// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0x9c77(%rip), %rsi      # 0x25cac
leaq -0x48(%rbp), %r14
leaq -0x19(%rbp), %rdx
movq %r14, %rdi
callq 0x4ce2
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1df6c
leaq -0x48(%rbp), %rdi
callq 0x3100
xorps %xmm0, %xmm0
callq 0x5584
movaps %xmm0, %xmm1
movsd 0x3fa4(%rip), %xmm0     # 0x20010
movq %rbx, %rdi
callq 0x1e2a6
xorps %xmm0, %xmm0
callq 0x558e
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x1e2a6
movsd 0x99c6(%rip), %xmm0     # 0x25a58
callq 0x564c
mulsd 0x3fa1(%rip), %xmm0     # 0x20040
movsd %xmm0, -0x18(%rbp)
movsd 0x99cc(%rip), %xmm0     # 0x25a78
callq 0x5584
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x1e2a6
movsd 0x998f(%rip), %xmm0     # 0x25a58
callq 0x564c
mulsd 0x3f6a(%rip), %xmm0     # 0x20040
movsd %xmm0, -0x18(%rbp)
movsd 0x9995(%rip), %xmm0     # 0x25a78
callq 0x558e
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x1e2a6
movsd 0x9980(%rip), %xmm0     # 0x25a80
callq 0x5584
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x1e2a6
movsd 0x9965(%rip), %xmm0     # 0x25a80
callq 0x558e
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x3ee2(%rip), %xmm0     # 0x20010
callq 0x1e2a6
movsd 0x3eed(%rip), %xmm0     # 0x20028
callq 0x5584
movaps %xmm0, %xmm1
movsd 0x3ee5(%rip), %xmm0     # 0x20030
movq %rbx, %rdi
callq 0x1e2a6
movsd 0x3ecd(%rip), %xmm0     # 0x20028
callq 0x558e
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x1e2a6
movsd 0x9912(%rip), %xmm0     # 0x25a88
callq 0x5584
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x1e2a6
movsd 0x98f7(%rip), %xmm0     # 0x25a88
callq 0x558e
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x3e8c(%rip), %xmm0     # 0x20030
callq 0x1e2a6
movsd 0x3e57(%rip), %xmm0     # 0x20008
callq 0x5584
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x3e4c(%rip), %xmm0     # 0x20010
callq 0x1e2a6
movsd 0x3e37(%rip), %xmm0     # 0x20008
callq 0x558e
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x1e2a6
xorps %xmm0, %xmm0
callq 0x5598
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x1e2a6
movsd 0x9876(%rip), %xmm0     # 0x25a78
callq 0x5598
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x3dfb(%rip), %xmm0     # 0x20010
callq 0x1e2a6
movsd 0x985e(%rip), %xmm0     # 0x25a80
callq 0x5598
movaps %xmm0, %xmm1
movsd 0x985e(%rip), %xmm0     # 0x25a90
movq %rbx, %rdi
callq 0x1e72a
movsd 0x9856(%rip), %xmm0     # 0x25a98
callq 0x5598
movaps %xmm0, %xmm1
movsd 0x984e(%rip), %xmm0     # 0x25aa0
movq %rbx, %rdi
callq 0x1e9d4
movsd 0x3dae(%rip), %xmm0     # 0x20010
callq 0x555c
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x1e2a6
xorps %xmm0, %xmm0
callq 0x555c
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x97f5(%rip), %xmm0     # 0x25a80
callq 0x1e2a6
movsd 0x3d98(%rip), %xmm0     # 0x20030
callq 0x555c
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x3d7d(%rip), %xmm0     # 0x20028
callq 0x1e2a6
movsd 0x97a0(%rip), %xmm0     # 0x25a58
callq 0x564c
mulsd 0x3d7b(%rip), %xmm0     # 0x20040
callq 0x555c
movapd %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x979f(%rip), %xmm0     # 0x25a78
callq 0x1e2a6
xorps %xmm0, %xmm0
callq 0x5566
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x1e2a6
movsd 0x3d14(%rip), %xmm0     # 0x20010
callq 0x5566
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9771(%rip), %xmm0     # 0x25a80
callq 0x1e2a6
movsd 0x3d14(%rip), %xmm0     # 0x20030
callq 0x5566
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9769(%rip), %xmm0     # 0x25a98
callq 0x1e2a6
movsd 0x971c(%rip), %xmm0     # 0x25a58
callq 0x564c
mulsd 0x3cf7(%rip), %xmm0     # 0x20040
callq 0x5566
movapd %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x971b(%rip), %xmm0     # 0x25a78
callq 0x1e2a6
xorps %xmm0, %xmm0
callq 0x5570
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x1e2a6
movsd 0x3c90(%rip), %xmm0     # 0x20010
callq 0x5570
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x96e5(%rip), %xmm0     # 0x25a78
callq 0x1e2a6
movsd 0x96f0(%rip), %xmm0     # 0x25a90
callq 0x5570
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x96cd(%rip), %xmm0     # 0x25a80
callq 0x1e2a6
movsd 0x96e0(%rip), %xmm0     # 0x25aa0
callq 0x5570
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x96c5(%rip), %xmm0     # 0x25a98
callq 0x1e2a6
movsd 0x96c8(%rip), %xmm0     # 0x25aa8
callq 0x5570
movsd %xmm0, -0x18(%rbp)
movsd 0x96be(%rip), %xmm0     # 0x25ab0
callq 0x5570
movsd %xmm0, -0x28(%rbp)
movsd 0x96b4(%rip), %xmm0     # 0x25ab8
callq 0x5570
movaps %xmm0, %xmm1
movsd -0x28(%rbp), %xmm0
addsd -0x18(%rbp), %xmm0
movq %rbx, %rdi
callq 0x1e2a6
xorpd %xmm0, %xmm0
callq 0x5570
movsd %xmm0, -0x18(%rbp)
xorpd %xmm0, %xmm0
movsd 0x3bd8(%rip), %xmm1     # 0x20010
callq 0x557a
movapd %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x1e2a6
movsd 0x3bba(%rip), %xmm0     # 0x20010
callq 0x5570
movsd %xmm0, -0x18(%rbp)
movsd 0x3ba8(%rip), %xmm0     # 0x20010
movaps %xmm0, %xmm1
callq 0x557a
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x1e2a6
movsd 0x9608(%rip), %xmm0     # 0x25a90
callq 0x5570
movsd %xmm0, -0x18(%rbp)
xorps %xmm1, %xmm1
movsd 0x3b73(%rip), %xmm0     # 0x20010
callq 0x557a
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x1e2a6
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x3100
movq %rbx, %rdi
callq 0x34a0
nop