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

    assertEquals(8.0, MathLib::pow(2, 3));
    assertEquals(0.001, MathLib::pow(0.1, 3));
    assertEquals(10000.0, MathLib::pow(10, 4));

    assertEquals(25.0, MathLib::sqrt(625));
    assertEquals(11.0, MathLib::sqrt(121));
    assertEquals(3.0, MathLib::sqrt(9));
    assertEquals(11.09053, MathLib::sqrt(123));

    //hypotenuse of the right triangle
    assertEquals(5.0, MathLib::hypot(3,4));
    assertEquals(6.40312, MathLib::hypot(4,5));

    assertEquals(2.0, MathLib::cbrt(8.0));
    assertEquals(5.0, MathLib::cbrt(125.0));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x3550
movq -0x48(%rbp), %rdx
leaq 0xa3f1(%rip), %rsi      # 0x3dcfd
leaq -0x28(%rbp), %rdi
callq 0x5b40
jmp 0x33917
movq -0x50(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x35710
jmp 0x33926
leaq -0x28(%rbp), %rdi
callq 0x31c0
leaq -0x29(%rbp), %rdi
callq 0x3370
movsd 0x4700(%rip), %xmm0     # 0x38040
movsd 0xa0f0(%rip), %xmm1     # 0x3da38
callq 0x7870
movq -0x50(%rbp), %rdi
movaps %xmm0, %xmm1
movsd 0x4e34(%rip), %xmm0     # 0x38790
callq 0x35d20
movsd 0xa1e7(%rip), %xmm0     # 0x3db50
movsd 0xa0c7(%rip), %xmm1     # 0x3da38
callq 0x7870
movq -0x50(%rbp), %rdi
movaps %xmm0, %xmm1
movsd 0xa1c3(%rip), %xmm0     # 0x3db48
callq 0x35d20
movsd 0x5b7e(%rip), %xmm0     # 0x39510
movsd 0xa0a6(%rip), %xmm1     # 0x3da40
callq 0x7870
movq -0x50(%rbp), %rdi
movaps %xmm0, %xmm1
movsd 0xa192(%rip), %xmm0     # 0x3db40
callq 0x35d20
movsd 0xa17d(%rip), %xmm0     # 0x3db38
callq 0x78a0
movq -0x50(%rbp), %rdi
movaps %xmm0, %xmm1
movsd 0xa161(%rip), %xmm0     # 0x3db30
callq 0x35d20
movsd 0xa14c(%rip), %xmm0     # 0x3db28
callq 0x78a0
movq -0x50(%rbp), %rdi
movaps %xmm0, %xmm1
movsd 0xa130(%rip), %xmm0     # 0x3db20
callq 0x35d20
movsd 0xa11b(%rip), %xmm0     # 0x3db18
callq 0x78a0
movq -0x50(%rbp), %rdi
movaps %xmm0, %xmm1
movsd 0xa027(%rip), %xmm0     # 0x3da38
callq 0x35d20
movsd 0xa0f2(%rip), %xmm0     # 0x3db10
callq 0x78a0
movq -0x50(%rbp), %rdi
movaps %xmm0, %xmm1
movsd 0xa0d6(%rip), %xmm0     # 0x3db08
callq 0x35d20
movsd 0x9ff9(%rip), %xmm0     # 0x3da38
movsd 0x9ff9(%rip), %xmm1     # 0x3da40
callq 0x78c0
movq -0x50(%rbp), %rdi
movaps %xmm0, %xmm1
movsd 0x9fed(%rip), %xmm0     # 0x3da48
callq 0x35d20
movsd 0x9fd8(%rip), %xmm0     # 0x3da40
movsd 0x9fd8(%rip), %xmm1     # 0x3da48
callq 0x78c0
movq -0x50(%rbp), %rdi
movaps %xmm0, %xmm1
movsd 0xa07c(%rip), %xmm0     # 0x3db00
callq 0x35d20
movsd 0x4cff(%rip), %xmm0     # 0x38790
callq 0x7900
movq -0x50(%rbp), %rdi
movaps %xmm0, %xmm1
movsd 0x459b(%rip), %xmm0     # 0x38040
callq 0x35d20
movsd 0xa046(%rip), %xmm0     # 0x3daf8
callq 0x7900
movq -0x50(%rbp), %rdi
movaps %xmm0, %xmm1
movsd 0x9f82(%rip), %xmm0     # 0x3da48
callq 0x35d20
addq $0x50, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x33af4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x31c0
leaq -0x29(%rbp), %rdi
callq 0x3370
movq -0x38(%rbp), %rdi
callq 0x3540
nopw %cs:(%rax,%rax)