# Simple file to control trig test creation.

Function: sin
loop_over: @sines
desired_result: $angle.value
end-setup
complex_check: { (exp($_ * 1i) - exp(-$_ * 1i)) / 2i }
End

Function: cos
loop_over: @cosines
desired_result: $angle.value
end-setup
complex_check: { (exp($_ * 1i) + exp(-$_ * 1i)) / 2 }
End

Function: tan
loop_over: @sines
skip: abs(cos($angle)) < 1e-6
desired_result: sin($angle.key()) / cos($angle.key())
end-setup
complex_check: { sin($_) / cos($_) }
End

Function: sec
loop_over: @cosines
skip: abs(cos($angle)) < 1e-6
desired_result: 1.0 / cos($angle.key())
end-setup
rational_inverse_tests: (-3/2, -2/2, 2/2, 3/2)
complex_check: { 1.0 / cos($_) }
End

Function: cosec
loop_over: @sines
skip: abs(sin($angle)) < 1e-6
desired_result: 1.0 / sin($angle.key())
end-setup
rational_inverse_tests: (-3/2, -2/2, 2/2, 3/2)
complex_check: { 1.0 / sin($_) }
End

Function: cotan
loop_over: @sines
skip: abs(sin($angle)) < 1e-6
desired_result: cos($angle.key()) / sin($angle.key())
end-setup
complex_check: { cos($_) / sin($_) }
End

Function: sinh
loop_over: @sinhes
desired_result: $angle.value
end-setup
complex_check: { (exp($_) - exp(-$_)) / 2 }
plus_inf: Inf
minus_inf: -Inf
End

Function: cosh
loop_over: @coshes
desired_result: $angle.value
end-setup
rational_inverse_tests: (2/2, 3/2, 4/2, 5/2)
complex_check: { (exp($_) + exp(-$_)) / 2 }
plus_inf: Inf
minus_inf: Inf
End

Function: tanh
loop_over: @sines
skip: abs(cosh($angle)) < 1e-6
desired_result: sinh($angle.key()) / cosh($angle.key())
end-setup
rational_inverse_tests: (-2/2, -1/2, 0/1, 1/2)
complex_check: { sinh($_) / cosh($_) }
plus_inf: 1
minus_inf: -1
End

Function: sech
loop_over: @cosines
skip: abs(cosh($angle)) < 1e-6
desired_result: 1.0 / cosh($angle.key())
end-setup
rational_inverse_tests: (1/4, 1/2, 3/4, 2/2)
complex_check: { 1.0 / cosh($_) }
plus_inf: 0
minus_inf: 0
End

Function: cosech
loop_over: @sines
skip: abs(sinh($angle)) < 1e-6
desired_result: 1.0 / sinh($angle.key())
end-setup
complex_check: { 1.0 / sinh($_) }
plus_inf: 0
minus_inf: "-0"
End

Function: cotanh
loop_over: @sines
skip: abs(sinh($angle)) < 1e-6
desired_result: cosh($angle.key()) / sinh($angle.key())
end-setup
rational_inverse_tests: (-4/2, -3/2, 3/2, 4/2)
complex_check: { cosh($_) / sinh ($_) }
plus_inf: 1
minus_inf: -1
End
