From 5ad2429f80b84949f8ef47ad15b5a602f7f4af5f Mon Sep 17 00:00:00 2001 From: Patrick Kofod Mogensen Date: Sun, 6 Aug 2017 21:17:20 +0200 Subject: [PATCH] Change |x| to abs(x) (#97) --- src/scalar/ScalarBenchmarks.jl | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/scalar/ScalarBenchmarks.jl b/src/scalar/ScalarBenchmarks.jl index 149bab69..45ac40ff 100644 --- a/src/scalar/ScalarBenchmarks.jl +++ b/src/scalar/ScalarBenchmarks.jl @@ -459,13 +459,13 @@ for T in (Float32, Float64) g["small", "negative argument", _arg_string] = @benchmarkable asin($(prevfloat(zero(T)))) g["one", "positive argument", _arg_string] = @benchmarkable asin($(one(T))) g["one", "negative argument", _arg_string] = @benchmarkable asin($(-one(T))) - g["|x| < 0.5", "positive argument", _arg_string] = @benchmarkable asin($(T(0.45))) - g["|x| < 0.5", "negative argument", _arg_string] = @benchmarkable asin($(T(-0.45))) - g["0.5 <= |x| < 0.975", "positive argument", _arg_string] = @benchmarkable asin($(T(0.6))) - g["0.5 <= |x| < 0.975", "negative argument", _arg_string] = @benchmarkable asin($T(-0.6)) + g["abs(x) < 0.5", "positive argument", _arg_string] = @benchmarkable asin($(T(0.45))) + g["abs(x) < 0.5", "negative argument", _arg_string] = @benchmarkable asin($(T(-0.45))) + g["0.5 <= abs(x) < 0.975", "positive argument", _arg_string] = @benchmarkable asin($(T(0.6))) + g["0.5 <= abs(x) < 0.975", "negative argument", _arg_string] = @benchmarkable asin($T(-0.6)) if T == Float64 - g["0.975 <= |x| < 1.0", "positive argument", _arg_string] = @benchmarkable asin($(0.98)) - g["0.975 <= |x| < 1.0", "negative argument", _arg_string] = @benchmarkable asin($(-0.98)) + g["0.975 <= abs(x) < 1.0", "positive argument", _arg_string] = @benchmarkable asin($(0.98)) + g["0.975 <= abs(x) < 1.0", "negative argument", _arg_string] = @benchmarkable asin($(-0.98)) end end @@ -481,10 +481,10 @@ for T in (Float32, Float64) g["small", "negative argument", _arg_string] = @benchmarkable acos($(prevfloat(zero(T)))) g["one", "positive argument", _arg_string] = @benchmarkable acos($(one(T))) g["one", "negative argument", _arg_string] = @benchmarkable acos($(-one(T))) - g["|x| < 0.5", "positive argument", _arg_string] = @benchmarkable acos($(T(0.45))) - g["|x| < 0.5", "negative argument", _arg_string] = @benchmarkable acos($(T(-0.45))) - g["0.5 <= |x| < 1", "positive argument", _arg_string] = @benchmarkable acos($(T(0.6))) - g["0.5 <= |x| < 1", "negative argument", _arg_string] = @benchmarkable acos($T(-0.6)) + g["abs(x) < 0.5", "positive argument", _arg_string] = @benchmarkable acos($(T(0.45))) + g["abs(x) < 0.5", "negative argument", _arg_string] = @benchmarkable acos($(T(-0.45))) + g["0.5 <= abs(x) < 1", "positive argument", _arg_string] = @benchmarkable acos($(T(0.6))) + g["0.5 <= abs(x) < 1", "negative argument", _arg_string] = @benchmarkable acos($T(-0.6)) end end # module