// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq -0x30(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xa16d(%rip), %rsi      # 0x31d66
leaq 0xa183(%rip), %rdx      # 0x31d83
leaq -0x40(%rbp), %r14
movq %r14, %rdi
callq 0x4f28
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28f78
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x27c2c
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x32e0
movsd 0x4554(%rip), %xmm0     # 0x2c188
callq 0x5986
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x29d9a
movsd 0x58e3(%rip), %xmm0     # 0x2d530
callq 0x5986
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x29d9a
movsd 0x9f2a(%rip), %xmm0     # 0x31b90
callq 0x5986
movq %rbx, %rdi
movl $0x1, %esi
movl %eax, %edx
callq 0x29d9a
movsd 0x9f16(%rip), %xmm0     # 0x31b98
callq 0x5986
movq %rbx, %rdi
movl $0x1, %esi
movl %eax, %edx
callq 0x29d9a
movsd 0x9e32(%rip), %xmm0     # 0x31ad0
callq 0x59a8
xorl %esi, %esi
testl %eax, %eax
setne %sil
movq %rbx, %rdi
callq 0x2930a
movsd 0x44cd(%rip), %xmm0     # 0x2c188
callq 0x59a8
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x29d9a
movsd 0x9d84(%rip), %xmm0     # 0x31a58
movsd 0x9d8c(%rip), %xmm1     # 0x31a68
callq 0x5916
movsd %xmm0, -0x20(%rbp)
movsd 0x9d6a(%rip), %xmm0     # 0x31a58
movl $0x3, %edi
callq 0x59ca
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x29578
movsd 0x5820(%rip), %xmm0     # 0x2d530
movl $0x3, %edi
callq 0x59ca
movaps %xmm0, %xmm1
movsd 0x9dcb(%rip), %xmm0     # 0x31af0
movq %rbx, %rdi
callq 0x29578
movsd 0x9d23(%rip), %xmm0     # 0x31a58
movsd 0x9d2b(%rip), %xmm1     # 0x31a68
callq 0x5916
movsd %xmm0, -0x20(%rbp)
movsd 0x9d11(%rip), %xmm1     # 0x31a60
movsd 0x9d01(%rip), %xmm0     # 0x31a58
callq 0x5a2e
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x29578
movsd 0x57bc(%rip), %xmm0     # 0x2d530
movsd 0x9ce4(%rip), %xmm1     # 0x31a60
callq 0x5a2e
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9d61(%rip), %xmm0     # 0x31af0
callq 0x29578
movsd 0x9e04(%rip), %xmm0     # 0x31ba0
movsd 0x9dbc(%rip), %xmm1     # 0x31b60
callq 0x597c
movsd %xmm0, -0x20(%rbp)
movsd 0x9dea(%rip), %xmm0     # 0x31ba0
movsd 0x9da2(%rip), %xmm1     # 0x31b60
callq 0x59d4
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x29578
movsd 0x9dcd(%rip), %xmm0     # 0x31ba8
movsd 0x9dcd(%rip), %xmm1     # 0x31bb0
callq 0x597c
movsd %xmm0, -0x20(%rbp)
movsd 0x9db3(%rip), %xmm0     # 0x31ba8
movsd 0x9db3(%rip), %xmm1     # 0x31bb0
callq 0x59d4
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x29578
movsd 0x41f6(%rip), %xmm1     # 0x2c010
movsd 0x570e(%rip), %xmm0     # 0x2d530
callq 0x597c
movsd %xmm0, -0x20(%rbp)
movsd 0x56fc(%rip), %xmm0     # 0x2d530
movsd 0x41d4(%rip), %xmm1     # 0x2c010
callq 0x59d4
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x29578
movsd 0x9c7f(%rip), %xmm1     # 0x31ad8
movsd 0x9c6f(%rip), %xmm0     # 0x31ad0
callq 0x59de
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9c5c(%rip), %xmm0     # 0x31ad0
callq 0x29578
movsd 0x9d37(%rip), %xmm1     # 0x31bb8
movsd 0x9c47(%rip), %xmm0     # 0x31ad0
callq 0x59de
movaps %xmm0, %xmm1
movsd 0x9d27(%rip), %xmm0     # 0x31bc0
movq %rbx, %rdi
callq 0x29578
movsd 0x9d17(%rip), %xmm0     # 0x31bc0
movsd 0x9c27(%rip), %xmm1     # 0x31ad8
callq 0x59de
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9c0c(%rip), %xmm0     # 0x31ad0
callq 0x29578
movsd 0x9cef(%rip), %xmm0     # 0x31bc0
movsd 0x9cdf(%rip), %xmm1     # 0x31bb8
callq 0x59de
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9cd4(%rip), %xmm0     # 0x31bc0
callq 0x29578
movsd 0x428f(%rip), %xmm0     # 0x2c188
callq 0x59f6
xorl %esi, %esi
testl %eax, %eax
setne %sil
movq %rbx, %rdi
callq 0x2930a
movsd 0x40fa(%rip), %xmm0     # 0x2c010
callq 0x59f6
xorl %esi, %esi
testl %eax, %eax
sete %sil
movq %rbx, %rdi
callq 0x2930a
movsd 0x9b5d(%rip), %xmm0     # 0x31a90
callq 0x59f6
xorl %esi, %esi
testl %eax, %eax
sete %sil
movq %rbx, %rdi
callq 0x2930a
movsd 0x9c78(%rip), %xmm0     # 0x31bc8
callq 0x5964
callq 0x5902
callq 0x595a
movsd %xmm0, -0x20(%rbp)
movsd 0x9c5c(%rip), %xmm0     # 0x31bc8
callq 0x5a06
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x29578
movsd 0x9c43(%rip), %xmm0     # 0x31bd0
callq 0x5a10
movaps %xmm0, %xmm1
movsd 0x564b(%rip), %xmm0     # 0x2d5e8
movq %rbx, %rdi
callq 0x29578
movsd 0x9c2b(%rip), %xmm0     # 0x31bd8
callq 0x5a10
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x5628(%rip), %xmm0     # 0x2d5e8
callq 0x29578
movsd 0x9c13(%rip), %xmm0     # 0x31be0
callq 0x5a10
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x5608(%rip), %xmm0     # 0x2d5e8
callq 0x29578
movsd 0x9bfb(%rip), %xmm0     # 0x31be8
callq 0x5a10
movaps %xmm0, %xmm1
movsd 0x9bf3(%rip), %xmm0     # 0x31bf0
movq %rbx, %rdi
callq 0x29578
movsd 0x9be3(%rip), %xmm0     # 0x31bf0
callq 0x5a10
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9bd0(%rip), %xmm0     # 0x31bf0
callq 0x29578
movsd 0x9bcb(%rip), %xmm0     # 0x31bf8
movsd 0x9bbb(%rip), %xmm1     # 0x31bf0
callq 0x5a1a
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9bb0(%rip), %xmm0     # 0x31bf8
callq 0x29578
movsd 0x541b(%rip), %xmm1     # 0x2d470
movsd 0x9b9b(%rip), %xmm0     # 0x31bf8
callq 0x5a1a
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9b88(%rip), %xmm0     # 0x31bf8
callq 0x29578
movsd 0x9b23(%rip), %xmm0     # 0x31ba0
movsd 0x9adb(%rip), %xmm1     # 0x31b60
callq 0x597c
movsd %xmm0, -0x20(%rbp)
movsd 0x9b09(%rip), %xmm0     # 0x31ba0
movsd 0x9ac1(%rip), %xmm1     # 0x31b60
callq 0x5a24
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x29578
movsd 0x9aec(%rip), %xmm0     # 0x31ba8
movsd 0x9aec(%rip), %xmm1     # 0x31bb0
callq 0x597c
movsd %xmm0, -0x20(%rbp)
movsd 0x9ad2(%rip), %xmm0     # 0x31ba8
movsd 0x9ad2(%rip), %xmm1     # 0x31bb0
callq 0x5a24
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x29578
movsd 0x5435(%rip), %xmm0     # 0x2d530
movsd 0x3f0d(%rip), %xmm1     # 0x2c010
callq 0x597c
movsd %xmm0, -0x20(%rbp)
movsd 0x541b(%rip), %xmm0     # 0x2d530
movsd 0x3ef3(%rip), %xmm1     # 0x2c010
callq 0x5a24
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x29578
movsd 0x9a96(%rip), %xmm0     # 0x31bd0
callq 0x5a3c
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x549b(%rip), %xmm0     # 0x2d5e8
callq 0x29578
movsd 0x9a7e(%rip), %xmm0     # 0x31bd8
callq 0x5a3c
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x547b(%rip), %xmm0     # 0x2d5e8
callq 0x29578
movsd 0x9a66(%rip), %xmm0     # 0x31be0
callq 0x5a3c
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9a63(%rip), %xmm0     # 0x31bf0
callq 0x29578
movsd 0x9a4e(%rip), %xmm0     # 0x31be8
callq 0x5a3c
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9a43(%rip), %xmm0     # 0x31bf0
callq 0x29578
movsd 0x9a36(%rip), %xmm0     # 0x31bf0
callq 0x5a3c
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9a23(%rip), %xmm0     # 0x31bf0
callq 0x29578
movsd 0x99f6(%rip), %xmm0     # 0x31bd0
callq 0x5a46
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x53fb(%rip), %xmm0     # 0x2d5e8
callq 0x29578
movsd 0x99de(%rip), %xmm0     # 0x31bd8
callq 0x5a46
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x53db(%rip), %xmm0     # 0x2d5e8
callq 0x29578
movsd 0x99c6(%rip), %xmm0     # 0x31be0
callq 0x5a46
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x53bb(%rip), %xmm0     # 0x2d5e8
callq 0x29578
movsd 0x99ae(%rip), %xmm0     # 0x31be8
callq 0x5a46
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x539b(%rip), %xmm0     # 0x2d5e8
callq 0x29578
movsd 0x9996(%rip), %xmm0     # 0x31bf0
callq 0x5a46
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9983(%rip), %xmm0     # 0x31bf0
callq 0x29578
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x28295
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x32e0
movq %rbx, %rdi
callq 0x34b0
nop