// File: /workspace/github_cpp_makefile_star2_O1/philipperemy[P]digital-setting-circles/Test.cpp
// Function: Test::test_MathLib_exponential_logarithmic()
void Test::test_MathLib_exponential_logarithmic()
{
    setUpErrorMessage("test_MathLib_exponential_logarithmic() - failed");

    assertEquals(0.0, MathLib::exp(INFINITY_NEGATIVE));
    assertEquals(1.0, MathLib::exp(0));
    assertEquals(2.71828, MathLib::exp(1));
    assertEquals(22026.46579, MathLib::exp(10));
    assertEquals(33.0, MathLib::exp(MathLib::log(33)));
    assertEquals(44.0, MathLib::log(MathLib::exp(44)));

    assertEquals(1.0, MathLib::log(2.71828));
    assertEquals(0.0, MathLib::log(1.0));
    assertLess(INFINITY_POSITIVE, MathLib::log(INFINITY_POSITIVE));
    assertLess(INFINITY_NEGATIVE, MathLib::log(0));

    assertEquals(22026.46579-1, MathLib::expm1(10));
    assertEquals(0.0, MathLib::log1p(0));
    assertEquals(1.0, MathLib::log1p(2.71828-1));

    assertEquals(MathLib::log(10) / MathLib::log(2), MathLib::log2(10));
    assertEquals(3.0, MathLib::log2(MathLib::pow(2,3)));

    assertEquals(MathLib::log(12) / MathLib::log(10), MathLib::log10(12));
    assertEquals(3.0, MathLib::log10(MathLib::pow(10,3)));

    // x * pow(2,exponent)
    assertEquals(MathLib::pow(2,4), MathLib::ldexp(2,3));
    assertEquals(80.0, MathLib::ldexp(10,3));

    assertEquals(MathLib::pow(2,4), MathLib::ldexp(2,3));
    assertEquals(80.0, MathLib::ldexp(10,3));

    // x = significand * 2 ^ exponent
    // 80 = 0.625 * 2 ^ 7
    int exp = 0;
    assertEquals(0.625, MathLib::frexp(80.0, &exp));
    assertEquals(7, exp);

    //modf(12.23, &a) = 0.23 and a = 12.0
    double intPart = 0;
    assertEquals(0.23, MathLib::modf(12.23, &intPart));
    assertEquals(12.0, intPart);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xabbf(%rip), %rsi      # 0x31cd2
leaq 0xabe7(%rip), %rdx      # 0x31d01
leaq -0x48(%rbp), %r14
movq %r14, %rdi
callq 0x4e0a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28e38
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x27146
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x32e0
movsd 0xa952(%rip), %xmm0     # 0x31aa0
callq 0x577e
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x2943c
xorps %xmm0, %xmm0
callq 0x577e
movaps %xmm0, %xmm1
movsd 0x4eac(%rip), %xmm0     # 0x2c020
movq %rbx, %rdi
callq 0x2943c
movsd 0x4e9c(%rip), %xmm0     # 0x2c020
callq 0x577e
movaps %xmm0, %xmm1
movsd 0xa92c(%rip), %xmm0     # 0x31ac0
movq %rbx, %rdi
callq 0x2943c
movsd 0x638c(%rip), %xmm0     # 0x2d530
callq 0x577e
movaps %xmm0, %xmm1
movsd 0xa914(%rip), %xmm0     # 0x31ac8
movq %rbx, %rdi
callq 0x2943c
movsd 0xa90c(%rip), %xmm0     # 0x31ad0
callq 0x579c
callq 0x577e
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xa8f4(%rip), %xmm0     # 0x31ad0
callq 0x2943c
movsd 0xa8ef(%rip), %xmm0     # 0x31ad8
callq 0x577e
callq 0x579c
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xa8d7(%rip), %xmm0     # 0x31ad8
callq 0x2943c
movsd 0xa8b2(%rip), %xmm0     # 0x31ac0
callq 0x579c
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x4dff(%rip), %xmm0     # 0x2c020
callq 0x2943c
movsd 0x4df2(%rip), %xmm0     # 0x2c020
callq 0x579c
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x2943c
movsd 0xa847(%rip), %xmm0     # 0x31a90
callq 0x579c
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xa834(%rip), %xmm0     # 0x31a90
callq 0x2a7ca
xorps %xmm0, %xmm0
callq 0x579c
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xa829(%rip), %xmm0     # 0x31aa0
callq 0x2a7ca
movsd 0x62ac(%rip), %xmm0     # 0x2d530
callq 0x57ba
movaps %xmm0, %xmm1
movsd 0xa84c(%rip), %xmm0     # 0x31ae0
movq %rbx, %rdi
callq 0x2943c
xorps %xmm0, %xmm0
callq 0x57c4
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x2943c
movsd 0xa82e(%rip), %xmm0     # 0x31ae8
callq 0x57c4
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x4d53(%rip), %xmm0     # 0x2c020
callq 0x2943c
movsd 0x6256(%rip), %xmm0     # 0x2d530
callq 0x579c
movsd %xmm0, -0x20(%rbp)
movsd 0xa76c(%rip), %xmm0     # 0x31a58
callq 0x579c
movsd -0x20(%rbp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, -0x20(%rbp)
movsd 0x6229(%rip), %xmm0     # 0x2d530
callq 0x57d8
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x2943c
movsd 0xa73c(%rip), %xmm1     # 0x31a60
movsd 0xa72c(%rip), %xmm0     # 0x31a58
callq 0x57e2
callq 0x57d8
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xa71c(%rip), %xmm0     # 0x31a60
callq 0x2943c
movsd 0x6297(%rip), %xmm0     # 0x2d5e8
callq 0x579c
movsd %xmm0, -0x20(%rbp)
movsd 0x61cd(%rip), %xmm0     # 0x2d530
callq 0x579c
movsd -0x20(%rbp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, -0x20(%rbp)
movsd 0x626a(%rip), %xmm0     # 0x2d5e8
callq 0x57a6
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x2943c
movsd 0x6195(%rip), %xmm0     # 0x2d530
movsd 0xa6bd(%rip), %xmm1     # 0x31a60
callq 0x57e2
callq 0x57a6
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xa6a5(%rip), %xmm0     # 0x31a60
callq 0x2943c
movsd 0xa6a0(%rip), %xmm1     # 0x31a68
movsd 0xa688(%rip), %xmm0     # 0x31a58
callq 0x57e2
movsd %xmm0, -0x20(%rbp)
movsd 0xa676(%rip), %xmm0     # 0x31a58
movl $0x3, %edi
callq 0x5792
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x2943c
movsd 0x612c(%rip), %xmm0     # 0x2d530
movl $0x3, %edi
callq 0x5792
movaps %xmm0, %xmm1
movsd 0xa6d7(%rip), %xmm0     # 0x31af0
movq %rbx, %rdi
callq 0x2943c
movsd 0xa62f(%rip), %xmm0     # 0x31a58
movsd 0xa637(%rip), %xmm1     # 0x31a68
callq 0x57e2
movsd %xmm0, -0x20(%rbp)
movsd 0xa615(%rip), %xmm0     # 0x31a58
movl $0x3, %edi
callq 0x5792
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x2943c
movsd 0x60cb(%rip), %xmm0     # 0x2d530
movl $0x3, %edi
callq 0x5792
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xa673(%rip), %xmm0     # 0x31af0
callq 0x2943c
leaq -0x24(%rbp), %r14
movl $0x0, (%r14)
movsd 0xa65b(%rip), %xmm0     # 0x31af0
movq %r14, %rdi
callq 0x5788
movaps %xmm0, %xmm1
movsd 0xa650(%rip), %xmm0     # 0x31af8
movq %rbx, %rdi
callq 0x2943c
movl (%r14), %edx
movq %rbx, %rdi
movl $0x7, %esi
callq 0x29c7a
leaq -0x50(%rbp), %r14
movq $0x0, (%r14)
movsd 0xa62d(%rip), %xmm0     # 0x31b00
movq %r14, %rdi
callq 0x57b0
movaps %xmm0, %xmm1
movsd 0xa622(%rip), %xmm0     # 0x31b08
movq %rbx, %rdi
callq 0x2943c
movsd (%r14), %xmm1
movq %rbx, %rdi
movsd 0x60ea(%rip), %xmm0     # 0x2d5e8
callq 0x2943c
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x27526
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x32e0
movq %rbx, %rdi
callq 0x34b0