// File: /workspace/github_cpp_makefile_star2_O3/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 0xaa7b(%rip), %rsi      # 0x31cd2
leaq 0xaaa3(%rip), %rdx      # 0x31d01
leaq -0x48(%rbp), %r14
movq %r14, %rdi
callq 0x4f28
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28f78
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x2728a
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x32e0
movsd 0xa80e(%rip), %xmm0     # 0x31aa0
callq 0x58b2
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x29578
xorps %xmm0, %xmm0
callq 0x58b2
movaps %xmm0, %xmm1
movsd 0x4d58(%rip), %xmm0     # 0x2c010
movq %rbx, %rdi
callq 0x29578
movsd 0x4d48(%rip), %xmm0     # 0x2c010
callq 0x58b2
movaps %xmm0, %xmm1
movsd 0xa7e8(%rip), %xmm0     # 0x31ac0
movq %rbx, %rdi
callq 0x29578
movsd 0x6248(%rip), %xmm0     # 0x2d530
callq 0x58b2
movaps %xmm0, %xmm1
movsd 0xa7d0(%rip), %xmm0     # 0x31ac8
movq %rbx, %rdi
callq 0x29578
movsd 0xa7c8(%rip), %xmm0     # 0x31ad0
callq 0x58d0
callq 0x58b2
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xa7b0(%rip), %xmm0     # 0x31ad0
callq 0x29578
movsd 0xa7ab(%rip), %xmm0     # 0x31ad8
callq 0x58b2
callq 0x58d0
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xa793(%rip), %xmm0     # 0x31ad8
callq 0x29578
movsd 0xa76e(%rip), %xmm0     # 0x31ac0
callq 0x58d0
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x4cab(%rip), %xmm0     # 0x2c010
callq 0x29578
movsd 0x4c9e(%rip), %xmm0     # 0x2c010
callq 0x58d0
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x29578
movsd 0xa703(%rip), %xmm0     # 0x31a90
callq 0x58d0
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xa6f0(%rip), %xmm0     # 0x31a90
callq 0x2a8c0
xorps %xmm0, %xmm0
callq 0x58d0
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xa6e5(%rip), %xmm0     # 0x31aa0
callq 0x2a8c0
movsd 0x6168(%rip), %xmm0     # 0x2d530
callq 0x58ee
movaps %xmm0, %xmm1
movsd 0xa708(%rip), %xmm0     # 0x31ae0
movq %rbx, %rdi
callq 0x29578
xorps %xmm0, %xmm0
callq 0x58f8
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x29578
movsd 0xa6ea(%rip), %xmm0     # 0x31ae8
callq 0x58f8
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x4bff(%rip), %xmm0     # 0x2c010
callq 0x29578
movsd 0x6112(%rip), %xmm0     # 0x2d530
callq 0x58d0
movsd %xmm0, -0x20(%rbp)
movsd 0xa628(%rip), %xmm0     # 0x31a58
callq 0x58d0
movsd -0x20(%rbp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, -0x20(%rbp)
movsd 0x60e5(%rip), %xmm0     # 0x2d530
callq 0x590c
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x29578
movsd 0xa5f8(%rip), %xmm1     # 0x31a60
movsd 0xa5e8(%rip), %xmm0     # 0x31a58
callq 0x5916
callq 0x590c
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xa5d8(%rip), %xmm0     # 0x31a60
callq 0x29578
movsd 0x6153(%rip), %xmm0     # 0x2d5e8
callq 0x58d0
movsd %xmm0, -0x20(%rbp)
movsd 0x6089(%rip), %xmm0     # 0x2d530
callq 0x58d0
movsd -0x20(%rbp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, -0x20(%rbp)
movsd 0x6126(%rip), %xmm0     # 0x2d5e8
callq 0x58da
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x29578
movsd 0x6051(%rip), %xmm0     # 0x2d530
movsd 0xa579(%rip), %xmm1     # 0x31a60
callq 0x5916
callq 0x58da
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xa561(%rip), %xmm0     # 0x31a60
callq 0x29578
movsd 0xa55c(%rip), %xmm1     # 0x31a68
movsd 0xa544(%rip), %xmm0     # 0x31a58
callq 0x5916
movsd %xmm0, -0x20(%rbp)
movsd 0xa532(%rip), %xmm0     # 0x31a58
movl $0x3, %edi
callq 0x58c6
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x29578
movsd 0x5fe8(%rip), %xmm0     # 0x2d530
movl $0x3, %edi
callq 0x58c6
movaps %xmm0, %xmm1
movsd 0xa593(%rip), %xmm0     # 0x31af0
movq %rbx, %rdi
callq 0x29578
movsd 0xa4eb(%rip), %xmm0     # 0x31a58
movsd 0xa4f3(%rip), %xmm1     # 0x31a68
callq 0x5916
movsd %xmm0, -0x20(%rbp)
movsd 0xa4d1(%rip), %xmm0     # 0x31a58
movl $0x3, %edi
callq 0x58c6
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x29578
movsd 0x5f87(%rip), %xmm0     # 0x2d530
movl $0x3, %edi
callq 0x58c6
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xa52f(%rip), %xmm0     # 0x31af0
callq 0x29578
leaq -0x24(%rbp), %r14
movl $0x0, (%r14)
movsd 0xa517(%rip), %xmm0     # 0x31af0
movq %r14, %rdi
callq 0x58bc
movaps %xmm0, %xmm1
movsd 0xa50c(%rip), %xmm0     # 0x31af8
movq %rbx, %rdi
callq 0x29578
movl (%r14), %edx
movq %rbx, %rdi
movl $0x7, %esi
callq 0x29d9a
leaq -0x50(%rbp), %r14
movq $0x0, (%r14)
movsd 0xa4e9(%rip), %xmm0     # 0x31b00
movq %r14, %rdi
callq 0x58e4
movaps %xmm0, %xmm1
movsd 0xa4de(%rip), %xmm0     # 0x31b08
movq %rbx, %rdi
callq 0x29578
movsd (%r14), %xmm1
movq %rbx, %rdi
movsd 0x5fa6(%rip), %xmm0     # 0x2d5e8
callq 0x29578
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x2766a
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x32e0
movq %rbx, %rdi
callq 0x34b0