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

    assertEquals(1.0, MathLib::cos(0));
    assertEquals(0.0, MathLib::sin(0));

    assertEquals(MathLib::sqrt(2)/2, MathLib::cos(pi/4));
    assertEquals(MathLib::sqrt(2)/2, MathLib::sin(pi/4));

    assertEquals(0.0, MathLib::cos(pi/2));
    assertEquals(1.0, MathLib::sin(pi/2));

    assertEquals(-1.0, MathLib::cos(pi));
    assertEquals(0.0, MathLib::sin(pi));

    assertEquals(0.0, MathLib::cos(3*pi/2));
    assertEquals(-1.0, MathLib::sin(3*pi/2));

    assertEquals(1.0, MathLib::cos(2*pi));
    assertEquals(0.0, MathLib::sin(2*pi));

    //tan
    assertEquals(0.0, MathLib::tan(0));
    assertEquals(1.0, MathLib::tan(pi/4));
    assertGreater(INFINITY_POSITIVE, MathLib::tan(pi/2));
    assertLess(INFINITY_NEGATIVE, MathLib::tan(-pi/2));

    //acos
    assertEquals(0.0, MathLib::acos(1));
    assertEquals(pi/2, MathLib::acos(0));
    assertEquals(pi, MathLib::acos(-1));
    assertEquals(pi/4, MathLib::acos(MathLib::sqrt(2)/2));

    //asin
    assertEquals(0.0, MathLib::asin(0));
    assertEquals(pi/2, MathLib::asin(1));
    assertEquals(-pi/2, MathLib::asin(-1));
    assertEquals(pi/4, MathLib::asin(MathLib::sqrt(2)/2));

    //atan
    assertEquals(0.0, MathLib::atan(0.0));
    assertEquals(pi/4, MathLib::atan(1.0));
    assertEquals(pi/2, MathLib::atan(INFINITY_POSITIVE));
    assertEquals(-pi/2, MathLib::atan(INFINITY_NEGATIVE));

    double atan_X = MathLib::atan(0.2);
    double atan_Y = MathLib::atan(0.3);
    double atan_XY = MathLib::atan((0.2+0.3)/(1-0.2*0.3));
    assertEquals(atan_X+atan_Y, atan_XY);

    assertEquals(MathLib::atan(0.0), MathLib::atan2(0.0, 1.0));
    assertEquals(MathLib::atan(1.0), MathLib::atan2(1.0, 1.0));
    assertEquals(MathLib::atan(INFINITY_POSITIVE), MathLib::atan2(1.0, 0.0));
}

// 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 0xaf2b(%rip), %rsi      # 0x31cac
leaq 0xaf49(%rip), %rdx      # 0x31cd1
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 0x26db4
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x32e0
xorps %xmm0, %xmm0
callq 0x5858
movaps %xmm0, %xmm1
movsd 0x5249(%rip), %xmm0     # 0x2c010
movq %rbx, %rdi
callq 0x29578
xorps %xmm0, %xmm0
callq 0x5862
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x29578
movsd 0xac6b(%rip), %xmm0     # 0x31a58
callq 0x5920
mulsd 0x5246(%rip), %xmm0     # 0x2c040
movsd %xmm0, -0x20(%rbp)
movsd 0xac71(%rip), %xmm0     # 0x31a78
callq 0x5858
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x29578
movsd 0xac34(%rip), %xmm0     # 0x31a58
callq 0x5920
mulsd 0x520f(%rip), %xmm0     # 0x2c040
movsd %xmm0, -0x20(%rbp)
movsd 0xac3a(%rip), %xmm0     # 0x31a78
callq 0x5862
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x29578
movsd 0xac25(%rip), %xmm0     # 0x31a80
callq 0x5858
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x29578
movsd 0xac0a(%rip), %xmm0     # 0x31a80
callq 0x5862
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x5187(%rip), %xmm0     # 0x2c010
callq 0x29578
movsd 0x5192(%rip), %xmm0     # 0x2c028
callq 0x5858
movaps %xmm0, %xmm1
movsd 0x518a(%rip), %xmm0     # 0x2c030
movq %rbx, %rdi
callq 0x29578
movsd 0x5172(%rip), %xmm0     # 0x2c028
callq 0x5862
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x29578
movsd 0xabb7(%rip), %xmm0     # 0x31a88
callq 0x5858
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x29578
movsd 0xab9c(%rip), %xmm0     # 0x31a88
callq 0x5862
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x5131(%rip), %xmm0     # 0x2c030
callq 0x29578
movsd 0x50fc(%rip), %xmm0     # 0x2c008
callq 0x5858
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x50f1(%rip), %xmm0     # 0x2c010
callq 0x29578
movsd 0x50dc(%rip), %xmm0     # 0x2c008
callq 0x5862
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x29578
xorps %xmm0, %xmm0
callq 0x586c
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x29578
movsd 0xab1b(%rip), %xmm0     # 0x31a78
callq 0x586c
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x50a0(%rip), %xmm0     # 0x2c010
callq 0x29578
movsd 0xab03(%rip), %xmm0     # 0x31a80
callq 0x586c
movaps %xmm0, %xmm1
movsd 0xab03(%rip), %xmm0     # 0x31a90
movq %rbx, %rdi
callq 0x2a148
movsd 0xaafb(%rip), %xmm0     # 0x31a98
callq 0x586c
movaps %xmm0, %xmm1
movsd 0xaaf3(%rip), %xmm0     # 0x31aa0
movq %rbx, %rdi
callq 0x2a8c0
movsd 0x5053(%rip), %xmm0     # 0x2c010
callq 0x5830
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x29578
xorps %xmm0, %xmm0
callq 0x5830
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xaa9a(%rip), %xmm0     # 0x31a80
callq 0x29578
movsd 0x503d(%rip), %xmm0     # 0x2c030
callq 0x5830
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x5022(%rip), %xmm0     # 0x2c028
callq 0x29578
movsd 0xaa45(%rip), %xmm0     # 0x31a58
callq 0x5920
mulsd 0x5020(%rip), %xmm0     # 0x2c040
callq 0x5830
movapd %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xaa44(%rip), %xmm0     # 0x31a78
callq 0x29578
xorps %xmm0, %xmm0
callq 0x583a
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x29578
movsd 0x4fb9(%rip), %xmm0     # 0x2c010
callq 0x583a
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xaa16(%rip), %xmm0     # 0x31a80
callq 0x29578
movsd 0x4fb9(%rip), %xmm0     # 0x2c030
callq 0x583a
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xaa0e(%rip), %xmm0     # 0x31a98
callq 0x29578
movsd 0xa9c1(%rip), %xmm0     # 0x31a58
callq 0x5920
mulsd 0x4f9c(%rip), %xmm0     # 0x2c040
callq 0x583a
movapd %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xa9c0(%rip), %xmm0     # 0x31a78
callq 0x29578
xorps %xmm0, %xmm0
callq 0x5844
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x29578
movsd 0x4f35(%rip), %xmm0     # 0x2c010
callq 0x5844
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xa98a(%rip), %xmm0     # 0x31a78
callq 0x29578
movsd 0xa995(%rip), %xmm0     # 0x31a90
callq 0x5844
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xa972(%rip), %xmm0     # 0x31a80
callq 0x29578
movsd 0xa985(%rip), %xmm0     # 0x31aa0
callq 0x5844
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xa96a(%rip), %xmm0     # 0x31a98
callq 0x29578
movsd 0xa96d(%rip), %xmm0     # 0x31aa8
callq 0x5844
movsd %xmm0, -0x20(%rbp)
movsd 0xa963(%rip), %xmm0     # 0x31ab0
callq 0x5844
movsd %xmm0, -0x28(%rbp)
movsd 0xa959(%rip), %xmm0     # 0x31ab8
callq 0x5844
movaps %xmm0, %xmm1
movsd -0x28(%rbp), %xmm0
addsd -0x20(%rbp), %xmm0
movq %rbx, %rdi
callq 0x29578
xorpd %xmm0, %xmm0
callq 0x5844
movsd %xmm0, -0x20(%rbp)
xorpd %xmm0, %xmm0
movsd 0x4e7d(%rip), %xmm1     # 0x2c010
callq 0x584e
movapd %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x29578
movsd 0x4e5f(%rip), %xmm0     # 0x2c010
callq 0x5844
movsd %xmm0, -0x20(%rbp)
movsd 0x4e4d(%rip), %xmm0     # 0x2c010
movaps %xmm0, %xmm1
callq 0x584e
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x29578
movsd 0xa8ad(%rip), %xmm0     # 0x31a90
callq 0x5844
movsd %xmm0, -0x20(%rbp)
xorps %xmm1, %xmm1
movsd 0x4e18(%rip), %xmm0     # 0x2c010
callq 0x584e
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
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 0x27230
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x32e0
movq %rbx, %rdi
callq 0x34b0