(FPCore (x) :precision binary64 (tanh x))
double code(double x) { return tanh(x); }
real(8) function code(x) real(8), intent (in) :: x code = tanh(x) end function
public static double code(double x) { return Math.tanh(x); }
def code(x): return math.tanh(x)
function code(x) return tanh(x) end
function tmp = code(x) tmp = tanh(x); end
code[x_] := N[Tanh[x], $MachinePrecision]
\begin{array}{l} \\ \tanh x \end{array}
Sampling outcomes in binary64 precision:
Herbie found 1 alternatives:
Alternative | Accuracy | Speedup |
---|
(FPCore (x) :precision binary64 (tanh x))
double code(double x) { return tanh(x); }
real(8) function code(x) real(8), intent (in) :: x code = tanh(x) end function
public static double code(double x) { return Math.tanh(x); }
def code(x): return math.tanh(x)
function code(x) return tanh(x) end
function tmp = code(x) tmp = tanh(x); end
code[x_] := N[Tanh[x], $MachinePrecision]
\begin{array}{l} \\ \tanh x \end{array}
(FPCore (x) :precision binary64 (tanh x))
double code(double x) { return tanh(x); }
real(8) function code(x) real(8), intent (in) :: x code = tanh(x) end function
public static double code(double x) { return Math.tanh(x); }
def code(x): return math.tanh(x)
function code(x) return tanh(x) end
function tmp = code(x) tmp = tanh(x); end
code[x_] := N[Tanh[x], $MachinePrecision]
\begin{array}{l} \\ \tanh x \end{array}
Initial program 100.0%
herbie shell --seed 1
(FPCore (x)
:name "tanh(x)"
:precision binary64
:pre (and (<= -1.79e+308 x) (<= x -1.79e+308))
(tanh x))