// File: /workspace/github_cpp_makefile_star2_O1/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 0xa2b1(%rip), %rsi      # 0x31d66
leaq 0xa2c7(%rip), %rdx      # 0x31d83
leaq -0x40(%rbp), %r14
movq %r14, %rdi
callq 0x4e0a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28e38
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x27ae8
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x32e0
movsd 0x4698(%rip), %xmm0     # 0x2c188
callq 0x5862
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x29c7a
movsd 0x5a27(%rip), %xmm0     # 0x2d530
callq 0x5862
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x29c7a
movsd 0xa06e(%rip), %xmm0     # 0x31b90
callq 0x5862
movq %rbx, %rdi
movl $0x1, %esi
movl %eax, %edx
callq 0x29c7a
movsd 0xa05a(%rip), %xmm0     # 0x31b98
callq 0x5862
movq %rbx, %rdi
movl $0x1, %esi
movl %eax, %edx
callq 0x29c7a
movsd 0x9f76(%rip), %xmm0     # 0x31ad0
callq 0x5884
xorl %esi, %esi
testl %eax, %eax
setne %sil
movq %rbx, %rdi
callq 0x291ce
movsd 0x4611(%rip), %xmm0     # 0x2c188
callq 0x5884
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x29c7a
movsd 0x9ec8(%rip), %xmm0     # 0x31a58
movsd 0x9ed0(%rip), %xmm1     # 0x31a68
callq 0x57e2
movsd %xmm0, -0x20(%rbp)
movsd 0x9eae(%rip), %xmm0     # 0x31a58
movl $0x3, %edi
callq 0x58a6
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x2943c
movsd 0x5964(%rip), %xmm0     # 0x2d530
movl $0x3, %edi
callq 0x58a6
movaps %xmm0, %xmm1
movsd 0x9f0f(%rip), %xmm0     # 0x31af0
movq %rbx, %rdi
callq 0x2943c
movsd 0x9e67(%rip), %xmm0     # 0x31a58
movsd 0x9e6f(%rip), %xmm1     # 0x31a68
callq 0x57e2
movsd %xmm0, -0x20(%rbp)
movsd 0x9e55(%rip), %xmm1     # 0x31a60
movsd 0x9e45(%rip), %xmm0     # 0x31a58
callq 0x590a
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x2943c
movsd 0x5900(%rip), %xmm0     # 0x2d530
movsd 0x9e28(%rip), %xmm1     # 0x31a60
callq 0x590a
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9ea5(%rip), %xmm0     # 0x31af0
callq 0x2943c
movsd 0x9f48(%rip), %xmm0     # 0x31ba0
movsd 0x9f00(%rip), %xmm1     # 0x31b60
callq 0x5858
movsd %xmm0, -0x20(%rbp)
movsd 0x9f2e(%rip), %xmm0     # 0x31ba0
movsd 0x9ee6(%rip), %xmm1     # 0x31b60
callq 0x58b0
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x2943c
movsd 0x9f11(%rip), %xmm0     # 0x31ba8
movsd 0x9f11(%rip), %xmm1     # 0x31bb0
callq 0x5858
movsd %xmm0, -0x20(%rbp)
movsd 0x9ef7(%rip), %xmm0     # 0x31ba8
movsd 0x9ef7(%rip), %xmm1     # 0x31bb0
callq 0x58b0
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x2943c
movsd 0x434a(%rip), %xmm1     # 0x2c020
movsd 0x5852(%rip), %xmm0     # 0x2d530
callq 0x5858
movsd %xmm0, -0x20(%rbp)
movsd 0x5840(%rip), %xmm0     # 0x2d530
movsd 0x4328(%rip), %xmm1     # 0x2c020
callq 0x58b0
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x2943c
movsd 0x9dc3(%rip), %xmm1     # 0x31ad8
movsd 0x9db3(%rip), %xmm0     # 0x31ad0
callq 0x58ba
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9da0(%rip), %xmm0     # 0x31ad0
callq 0x2943c
movsd 0x9e7b(%rip), %xmm1     # 0x31bb8
movsd 0x9d8b(%rip), %xmm0     # 0x31ad0
callq 0x58ba
movaps %xmm0, %xmm1
movsd 0x9e6b(%rip), %xmm0     # 0x31bc0
movq %rbx, %rdi
callq 0x2943c
movsd 0x9e5b(%rip), %xmm0     # 0x31bc0
movsd 0x9d6b(%rip), %xmm1     # 0x31ad8
callq 0x58ba
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9d50(%rip), %xmm0     # 0x31ad0
callq 0x2943c
movsd 0x9e33(%rip), %xmm0     # 0x31bc0
movsd 0x9e23(%rip), %xmm1     # 0x31bb8
callq 0x58ba
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9e18(%rip), %xmm0     # 0x31bc0
callq 0x2943c
movsd 0x43d3(%rip), %xmm0     # 0x2c188
callq 0x58d2
xorl %esi, %esi
testl %eax, %eax
setne %sil
movq %rbx, %rdi
callq 0x291ce
movsd 0x424e(%rip), %xmm0     # 0x2c020
callq 0x58d2
xorl %esi, %esi
testl %eax, %eax
sete %sil
movq %rbx, %rdi
callq 0x291ce
movsd 0x9ca1(%rip), %xmm0     # 0x31a90
callq 0x58d2
xorl %esi, %esi
testl %eax, %eax
sete %sil
movq %rbx, %rdi
callq 0x291ce
movsd 0x9dbc(%rip), %xmm0     # 0x31bc8
callq 0x5840
callq 0x57ce
callq 0x5836
movsd %xmm0, -0x20(%rbp)
movsd 0x9da0(%rip), %xmm0     # 0x31bc8
callq 0x58e2
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x2943c
movsd 0x9d87(%rip), %xmm0     # 0x31bd0
callq 0x58ec
movaps %xmm0, %xmm1
movsd 0x578f(%rip), %xmm0     # 0x2d5e8
movq %rbx, %rdi
callq 0x2943c
movsd 0x9d6f(%rip), %xmm0     # 0x31bd8
callq 0x58ec
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x576c(%rip), %xmm0     # 0x2d5e8
callq 0x2943c
movsd 0x9d57(%rip), %xmm0     # 0x31be0
callq 0x58ec
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x574c(%rip), %xmm0     # 0x2d5e8
callq 0x2943c
movsd 0x9d3f(%rip), %xmm0     # 0x31be8
callq 0x58ec
movaps %xmm0, %xmm1
movsd 0x9d37(%rip), %xmm0     # 0x31bf0
movq %rbx, %rdi
callq 0x2943c
movsd 0x9d27(%rip), %xmm0     # 0x31bf0
callq 0x58ec
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9d14(%rip), %xmm0     # 0x31bf0
callq 0x2943c
movsd 0x9d0f(%rip), %xmm0     # 0x31bf8
movsd 0x9cff(%rip), %xmm1     # 0x31bf0
callq 0x58f6
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9cf4(%rip), %xmm0     # 0x31bf8
callq 0x2943c
movsd 0x555f(%rip), %xmm1     # 0x2d470
movsd 0x9cdf(%rip), %xmm0     # 0x31bf8
callq 0x58f6
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9ccc(%rip), %xmm0     # 0x31bf8
callq 0x2943c
movsd 0x9c67(%rip), %xmm0     # 0x31ba0
movsd 0x9c1f(%rip), %xmm1     # 0x31b60
callq 0x5858
movsd %xmm0, -0x20(%rbp)
movsd 0x9c4d(%rip), %xmm0     # 0x31ba0
movsd 0x9c05(%rip), %xmm1     # 0x31b60
callq 0x5900
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x2943c
movsd 0x9c30(%rip), %xmm0     # 0x31ba8
movsd 0x9c30(%rip), %xmm1     # 0x31bb0
callq 0x5858
movsd %xmm0, -0x20(%rbp)
movsd 0x9c16(%rip), %xmm0     # 0x31ba8
movsd 0x9c16(%rip), %xmm1     # 0x31bb0
callq 0x5900
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x2943c
movsd 0x5579(%rip), %xmm0     # 0x2d530
movsd 0x4061(%rip), %xmm1     # 0x2c020
callq 0x5858
movsd %xmm0, -0x20(%rbp)
movsd 0x555f(%rip), %xmm0     # 0x2d530
movsd 0x4047(%rip), %xmm1     # 0x2c020
callq 0x5900
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x2943c
movsd 0x9bda(%rip), %xmm0     # 0x31bd0
callq 0x5918
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x55df(%rip), %xmm0     # 0x2d5e8
callq 0x2943c
movsd 0x9bc2(%rip), %xmm0     # 0x31bd8
callq 0x5918
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x55bf(%rip), %xmm0     # 0x2d5e8
callq 0x2943c
movsd 0x9baa(%rip), %xmm0     # 0x31be0
callq 0x5918
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9ba7(%rip), %xmm0     # 0x31bf0
callq 0x2943c
movsd 0x9b92(%rip), %xmm0     # 0x31be8
callq 0x5918
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9b87(%rip), %xmm0     # 0x31bf0
callq 0x2943c
movsd 0x9b7a(%rip), %xmm0     # 0x31bf0
callq 0x5918
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9b67(%rip), %xmm0     # 0x31bf0
callq 0x2943c
movsd 0x9b3a(%rip), %xmm0     # 0x31bd0
callq 0x5922
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x553f(%rip), %xmm0     # 0x2d5e8
callq 0x2943c
movsd 0x9b22(%rip), %xmm0     # 0x31bd8
callq 0x5922
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x551f(%rip), %xmm0     # 0x2d5e8
callq 0x2943c
movsd 0x9b0a(%rip), %xmm0     # 0x31be0
callq 0x5922
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x54ff(%rip), %xmm0     # 0x2d5e8
callq 0x2943c
movsd 0x9af2(%rip), %xmm0     # 0x31be8
callq 0x5922
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x54df(%rip), %xmm0     # 0x2d5e8
callq 0x2943c
movsd 0x9ada(%rip), %xmm0     # 0x31bf0
callq 0x5922
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9ac7(%rip), %xmm0     # 0x31bf0
callq 0x2943c
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x28151
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x32e0
movq %rbx, %rdi
callq 0x34b0
nop