// File: /workspace/github_cpp_makefile_star2_O1/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 0xb06f(%rip), %rsi      # 0x31cac
leaq 0xb08d(%rip), %rdx      # 0x31cd1
leaq -0x48(%rbp), %r14
movq %r14, %rdi
callq 0x4e0a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28e38
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x26c70
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x32e0
xorps %xmm0, %xmm0
callq 0x5724
movaps %xmm0, %xmm1
movsd 0x539d(%rip), %xmm0     # 0x2c020
movq %rbx, %rdi
callq 0x2943c
xorps %xmm0, %xmm0
callq 0x572e
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x2943c
movsd 0xadaf(%rip), %xmm0     # 0x31a58
callq 0x57ec
mulsd 0x538a(%rip), %xmm0     # 0x2c040
movsd %xmm0, -0x20(%rbp)
movsd 0xadb5(%rip), %xmm0     # 0x31a78
callq 0x5724
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x2943c
movsd 0xad78(%rip), %xmm0     # 0x31a58
callq 0x57ec
mulsd 0x5353(%rip), %xmm0     # 0x2c040
movsd %xmm0, -0x20(%rbp)
movsd 0xad7e(%rip), %xmm0     # 0x31a78
callq 0x572e
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x2943c
movsd 0xad69(%rip), %xmm0     # 0x31a80
callq 0x5724
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x2943c
movsd 0xad4e(%rip), %xmm0     # 0x31a80
callq 0x572e
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x52db(%rip), %xmm0     # 0x2c020
callq 0x2943c
movsd 0x52d6(%rip), %xmm0     # 0x2c028
callq 0x5724
movaps %xmm0, %xmm1
movsd 0x52ce(%rip), %xmm0     # 0x2c030
movq %rbx, %rdi
callq 0x2943c
movsd 0x52b6(%rip), %xmm0     # 0x2c028
callq 0x572e
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x2943c
movsd 0xacfb(%rip), %xmm0     # 0x31a88
callq 0x5724
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x2943c
movsd 0xace0(%rip), %xmm0     # 0x31a88
callq 0x572e
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x5275(%rip), %xmm0     # 0x2c030
callq 0x2943c
movsd 0x5240(%rip), %xmm0     # 0x2c008
callq 0x5724
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x5245(%rip), %xmm0     # 0x2c020
callq 0x2943c
movsd 0x5220(%rip), %xmm0     # 0x2c008
callq 0x572e
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x2943c
xorps %xmm0, %xmm0
callq 0x5738
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x2943c
movsd 0xac5f(%rip), %xmm0     # 0x31a78
callq 0x5738
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x51f4(%rip), %xmm0     # 0x2c020
callq 0x2943c
movsd 0xac47(%rip), %xmm0     # 0x31a80
callq 0x5738
movaps %xmm0, %xmm1
movsd 0xac47(%rip), %xmm0     # 0x31a90
movq %rbx, %rdi
callq 0x2a036
movsd 0xac3f(%rip), %xmm0     # 0x31a98
callq 0x5738
movaps %xmm0, %xmm1
movsd 0xac37(%rip), %xmm0     # 0x31aa0
movq %rbx, %rdi
callq 0x2a7ca
movsd 0x51a7(%rip), %xmm0     # 0x2c020
callq 0x56fc
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x2943c
xorps %xmm0, %xmm0
callq 0x56fc
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xabde(%rip), %xmm0     # 0x31a80
callq 0x2943c
movsd 0x5181(%rip), %xmm0     # 0x2c030
callq 0x56fc
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x5166(%rip), %xmm0     # 0x2c028
callq 0x2943c
movsd 0xab89(%rip), %xmm0     # 0x31a58
callq 0x57ec
mulsd 0x5164(%rip), %xmm0     # 0x2c040
callq 0x56fc
movapd %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xab88(%rip), %xmm0     # 0x31a78
callq 0x2943c
xorps %xmm0, %xmm0
callq 0x5706
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x2943c
movsd 0x510d(%rip), %xmm0     # 0x2c020
callq 0x5706
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xab5a(%rip), %xmm0     # 0x31a80
callq 0x2943c
movsd 0x50fd(%rip), %xmm0     # 0x2c030
callq 0x5706
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xab52(%rip), %xmm0     # 0x31a98
callq 0x2943c
movsd 0xab05(%rip), %xmm0     # 0x31a58
callq 0x57ec
mulsd 0x50e0(%rip), %xmm0     # 0x2c040
callq 0x5706
movapd %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xab04(%rip), %xmm0     # 0x31a78
callq 0x2943c
xorps %xmm0, %xmm0
callq 0x5710
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x2943c
movsd 0x5089(%rip), %xmm0     # 0x2c020
callq 0x5710
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xaace(%rip), %xmm0     # 0x31a78
callq 0x2943c
movsd 0xaad9(%rip), %xmm0     # 0x31a90
callq 0x5710
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xaab6(%rip), %xmm0     # 0x31a80
callq 0x2943c
movsd 0xaac9(%rip), %xmm0     # 0x31aa0
callq 0x5710
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xaaae(%rip), %xmm0     # 0x31a98
callq 0x2943c
movsd 0xaab1(%rip), %xmm0     # 0x31aa8
callq 0x5710
movsd %xmm0, -0x20(%rbp)
movsd 0xaaa7(%rip), %xmm0     # 0x31ab0
callq 0x5710
movsd %xmm0, -0x28(%rbp)
movsd 0xaa9d(%rip), %xmm0     # 0x31ab8
callq 0x5710
movaps %xmm0, %xmm1
movsd -0x28(%rbp), %xmm0
addsd -0x20(%rbp), %xmm0
movq %rbx, %rdi
callq 0x2943c
xorpd %xmm0, %xmm0
callq 0x5710
movsd %xmm0, -0x20(%rbp)
xorpd %xmm0, %xmm0
movsd 0x4fd1(%rip), %xmm1     # 0x2c020
callq 0x571a
movapd %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x2943c
movsd 0x4fb3(%rip), %xmm0     # 0x2c020
callq 0x5710
movsd %xmm0, -0x20(%rbp)
movsd 0x4fa1(%rip), %xmm0     # 0x2c020
movaps %xmm0, %xmm1
callq 0x571a
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x2943c
movsd 0xa9f1(%rip), %xmm0     # 0x31a90
callq 0x5710
movsd %xmm0, -0x20(%rbp)
xorps %xmm1, %xmm1
movsd 0x4f6c(%rip), %xmm0     # 0x2c020
callq 0x571a
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x2943c
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x270ec
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x32e0
movq %rbx, %rdi
callq 0x34b0