.class public Lcom/scaleasw/powercalc/Complex;
.super Ljava/lang/Object;
.source "Complex.java"

# interfaces
.implements Landroid/os/Parcelable;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/scaleasw/powercalc/Complex$Format;
    }
.end annotation


# instance fields
.field public format:Lcom/scaleasw/powercalc/Complex$Format;

.field public im:D

.field public radix:J

.field public re:D


# direct methods
.method constructor <init>(DD)V
    .locals 1
    .param p1, "re"    # D
    .param p3, "im"    # D

    .prologue
    .line 25
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 26
    iput-wide p1, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 27
    iput-wide p3, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 28
    sget-object v0, Lcom/scaleasw/powercalc/Complex$Format;->DEFAULT:Lcom/scaleasw/powercalc/Complex$Format;

    iput-object v0, p0, Lcom/scaleasw/powercalc/Complex;->format:Lcom/scaleasw/powercalc/Complex$Format;

    .line 29
    return-void
.end method

.method constructor <init>(J)V
    .locals 1
    .param p1, "radix"    # J

    .prologue
    .line 32
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 33
    iput-wide p1, p0, Lcom/scaleasw/powercalc/Complex;->radix:J

    .line 34
    sget-object v0, Lcom/scaleasw/powercalc/Complex$Format;->DEFAULT:Lcom/scaleasw/powercalc/Complex$Format;

    iput-object v0, p0, Lcom/scaleasw/powercalc/Complex;->format:Lcom/scaleasw/powercalc/Complex$Format;

    .line 35
    return-void
.end method

.method constructor <init>(Lcom/scaleasw/powercalc/Complex;)V
    .locals 2
    .param p1, "complex"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    .line 17
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 18
    iget-wide v0, p1, Lcom/scaleasw/powercalc/Complex;->re:D

    iput-wide v0, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 19
    iget-wide v0, p1, Lcom/scaleasw/powercalc/Complex;->im:D

    iput-wide v0, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 20
    iget-wide v0, p1, Lcom/scaleasw/powercalc/Complex;->radix:J

    iput-wide v0, p0, Lcom/scaleasw/powercalc/Complex;->radix:J

    .line 21
    sget-object v0, Lcom/scaleasw/powercalc/Complex$Format;->DEFAULT:Lcom/scaleasw/powercalc/Complex$Format;

    iput-object v0, p0, Lcom/scaleasw/powercalc/Complex;->format:Lcom/scaleasw/powercalc/Complex$Format;

    .line 22
    return-void
.end method

.method public static acos(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 10
    .param p0, "arg"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const-wide/16 v8, 0x0

    .line 255
    new-instance v0, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v0, v8, v9, v8, v9}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 256
    .local v0, "result":Lcom/scaleasw/powercalc/Complex;
    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    cmpl-double v4, v4, v8

    if-nez v4, :cond_0

    .line 257
    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v4, v5}, Lcom/scaleasw/powercalc/Complex;->acosReal(D)Ljava/lang/Double;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    iput-wide v4, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 274
    .end local v0    # "result":Lcom/scaleasw/powercalc/Complex;
    :goto_0
    return-object v0

    .line 260
    .restart local v0    # "result":Lcom/scaleasw/powercalc/Complex;
    :cond_0
    new-instance v1, Lcom/scaleasw/powercalc/Complex;

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    neg-double v4, v4

    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-direct {v1, v4, v5, v6, v7}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 261
    .local v1, "temp1":Lcom/scaleasw/powercalc/Complex;
    new-instance v2, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v2, p0}, Lcom/scaleasw/powercalc/Complex;-><init>(Lcom/scaleasw/powercalc/Complex;)V

    .line 262
    .local v2, "temp2":Lcom/scaleasw/powercalc/Complex;
    new-instance v3, Lcom/scaleasw/powercalc/Complex;

    const-wide/high16 v4, 0x3ff0000000000000L    # 1.0

    invoke-direct {v3, v4, v5, v8, v9}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 263
    .local v3, "temp3":Lcom/scaleasw/powercalc/Complex;
    invoke-static {v2, v2}, Lcom/scaleasw/powercalc/Complex;->multiply(Lcom/scaleasw/powercalc/Complex;Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v2

    .line 264
    iget-wide v4, v3, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v6, v2, Lcom/scaleasw/powercalc/Complex;->re:D

    sub-double/2addr v4, v6

    iput-wide v4, v3, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 265
    iget-wide v4, v3, Lcom/scaleasw/powercalc/Complex;->im:D

    iget-wide v6, v2, Lcom/scaleasw/powercalc/Complex;->im:D

    sub-double/2addr v4, v6

    iput-wide v4, v3, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 266
    invoke-static {v3}, Lcom/scaleasw/powercalc/Complex;->squareRoot(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v3

    .line 267
    iget-wide v4, v3, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v6, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    add-double/2addr v4, v6

    iput-wide v4, v3, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 268
    iget-wide v4, v3, Lcom/scaleasw/powercalc/Complex;->im:D

    iget-wide v6, v1, Lcom/scaleasw/powercalc/Complex;->im:D

    add-double/2addr v4, v6

    iput-wide v4, v3, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 269
    invoke-static {v3}, Lcom/scaleasw/powercalc/Complex;->ln(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v2

    .line 270
    if-nez v2, :cond_1

    const/4 v0, 0x0

    goto :goto_0

    .line 271
    :cond_1
    iget-wide v4, v2, Lcom/scaleasw/powercalc/Complex;->im:D

    neg-double v4, v4

    const-wide v6, 0x3ff921fb54442d18L    # 1.5707963267948966

    add-double/2addr v4, v6

    iput-wide v4, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 272
    iget-wide v4, v2, Lcom/scaleasw/powercalc/Complex;->re:D

    iput-wide v4, v0, Lcom/scaleasw/powercalc/Complex;->im:D

    goto :goto_0
.end method

.method public static acosReal(D)Ljava/lang/Double;
    .locals 2
    .param p0, "arg"    # D

    .prologue
    .line 249
    invoke-static {p0, p1}, Ljava/lang/Math;->acos(D)D

    move-result-wide v0

    invoke-static {v0, v1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v0

    return-object v0
.end method

.method public static acosh(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 10
    .param p0, "arg"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const-wide/high16 v8, 0x3ff0000000000000L    # 1.0

    const-wide/16 v6, 0x0

    .line 402
    new-instance v0, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v0, v6, v7, v6, v7}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 403
    .local v0, "result":Lcom/scaleasw/powercalc/Complex;
    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    cmpl-double v3, v4, v6

    if-nez v3, :cond_0

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    cmpl-double v3, v4, v8

    if-ltz v3, :cond_0

    .line 404
    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v4, v5}, Lcom/scaleasw/powercalc/Complex;->acoshReal(D)Ljava/lang/Double;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    iput-wide v4, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 416
    :goto_0
    return-object v0

    .line 407
    :cond_0
    new-instance v1, Lcom/scaleasw/powercalc/Complex;

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    add-double/2addr v4, v8

    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    invoke-direct {v1, v4, v5, v6, v7}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 408
    .local v1, "temp1":Lcom/scaleasw/powercalc/Complex;
    new-instance v2, Lcom/scaleasw/powercalc/Complex;

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    sub-double/2addr v4, v8

    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    invoke-direct {v2, v4, v5, v6, v7}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 409
    .local v2, "temp2":Lcom/scaleasw/powercalc/Complex;
    invoke-static {v1}, Lcom/scaleasw/powercalc/Complex;->squareRoot(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v1

    .line 410
    invoke-static {v2}, Lcom/scaleasw/powercalc/Complex;->squareRoot(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v2

    .line 411
    invoke-static {v1, v2}, Lcom/scaleasw/powercalc/Complex;->multiply(Lcom/scaleasw/powercalc/Complex;Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v1

    .line 412
    iget-wide v4, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    add-double/2addr v4, v6

    iput-wide v4, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 413
    iget-wide v4, v1, Lcom/scaleasw/powercalc/Complex;->im:D

    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    add-double/2addr v4, v6

    iput-wide v4, v1, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 414
    invoke-static {v1}, Lcom/scaleasw/powercalc/Complex;->ln(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v0

    goto :goto_0
.end method

.method public static acoshReal(D)Ljava/lang/Double;
    .locals 6
    .param p0, "arg"    # D

    .prologue
    const-wide/high16 v4, 0x3ff0000000000000L    # 1.0

    .line 394
    add-double v2, p0, v4

    invoke-static {v2, v3}, Ljava/lang/Math;->sqrt(D)D

    move-result-wide v2

    sub-double v4, p0, v4

    invoke-static {v4, v5}, Ljava/lang/Math;->sqrt(D)D

    move-result-wide v4

    mul-double/2addr v2, v4

    add-double v0, p0, v2

    .line 395
    .local v0, "temp":D
    const-wide/16 v2, 0x0

    cmpg-double v2, v0, v2

    if-gtz v2, :cond_0

    const/4 v2, 0x0

    .line 396
    :goto_0
    return-object v2

    :cond_0
    invoke-static {v0, v1}, Ljava/lang/Math;->log(D)D

    move-result-wide v2

    invoke-static {v2, v3}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v2

    goto :goto_0
.end method

.method public static asin(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 10
    .param p0, "arg"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const-wide/16 v8, 0x0

    .line 202
    new-instance v0, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v0, v8, v9, v8, v9}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 203
    .local v0, "result":Lcom/scaleasw/powercalc/Complex;
    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    cmpl-double v4, v4, v8

    if-nez v4, :cond_0

    .line 204
    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v4, v5}, Lcom/scaleasw/powercalc/Complex;->asinReal(D)Ljava/lang/Double;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    iput-wide v4, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 221
    .end local v0    # "result":Lcom/scaleasw/powercalc/Complex;
    :goto_0
    return-object v0

    .line 207
    .restart local v0    # "result":Lcom/scaleasw/powercalc/Complex;
    :cond_0
    new-instance v1, Lcom/scaleasw/powercalc/Complex;

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    neg-double v4, v4

    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-direct {v1, v4, v5, v6, v7}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 208
    .local v1, "temp1":Lcom/scaleasw/powercalc/Complex;
    new-instance v2, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v2, p0}, Lcom/scaleasw/powercalc/Complex;-><init>(Lcom/scaleasw/powercalc/Complex;)V

    .line 209
    .local v2, "temp2":Lcom/scaleasw/powercalc/Complex;
    new-instance v3, Lcom/scaleasw/powercalc/Complex;

    const-wide/high16 v4, 0x3ff0000000000000L    # 1.0

    invoke-direct {v3, v4, v5, v8, v9}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 210
    .local v3, "temp3":Lcom/scaleasw/powercalc/Complex;
    invoke-static {v2, v2}, Lcom/scaleasw/powercalc/Complex;->multiply(Lcom/scaleasw/powercalc/Complex;Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v2

    .line 211
    iget-wide v4, v3, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v6, v2, Lcom/scaleasw/powercalc/Complex;->re:D

    sub-double/2addr v4, v6

    iput-wide v4, v3, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 212
    iget-wide v4, v3, Lcom/scaleasw/powercalc/Complex;->im:D

    iget-wide v6, v2, Lcom/scaleasw/powercalc/Complex;->im:D

    sub-double/2addr v4, v6

    iput-wide v4, v3, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 213
    invoke-static {v3}, Lcom/scaleasw/powercalc/Complex;->squareRoot(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v3

    .line 214
    iget-wide v4, v3, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v6, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    add-double/2addr v4, v6

    iput-wide v4, v3, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 215
    iget-wide v4, v3, Lcom/scaleasw/powercalc/Complex;->im:D

    iget-wide v6, v1, Lcom/scaleasw/powercalc/Complex;->im:D

    add-double/2addr v4, v6

    iput-wide v4, v3, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 216
    invoke-static {v3}, Lcom/scaleasw/powercalc/Complex;->ln(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v2

    .line 217
    if-nez v2, :cond_1

    const/4 v0, 0x0

    goto :goto_0

    .line 218
    :cond_1
    iget-wide v4, v2, Lcom/scaleasw/powercalc/Complex;->im:D

    iput-wide v4, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 219
    iget-wide v4, v2, Lcom/scaleasw/powercalc/Complex;->re:D

    neg-double v4, v4

    iput-wide v4, v0, Lcom/scaleasw/powercalc/Complex;->im:D

    goto :goto_0
.end method

.method public static asinReal(D)Ljava/lang/Double;
    .locals 2
    .param p0, "arg"    # D

    .prologue
    .line 196
    invoke-static {p0, p1}, Ljava/lang/Math;->asin(D)D

    move-result-wide v0

    invoke-static {v0, v1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v0

    return-object v0
.end method

.method public static asinh(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 6
    .param p0, "arg"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const-wide/16 v4, 0x0

    .line 357
    new-instance v0, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v0, v4, v5, v4, v5}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 358
    .local v0, "result":Lcom/scaleasw/powercalc/Complex;
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    cmpl-double v2, v2, v4

    if-nez v2, :cond_0

    .line 359
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v2, v3}, Lcom/scaleasw/powercalc/Complex;->asinhReal(D)Ljava/lang/Double;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 368
    .end local v0    # "result":Lcom/scaleasw/powercalc/Complex;
    :goto_0
    return-object v0

    .line 362
    .restart local v0    # "result":Lcom/scaleasw/powercalc/Complex;
    :cond_0
    new-instance v1, Lcom/scaleasw/powercalc/Complex;

    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    neg-double v4, v4

    invoke-direct {v1, v2, v3, v4, v5}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 363
    .local v1, "temp1":Lcom/scaleasw/powercalc/Complex;
    invoke-static {v1}, Lcom/scaleasw/powercalc/Complex;->asin(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v1

    .line 364
    if-nez v1, :cond_1

    const/4 v0, 0x0

    goto :goto_0

    .line 365
    :cond_1
    iget-wide v2, v1, Lcom/scaleasw/powercalc/Complex;->im:D

    neg-double v2, v2

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 366
    iget-wide v2, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->im:D

    goto :goto_0
.end method

.method public static asinhReal(D)Ljava/lang/Double;
    .locals 6
    .param p0, "arg"    # D

    .prologue
    .line 349
    mul-double v2, p0, p0

    const-wide/high16 v4, 0x3ff0000000000000L    # 1.0

    add-double/2addr v2, v4

    invoke-static {v2, v3}, Ljava/lang/Math;->sqrt(D)D

    move-result-wide v2

    add-double v0, p0, v2

    .line 350
    .local v0, "temp":D
    const-wide/16 v2, 0x0

    cmpg-double v2, v0, v2

    if-gtz v2, :cond_0

    const/4 v2, 0x0

    .line 351
    :goto_0
    return-object v2

    :cond_0
    invoke-static {v0, v1}, Ljava/lang/Math;->log(D)D

    move-result-wide v2

    invoke-static {v2, v3}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v2

    goto :goto_0
.end method

.method public static atan(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 6
    .param p0, "arg"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const-wide/16 v4, 0x0

    .line 312
    new-instance v0, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v0, v4, v5, v4, v5}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 313
    .local v0, "result":Lcom/scaleasw/powercalc/Complex;
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    cmpl-double v2, v2, v4

    if-nez v2, :cond_0

    .line 314
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v2, v3}, Lcom/scaleasw/powercalc/Complex;->atanReal(D)Ljava/lang/Double;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 323
    .end local v0    # "result":Lcom/scaleasw/powercalc/Complex;
    :goto_0
    return-object v0

    .line 317
    .restart local v0    # "result":Lcom/scaleasw/powercalc/Complex;
    :cond_0
    new-instance v1, Lcom/scaleasw/powercalc/Complex;

    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    neg-double v2, v2

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-direct {v1, v2, v3, v4, v5}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 318
    .local v1, "temp":Lcom/scaleasw/powercalc/Complex;
    invoke-static {v1}, Lcom/scaleasw/powercalc/Complex;->atanh(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v1

    .line 319
    if-nez v1, :cond_1

    const/4 v0, 0x0

    goto :goto_0

    .line 320
    :cond_1
    iget-wide v2, v1, Lcom/scaleasw/powercalc/Complex;->im:D

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 321
    iget-wide v2, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    neg-double v2, v2

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->im:D

    goto :goto_0
.end method

.method public static atanReal(D)Ljava/lang/Double;
    .locals 2
    .param p0, "arg"    # D

    .prologue
    .line 306
    invoke-static {p0, p1}, Ljava/lang/Math;->atan(D)D

    move-result-wide v0

    invoke-static {v0, v1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v0

    return-object v0
.end method

.method public static atanh(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 14
    .param p0, "arg"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const/4 v4, 0x0

    const-wide/high16 v12, 0x3ff0000000000000L    # 1.0

    const-wide/high16 v10, 0x3fe0000000000000L    # 0.5

    const-wide/16 v8, 0x0

    .line 455
    new-instance v0, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v0, v8, v9, v8, v9}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 456
    .local v0, "result":Lcom/scaleasw/powercalc/Complex;
    invoke-static {v8, v9}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v1

    .line 457
    .local v1, "result_re":Ljava/lang/Double;
    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    cmpl-double v5, v6, v8

    if-nez v5, :cond_0

    .line 458
    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v6, v7}, Lcom/scaleasw/powercalc/Complex;->atanhReal(D)Ljava/lang/Double;

    move-result-object v1

    .line 460
    :cond_0
    if-eqz v1, :cond_1

    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    cmpl-double v5, v6, v8

    if-eqz v5, :cond_2

    .line 461
    :cond_1
    new-instance v2, Lcom/scaleasw/powercalc/Complex;

    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    add-double/2addr v6, v12

    iget-wide v8, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    invoke-direct {v2, v6, v7, v8, v9}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 462
    .local v2, "temp1":Lcom/scaleasw/powercalc/Complex;
    new-instance v3, Lcom/scaleasw/powercalc/Complex;

    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    sub-double v6, v12, v6

    iget-wide v8, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    invoke-direct {v3, v6, v7, v8, v9}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 463
    .local v3, "temp2":Lcom/scaleasw/powercalc/Complex;
    invoke-static {v2}, Lcom/scaleasw/powercalc/Complex;->ln(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v2

    .line 464
    invoke-static {v3}, Lcom/scaleasw/powercalc/Complex;->ln(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v3

    .line 465
    if-nez v2, :cond_3

    move-object v0, v4

    .line 472
    .end local v0    # "result":Lcom/scaleasw/powercalc/Complex;
    .end local v2    # "temp1":Lcom/scaleasw/powercalc/Complex;
    .end local v3    # "temp2":Lcom/scaleasw/powercalc/Complex;
    :cond_2
    :goto_0
    return-object v0

    .line 466
    .restart local v0    # "result":Lcom/scaleasw/powercalc/Complex;
    .restart local v2    # "temp1":Lcom/scaleasw/powercalc/Complex;
    .restart local v3    # "temp2":Lcom/scaleasw/powercalc/Complex;
    :cond_3
    if-nez v3, :cond_4

    move-object v0, v4

    goto :goto_0

    .line 467
    :cond_4
    iget-wide v4, v2, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v6, v3, Lcom/scaleasw/powercalc/Complex;->re:D

    sub-double/2addr v4, v6

    iput-wide v4, v2, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 468
    iget-wide v4, v2, Lcom/scaleasw/powercalc/Complex;->im:D

    iget-wide v6, v3, Lcom/scaleasw/powercalc/Complex;->im:D

    sub-double/2addr v4, v6

    iput-wide v4, v2, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 469
    iget-wide v4, v2, Lcom/scaleasw/powercalc/Complex;->re:D

    mul-double/2addr v4, v10

    iput-wide v4, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 470
    iget-wide v4, v2, Lcom/scaleasw/powercalc/Complex;->re:D

    mul-double/2addr v4, v10

    iput-wide v4, v0, Lcom/scaleasw/powercalc/Complex;->im:D

    goto :goto_0
.end method

.method public static atanhReal(D)Ljava/lang/Double;
    .locals 6
    .param p0, "arg"    # D

    .prologue
    const-wide/high16 v4, 0x3ff0000000000000L    # 1.0

    .line 448
    cmpl-double v0, p0, v4

    if-ltz v0, :cond_0

    const/4 v0, 0x0

    .line 449
    :goto_0
    return-object v0

    :cond_0
    const-wide/high16 v0, 0x3fe0000000000000L    # 0.5

    add-double v2, v4, p0

    sub-double/2addr v4, p0

    div-double/2addr v2, v4

    invoke-static {v2, v3}, Ljava/lang/Math;->log(D)D

    move-result-wide v2

    mul-double/2addr v0, v2

    invoke-static {v0, v1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v0

    goto :goto_0
.end method

.method public static combinations(Lcom/scaleasw/powercalc/Complex;Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 12
    .param p0, "arg1"    # Lcom/scaleasw/powercalc/Complex;
    .param p1, "arg2"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const-wide/16 v10, 0x0

    .line 664
    invoke-static {p0}, Lcom/scaleasw/powercalc/Complex;->factorial(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v1

    .line 665
    .local v1, "v1":Lcom/scaleasw/powercalc/Complex;
    invoke-static {p1}, Lcom/scaleasw/powercalc/Complex;->factorial(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v2

    .line 666
    .local v2, "v2":Lcom/scaleasw/powercalc/Complex;
    new-instance v4, Lcom/scaleasw/powercalc/Complex;

    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v8, p1, Lcom/scaleasw/powercalc/Complex;->re:D

    sub-double/2addr v6, v8

    invoke-direct {v4, v6, v7, v10, v11}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    invoke-static {v4}, Lcom/scaleasw/powercalc/Complex;->factorial(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v3

    .line 667
    .local v3, "v3":Lcom/scaleasw/powercalc/Complex;
    if-eqz v1, :cond_0

    if-eqz v2, :cond_0

    if-nez v3, :cond_1

    :cond_0
    const/4 v0, 0x0

    .line 669
    :goto_0
    return-object v0

    .line 668
    :cond_1
    new-instance v0, Lcom/scaleasw/powercalc/Complex;

    iget-wide v4, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v6, v2, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v8, v3, Lcom/scaleasw/powercalc/Complex;->re:D

    mul-double/2addr v6, v8

    div-double/2addr v4, v6

    invoke-direct {v0, v4, v5, v10, v11}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 669
    .local v0, "result":Lcom/scaleasw/powercalc/Complex;
    goto :goto_0
.end method

.method public static cos(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 6
    .param p0, "arg"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const-wide/16 v4, 0x0

    .line 235
    new-instance v0, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v0, v4, v5, v4, v5}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 236
    .local v0, "result":Lcom/scaleasw/powercalc/Complex;
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    cmpl-double v1, v2, v4

    if-nez v1, :cond_0

    .line 237
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v2, v3}, Lcom/scaleasw/powercalc/Complex;->cosReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 243
    :goto_0
    return-object v0

    .line 240
    :cond_0
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v2, v3}, Lcom/scaleasw/powercalc/Complex;->cosReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    invoke-static {v4, v5}, Lcom/scaleasw/powercalc/Complex;->coshReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    mul-double/2addr v2, v4

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 241
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v2, v3}, Lcom/scaleasw/powercalc/Complex;->sinReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    neg-double v2, v2

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    invoke-static {v4, v5}, Lcom/scaleasw/powercalc/Complex;->sinhReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    mul-double/2addr v2, v4

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->im:D

    goto :goto_0
.end method

.method public static cosReal(D)Ljava/lang/Double;
    .locals 6
    .param p0, "arg"    # D

    .prologue
    .line 227
    invoke-static {p0, p1}, Ljava/lang/Math;->cos(D)D

    move-result-wide v0

    .line 228
    .local v0, "result":D
    invoke-static {v0, v1}, Ljava/lang/Math;->abs(D)D

    move-result-wide v2

    const-wide v4, 0x3cb59e05f1e2674dL    # 3.0E-16

    cmpg-double v2, v2, v4

    if-gtz v2, :cond_0

    const-wide/16 v0, 0x0

    .line 229
    :cond_0
    invoke-static {v0, v1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v2

    return-object v2
.end method

.method public static cosh(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 6
    .param p0, "arg"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const-wide/16 v4, 0x0

    .line 380
    new-instance v0, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v0, v4, v5, v4, v5}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 381
    .local v0, "result":Lcom/scaleasw/powercalc/Complex;
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    cmpl-double v1, v2, v4

    if-nez v1, :cond_0

    .line 382
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v2, v3}, Lcom/scaleasw/powercalc/Complex;->coshReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 388
    :goto_0
    return-object v0

    .line 385
    :cond_0
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v2, v3}, Lcom/scaleasw/powercalc/Complex;->coshReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    invoke-static {v4, v5}, Lcom/scaleasw/powercalc/Complex;->cosReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    mul-double/2addr v2, v4

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 386
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v2, v3}, Lcom/scaleasw/powercalc/Complex;->sinhReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    invoke-static {v4, v5}, Lcom/scaleasw/powercalc/Complex;->sinReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    mul-double/2addr v2, v4

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->im:D

    goto :goto_0
.end method

.method public static coshReal(D)Ljava/lang/Double;
    .locals 2
    .param p0, "arg"    # D

    .prologue
    .line 374
    invoke-static {p0, p1}, Ljava/lang/Math;->cosh(D)D

    move-result-wide v0

    invoke-static {v0, v1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v0

    return-object v0
.end method

.method public static divide(Lcom/scaleasw/powercalc/Complex;Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 12
    .param p0, "arg1"    # Lcom/scaleasw/powercalc/Complex;
    .param p1, "arg2"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const-wide/16 v10, 0x0

    .line 163
    iget-wide v4, p1, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v6, p1, Lcom/scaleasw/powercalc/Complex;->re:D

    mul-double/2addr v4, v6

    iget-wide v6, p1, Lcom/scaleasw/powercalc/Complex;->im:D

    iget-wide v8, p1, Lcom/scaleasw/powercalc/Complex;->im:D

    mul-double/2addr v6, v8

    add-double v2, v4, v6

    .line 164
    .local v2, "size":D
    cmpl-double v1, v2, v10

    if-nez v1, :cond_0

    const/4 v0, 0x0

    .line 168
    :goto_0
    return-object v0

    .line 165
    :cond_0
    new-instance v0, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v0, v10, v11, v10, v11}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 166
    .local v0, "result":Lcom/scaleasw/powercalc/Complex;
    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v6, p1, Lcom/scaleasw/powercalc/Complex;->re:D

    mul-double/2addr v4, v6

    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    iget-wide v8, p1, Lcom/scaleasw/powercalc/Complex;->im:D

    mul-double/2addr v6, v8

    add-double/2addr v4, v6

    div-double/2addr v4, v2

    iput-wide v4, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 167
    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    iget-wide v6, p1, Lcom/scaleasw/powercalc/Complex;->re:D

    mul-double/2addr v4, v6

    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v8, p1, Lcom/scaleasw/powercalc/Complex;->im:D

    mul-double/2addr v6, v8

    sub-double/2addr v4, v6

    div-double/2addr v4, v2

    iput-wide v4, v0, Lcom/scaleasw/powercalc/Complex;->im:D

    goto :goto_0
.end method

.method public static factorial(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 6
    .param p0, "arg"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const-wide/16 v4, 0x0

    .line 637
    new-instance v1, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v1, v4, v5, v4, v5}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 638
    .local v1, "result":Lcom/scaleasw/powercalc/Complex;
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    cmpl-double v2, v2, v4

    if-eqz v2, :cond_1

    const/4 v1, 0x0

    .line 648
    :cond_0
    :goto_0
    return-object v1

    .line 639
    :cond_1
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    cmpg-double v2, v2, v4

    if-gez v2, :cond_2

    const/4 v1, 0x0

    goto :goto_0

    .line 640
    :cond_2
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    const-wide v4, 0x4056800000000000L    # 90.0

    cmpl-double v2, v2, v4

    if-ltz v2, :cond_3

    const/4 v1, 0x0

    goto :goto_0

    .line 643
    :cond_3
    const-wide/high16 v2, 0x3ff0000000000000L    # 1.0

    iput-wide v2, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 644
    const/4 v0, 0x1

    .local v0, "i":I
    :goto_1
    int-to-double v2, v0

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v4, v5}, Ljava/lang/Math;->floor(D)D

    move-result-wide v4

    cmpg-double v2, v2, v4

    if-gtz v2, :cond_0

    .line 645
    iget-wide v2, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    int-to-double v4, v0

    mul-double/2addr v2, v4

    iput-wide v2, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 644
    add-int/lit8 v0, v0, 0x1

    goto :goto_1
.end method

.method public static ln(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 10
    .param p0, "arg"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const/4 v4, 0x0

    const-wide/16 v8, 0x0

    .line 505
    new-instance v1, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v1, v8, v9, v8, v9}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 506
    .local v1, "result":Lcom/scaleasw/powercalc/Complex;
    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    cmpl-double v5, v6, v8

    if-nez v5, :cond_0

    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    cmpl-double v5, v6, v8

    if-lez v5, :cond_0

    .line 507
    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v4, v5}, Lcom/scaleasw/powercalc/Complex;->lnReal(D)Ljava/lang/Double;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    iput-wide v4, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 517
    .end local v1    # "result":Lcom/scaleasw/powercalc/Complex;
    :goto_0
    return-object v1

    .line 510
    .restart local v1    # "result":Lcom/scaleasw/powercalc/Complex;
    :cond_0
    invoke-virtual {p0}, Lcom/scaleasw/powercalc/Complex;->magnitude()Ljava/lang/Double;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    .line 511
    .local v2, "magnitude":D
    cmpg-double v5, v2, v8

    if-gtz v5, :cond_1

    move-object v1, v4

    goto :goto_0

    .line 512
    :cond_1
    invoke-virtual {p0}, Lcom/scaleasw/powercalc/Complex;->argument()Ljava/lang/Double;

    move-result-object v0

    .line 513
    .local v0, "argument":Ljava/lang/Double;
    if-nez v0, :cond_2

    move-object v1, v4

    goto :goto_0

    .line 514
    :cond_2
    invoke-static {v2, v3}, Ljava/lang/Math;->log(D)D

    move-result-wide v4

    iput-wide v4, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 515
    invoke-virtual {v0}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    iput-wide v4, v1, Lcom/scaleasw/powercalc/Complex;->im:D

    goto :goto_0
.end method

.method public static lnReal(D)Ljava/lang/Double;
    .locals 2
    .param p0, "arg"    # D

    .prologue
    .line 498
    const-wide/16 v0, 0x0

    cmpg-double v0, p0, v0

    if-gtz v0, :cond_0

    const/4 v0, 0x0

    .line 499
    :goto_0
    return-object v0

    :cond_0
    invoke-static {p0, p1}, Ljava/lang/Math;->log(D)D

    move-result-wide v0

    invoke-static {v0, v1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v0

    goto :goto_0
.end method

.method public static log(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 10
    .param p0, "arg"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const/4 v4, 0x0

    const-wide/16 v8, 0x0

    .line 530
    new-instance v1, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v1, v8, v9, v8, v9}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 531
    .local v1, "result":Lcom/scaleasw/powercalc/Complex;
    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    cmpl-double v5, v6, v8

    if-nez v5, :cond_0

    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    cmpl-double v5, v6, v8

    if-lez v5, :cond_0

    .line 532
    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v4, v5}, Lcom/scaleasw/powercalc/Complex;->logReal(D)Ljava/lang/Double;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    iput-wide v4, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 542
    .end local v1    # "result":Lcom/scaleasw/powercalc/Complex;
    :goto_0
    return-object v1

    .line 535
    .restart local v1    # "result":Lcom/scaleasw/powercalc/Complex;
    :cond_0
    invoke-virtual {p0}, Lcom/scaleasw/powercalc/Complex;->magnitude()Ljava/lang/Double;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    .line 536
    .local v2, "magnitude":D
    cmpg-double v5, v2, v8

    if-gtz v5, :cond_1

    move-object v1, v4

    goto :goto_0

    .line 537
    :cond_1
    invoke-virtual {p0}, Lcom/scaleasw/powercalc/Complex;->argument()Ljava/lang/Double;

    move-result-object v0

    .line 538
    .local v0, "argument":Ljava/lang/Double;
    if-nez v0, :cond_2

    move-object v1, v4

    goto :goto_0

    .line 539
    :cond_2
    invoke-static {v2, v3}, Ljava/lang/Math;->log10(D)D

    move-result-wide v4

    iput-wide v4, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 540
    invoke-virtual {v0}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    const-wide/high16 v6, 0x4024000000000000L    # 10.0

    invoke-static {v6, v7}, Ljava/lang/Math;->log(D)D

    move-result-wide v6

    div-double/2addr v4, v6

    iput-wide v4, v1, Lcom/scaleasw/powercalc/Complex;->im:D

    goto :goto_0
.end method

.method public static logReal(D)Ljava/lang/Double;
    .locals 2
    .param p0, "arg"    # D

    .prologue
    .line 523
    const-wide/16 v0, 0x0

    cmpg-double v0, p0, v0

    if-gtz v0, :cond_0

    const/4 v0, 0x0

    .line 524
    :goto_0
    return-object v0

    :cond_0
    invoke-static {p0, p1}, Ljava/lang/Math;->log10(D)D

    move-result-wide v0

    invoke-static {v0, v1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v0

    goto :goto_0
.end method

.method public static multiply(Lcom/scaleasw/powercalc/Complex;Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 8
    .param p0, "arg1"    # Lcom/scaleasw/powercalc/Complex;
    .param p1, "arg2"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const-wide/16 v2, 0x0

    .line 154
    new-instance v0, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v0, v2, v3, v2, v3}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 155
    .local v0, "result":Lcom/scaleasw/powercalc/Complex;
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v4, p1, Lcom/scaleasw/powercalc/Complex;->re:D

    mul-double/2addr v2, v4

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    iget-wide v6, p1, Lcom/scaleasw/powercalc/Complex;->im:D

    mul-double/2addr v4, v6

    sub-double/2addr v2, v4

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 156
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    iget-wide v4, p1, Lcom/scaleasw/powercalc/Complex;->re:D

    mul-double/2addr v2, v4

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v6, p1, Lcom/scaleasw/powercalc/Complex;->im:D

    mul-double/2addr v4, v6

    add-double/2addr v2, v4

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 157
    return-object v0
.end method

.method public static permutations(Lcom/scaleasw/powercalc/Complex;Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 10
    .param p0, "arg1"    # Lcom/scaleasw/powercalc/Complex;
    .param p1, "arg2"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const-wide/16 v8, 0x0

    .line 654
    invoke-static {p0}, Lcom/scaleasw/powercalc/Complex;->factorial(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v1

    .line 655
    .local v1, "v1":Lcom/scaleasw/powercalc/Complex;
    new-instance v3, Lcom/scaleasw/powercalc/Complex;

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v6, p1, Lcom/scaleasw/powercalc/Complex;->re:D

    sub-double/2addr v4, v6

    invoke-direct {v3, v4, v5, v8, v9}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    invoke-static {v3}, Lcom/scaleasw/powercalc/Complex;->factorial(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v2

    .line 656
    .local v2, "v2":Lcom/scaleasw/powercalc/Complex;
    if-eqz v1, :cond_0

    if-nez v2, :cond_1

    :cond_0
    const/4 v0, 0x0

    .line 658
    :goto_0
    return-object v0

    .line 657
    :cond_1
    new-instance v0, Lcom/scaleasw/powercalc/Complex;

    iget-wide v4, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v6, v2, Lcom/scaleasw/powercalc/Complex;->re:D

    div-double/2addr v4, v6

    invoke-direct {v0, v4, v5, v8, v9}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 658
    .local v0, "result":Lcom/scaleasw/powercalc/Complex;
    goto :goto_0
.end method

.method public static powerComplexComplex(Lcom/scaleasw/powercalc/Complex;Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 14
    .param p0, "arg1"    # Lcom/scaleasw/powercalc/Complex;
    .param p1, "arg2"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    .line 579
    new-instance v7, Lcom/scaleasw/powercalc/Complex;

    const-wide/16 v8, 0x0

    const-wide/16 v10, 0x0

    invoke-direct {v7, v8, v9, v10, v11}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 580
    .local v7, "result":Lcom/scaleasw/powercalc/Complex;
    iget-wide v8, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    const-wide/16 v10, 0x0

    cmpl-double v8, v8, v10

    if-nez v8, :cond_1

    .line 581
    iget-wide v8, p1, Lcom/scaleasw/powercalc/Complex;->im:D

    const-wide/16 v10, 0x0

    cmpl-double v8, v8, v10

    if-nez v8, :cond_0

    iget-wide v8, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v10, p1, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v8, v9, v10, v11}, Lcom/scaleasw/powercalc/Complex;->powerRealReal(DD)D

    move-result-wide v8

    iput-wide v8, v7, Lcom/scaleasw/powercalc/Complex;->re:D

    :goto_0
    move-object v8, v7

    .line 603
    :goto_1
    return-object v8

    .line 582
    :cond_0
    iget-wide v8, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v8, v9, p1}, Lcom/scaleasw/powercalc/Complex;->powerRealComplex(DLcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v7

    goto :goto_0

    .line 585
    :cond_1
    iget-wide v8, p1, Lcom/scaleasw/powercalc/Complex;->im:D

    const-wide/16 v10, 0x0

    cmpl-double v8, v8, v10

    if-nez v8, :cond_2

    iget-wide v8, p1, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {p0, v8, v9}, Lcom/scaleasw/powercalc/Complex;->powerComplexReal(Lcom/scaleasw/powercalc/Complex;D)Lcom/scaleasw/powercalc/Complex;

    move-result-object v7

    goto :goto_0

    .line 587
    :cond_2
    iget-wide v8, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v10, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    mul-double/2addr v8, v10

    iget-wide v10, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    iget-wide v12, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    mul-double/2addr v10, v12

    add-double v2, v8, v10

    .line 588
    .local v2, "magSq":D
    new-instance v4, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v4, p1}, Lcom/scaleasw/powercalc/Complex;-><init>(Lcom/scaleasw/powercalc/Complex;)V

    .line 589
    .local v4, "pow1":Lcom/scaleasw/powercalc/Complex;
    iget-wide v8, v4, Lcom/scaleasw/powercalc/Complex;->re:D

    const-wide/high16 v10, 0x3fe0000000000000L    # 0.5

    mul-double/2addr v8, v10

    iput-wide v8, v4, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 590
    iget-wide v8, v4, Lcom/scaleasw/powercalc/Complex;->im:D

    const-wide/high16 v10, 0x3fe0000000000000L    # 0.5

    mul-double/2addr v8, v10

    iput-wide v8, v4, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 591
    invoke-static {v2, v3, v4}, Lcom/scaleasw/powercalc/Complex;->powerRealComplex(DLcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v5

    .line 592
    .local v5, "res1":Lcom/scaleasw/powercalc/Complex;
    if-nez v5, :cond_3

    const/4 v8, 0x0

    goto :goto_1

    .line 593
    :cond_3
    iget-wide v8, p1, Lcom/scaleasw/powercalc/Complex;->im:D

    neg-double v8, v8

    iput-wide v8, v4, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 594
    iget-wide v8, p1, Lcom/scaleasw/powercalc/Complex;->re:D

    iput-wide v8, v4, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 595
    invoke-virtual {p0}, Lcom/scaleasw/powercalc/Complex;->argument()Ljava/lang/Double;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v0

    .line 596
    .local v0, "argument":D
    iget-wide v8, v4, Lcom/scaleasw/powercalc/Complex;->re:D

    mul-double/2addr v8, v0

    iput-wide v8, v4, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 597
    iget-wide v8, v4, Lcom/scaleasw/powercalc/Complex;->im:D

    mul-double/2addr v8, v0

    iput-wide v8, v4, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 598
    invoke-static {v4}, Lcom/scaleasw/powercalc/Complex;->powerE(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v6

    .line 599
    .local v6, "res2":Lcom/scaleasw/powercalc/Complex;
    if-nez v6, :cond_4

    const/4 v8, 0x0

    goto :goto_1

    .line 600
    :cond_4
    invoke-static {v5, v6}, Lcom/scaleasw/powercalc/Complex;->multiply(Lcom/scaleasw/powercalc/Complex;Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v7

    goto :goto_0
.end method

.method public static powerComplexReal(Lcom/scaleasw/powercalc/Complex;D)Lcom/scaleasw/powercalc/Complex;
    .locals 11
    .param p0, "arg1"    # Lcom/scaleasw/powercalc/Complex;
    .param p1, "arg2"    # D

    .prologue
    const-wide/16 v6, 0x0

    .line 567
    invoke-virtual {p0}, Lcom/scaleasw/powercalc/Complex;->magnitude()Ljava/lang/Double;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    .line 568
    .local v2, "mag":D
    invoke-virtual {p0}, Lcom/scaleasw/powercalc/Complex;->argument()Ljava/lang/Double;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v0

    .line 570
    .local v0, "argument":D
    new-instance v4, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v4, v6, v7, v6, v7}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 571
    .local v4, "result":Lcom/scaleasw/powercalc/Complex;
    invoke-static {v2, v3, p1, p2}, Ljava/lang/Math;->pow(DD)D

    move-result-wide v6

    mul-double v8, p1, v0

    invoke-static {v8, v9}, Ljava/lang/Math;->cos(D)D

    move-result-wide v8

    mul-double/2addr v6, v8

    iput-wide v6, v4, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 572
    invoke-static {v2, v3, p1, p2}, Ljava/lang/Math;->pow(DD)D

    move-result-wide v6

    mul-double v8, p1, v0

    invoke-static {v8, v9}, Ljava/lang/Math;->sin(D)D

    move-result-wide v8

    mul-double/2addr v6, v8

    iput-wide v6, v4, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 573
    return-object v4
.end method

.method public static powerE(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 6
    .param p0, "arg"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const-wide/16 v4, 0x0

    .line 484
    new-instance v0, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v0, v4, v5, v4, v5}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 485
    .local v0, "result":Lcom/scaleasw/powercalc/Complex;
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    cmpl-double v1, v2, v4

    if-nez v1, :cond_0

    .line 486
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v2, v3}, Lcom/scaleasw/powercalc/Complex;->powerEReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 492
    :goto_0
    return-object v0

    .line 489
    :cond_0
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v2, v3}, Lcom/scaleasw/powercalc/Complex;->powerEReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    invoke-static {v4, v5}, Lcom/scaleasw/powercalc/Complex;->cosReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    mul-double/2addr v2, v4

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 490
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v2, v3}, Lcom/scaleasw/powercalc/Complex;->powerEReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    invoke-static {v4, v5}, Lcom/scaleasw/powercalc/Complex;->sinReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    mul-double/2addr v2, v4

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->im:D

    goto :goto_0
.end method

.method public static powerEReal(D)Ljava/lang/Double;
    .locals 4
    .param p0, "arg"    # D

    .prologue
    .line 478
    invoke-static {p0, p1}, Ljava/lang/Math;->expm1(D)D

    move-result-wide v0

    const-wide/high16 v2, 0x3ff0000000000000L    # 1.0

    add-double/2addr v0, v2

    invoke-static {v0, v1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v0

    return-object v0
.end method

.method public static powerRealComplex(DLcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 8
    .param p0, "arg1"    # D
    .param p2, "arg2"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const-wide/16 v4, 0x0

    .line 554
    invoke-static {p0, p1}, Ljava/lang/Math;->log(D)D

    move-result-wide v2

    invoke-static {v2, v3}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v0

    .line 555
    .local v0, "lna":Ljava/lang/Double;
    if-nez v0, :cond_0

    const/4 v1, 0x0

    .line 561
    :goto_0
    return-object v1

    .line 556
    :cond_0
    new-instance v1, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v1, v4, v5, v4, v5}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 557
    .local v1, "result":Lcom/scaleasw/powercalc/Complex;
    iget-wide v2, p2, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {p0, p1, v2, v3}, Lcom/scaleasw/powercalc/Complex;->powerRealReal(DD)D

    move-result-wide v2

    iput-wide v2, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 558
    iget-wide v2, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    iput-wide v2, v1, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 559
    iget-wide v2, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v4, p2, Lcom/scaleasw/powercalc/Complex;->im:D

    invoke-virtual {v0}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v6

    mul-double/2addr v4, v6

    invoke-static {v4, v5}, Ljava/lang/Math;->cos(D)D

    move-result-wide v4

    mul-double/2addr v2, v4

    iput-wide v2, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 560
    iget-wide v2, v1, Lcom/scaleasw/powercalc/Complex;->im:D

    iget-wide v4, p2, Lcom/scaleasw/powercalc/Complex;->im:D

    invoke-virtual {v0}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v6

    mul-double/2addr v4, v6

    invoke-static {v4, v5}, Ljava/lang/Math;->sin(D)D

    move-result-wide v4

    mul-double/2addr v2, v4

    iput-wide v2, v1, Lcom/scaleasw/powercalc/Complex;->im:D

    goto :goto_0
.end method

.method public static powerRealReal(DD)D
    .locals 2
    .param p0, "arg1"    # D
    .param p2, "arg2"    # D

    .prologue
    .line 548
    invoke-static {p0, p1, p2, p3}, Ljava/lang/Math;->pow(DD)D

    move-result-wide v0

    return-wide v0
.end method

.method public static sin(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 6
    .param p0, "arg"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const-wide/16 v4, 0x0

    .line 182
    new-instance v0, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v0, v4, v5, v4, v5}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 183
    .local v0, "result":Lcom/scaleasw/powercalc/Complex;
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    cmpl-double v1, v2, v4

    if-nez v1, :cond_0

    .line 184
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v2, v3}, Lcom/scaleasw/powercalc/Complex;->sinReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 190
    :goto_0
    return-object v0

    .line 187
    :cond_0
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v2, v3}, Lcom/scaleasw/powercalc/Complex;->sinReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    invoke-static {v4, v5}, Lcom/scaleasw/powercalc/Complex;->coshReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    mul-double/2addr v2, v4

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 188
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v2, v3}, Lcom/scaleasw/powercalc/Complex;->cosReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    invoke-static {v4, v5}, Lcom/scaleasw/powercalc/Complex;->sinhReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    mul-double/2addr v2, v4

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->im:D

    goto :goto_0
.end method

.method public static sinReal(D)Ljava/lang/Double;
    .locals 6
    .param p0, "arg"    # D

    .prologue
    .line 174
    invoke-static {p0, p1}, Ljava/lang/Math;->sin(D)D

    move-result-wide v0

    .line 175
    .local v0, "result":D
    invoke-static {v0, v1}, Ljava/lang/Math;->abs(D)D

    move-result-wide v2

    const-wide v4, 0x3cb59e05f1e2674dL    # 3.0E-16

    cmpg-double v2, v2, v4

    if-gtz v2, :cond_0

    const-wide/16 v0, 0x0

    .line 176
    :cond_0
    invoke-static {v0, v1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v2

    return-object v2
.end method

.method public static sinh(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 6
    .param p0, "arg"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const-wide/16 v4, 0x0

    .line 335
    new-instance v0, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v0, v4, v5, v4, v5}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 336
    .local v0, "result":Lcom/scaleasw/powercalc/Complex;
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    cmpl-double v1, v2, v4

    if-nez v1, :cond_0

    .line 337
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v2, v3}, Lcom/scaleasw/powercalc/Complex;->sinhReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 343
    :goto_0
    return-object v0

    .line 340
    :cond_0
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v2, v3}, Lcom/scaleasw/powercalc/Complex;->sinhReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    invoke-static {v4, v5}, Lcom/scaleasw/powercalc/Complex;->cosReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    mul-double/2addr v2, v4

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 341
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v2, v3}, Lcom/scaleasw/powercalc/Complex;->coshReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    invoke-static {v4, v5}, Lcom/scaleasw/powercalc/Complex;->sinReal(D)Ljava/lang/Double;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    mul-double/2addr v2, v4

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->im:D

    goto :goto_0
.end method

.method public static sinhReal(D)Ljava/lang/Double;
    .locals 2
    .param p0, "arg"    # D

    .prologue
    .line 329
    invoke-static {p0, p1}, Ljava/lang/Math;->sinh(D)D

    move-result-wide v0

    invoke-static {v0, v1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v0

    return-object v0
.end method

.method public static square(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 8
    .param p0, "arg"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const-wide/16 v2, 0x0

    .line 609
    new-instance v0, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v0, v2, v3, v2, v3}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 610
    .local v0, "result":Lcom/scaleasw/powercalc/Complex;
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    mul-double/2addr v2, v4

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    mul-double/2addr v4, v6

    sub-double/2addr v2, v4

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 611
    const-wide/high16 v2, 0x4000000000000000L    # 2.0

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    mul-double/2addr v2, v4

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    mul-double/2addr v2, v4

    iput-wide v2, v0, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 612
    return-object v0
.end method

.method public static squareRoot(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 10
    .param p0, "arg"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const-wide/high16 v8, 0x4000000000000000L    # 2.0

    const-wide/16 v6, 0x0

    .line 618
    new-instance v2, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v2, v6, v7, v6, v7}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 619
    .local v2, "result":Lcom/scaleasw/powercalc/Complex;
    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    cmpl-double v3, v4, v6

    if-nez v3, :cond_1

    .line 620
    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    cmpg-double v3, v4, v6

    if-gez v3, :cond_0

    .line 621
    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v4, v5}, Ljava/lang/Math;->abs(D)D

    move-result-wide v4

    invoke-static {v4, v5}, Ljava/lang/Math;->sqrt(D)D

    move-result-wide v4

    iput-wide v4, v2, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 622
    iput-wide v6, v2, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 631
    :goto_0
    return-object v2

    .line 624
    :cond_0
    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v4, v5}, Ljava/lang/Math;->sqrt(D)D

    move-result-wide v4

    iput-wide v4, v2, Lcom/scaleasw/powercalc/Complex;->re:D

    goto :goto_0

    .line 627
    :cond_1
    invoke-virtual {p0}, Lcom/scaleasw/powercalc/Complex;->magnitude()Ljava/lang/Double;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v0

    .line 628
    .local v0, "mag":D
    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    add-double/2addr v4, v0

    div-double/2addr v4, v8

    invoke-static {v4, v5}, Ljava/lang/Math;->sqrt(D)D

    move-result-wide v4

    iput-wide v4, v2, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 629
    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    invoke-static {v4, v5}, Ljava/lang/Math;->signum(D)D

    move-result-wide v4

    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    neg-double v6, v6

    add-double/2addr v6, v0

    div-double/2addr v6, v8

    invoke-static {v6, v7}, Ljava/lang/Math;->sqrt(D)D

    move-result-wide v6

    mul-double/2addr v4, v6

    iput-wide v4, v2, Lcom/scaleasw/powercalc/Complex;->im:D

    goto :goto_0
.end method

.method public static tan(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 14
    .param p0, "arg"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const-wide/high16 v12, 0x4000000000000000L    # 2.0

    const-wide/high16 v10, 0x3ff0000000000000L    # 1.0

    const-wide/high16 v8, -0x4000000000000000L    # -2.0

    const-wide/16 v6, 0x0

    .line 286
    new-instance v0, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v0, v6, v7, v6, v7}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 287
    .local v0, "result":Lcom/scaleasw/powercalc/Complex;
    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    cmpl-double v4, v4, v6

    if-nez v4, :cond_0

    .line 288
    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v4, v5}, Lcom/scaleasw/powercalc/Complex;->tanReal(D)Ljava/lang/Double;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    iput-wide v4, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 300
    :goto_0
    return-object v0

    .line 291
    :cond_0
    new-instance v1, Lcom/scaleasw/powercalc/Complex;

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    mul-double/2addr v4, v8

    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    mul-double/2addr v6, v12

    invoke-direct {v1, v4, v5, v6, v7}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 292
    .local v1, "temp1":Lcom/scaleasw/powercalc/Complex;
    invoke-static {v1}, Lcom/scaleasw/powercalc/Complex;->powerE(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v1

    .line 293
    iget-wide v4, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    sub-double/2addr v4, v10

    iput-wide v4, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 294
    new-instance v2, Lcom/scaleasw/powercalc/Complex;

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    mul-double/2addr v4, v8

    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    mul-double/2addr v6, v12

    invoke-direct {v2, v4, v5, v6, v7}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 295
    .local v2, "temp2":Lcom/scaleasw/powercalc/Complex;
    invoke-static {v2}, Lcom/scaleasw/powercalc/Complex;->powerE(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v2

    .line 296
    iget-wide v4, v2, Lcom/scaleasw/powercalc/Complex;->re:D

    add-double/2addr v4, v10

    iput-wide v4, v2, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 297
    new-instance v3, Lcom/scaleasw/powercalc/Complex;

    iget-wide v4, v2, Lcom/scaleasw/powercalc/Complex;->im:D

    neg-double v4, v4

    iget-wide v6, v2, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-direct {v3, v4, v5, v6, v7}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 298
    .local v3, "temp3":Lcom/scaleasw/powercalc/Complex;
    invoke-static {v1, v3}, Lcom/scaleasw/powercalc/Complex;->divide(Lcom/scaleasw/powercalc/Complex;Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v0

    goto :goto_0
.end method

.method public static tanReal(D)Ljava/lang/Double;
    .locals 2
    .param p0, "arg"    # D

    .prologue
    .line 280
    invoke-static {p0, p1}, Ljava/lang/Math;->tan(D)D

    move-result-wide v0

    invoke-static {v0, v1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v0

    return-object v0
.end method

.method public static tanh(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;
    .locals 10
    .param p0, "arg"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    const-wide/16 v6, 0x0

    .line 428
    new-instance v1, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v1, v6, v7, v6, v7}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 429
    .local v1, "result":Lcom/scaleasw/powercalc/Complex;
    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    cmpl-double v4, v4, v6

    if-nez v4, :cond_0

    .line 430
    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v4, v5}, Lcom/scaleasw/powercalc/Complex;->tanhReal(D)Ljava/lang/Double;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    iput-wide v4, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 442
    :goto_0
    return-object v1

    .line 433
    :cond_0
    new-instance v2, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v2, p0}, Lcom/scaleasw/powercalc/Complex;-><init>(Lcom/scaleasw/powercalc/Complex;)V

    .line 434
    .local v2, "temp1":Lcom/scaleasw/powercalc/Complex;
    new-instance v3, Lcom/scaleasw/powercalc/Complex;

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    neg-double v4, v4

    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    neg-double v6, v6

    invoke-direct {v3, v4, v5, v6, v7}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 435
    .local v3, "temp2":Lcom/scaleasw/powercalc/Complex;
    invoke-static {v2}, Lcom/scaleasw/powercalc/Complex;->powerE(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v2

    .line 436
    invoke-static {v3}, Lcom/scaleasw/powercalc/Complex;->powerE(Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v3

    .line 437
    iget-wide v4, v2, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v6, v3, Lcom/scaleasw/powercalc/Complex;->re:D

    sub-double/2addr v4, v6

    iput-wide v4, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 438
    iget-wide v4, v2, Lcom/scaleasw/powercalc/Complex;->im:D

    iget-wide v6, v3, Lcom/scaleasw/powercalc/Complex;->im:D

    sub-double/2addr v4, v6

    iput-wide v4, v1, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 439
    new-instance v0, Lcom/scaleasw/powercalc/Complex;

    iget-wide v4, v2, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v6, v3, Lcom/scaleasw/powercalc/Complex;->re:D

    add-double/2addr v4, v6

    iget-wide v6, v2, Lcom/scaleasw/powercalc/Complex;->im:D

    iget-wide v8, v3, Lcom/scaleasw/powercalc/Complex;->im:D

    add-double/2addr v6, v8

    invoke-direct {v0, v4, v5, v6, v7}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 440
    .local v0, "bottom":Lcom/scaleasw/powercalc/Complex;
    invoke-static {v1, v0}, Lcom/scaleasw/powercalc/Complex;->divide(Lcom/scaleasw/powercalc/Complex;Lcom/scaleasw/powercalc/Complex;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v1

    goto :goto_0
.end method

.method public static tanhReal(D)Ljava/lang/Double;
    .locals 2
    .param p0, "arg"    # D

    .prologue
    .line 422
    invoke-static {p0, p1}, Ljava/lang/Math;->tanh(D)D

    move-result-wide v0

    invoke-static {v0, v1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v0

    return-object v0
.end method


# virtual methods
.method public argument()Ljava/lang/Double;
    .locals 8

    .prologue
    const-wide v6, 0x400921fb54442d18L    # Math.PI

    const-wide/16 v4, 0x0

    .line 137
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    cmpl-double v1, v2, v4

    if-lez v1, :cond_0

    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    div-double/2addr v2, v4

    invoke-static {v2, v3}, Ljava/lang/Math;->atan(D)D

    move-result-wide v2

    invoke-static {v2, v3}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v0

    .line 148
    .local v0, "result":Ljava/lang/Double;
    :goto_0
    return-object v0

    .line 138
    .end local v0    # "result":Ljava/lang/Double;
    :cond_0
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    cmpg-double v1, v2, v4

    if-gez v1, :cond_2

    .line 139
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    cmpl-double v1, v2, v4

    if-ltz v1, :cond_1

    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    neg-double v4, v4

    div-double/2addr v2, v4

    invoke-static {v2, v3}, Ljava/lang/Math;->atan(D)D

    move-result-wide v2

    sub-double v2, v6, v2

    invoke-static {v2, v3}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v0

    .restart local v0    # "result":Ljava/lang/Double;
    goto :goto_0

    .line 140
    .end local v0    # "result":Ljava/lang/Double;
    :cond_1
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    neg-double v2, v2

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    neg-double v4, v4

    div-double/2addr v2, v4

    invoke-static {v2, v3}, Ljava/lang/Math;->atan(D)D

    move-result-wide v2

    add-double/2addr v2, v6

    invoke-static {v2, v3}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v0

    .restart local v0    # "result":Ljava/lang/Double;
    goto :goto_0

    .line 144
    .end local v0    # "result":Ljava/lang/Double;
    :cond_2
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    cmpl-double v1, v2, v4

    if-lez v1, :cond_3

    const-wide v2, 0x3ff921fb54442d18L    # 1.5707963267948966

    invoke-static {v2, v3}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v0

    .restart local v0    # "result":Ljava/lang/Double;
    goto :goto_0

    .line 145
    .end local v0    # "result":Ljava/lang/Double;
    :cond_3
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    cmpg-double v1, v2, v4

    if-gez v1, :cond_4

    const-wide v2, -0x4006de04abbbd2e8L    # -1.5707963267948966

    invoke-static {v2, v3}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v0

    .restart local v0    # "result":Ljava/lang/Double;
    goto :goto_0

    .line 146
    .end local v0    # "result":Ljava/lang/Double;
    :cond_4
    invoke-static {v4, v5}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v0

    .restart local v0    # "result":Ljava/lang/Double;
    goto :goto_0
.end method

.method public describeContents()I
    .locals 1

    .prologue
    .line 56
    const/4 v0, 0x0

    return v0
.end method

.method public getMask(I)J
    .locals 6
    .param p1, "bitSize"    # I

    .prologue
    .line 111
    const-wide/16 v2, 0x1

    .line 112
    .local v2, "mask":J
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_0
    add-int/lit8 v1, p1, -0x1

    if-ge v0, v1, :cond_0

    .line 114
    const/4 v1, 0x1

    shl-long/2addr v2, v1

    .line 115
    const-wide/16 v4, 0x1

    or-long/2addr v2, v4

    .line 112
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 117
    :cond_0
    return-wide v2
.end method

.method public getRadixSign(J)J
    .locals 9
    .param p1, "bitSize"    # J

    .prologue
    .line 101
    const-wide/16 v2, 0x1

    .line 102
    .local v2, "mask":J
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_0
    int-to-long v4, v0

    const-wide/16 v6, 0x1

    sub-long v6, p1, v6

    cmp-long v1, v4, v6

    if-gez v1, :cond_0

    .line 104
    const/4 v1, 0x1

    shl-long/2addr v2, v1

    .line 102
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 106
    :cond_0
    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->radix:J

    and-long/2addr v4, v2

    return-wide v4
.end method

.method public magnitude()Ljava/lang/Double;
    .locals 6

    .prologue
    .line 129
    iget-wide v0, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    const-wide/16 v2, 0x0

    cmpl-double v0, v0, v2

    if-nez v0, :cond_0

    iget-wide v0, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v0, v1}, Ljava/lang/Math;->abs(D)D

    move-result-wide v0

    invoke-static {v0, v1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v0

    .line 130
    :goto_0
    return-object v0

    :cond_0
    iget-wide v0, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    mul-double/2addr v0, v2

    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    iget-wide v4, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    mul-double/2addr v2, v4

    add-double/2addr v0, v2

    invoke-static {v0, v1}, Ljava/lang/Math;->sqrt(D)D

    move-result-wide v0

    invoke-static {v0, v1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v0

    goto :goto_0
.end method

.method public readFromParcel(Landroid/os/Parcel;)V
    .locals 2
    .param p1, "in"    # Landroid/os/Parcel;

    .prologue
    .line 48
    invoke-virtual {p1}, Landroid/os/Parcel;->readDouble()D

    move-result-wide v0

    iput-wide v0, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 49
    invoke-virtual {p1}, Landroid/os/Parcel;->readDouble()D

    move-result-wide v0

    iput-wide v0, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 50
    invoke-virtual {p1}, Landroid/os/Parcel;->readLong()J

    move-result-wide v0

    iput-wide v0, p0, Lcom/scaleasw/powercalc/Complex;->radix:J

    .line 51
    invoke-static {}, Lcom/scaleasw/powercalc/Complex$Format;->values()[Lcom/scaleasw/powercalc/Complex$Format;

    move-result-object v0

    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v1

    aget-object v0, v0, v1

    iput-object v0, p0, Lcom/scaleasw/powercalc/Complex;->format:Lcom/scaleasw/powercalc/Complex$Format;

    .line 52
    return-void
.end method

.method public setComplex(Lcom/scaleasw/powercalc/Complex;)V
    .locals 2
    .param p1, "value"    # Lcom/scaleasw/powercalc/Complex;

    .prologue
    .line 61
    iget-wide v0, p1, Lcom/scaleasw/powercalc/Complex;->re:D

    iput-wide v0, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 62
    iget-wide v0, p1, Lcom/scaleasw/powercalc/Complex;->im:D

    iput-wide v0, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 63
    iget-wide v0, p1, Lcom/scaleasw/powercalc/Complex;->radix:J

    iput-wide v0, p0, Lcom/scaleasw/powercalc/Complex;->radix:J

    .line 64
    iget-object v0, p1, Lcom/scaleasw/powercalc/Complex;->format:Lcom/scaleasw/powercalc/Complex$Format;

    iput-object v0, p0, Lcom/scaleasw/powercalc/Complex;->format:Lcom/scaleasw/powercalc/Complex$Format;

    .line 65
    return-void
.end method

.method public setRadix(JI)V
    .locals 11
    .param p1, "value"    # J
    .param p3, "bitSize"    # I

    .prologue
    const/4 v10, 0x1

    .line 76
    const-wide/16 v4, 0x1

    .line 77
    .local v4, "sign":J
    const-wide/16 v2, 0x0

    .line 78
    .local v2, "mask":J
    iput-wide p1, p0, Lcom/scaleasw/powercalc/Complex;->radix:J

    .line 79
    const-wide/16 v6, 0x0

    iput-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 80
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_0
    if-ge v0, p3, :cond_0

    .line 82
    shl-long/2addr v2, v10

    .line 83
    const-wide/16 v6, 0x1

    or-long/2addr v2, v6

    .line 84
    shl-long/2addr v4, v10

    .line 80
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 86
    :cond_0
    shr-long/2addr v4, v10

    .line 87
    const/16 v1, 0x40

    if-ge p3, v1, :cond_1

    .line 89
    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->radix:J

    and-long/2addr v6, v2

    iput-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->radix:J

    .line 90
    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->radix:J

    and-long/2addr v6, v4

    const-wide/16 v8, 0x0

    cmp-long v1, v6, v8

    if-eqz v1, :cond_1

    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->radix:J

    shl-long v8, v4, v10

    cmp-long v1, v6, v8

    if-gez v1, :cond_1

    .line 92
    shl-long/2addr v4, v10

    .line 93
    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->radix:J

    sub-long v6, v4, v6

    neg-long v6, v6

    iput-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->radix:J

    .line 96
    :cond_1
    iget-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->radix:J

    long-to-double v6, v6

    iput-wide v6, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 97
    return-void
.end method

.method public toComplex()V
    .locals 2

    .prologue
    .line 122
    iget-wide v0, p0, Lcom/scaleasw/powercalc/Complex;->radix:J

    long-to-double v0, v0

    iput-wide v0, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 123
    const-wide/16 v0, 0x0

    iput-wide v0, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 124
    return-void
.end method

.method public toRadix(I)V
    .locals 4
    .param p1, "bitSize"    # I

    .prologue
    .line 69
    iget-wide v2, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v2, v3}, Ljava/lang/Math;->floor(D)D

    move-result-wide v2

    double-to-long v0, v2

    .line 70
    .local v0, "value":J
    invoke-virtual {p0, v0, v1, p1}, Lcom/scaleasw/powercalc/Complex;->setRadix(JI)V

    .line 71
    return-void
.end method

.method public writeToParcel(Landroid/os/Parcel;I)V
    .locals 2
    .param p1, "out"    # Landroid/os/Parcel;
    .param p2, "flags"    # I

    .prologue
    .line 40
    iget-wide v0, p0, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-virtual {p1, v0, v1}, Landroid/os/Parcel;->writeDouble(D)V

    .line 41
    iget-wide v0, p0, Lcom/scaleasw/powercalc/Complex;->im:D

    invoke-virtual {p1, v0, v1}, Landroid/os/Parcel;->writeDouble(D)V

    .line 42
    iget-wide v0, p0, Lcom/scaleasw/powercalc/Complex;->radix:J

    invoke-virtual {p1, v0, v1}, Landroid/os/Parcel;->writeLong(J)V

    .line 43
    iget-object v0, p0, Lcom/scaleasw/powercalc/Complex;->format:Lcom/scaleasw/powercalc/Complex$Format;

    invoke-virtual {v0}, Lcom/scaleasw/powercalc/Complex$Format;->ordinal()I

    move-result v0

    invoke-virtual {p1, v0}, Landroid/os/Parcel;->writeInt(I)V

    .line 44
    return-void
.end method
