Skip to content

Commit

Permalink
[trig] do not generate tests for named parameters; regen test files
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Jul 29, 2011
1 parent bede20a commit 07f400b
Show file tree
Hide file tree
Showing 14 changed files with 220 additions and 402 deletions.
146 changes: 58 additions & 88 deletions S32-trig/atan2.t
Original file line number Diff line number Diff line change
Expand Up @@ -87,211 +87,181 @@ is_approx(atan2(-4, -4), -3 * pi / 4, "atan2(-4, -4) is -3pi / 4");

{
# Num tests
is_approx(atan2((10).Num), 1.47112767430373, "atan2(Num)");
is_approx(atan2(:y((100).Num)), 1.56079666010823, "atan2(:y(Num))");
is_approx(atan2((1).Num), 0.785398163397448, "atan2(Num)");
}

{
# Num vs Num tests
is_approx((1).Num.atan2((-10).Num), 3.04192400109863, "Num.atan2(Num)");
is_approx(atan2((0.1).Num, (10).Num), 0.00999966668666524, "atan2(Num, Num)");
is_approx(atan2(:y((0.1).Num), :x((0.1).Num)), 0.785398163397448, "atan2(:y(Num), :x(Num))");
is_approx((-0.1).Num.atan2((100).Num), -0.000999999666666867, "Num.atan2(Num)");
is_approx(atan2((0.1).Num, (1).Num), 0.099668652491162, "atan2(Num, Num)");
}

{
# Num vs Rat tests
is_approx((0.1).Num.atan2((-10).Rat(1e-9)), 3.13159298690313, "Num.atan2(Rat)");
is_approx(atan2((-0.1).Num, (0.1).Rat(1e-9)), -0.785398163397448, "atan2(Num, Rat)");
is_approx(atan2(:y((1).Num), :x((1).Rat(1e-9))), 0.785398163397448, "atan2(:y(Num), :x(Rat))");
is_approx((-100).Num.atan2((-10).Rat), -1.67046497928606, "Num.atan2(Rat)");
is_approx(atan2((-100).Num, (100).Rat), -0.785398163397448, "atan2(Num, Rat)");
}

{
# Num vs Int tests
is_approx((-100).Num.atan2((100).Int), -0.785398163397448, "Num.atan2(Int)");
is_approx(atan2((100).Num, (100).Int), 0.785398163397448, "atan2(Num, Int)");
is_approx(atan2(:y((10).Num), :x((100).Int)), 0.099668652491162, "atan2(:y(Num), :x(Int))");
is_approx((-10).Num.atan2((10).Int), -0.785398163397448, "Num.atan2(Int)");
is_approx(atan2((-10).Num, (-10).Int), -2.35619449019234, "atan2(Num, Int)");
}

{
# Num vs Str tests
is_approx((0.1).Num.atan2((-10).Str), 3.13159298690313, "Num.atan2(Str)");
is_approx(atan2((-1).Num, (10).Str), -0.099668652491162, "atan2(Num, Str)");
is_approx(atan2(:y((100).Num), :x((-1).Str)), 1.58079599348156, "atan2(:y(Num), :x(Str))");
is_approx((-1).Num.atan2((100).Str), -0.00999966668666524, "Num.atan2(Str)");
is_approx(atan2((-10).Num, (-0.1).Str), -1.58079599348156, "atan2(Num, Str)");
}

{
# Num vs DifferentReal tests
is_approx((-1).Num.atan2(DifferentReal.new(10)), -0.099668652491162, "Num.atan2(DifferentReal)");
is_approx(atan2((-100).Num, DifferentReal.new(-0.1)), -1.57179632646156, "atan2(Num, DifferentReal)");
is_approx(atan2(:y((-0.1).Num), :x(DifferentReal.new(-100))), -3.14059265392313, "atan2(:y(Num), :x(DifferentReal))");
is_approx((-100).Num.atan2(DifferentReal.new(-0.1)), -1.57179632646156, "Num.atan2(DifferentReal)");
is_approx(atan2((-100).Num, DifferentReal.new(-1)), -1.58079599348156, "atan2(Num, DifferentReal)");
}

{
# Rat tests
is_approx((-0.1).Rat(1e-9).atan2, -0.099668652491162, "Rat.atan2");
is_approx(atan2((-1).Rat(1e-9)), -0.785398163397448, "atan2(Rat)");
is_approx(atan2(:y((-100).Rat(1e-9))), -1.56079666010823, "atan2(:y(Rat))");
is_approx((-0.1).Rat.atan2, -0.099668652491162, "Rat.atan2");
is_approx(atan2((-1).Rat), -0.785398163397448, "atan2(Rat)");
}

{
# Rat vs Num tests
is_approx((0.1).Rat(1e-9).atan2((-100).Num), 3.14059265392313, "Rat.atan2(Num)");
is_approx(atan2((-10).Rat(1e-9), (10).Num), -0.785398163397448, "atan2(Rat, Num)");
is_approx(atan2(:y((0.1).Rat(1e-9)), :x((-10).Num)), 3.13159298690313, "atan2(:y(Rat), :x(Num))");
is_approx((-1).Rat.atan2((-0.1).Num), -1.67046497928606, "Rat.atan2(Num)");
is_approx(atan2((-100).Rat, (-1).Num), -1.58079599348156, "atan2(Rat, Num)");
}

{
# Rat vs Rat tests
is_approx((10).Rat(1e-9).atan2((-100).Rat(1e-9)), 3.04192400109863, "Rat.atan2(Rat)");
is_approx(atan2((-1).Rat(1e-9), (10).Rat(1e-9)), -0.099668652491162, "atan2(Rat, Rat)");
is_approx(atan2(:y((-0.1).Rat(1e-9)), :x((0.1).Rat(1e-9))), -0.785398163397448, "atan2(:y(Rat), :x(Rat))");
is_approx((-100).Rat.atan2((1).Rat), -1.56079666010823, "Rat.atan2(Rat)");
is_approx(atan2((-0.1).Rat, (-1).Rat), -3.04192400109863, "atan2(Rat, Rat)");
}

{
# Rat vs Int tests
is_approx((10).Rat(1e-9).atan2((100).Int), 0.099668652491162, "Rat.atan2(Int)");
is_approx(atan2((-0.1).Rat(1e-9), (-100).Int), -3.14059265392313, "atan2(Rat, Int)");
is_approx(atan2(:y((-10).Rat(1e-9)), :x((1).Int)), -1.47112767430373, "atan2(:y(Rat), :x(Int))");
is_approx((-0.1).Rat.atan2((-1).Int), -3.04192400109863, "Rat.atan2(Int)");
is_approx(atan2((-0.1).Rat, (1).Int), -0.099668652491162, "atan2(Rat, Int)");
}

{
# Rat vs Str tests
is_approx((100).Rat(1e-9).atan2((1).Str), 1.56079666010823, "Rat.atan2(Str)");
is_approx(atan2((-100).Rat(1e-9), (0.1).Str), -1.56979632712823, "atan2(Rat, Str)");
is_approx(atan2(:y((1).Rat(1e-9)), :x((1).Str)), 0.785398163397448, "atan2(:y(Rat), :x(Str))");
is_approx((-0.1).Rat.atan2((1).Str), -0.099668652491162, "Rat.atan2(Str)");
is_approx(atan2((0.1).Rat, (10).Str), 0.00999966668666524, "atan2(Rat, Str)");
}

{
# Rat vs DifferentReal tests
is_approx((100).Rat(1e-9).atan2(DifferentReal.new(0.1)), 1.56979632712823, "Rat.atan2(DifferentReal)");
is_approx(atan2((-10).Rat(1e-9), DifferentReal.new(100)), -0.099668652491162, "atan2(Rat, DifferentReal)");
is_approx(atan2(:y((-0.1).Rat(1e-9)), :x(DifferentReal.new(-0.1))), -2.35619449019234, "atan2(:y(Rat), :x(DifferentReal))");
is_approx((-10).Rat.atan2(DifferentReal.new(10)), -0.785398163397448, "Rat.atan2(DifferentReal)");
is_approx(atan2((0.1).Rat, DifferentReal.new(100)), 0.000999999666666867, "atan2(Rat, DifferentReal)");
}

{
# Int tests
is_approx((-100).Int.atan2, -1.56079666010823, "Int.atan2");
is_approx(atan2((-10).Int), -1.47112767430373, "atan2(Int)");
is_approx(atan2(:y((-100).Int)), -1.56079666010823, "atan2(:y(Int))");
is_approx((1).Int.atan2, 0.785398163397448, "Int.atan2");
is_approx(atan2((10).Int), 1.47112767430373, "atan2(Int)");
}

{
# Int vs Num tests
is_approx((-10).Int.atan2((1).Num), -1.47112767430373, "Int.atan2(Num)");
is_approx(atan2((1).Int, (1).Num), 0.785398163397448, "atan2(Int, Num)");
is_approx(atan2(:y((-10).Int), :x((-100).Num)), -3.04192400109863, "atan2(:y(Int), :x(Num))");
is_approx((-100).Int.atan2((-100).Num), -2.35619449019234, "Int.atan2(Num)");
is_approx(atan2((-10).Int, (0.1).Num), -1.56079666010823, "atan2(Int, Num)");
}

{
# Int vs Rat tests
is_approx((-1).Int.atan2((1).Rat(1e-9)), -0.785398163397448, "Int.atan2(Rat)");
is_approx(atan2((10).Int, (100).Rat(1e-9)), 0.099668652491162, "atan2(Int, Rat)");
is_approx(atan2(:y((-100).Int), :x((100).Rat(1e-9))), -0.785398163397448, "atan2(:y(Int), :x(Rat))");
is_approx((10).Int.atan2((100).Rat), 0.099668652491162, "Int.atan2(Rat)");
is_approx(atan2((100).Int, (-100).Rat), 2.35619449019234, "atan2(Int, Rat)");
}

{
# Int vs Int tests
is_approx((-1).Int.atan2((10).Int), -0.099668652491162, "Int.atan2(Int)");
is_approx(atan2((100).Int, (1).Int), 1.56079666010823, "atan2(Int, Int)");
is_approx(atan2(:y((-1).Int), :x((-100).Int)), -3.13159298690313, "atan2(:y(Int), :x(Int))");
is_approx((1).Int.atan2((-1).Int), 2.35619449019234, "Int.atan2(Int)");
is_approx(atan2((1).Int, (1).Int), 0.785398163397448, "atan2(Int, Int)");
}

{
# Int vs Str tests
is_approx((-100).Int.atan2((1).Str), -1.56079666010823, "Int.atan2(Str)");
is_approx(atan2((100).Int, (-0.1).Str), 1.57179632646156, "atan2(Int, Str)");
is_approx(atan2(:y((100).Int), :x((-100).Str)), 2.35619449019234, "atan2(:y(Int), :x(Str))");
is_approx((1).Int.atan2((10).Str), 0.099668652491162, "Int.atan2(Str)");
is_approx(atan2((1).Int, (0.1).Str), 1.47112767430373, "atan2(Int, Str)");
}

{
# Int vs DifferentReal tests
is_approx((1).Int.atan2(DifferentReal.new(-100)), 3.13159298690313, "Int.atan2(DifferentReal)");
is_approx(atan2((-10).Int, DifferentReal.new(1)), -1.47112767430373, "atan2(Int, DifferentReal)");
is_approx(atan2(:y((100).Int), :x(DifferentReal.new(1))), 1.56079666010823, "atan2(:y(Int), :x(DifferentReal))");
is_approx((1).Int.atan2(DifferentReal.new(-10)), 3.04192400109863, "Int.atan2(DifferentReal)");
is_approx(atan2((-100).Int, DifferentReal.new(0.1)), -1.56979632712823, "atan2(Int, DifferentReal)");
}

{
# Str tests
is_approx((-10).Str.atan2, -1.47112767430373, "Str.atan2");
is_approx(atan2((-0.1).Str), -0.099668652491162, "atan2(Str)");
is_approx(atan2(:y((-1).Str)), -0.785398163397448, "atan2(:y(Str))");
is_approx((10).Str.atan2, 1.47112767430373, "Str.atan2");
is_approx(atan2((0.1).Str), 0.099668652491162, "atan2(Str)");
}

{
# Str vs Num tests
is_approx((-10).Str.atan2((10).Num), -0.785398163397448, "Str.atan2(Num)");
is_approx(atan2((-1).Str, (10).Num), -0.099668652491162, "atan2(Str, Num)");
is_approx(atan2(:y((-10).Str), :x((-10).Num)), -2.35619449019234, "atan2(:y(Str), :x(Num))");
is_approx((-0.1).Str.atan2((10).Num), -0.00999966668666524, "Str.atan2(Num)");
is_approx(atan2((10).Str, (100).Num), 0.099668652491162, "atan2(Str, Num)");
}

{
# Str vs Rat tests
is_approx((-10).Str.atan2((-10).Rat(1e-9)), -2.35619449019234, "Str.atan2(Rat)");
is_approx(atan2((-100).Str, (100).Rat(1e-9)), -0.785398163397448, "atan2(Str, Rat)");
is_approx(atan2(:y((100).Str), :x((100).Rat(1e-9))), 0.785398163397448, "atan2(:y(Str), :x(Rat))");
is_approx((-100).Str.atan2((0.1).Rat), -1.56979632712823, "Str.atan2(Rat)");
is_approx(atan2((-10).Str, (-1).Rat), -1.67046497928606, "atan2(Str, Rat)");
}

{
# Str vs Int tests
is_approx((-100).Str.atan2((10).Int), -1.47112767430373, "Str.atan2(Int)");
is_approx((1).Str.atan2((-1).Int), 2.35619449019234, "Str.atan2(Int)");
is_approx(atan2((10).Str, (-100).Int), 3.04192400109863, "atan2(Str, Int)");
is_approx(atan2(:y((0.1).Str), :x((100).Int)), 0.000999999666666867, "atan2(:y(Str), :x(Int))");
}

{
# Str vs Str tests
is_approx((-1).Str.atan2((-10).Str), -3.04192400109863, "Str.atan2(Str)");
is_approx(atan2((1).Str, (100).Str), 0.00999966668666524, "atan2(Str, Str)");
is_approx(atan2(:y((-1).Str), :x((-1).Str)), -2.35619449019234, "atan2(:y(Str), :x(Str))");
is_approx((-100).Str.atan2((-100).Str), -2.35619449019234, "Str.atan2(Str)");
is_approx(atan2((10).Str, (-100).Str), 3.04192400109863, "atan2(Str, Str)");
}

{
# Str vs DifferentReal tests
is_approx((1).Str.atan2(DifferentReal.new(-100)), 3.13159298690313, "Str.atan2(DifferentReal)");
is_approx(atan2((0.1).Str, DifferentReal.new(100)), 0.000999999666666867, "atan2(Str, DifferentReal)");
is_approx(atan2(:y((-1).Str), :x(DifferentReal.new(-100))), -3.13159298690313, "atan2(:y(Str), :x(DifferentReal))");
is_approx((0.1).Str.atan2(DifferentReal.new(-0.1)), 2.35619449019234, "Str.atan2(DifferentReal)");
is_approx(atan2((-1).Str, DifferentReal.new(-100)), -3.13159298690313, "atan2(Str, DifferentReal)");
}

{
# DifferentReal tests
is_approx(DifferentReal.new(100).atan2, 1.56079666010823, "DifferentReal.atan2");
is_approx(atan2(DifferentReal.new(0.1)), 0.099668652491162, "atan2(DifferentReal)");
is_approx(atan2(:y(DifferentReal.new(0.1))), 0.099668652491162, "atan2(:y(DifferentReal))");
is_approx(DifferentReal.new(0.1).atan2, 0.099668652491162, "DifferentReal.atan2");
is_approx(atan2(DifferentReal.new(100)), 1.56079666010823, "atan2(DifferentReal)");
}

{
# DifferentReal vs Num tests
is_approx(DifferentReal.new(-10).atan2((-100).Num), -3.04192400109863, "DifferentReal.atan2(Num)");
is_approx(atan2(DifferentReal.new(-1), (1).Num), -0.785398163397448, "atan2(DifferentReal, Num)");
is_approx(atan2(:y(DifferentReal.new(-100)), :x((-100).Num)), -2.35619449019234, "atan2(:y(DifferentReal), :x(Num))");
is_approx(DifferentReal.new(1).atan2((-0.1).Num), 1.67046497928606, "DifferentReal.atan2(Num)");
is_approx(atan2(DifferentReal.new(0.1), (10).Num), 0.00999966668666524, "atan2(DifferentReal, Num)");
}

{
# DifferentReal vs Rat tests
is_approx(DifferentReal.new(100).atan2((100).Rat(1e-9)), 0.785398163397448, "DifferentReal.atan2(Rat)");
is_approx(atan2(DifferentReal.new(10), (-1).Rat(1e-9)), 1.67046497928606, "atan2(DifferentReal, Rat)");
is_approx(atan2(:y(DifferentReal.new(-1)), :x((100).Rat(1e-9))), -0.00999966668666524, "atan2(:y(DifferentReal), :x(Rat))");
is_approx(DifferentReal.new(-10).atan2((-0.1).Rat), -1.58079599348156, "DifferentReal.atan2(Rat)");
is_approx(atan2(DifferentReal.new(1), (10).Rat), 0.099668652491162, "atan2(DifferentReal, Rat)");
}

{
# DifferentReal vs Int tests
is_approx(DifferentReal.new(-100).atan2((-1).Int), -1.58079599348156, "DifferentReal.atan2(Int)");
is_approx(atan2(DifferentReal.new(-100), (-100).Int), -2.35619449019234, "atan2(DifferentReal, Int)");
is_approx(atan2(:y(DifferentReal.new(-10)), :x((-10).Int)), -2.35619449019234, "atan2(:y(DifferentReal), :x(Int))");
is_approx(DifferentReal.new(0.1).atan2((1).Int), 0.099668652491162, "DifferentReal.atan2(Int)");
is_approx(atan2(DifferentReal.new(-100), (-1).Int), -1.58079599348156, "atan2(DifferentReal, Int)");
}

{
# DifferentReal vs Str tests
is_approx(DifferentReal.new(100).atan2((1).Str), 1.56079666010823, "DifferentReal.atan2(Str)");
is_approx(atan2(DifferentReal.new(100), (1).Str), 1.56079666010823, "atan2(DifferentReal, Str)");
is_approx(atan2(:y(DifferentReal.new(0.1)), :x((-0.1).Str)), 2.35619449019234, "atan2(:y(DifferentReal), :x(Str))");
is_approx(DifferentReal.new(-10).atan2((-10).Str), -2.35619449019234, "DifferentReal.atan2(Str)");
is_approx(atan2(DifferentReal.new(100), (-100).Str), 2.35619449019234, "atan2(DifferentReal, Str)");
}

{
# DifferentReal vs DifferentReal tests
is_approx(DifferentReal.new(0.1).atan2(DifferentReal.new(10)), 0.00999966668666524, "DifferentReal.atan2(DifferentReal)");
is_approx(atan2(DifferentReal.new(10), DifferentReal.new(1)), 1.47112767430373, "atan2(DifferentReal, DifferentReal)");
is_approx(atan2(:y(DifferentReal.new(-0.1)), :x(DifferentReal.new(-1))), -3.04192400109863, "atan2(:y(DifferentReal), :x(DifferentReal))");
is_approx(DifferentReal.new(-0.1).atan2(DifferentReal.new(-1)), -3.04192400109863, "DifferentReal.atan2(DifferentReal)");
is_approx(atan2(DifferentReal.new(10), DifferentReal.new(100)), 0.099668652491162, "atan2(DifferentReal, DifferentReal)");
}

done;
Expand Down
30 changes: 9 additions & 21 deletions S32-trig/cos.t
Original file line number Diff line number Diff line change
Expand Up @@ -95,41 +95,35 @@ for @cosines -> $angle
{
# Num tests
is_approx(cos((-7.85398163404734).Num), 0, "cos(Num) - -7.85398163404734");
is_approx(cos(:x((-5.49778714383314).Num)), 0.707106781186548, "cos(:x(Num)) - -5.49778714383314");
}

{
# Rat tests
is_approx((-2.09439510241262).Rat(1e-9).cos, -0.5, "Rat.cos - -2.09439510241262");
is_approx(cos((-1.57079632680947).Rat(1e-9)), 0, "cos(Rat) - -1.57079632680947");
is_approx(cos(:x((-1.04719755120631).Rat(1e-9))), 0.5, "cos(:x(Rat)) - -1.04719755120631");
is_approx((-5.49778714383314).Rat(1e-9).cos, 0.707106781186548, "Rat.cos - -5.49778714383314");
is_approx(cos((-2.09439510241262).Rat(1e-9)), -0.5, "cos(Rat) - -2.09439510241262");
}

{
# Complex tests
is_approx(cos((-0.785398163404734 + 2i).Complex), 2.66027408529666 + 2.56457758882432i, "cos(Complex) - -0.785398163404734 + 2i");
is_approx(cos(:x((0 + 2i).Complex)), 3.76219569108363 + -0i, "cos(:x(Complex)) - 0 + 2i");
is_approx(cos((-1.57079632680947 + 2i).Complex), -5.48212707989036e-11 + 3.62686040784702i, "cos(Complex) - -1.57079632680947 + 2i");
}

{
# Str tests
is_approx((0.785398163404734).Str.cos, 0.707106781186548, "Str.cos - 0.785398163404734");
is_approx(cos((1.57079632680947).Str), 0, "cos(Str) - 1.57079632680947");
is_approx(cos(:x((2.3561944902142).Str)), -0.707106781186548, "cos(:x(Str)) - 2.3561944902142");
is_approx((-1.04719755120631).Str.cos, 0.5, "Str.cos - -1.04719755120631");
is_approx(cos((-0.785398163404734).Str), 0.707106781186548, "cos(Str) - -0.785398163404734");
}

{
# NotComplex tests
is_approx(NotComplex.new(3.14159265361894 + 2i).cos, -3.76219569108363 + 1.05698434049896e-10i, "NotComplex.cos - 3.14159265361894 + 2i");
is_approx(cos(NotComplex.new(3.92699081702367 + 2i)), -2.66027408521913 + 2.56457758889906i, "cos(NotComplex) - 3.92699081702367 + 2i");
is_approx(cos(:x(NotComplex.new(4.7123889804284 + 2i))), 1.64464647771967e-10 + 3.62686040784702i, "cos(:x(NotComplex)) - 4.7123889804284 + 2i");
is_approx(NotComplex.new(0 + 2i).cos, 3.76219569108363 + -0i, "NotComplex.cos - 0 + 2i");
is_approx(cos(NotComplex.new(0.785398163404734 + 2i)), 2.66027408529666 - 2.56457758882432i, "cos(NotComplex) - 0.785398163404734 + 2i");
}

{
# DifferentReal tests
is_approx(DifferentReal.new(5.23598775603156).cos, 0.5, "DifferentReal.cos - 5.23598775603156");
is_approx(cos(DifferentReal.new(8.63937979745208)), -0.707106781186548, "cos(DifferentReal) - 8.63937979745208");
is_approx(cos(:x(DifferentReal.new(10.9955742876663))), 0, "cos(:x(DifferentReal)) - 10.9955742876663");
is_approx(DifferentReal.new(1.57079632680947).cos, 0, "DifferentReal.cos - 1.57079632680947");
is_approx(cos(DifferentReal.new(2.3561944902142)), -0.707106781186548, "cos(DifferentReal) - 2.3561944902142");
}


Expand All @@ -156,41 +150,35 @@ for @cosines -> $angle
{
# Num tests
is_approx(acos((0.707106781186548).Num), 0.785398163404734, "acos(Num) - 0.785398163404734");
is_approx(acos(:x((0.707106781186548).Num)), 0.785398163404734, "acos(:x(Num)) - 0.785398163404734");
}

{
# Rat tests
is_approx(((0.707106781186548).Rat(1e-9)).acos, 0.785398163404734, "Rat.acos - 0.785398163404734");
is_approx(acos((0.707106781186548).Rat(1e-9)), 0.785398163404734, "acos(Rat) - 0.785398163404734");
is_approx(acos(:x((0.707106781186548).Rat(1e-9))), 0.785398163404734, "acos(:x(Rat)) - 0.785398163404734");
}

{
# Complex tests
is_approx(acos((0.785398163404734 + 2i).Complex), 1.22945740853541 - 1.49709293866352i, "acos(Complex) - 1.22945740853541 - 1.49709293866352i");
is_approx(acos(:x((0.785398163404734 + 2i).Complex)), 1.22945740853541 - 1.49709293866352i, "acos(:x(Complex)) - 1.22945740853541 - 1.49709293866352i");
}

{
# Str tests
is_approx(((0.707106781186548).Str).acos, 0.785398163404734, "Str.acos - 0.785398163404734");
is_approx(acos((0.707106781186548).Str), 0.785398163404734, "acos(Str) - 0.785398163404734");
is_approx(acos(:x((0.707106781186548).Str)), 0.785398163404734, "acos(:x(Str)) - 0.785398163404734");
}

{
# NotComplex tests
is_approx((NotComplex.new(0.785398163404734 + 2i)).acos, 1.22945740853541 - 1.49709293866352i, "NotComplex.acos - 1.22945740853541 - 1.49709293866352i");
is_approx(acos(NotComplex.new(0.785398163404734 + 2i)), 1.22945740853541 - 1.49709293866352i, "acos(NotComplex) - 1.22945740853541 - 1.49709293866352i");
is_approx(acos(:x(NotComplex.new(0.785398163404734 + 2i))), 1.22945740853541 - 1.49709293866352i, "acos(:x(NotComplex)) - 1.22945740853541 - 1.49709293866352i");
}

{
# DifferentReal tests
is_approx((DifferentReal.new(0.707106781186548)).acos, 0.785398163404734, "DifferentReal.acos - 0.785398163404734");
is_approx(acos(DifferentReal.new(0.707106781186548)), 0.785398163404734, "acos(DifferentReal) - 0.785398163404734");
is_approx(acos(:x(DifferentReal.new(0.707106781186548))), 0.785398163404734, "acos(:x(DifferentReal)) - 0.785398163404734");
}

done;
Expand Down
Loading

0 comments on commit 07f400b

Please sign in to comment.