// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0x97ed(%rip), %rsi      # 0x25cd2
leaq -0x48(%rbp), %r14
leaq -0x20(%rbp), %rdx
movq %r14, %rdi
callq 0x4ce2
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1df6c
leaq -0x48(%rbp), %rdi
callq 0x3100
movsd 0x958f(%rip), %xmm0     # 0x25aa0
callq 0x55de
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x1e2a6
xorps %xmm0, %xmm0
callq 0x55de
movaps %xmm0, %xmm1
movsd 0x3ad9(%rip), %xmm0     # 0x20010
movq %rbx, %rdi
callq 0x1e2a6
movsd 0x3ac9(%rip), %xmm0     # 0x20010
callq 0x55de
movaps %xmm0, %xmm1
movsd 0x9569(%rip), %xmm0     # 0x25ac0
movq %rbx, %rdi
callq 0x1e2a6
movsd 0x4fc9(%rip), %xmm0     # 0x21530
callq 0x55de
movaps %xmm0, %xmm1
movsd 0x9551(%rip), %xmm0     # 0x25ac8
movq %rbx, %rdi
callq 0x1e2a6
movsd 0x9549(%rip), %xmm0     # 0x25ad0
callq 0x55fc
callq 0x55de
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9531(%rip), %xmm0     # 0x25ad0
callq 0x1e2a6
movsd 0x952c(%rip), %xmm0     # 0x25ad8
callq 0x55de
callq 0x55fc
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9514(%rip), %xmm0     # 0x25ad8
callq 0x1e2a6
movsd 0x94ef(%rip), %xmm0     # 0x25ac0
callq 0x55fc
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x3a2c(%rip), %xmm0     # 0x20010
callq 0x1e2a6
movsd 0x3a1f(%rip), %xmm0     # 0x20010
callq 0x55fc
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x1e2a6
movsd 0x9484(%rip), %xmm0     # 0x25a90
callq 0x55fc
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9471(%rip), %xmm0     # 0x25a90
callq 0x1e9d4
xorps %xmm0, %xmm0
callq 0x55fc
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9466(%rip), %xmm0     # 0x25aa0
callq 0x1e9d4
movsd 0x4ee9(%rip), %xmm0     # 0x21530
callq 0x561a
movaps %xmm0, %xmm1
movsd 0x9489(%rip), %xmm0     # 0x25ae0
movq %rbx, %rdi
callq 0x1e2a6
xorps %xmm0, %xmm0
callq 0x5624
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x1e2a6
movsd 0x946b(%rip), %xmm0     # 0x25ae8
callq 0x5624
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x3980(%rip), %xmm0     # 0x20010
callq 0x1e2a6
movsd 0x4e93(%rip), %xmm0     # 0x21530
callq 0x55fc
movsd %xmm0, -0x18(%rbp)
movsd 0x93a9(%rip), %xmm0     # 0x25a58
callq 0x55fc
movsd -0x18(%rbp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, -0x18(%rbp)
movsd 0x4e66(%rip), %xmm0     # 0x21530
callq 0x5638
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x1e2a6
movsd 0x9379(%rip), %xmm1     # 0x25a60
movsd 0x9369(%rip), %xmm0     # 0x25a58
callq 0x5642
callq 0x5638
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9359(%rip), %xmm0     # 0x25a60
callq 0x1e2a6
movsd 0x4ed4(%rip), %xmm0     # 0x215e8
callq 0x55fc
movsd %xmm0, -0x18(%rbp)
movsd 0x4e0a(%rip), %xmm0     # 0x21530
callq 0x55fc
movsd -0x18(%rbp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, -0x18(%rbp)
movsd 0x4ea7(%rip), %xmm0     # 0x215e8
callq 0x5606
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x1e2a6
movsd 0x4dd2(%rip), %xmm0     # 0x21530
movsd 0x92fa(%rip), %xmm1     # 0x25a60
callq 0x5642
callq 0x5606
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x92e2(%rip), %xmm0     # 0x25a60
callq 0x1e2a6
movsd 0x92dd(%rip), %xmm1     # 0x25a68
movsd 0x92c5(%rip), %xmm0     # 0x25a58
callq 0x5642
movsd %xmm0, -0x18(%rbp)
pushq $0x3
popq %r14
movsd 0x92af(%rip), %xmm0     # 0x25a58
movl %r14d, %edi
callq 0x55f2
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x1e2a6
movsd 0x4d67(%rip), %xmm0     # 0x21530
movl %r14d, %edi
callq 0x55f2
movaps %xmm0, %xmm1
movsd 0x9314(%rip), %xmm0     # 0x25af0
movq %rbx, %rdi
callq 0x1e2a6
movsd 0x926c(%rip), %xmm0     # 0x25a58
movsd 0x9274(%rip), %xmm1     # 0x25a68
callq 0x5642
movsd %xmm0, -0x18(%rbp)
movsd 0x9252(%rip), %xmm0     # 0x25a58
movl %r14d, %edi
callq 0x55f2
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x1e2a6
movsd 0x4d0a(%rip), %xmm0     # 0x21530
movl %r14d, %edi
callq 0x55f2
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x92b4(%rip), %xmm0     # 0x25af0
callq 0x1e2a6
leaq -0x24(%rbp), %r14
andl $0x0, (%r14)
movsd 0x929f(%rip), %xmm0     # 0x25af0
movq %r14, %rdi
callq 0x55e8
movaps %xmm0, %xmm1
movsd 0x9294(%rip), %xmm0     # 0x25af8
movq %rbx, %rdi
callq 0x1e2a6
movl (%r14), %edx
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x1e5d6
leaq -0x20(%rbp), %r14
andq $0x0, (%r14)
movsd 0x9276(%rip), %xmm0     # 0x25b00
movq %r14, %rdi
callq 0x5610
movaps %xmm0, %xmm1
movsd 0x926b(%rip), %xmm0     # 0x25b08
movq %rbx, %rdi
callq 0x1e2a6
movsd (%r14), %xmm1
movq %rbx, %rdi
movsd 0x4d33(%rip), %xmm0     # 0x215e8
callq 0x1e2a6
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x3100
movq %rbx, %rdi
callq 0x34a0
nop