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

    assertEquals(0, MathLib::isinf(NAN));
    assertEquals(0, MathLib::isinf(10));
    assertEquals(1, MathLib::isinf(INFINITY));
    assertEquals(1, MathLib::isinf(-INFINITY));
    assertTrue(MathLib::finite(33) != 0);
    assertEquals(0, MathLib::finite(NAN));

    // x 2^n = scalbn(x,n)
    assertEquals(MathLib::pow(2,4), MathLib::scalbn(2,3));
    assertEquals(80.0, MathLib::scalbn(10,3));

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

    assertEquals(MathLib::fmod(4587, 123), MathLib::drem(4587, 123));
    assertEquals(MathLib::fmod(45824, 1231), MathLib::drem(45824, 1231));
    assertEquals(MathLib::fmod(10, 1), MathLib::drem(10, 1));

    //x copies the sign of y
    assertEquals(33.0, MathLib::copysign(33, 44));
    assertEquals(-33.0, MathLib::copysign(33, -44));
    assertEquals(33.0, MathLib::copysign(-33, 44));
    assertEquals(-33.0, MathLib::copysign(-33, -44));

    assertTrue(MathLib::isnan(NAN) != 0);
    assertTrue(MathLib::isnan(1) == 0);
    assertTrue(MathLib::isnan(INFINITY_POSITIVE) == 0);

    assertEquals(MathLib::ceil(MathLib::logb(MathLib::fabs(75485))), (double)MathLib::ilogb(75485));
    assertEquals(12.0, MathLib::rint(12.2));
    assertEquals(12.0, MathLib::rint(12.49));
    assertEquals(12.0, MathLib::rint(12.5));
    assertEquals(13.0, MathLib::rint(12.51));
    assertEquals(13.0, MathLib::rint(13.0));

    assertEquals(12.21, MathLib::nextafter(12.21, 13.0));
    assertEquals(12.21, MathLib::nextafter(12.21, -13.0));

    assertEquals(MathLib::fmod(4587, 123), MathLib::remainder(4587, 123));
    assertEquals(MathLib::fmod(45824, 1231), MathLib::remainder(45824, 1231));
    assertEquals(MathLib::fmod(10, 1), MathLib::remainder(10, 1));

    assertEquals(12.0, MathLib::round(12.2));
    assertEquals(12.0, MathLib::round(12.49));
    assertEquals(13.0, MathLib::round(12.5));
    assertEquals(13.0, MathLib::round(12.51));
    assertEquals(13.0, MathLib::round(13.0));

    assertEquals(12.0, MathLib::trunc(12.2));
    assertEquals(12.0, MathLib::trunc(12.49));
    assertEquals(12.0, MathLib::trunc(12.5));
    assertEquals(12.0, MathLib::trunc(12.51));
    assertEquals(13.0, MathLib::trunc(13.0));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x8f87(%rip), %rsi      # 0x25d66
leaq -0x40(%rbp), %r14
leaq -0x19(%rbp), %rdx
movq %r14, %rdi
callq 0x4ce2
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1df6c
leaq -0x40(%rbp), %rdi
callq 0x3100
movsd 0x337d(%rip), %xmm0     # 0x20188
callq 0x56b2
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x1e5d6
movsd 0x470c(%rip), %xmm0     # 0x21530
callq 0x56b2
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x1e5d6
movsd 0x8d53(%rip), %xmm0     # 0x25b90
callq 0x56b2
pushq $0x1
popq %r14
movq %rbx, %rdi
movl %r14d, %esi
movl %eax, %edx
callq 0x1e5d6
movsd 0x8d3d(%rip), %xmm0     # 0x25b98
callq 0x56b2
movq %rbx, %rdi
movl %r14d, %esi
movl %eax, %edx
callq 0x1e5d6
movsd 0x8c5b(%rip), %xmm0     # 0x25ad0
callq 0x56d4
xorl %esi, %esi
testl %eax, %eax
setne %sil
movq %rbx, %rdi
callq 0x1e196
movsd 0x32f6(%rip), %xmm0     # 0x20188
callq 0x56d4
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x1e5d6
movsd 0x8bad(%rip), %xmm0     # 0x25a58
movsd 0x8bb5(%rip), %xmm1     # 0x25a68
callq 0x5642
movsd %xmm0, -0x18(%rbp)
pushq $0x3
popq %r14
movsd 0x8b8f(%rip), %xmm0     # 0x25a58
movl %r14d, %edi
callq 0x56f6
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x1e2a6
movsd 0x4647(%rip), %xmm0     # 0x21530
movl %r14d, %edi
callq 0x56f6
movaps %xmm0, %xmm1
movsd 0x8bf4(%rip), %xmm0     # 0x25af0
movq %rbx, %rdi
callq 0x1e2a6
movsd 0x8b4c(%rip), %xmm0     # 0x25a58
movsd 0x8b54(%rip), %xmm1     # 0x25a68
callq 0x5642
movsd %xmm0, -0x18(%rbp)
movsd 0x8b3a(%rip), %xmm1     # 0x25a60
movsd 0x8b2a(%rip), %xmm0     # 0x25a58
callq 0x575a
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x1e2a6
movsd 0x45e5(%rip), %xmm0     # 0x21530
movsd 0x8b0d(%rip), %xmm1     # 0x25a60
callq 0x575a
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x8b8a(%rip), %xmm0     # 0x25af0
callq 0x1e2a6
movsd 0x8c2d(%rip), %xmm0     # 0x25ba0
movsd 0x8be5(%rip), %xmm1     # 0x25b60
callq 0x56a8
movsd %xmm0, -0x18(%rbp)
movsd 0x8c13(%rip), %xmm0     # 0x25ba0
movsd 0x8bcb(%rip), %xmm1     # 0x25b60
callq 0x5700
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x1e2a6
movsd 0x8bf6(%rip), %xmm0     # 0x25ba8
movsd 0x8bf6(%rip), %xmm1     # 0x25bb0
callq 0x56a8
movsd %xmm0, -0x18(%rbp)
movsd 0x8bdc(%rip), %xmm0     # 0x25ba8
movsd 0x8bdc(%rip), %xmm1     # 0x25bb0
callq 0x5700
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x1e2a6
movsd 0x301f(%rip), %xmm1     # 0x20010
movsd 0x4537(%rip), %xmm0     # 0x21530
callq 0x56a8
movsd %xmm0, -0x18(%rbp)
movsd 0x4525(%rip), %xmm0     # 0x21530
movsd 0x2ffd(%rip), %xmm1     # 0x20010
callq 0x5700
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x1e2a6
movsd 0x8aa8(%rip), %xmm1     # 0x25ad8
movsd 0x8a98(%rip), %xmm0     # 0x25ad0
callq 0x570a
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x8a85(%rip), %xmm0     # 0x25ad0
callq 0x1e2a6
movsd 0x8b60(%rip), %xmm1     # 0x25bb8
movsd 0x8a70(%rip), %xmm0     # 0x25ad0
callq 0x570a
movaps %xmm0, %xmm1
movsd 0x8b50(%rip), %xmm0     # 0x25bc0
movq %rbx, %rdi
callq 0x1e2a6
movsd 0x8b40(%rip), %xmm0     # 0x25bc0
movsd 0x8a50(%rip), %xmm1     # 0x25ad8
callq 0x570a
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x8a35(%rip), %xmm0     # 0x25ad0
callq 0x1e2a6
movsd 0x8b18(%rip), %xmm0     # 0x25bc0
movsd 0x8b08(%rip), %xmm1     # 0x25bb8
callq 0x570a
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x8afd(%rip), %xmm0     # 0x25bc0
callq 0x1e2a6
movsd 0x30b8(%rip), %xmm0     # 0x20188
callq 0x5722
xorl %esi, %esi
testl %eax, %eax
setne %sil
movq %rbx, %rdi
callq 0x1e196
movsd 0x2f23(%rip), %xmm0     # 0x20010
callq 0x5722
xorl %esi, %esi
testl %eax, %eax
sete %sil
movq %rbx, %rdi
callq 0x1e196
movsd 0x8986(%rip), %xmm0     # 0x25a90
callq 0x5722
xorl %esi, %esi
testl %eax, %eax
sete %sil
movq %rbx, %rdi
callq 0x1e196
movsd 0x8aa1(%rip), %xmm0     # 0x25bc8
callq 0x5690
callq 0x562e
callq 0x5686
movsd %xmm0, -0x18(%rbp)
movsd 0x8a85(%rip), %xmm0     # 0x25bc8
callq 0x5732
cvtsi2sd %eax, %xmm1
movq %rbx, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x1e2a6
movsd 0x8a6f(%rip), %xmm0     # 0x25bd0
callq 0x573c
movaps %xmm0, %xmm1
movsd 0x4477(%rip), %xmm0     # 0x215e8
movq %rbx, %rdi
callq 0x1e2a6
movsd 0x8a57(%rip), %xmm0     # 0x25bd8
callq 0x573c
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x4454(%rip), %xmm0     # 0x215e8
callq 0x1e2a6
movsd 0x8a3f(%rip), %xmm0     # 0x25be0
callq 0x573c
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x4434(%rip), %xmm0     # 0x215e8
callq 0x1e2a6
movsd 0x8a27(%rip), %xmm0     # 0x25be8
callq 0x573c
movaps %xmm0, %xmm1
movsd 0x8a1f(%rip), %xmm0     # 0x25bf0
movq %rbx, %rdi
callq 0x1e2a6
movsd 0x8a0f(%rip), %xmm0     # 0x25bf0
callq 0x573c
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x89fc(%rip), %xmm0     # 0x25bf0
callq 0x1e2a6
movsd 0x89f7(%rip), %xmm0     # 0x25bf8
movsd 0x89e7(%rip), %xmm1     # 0x25bf0
callq 0x5746
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x89dc(%rip), %xmm0     # 0x25bf8
callq 0x1e2a6
movsd 0x4247(%rip), %xmm1     # 0x21470
movsd 0x89c7(%rip), %xmm0     # 0x25bf8
callq 0x5746
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x89b4(%rip), %xmm0     # 0x25bf8
callq 0x1e2a6
movsd 0x894f(%rip), %xmm0     # 0x25ba0
movsd 0x8907(%rip), %xmm1     # 0x25b60
callq 0x56a8
movsd %xmm0, -0x18(%rbp)
movsd 0x8935(%rip), %xmm0     # 0x25ba0
movsd 0x88ed(%rip), %xmm1     # 0x25b60
callq 0x5750
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x1e2a6
movsd 0x8918(%rip), %xmm0     # 0x25ba8
movsd 0x8918(%rip), %xmm1     # 0x25bb0
callq 0x56a8
movsd %xmm0, -0x18(%rbp)
movsd 0x88fe(%rip), %xmm0     # 0x25ba8
movsd 0x88fe(%rip), %xmm1     # 0x25bb0
callq 0x5750
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x1e2a6
movsd 0x4261(%rip), %xmm0     # 0x21530
movsd 0x2d39(%rip), %xmm1     # 0x20010
callq 0x56a8
movsd %xmm0, -0x18(%rbp)
movsd 0x4247(%rip), %xmm0     # 0x21530
movsd 0x2d1f(%rip), %xmm1     # 0x20010
callq 0x5750
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x1e2a6
movsd 0x88c2(%rip), %xmm0     # 0x25bd0
callq 0x5768
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x42c7(%rip), %xmm0     # 0x215e8
callq 0x1e2a6
movsd 0x88aa(%rip), %xmm0     # 0x25bd8
callq 0x5768
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x42a7(%rip), %xmm0     # 0x215e8
callq 0x1e2a6
movsd 0x8892(%rip), %xmm0     # 0x25be0
callq 0x5768
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x888f(%rip), %xmm0     # 0x25bf0
callq 0x1e2a6
movsd 0x887a(%rip), %xmm0     # 0x25be8
callq 0x5768
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x886f(%rip), %xmm0     # 0x25bf0
callq 0x1e2a6
movsd 0x8862(%rip), %xmm0     # 0x25bf0
callq 0x5768
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x884f(%rip), %xmm0     # 0x25bf0
callq 0x1e2a6
movsd 0x8822(%rip), %xmm0     # 0x25bd0
callq 0x5772
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x4227(%rip), %xmm0     # 0x215e8
callq 0x1e2a6
movsd 0x880a(%rip), %xmm0     # 0x25bd8
callq 0x5772
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x4207(%rip), %xmm0     # 0x215e8
callq 0x1e2a6
movsd 0x87f2(%rip), %xmm0     # 0x25be0
callq 0x5772
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x41e7(%rip), %xmm0     # 0x215e8
callq 0x1e2a6
movsd 0x87da(%rip), %xmm0     # 0x25be8
callq 0x5772
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x41c7(%rip), %xmm0     # 0x215e8
callq 0x1e2a6
movsd 0x87c2(%rip), %xmm0     # 0x25bf0
callq 0x5772
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x87af(%rip), %xmm0     # 0x25bf0
callq 0x1e2a6
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x3100
movq %rbx, %rdi
callq 0x34a0
nop