
(FPCore (x) :precision binary64 (log (+ x (sqrt (+ (* x x) 1.0)))))
double code(double x) {
return log((x + sqrt(((x * x) + 1.0))));
}
real(8) function code(x)
real(8), intent (in) :: x
code = log((x + sqrt(((x * x) + 1.0d0))))
end function
public static double code(double x) {
return Math.log((x + Math.sqrt(((x * x) + 1.0))));
}
def code(x): return math.log((x + math.sqrt(((x * x) + 1.0))))
function code(x) return log(Float64(x + sqrt(Float64(Float64(x * x) + 1.0)))) end
function tmp = code(x) tmp = log((x + sqrt(((x * x) + 1.0)))); end
code[x_] := N[Log[N[(x + N[Sqrt[N[(N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\log \left(x + \sqrt{x \cdot x + 1}\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x) :precision binary64 (log (+ x (sqrt (+ (* x x) 1.0)))))
double code(double x) {
return log((x + sqrt(((x * x) + 1.0))));
}
real(8) function code(x)
real(8), intent (in) :: x
code = log((x + sqrt(((x * x) + 1.0d0))))
end function
public static double code(double x) {
return Math.log((x + Math.sqrt(((x * x) + 1.0))));
}
def code(x): return math.log((x + math.sqrt(((x * x) + 1.0))))
function code(x) return log(Float64(x + sqrt(Float64(Float64(x * x) + 1.0)))) end
function tmp = code(x) tmp = log((x + sqrt(((x * x) + 1.0)))); end
code[x_] := N[Log[N[(x + N[Sqrt[N[(N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\log \left(x + \sqrt{x \cdot x + 1}\right)
\end{array}
(FPCore (x)
:precision binary64
(if (<= x -0.0142)
(- (log (- (hypot 1.0 x) x)))
(if (<= x 1.26)
(*
x
(+
1.0
(*
(pow x 2.0)
(-
(* (pow x 2.0) (+ 0.075 (* (pow x 2.0) -0.044642857142857144)))
0.16666666666666666))))
(log (* x 2.0)))))
double code(double x) {
double tmp;
if (x <= -0.0142) {
tmp = -log((hypot(1.0, x) - x));
} else if (x <= 1.26) {
tmp = x * (1.0 + (pow(x, 2.0) * ((pow(x, 2.0) * (0.075 + (pow(x, 2.0) * -0.044642857142857144))) - 0.16666666666666666)));
} else {
tmp = log((x * 2.0));
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= -0.0142) {
tmp = -Math.log((Math.hypot(1.0, x) - x));
} else if (x <= 1.26) {
tmp = x * (1.0 + (Math.pow(x, 2.0) * ((Math.pow(x, 2.0) * (0.075 + (Math.pow(x, 2.0) * -0.044642857142857144))) - 0.16666666666666666)));
} else {
tmp = Math.log((x * 2.0));
}
return tmp;
}
def code(x): tmp = 0 if x <= -0.0142: tmp = -math.log((math.hypot(1.0, x) - x)) elif x <= 1.26: tmp = x * (1.0 + (math.pow(x, 2.0) * ((math.pow(x, 2.0) * (0.075 + (math.pow(x, 2.0) * -0.044642857142857144))) - 0.16666666666666666))) else: tmp = math.log((x * 2.0)) return tmp
function code(x) tmp = 0.0 if (x <= -0.0142) tmp = Float64(-log(Float64(hypot(1.0, x) - x))); elseif (x <= 1.26) tmp = Float64(x * Float64(1.0 + Float64((x ^ 2.0) * Float64(Float64((x ^ 2.0) * Float64(0.075 + Float64((x ^ 2.0) * -0.044642857142857144))) - 0.16666666666666666)))); else tmp = log(Float64(x * 2.0)); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= -0.0142) tmp = -log((hypot(1.0, x) - x)); elseif (x <= 1.26) tmp = x * (1.0 + ((x ^ 2.0) * (((x ^ 2.0) * (0.075 + ((x ^ 2.0) * -0.044642857142857144))) - 0.16666666666666666))); else tmp = log((x * 2.0)); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, -0.0142], (-N[Log[N[(N[Sqrt[1.0 ^ 2 + x ^ 2], $MachinePrecision] - x), $MachinePrecision]], $MachinePrecision]), If[LessEqual[x, 1.26], N[(x * N[(1.0 + N[(N[Power[x, 2.0], $MachinePrecision] * N[(N[(N[Power[x, 2.0], $MachinePrecision] * N[(0.075 + N[(N[Power[x, 2.0], $MachinePrecision] * -0.044642857142857144), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Log[N[(x * 2.0), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.0142:\\
\;\;\;\;-\log \left(\mathsf{hypot}\left(1, x\right) - x\right)\\
\mathbf{elif}\;x \leq 1.26:\\
\;\;\;\;x \cdot \left(1 + {x}^{2} \cdot \left({x}^{2} \cdot \left(0.075 + {x}^{2} \cdot -0.044642857142857144\right) - 0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\log \left(x \cdot 2\right)\\
\end{array}
\end{array}
if x < -0.014200000000000001Initial program 5.6%
sqr-neg5.6%
+-commutative5.6%
sqr-neg5.6%
hypot-1-def6.8%
Simplified6.8%
flip-+7.2%
clear-num7.2%
log-div5.7%
metadata-eval5.7%
pow25.7%
hypot-1-def5.7%
hypot-1-def5.7%
add-sqr-sqrt6.1%
+-commutative6.1%
fma-define6.1%
Applied egg-rr6.1%
neg-sub06.1%
div-sub6.1%
fma-undefine6.1%
unpow26.1%
associate--r+6.1%
+-inverses6.1%
metadata-eval6.1%
*-rgt-identity6.1%
associate-/l*6.1%
metadata-eval6.1%
fma-undefine6.1%
unpow26.1%
associate--r+53.8%
+-inverses99.9%
metadata-eval99.9%
*-rgt-identity99.9%
associate-/l*99.9%
metadata-eval99.9%
*-commutative99.9%
neg-mul-199.9%
Simplified99.9%
if -0.014200000000000001 < x < 1.26000000000000001Initial program 8.9%
sqr-neg8.9%
+-commutative8.9%
sqr-neg8.9%
hypot-1-def9.0%
Simplified9.0%
Taylor expanded in x around 0 100.0%
if 1.26000000000000001 < x Initial program 48.3%
sqr-neg48.3%
+-commutative48.3%
sqr-neg48.3%
hypot-1-def100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x)
:precision binary64
(if (<= x -0.0009)
(- (log (- (hypot 1.0 x) x)))
(if (<= x 0.0012)
(+ x (* -0.16666666666666666 (pow x 3.0)))
(* 2.0 (log (sqrt (+ x (hypot 1.0 x))))))))
double code(double x) {
double tmp;
if (x <= -0.0009) {
tmp = -log((hypot(1.0, x) - x));
} else if (x <= 0.0012) {
tmp = x + (-0.16666666666666666 * pow(x, 3.0));
} else {
tmp = 2.0 * log(sqrt((x + hypot(1.0, x))));
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= -0.0009) {
tmp = -Math.log((Math.hypot(1.0, x) - x));
} else if (x <= 0.0012) {
tmp = x + (-0.16666666666666666 * Math.pow(x, 3.0));
} else {
tmp = 2.0 * Math.log(Math.sqrt((x + Math.hypot(1.0, x))));
}
return tmp;
}
def code(x): tmp = 0 if x <= -0.0009: tmp = -math.log((math.hypot(1.0, x) - x)) elif x <= 0.0012: tmp = x + (-0.16666666666666666 * math.pow(x, 3.0)) else: tmp = 2.0 * math.log(math.sqrt((x + math.hypot(1.0, x)))) return tmp
function code(x) tmp = 0.0 if (x <= -0.0009) tmp = Float64(-log(Float64(hypot(1.0, x) - x))); elseif (x <= 0.0012) tmp = Float64(x + Float64(-0.16666666666666666 * (x ^ 3.0))); else tmp = Float64(2.0 * log(sqrt(Float64(x + hypot(1.0, x))))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= -0.0009) tmp = -log((hypot(1.0, x) - x)); elseif (x <= 0.0012) tmp = x + (-0.16666666666666666 * (x ^ 3.0)); else tmp = 2.0 * log(sqrt((x + hypot(1.0, x)))); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, -0.0009], (-N[Log[N[(N[Sqrt[1.0 ^ 2 + x ^ 2], $MachinePrecision] - x), $MachinePrecision]], $MachinePrecision]), If[LessEqual[x, 0.0012], N[(x + N[(-0.16666666666666666 * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Log[N[Sqrt[N[(x + N[Sqrt[1.0 ^ 2 + x ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.0009:\\
\;\;\;\;-\log \left(\mathsf{hypot}\left(1, x\right) - x\right)\\
\mathbf{elif}\;x \leq 0.0012:\\
\;\;\;\;x + -0.16666666666666666 \cdot {x}^{3}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \log \left(\sqrt{x + \mathsf{hypot}\left(1, x\right)}\right)\\
\end{array}
\end{array}
if x < -8.9999999999999998e-4Initial program 5.6%
sqr-neg5.6%
+-commutative5.6%
sqr-neg5.6%
hypot-1-def6.8%
Simplified6.8%
flip-+7.2%
clear-num7.2%
log-div5.7%
metadata-eval5.7%
pow25.7%
hypot-1-def5.7%
hypot-1-def5.7%
add-sqr-sqrt6.1%
+-commutative6.1%
fma-define6.1%
Applied egg-rr6.1%
neg-sub06.1%
div-sub6.1%
fma-undefine6.1%
unpow26.1%
associate--r+6.1%
+-inverses6.1%
metadata-eval6.1%
*-rgt-identity6.1%
associate-/l*6.1%
metadata-eval6.1%
fma-undefine6.1%
unpow26.1%
associate--r+53.8%
+-inverses99.9%
metadata-eval99.9%
*-rgt-identity99.9%
associate-/l*99.9%
metadata-eval99.9%
*-commutative99.9%
neg-mul-199.9%
Simplified99.9%
if -8.9999999999999998e-4 < x < 0.00119999999999999989Initial program 8.2%
sqr-neg8.2%
+-commutative8.2%
sqr-neg8.2%
hypot-1-def8.2%
Simplified8.2%
Taylor expanded in x around 0 100.0%
distribute-rgt-in100.0%
*-lft-identity100.0%
associate-*l*100.0%
unpow2100.0%
unpow3100.0%
Simplified100.0%
if 0.00119999999999999989 < x Initial program 48.9%
sqr-neg48.9%
+-commutative48.9%
sqr-neg48.9%
hypot-1-def99.9%
Simplified99.9%
add-sqr-sqrt99.9%
pow299.9%
log-pow99.9%
Applied egg-rr99.9%
Final simplification100.0%
(FPCore (x)
:precision binary64
(if (<= x -0.0009)
(- (log (- (hypot 1.0 x) x)))
(if (<= x 0.00115)
(+ x (* -0.16666666666666666 (pow x 3.0)))
(+ 1.0 (+ (log (+ x (hypot 1.0 x))) -1.0)))))
double code(double x) {
double tmp;
if (x <= -0.0009) {
tmp = -log((hypot(1.0, x) - x));
} else if (x <= 0.00115) {
tmp = x + (-0.16666666666666666 * pow(x, 3.0));
} else {
tmp = 1.0 + (log((x + hypot(1.0, x))) + -1.0);
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= -0.0009) {
tmp = -Math.log((Math.hypot(1.0, x) - x));
} else if (x <= 0.00115) {
tmp = x + (-0.16666666666666666 * Math.pow(x, 3.0));
} else {
tmp = 1.0 + (Math.log((x + Math.hypot(1.0, x))) + -1.0);
}
return tmp;
}
def code(x): tmp = 0 if x <= -0.0009: tmp = -math.log((math.hypot(1.0, x) - x)) elif x <= 0.00115: tmp = x + (-0.16666666666666666 * math.pow(x, 3.0)) else: tmp = 1.0 + (math.log((x + math.hypot(1.0, x))) + -1.0) return tmp
function code(x) tmp = 0.0 if (x <= -0.0009) tmp = Float64(-log(Float64(hypot(1.0, x) - x))); elseif (x <= 0.00115) tmp = Float64(x + Float64(-0.16666666666666666 * (x ^ 3.0))); else tmp = Float64(1.0 + Float64(log(Float64(x + hypot(1.0, x))) + -1.0)); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= -0.0009) tmp = -log((hypot(1.0, x) - x)); elseif (x <= 0.00115) tmp = x + (-0.16666666666666666 * (x ^ 3.0)); else tmp = 1.0 + (log((x + hypot(1.0, x))) + -1.0); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, -0.0009], (-N[Log[N[(N[Sqrt[1.0 ^ 2 + x ^ 2], $MachinePrecision] - x), $MachinePrecision]], $MachinePrecision]), If[LessEqual[x, 0.00115], N[(x + N[(-0.16666666666666666 * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[Log[N[(x + N[Sqrt[1.0 ^ 2 + x ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.0009:\\
\;\;\;\;-\log \left(\mathsf{hypot}\left(1, x\right) - x\right)\\
\mathbf{elif}\;x \leq 0.00115:\\
\;\;\;\;x + -0.16666666666666666 \cdot {x}^{3}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\log \left(x + \mathsf{hypot}\left(1, x\right)\right) + -1\right)\\
\end{array}
\end{array}
if x < -8.9999999999999998e-4Initial program 5.6%
sqr-neg5.6%
+-commutative5.6%
sqr-neg5.6%
hypot-1-def6.8%
Simplified6.8%
flip-+7.2%
clear-num7.2%
log-div5.7%
metadata-eval5.7%
pow25.7%
hypot-1-def5.7%
hypot-1-def5.7%
add-sqr-sqrt6.1%
+-commutative6.1%
fma-define6.1%
Applied egg-rr6.1%
neg-sub06.1%
div-sub6.1%
fma-undefine6.1%
unpow26.1%
associate--r+6.1%
+-inverses6.1%
metadata-eval6.1%
*-rgt-identity6.1%
associate-/l*6.1%
metadata-eval6.1%
fma-undefine6.1%
unpow26.1%
associate--r+53.8%
+-inverses99.9%
metadata-eval99.9%
*-rgt-identity99.9%
associate-/l*99.9%
metadata-eval99.9%
*-commutative99.9%
neg-mul-199.9%
Simplified99.9%
if -8.9999999999999998e-4 < x < 0.00115Initial program 8.2%
sqr-neg8.2%
+-commutative8.2%
sqr-neg8.2%
hypot-1-def8.2%
Simplified8.2%
Taylor expanded in x around 0 100.0%
distribute-rgt-in100.0%
*-lft-identity100.0%
associate-*l*100.0%
unpow2100.0%
unpow3100.0%
Simplified100.0%
if 0.00115 < x Initial program 48.9%
sqr-neg48.9%
+-commutative48.9%
sqr-neg48.9%
hypot-1-def99.9%
Simplified99.9%
expm1-log1p-u98.1%
expm1-undefine98.1%
log1p-undefine98.1%
rem-exp-log99.9%
Applied egg-rr99.9%
associate--l+99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Final simplification100.0%
(FPCore (x)
:precision binary64
(if (<= x -1.25)
(log (/ -0.5 x))
(if (<= x 0.00115)
(+ x (* -0.16666666666666666 (pow x 3.0)))
(log (+ x (hypot 1.0 x))))))
double code(double x) {
double tmp;
if (x <= -1.25) {
tmp = log((-0.5 / x));
} else if (x <= 0.00115) {
tmp = x + (-0.16666666666666666 * pow(x, 3.0));
} else {
tmp = log((x + hypot(1.0, x)));
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= -1.25) {
tmp = Math.log((-0.5 / x));
} else if (x <= 0.00115) {
tmp = x + (-0.16666666666666666 * Math.pow(x, 3.0));
} else {
tmp = Math.log((x + Math.hypot(1.0, x)));
}
return tmp;
}
def code(x): tmp = 0 if x <= -1.25: tmp = math.log((-0.5 / x)) elif x <= 0.00115: tmp = x + (-0.16666666666666666 * math.pow(x, 3.0)) else: tmp = math.log((x + math.hypot(1.0, x))) return tmp
function code(x) tmp = 0.0 if (x <= -1.25) tmp = log(Float64(-0.5 / x)); elseif (x <= 0.00115) tmp = Float64(x + Float64(-0.16666666666666666 * (x ^ 3.0))); else tmp = log(Float64(x + hypot(1.0, x))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= -1.25) tmp = log((-0.5 / x)); elseif (x <= 0.00115) tmp = x + (-0.16666666666666666 * (x ^ 3.0)); else tmp = log((x + hypot(1.0, x))); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, -1.25], N[Log[N[(-0.5 / x), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, 0.00115], N[(x + N[(-0.16666666666666666 * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Log[N[(x + N[Sqrt[1.0 ^ 2 + x ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.25:\\
\;\;\;\;\log \left(\frac{-0.5}{x}\right)\\
\mathbf{elif}\;x \leq 0.00115:\\
\;\;\;\;x + -0.16666666666666666 \cdot {x}^{3}\\
\mathbf{else}:\\
\;\;\;\;\log \left(x + \mathsf{hypot}\left(1, x\right)\right)\\
\end{array}
\end{array}
if x < -1.25Initial program 4.2%
sqr-neg4.2%
+-commutative4.2%
sqr-neg4.2%
hypot-1-def5.4%
Simplified5.4%
Taylor expanded in x around -inf 99.2%
if -1.25 < x < 0.00115Initial program 9.0%
sqr-neg9.0%
+-commutative9.0%
sqr-neg9.0%
hypot-1-def9.0%
Simplified9.0%
Taylor expanded in x around 0 99.5%
distribute-rgt-in99.5%
*-lft-identity99.5%
associate-*l*99.5%
unpow299.5%
unpow399.5%
Simplified99.5%
if 0.00115 < x Initial program 48.9%
sqr-neg48.9%
+-commutative48.9%
sqr-neg48.9%
hypot-1-def99.9%
Simplified99.9%
Final simplification99.6%
(FPCore (x)
:precision binary64
(if (<= x -0.0009)
(- (log (- (hypot 1.0 x) x)))
(if (<= x 0.00115)
(+ x (* -0.16666666666666666 (pow x 3.0)))
(log (+ x (hypot 1.0 x))))))
double code(double x) {
double tmp;
if (x <= -0.0009) {
tmp = -log((hypot(1.0, x) - x));
} else if (x <= 0.00115) {
tmp = x + (-0.16666666666666666 * pow(x, 3.0));
} else {
tmp = log((x + hypot(1.0, x)));
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= -0.0009) {
tmp = -Math.log((Math.hypot(1.0, x) - x));
} else if (x <= 0.00115) {
tmp = x + (-0.16666666666666666 * Math.pow(x, 3.0));
} else {
tmp = Math.log((x + Math.hypot(1.0, x)));
}
return tmp;
}
def code(x): tmp = 0 if x <= -0.0009: tmp = -math.log((math.hypot(1.0, x) - x)) elif x <= 0.00115: tmp = x + (-0.16666666666666666 * math.pow(x, 3.0)) else: tmp = math.log((x + math.hypot(1.0, x))) return tmp
function code(x) tmp = 0.0 if (x <= -0.0009) tmp = Float64(-log(Float64(hypot(1.0, x) - x))); elseif (x <= 0.00115) tmp = Float64(x + Float64(-0.16666666666666666 * (x ^ 3.0))); else tmp = log(Float64(x + hypot(1.0, x))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= -0.0009) tmp = -log((hypot(1.0, x) - x)); elseif (x <= 0.00115) tmp = x + (-0.16666666666666666 * (x ^ 3.0)); else tmp = log((x + hypot(1.0, x))); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, -0.0009], (-N[Log[N[(N[Sqrt[1.0 ^ 2 + x ^ 2], $MachinePrecision] - x), $MachinePrecision]], $MachinePrecision]), If[LessEqual[x, 0.00115], N[(x + N[(-0.16666666666666666 * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Log[N[(x + N[Sqrt[1.0 ^ 2 + x ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.0009:\\
\;\;\;\;-\log \left(\mathsf{hypot}\left(1, x\right) - x\right)\\
\mathbf{elif}\;x \leq 0.00115:\\
\;\;\;\;x + -0.16666666666666666 \cdot {x}^{3}\\
\mathbf{else}:\\
\;\;\;\;\log \left(x + \mathsf{hypot}\left(1, x\right)\right)\\
\end{array}
\end{array}
if x < -8.9999999999999998e-4Initial program 5.6%
sqr-neg5.6%
+-commutative5.6%
sqr-neg5.6%
hypot-1-def6.8%
Simplified6.8%
flip-+7.2%
clear-num7.2%
log-div5.7%
metadata-eval5.7%
pow25.7%
hypot-1-def5.7%
hypot-1-def5.7%
add-sqr-sqrt6.1%
+-commutative6.1%
fma-define6.1%
Applied egg-rr6.1%
neg-sub06.1%
div-sub6.1%
fma-undefine6.1%
unpow26.1%
associate--r+6.1%
+-inverses6.1%
metadata-eval6.1%
*-rgt-identity6.1%
associate-/l*6.1%
metadata-eval6.1%
fma-undefine6.1%
unpow26.1%
associate--r+53.8%
+-inverses99.9%
metadata-eval99.9%
*-rgt-identity99.9%
associate-/l*99.9%
metadata-eval99.9%
*-commutative99.9%
neg-mul-199.9%
Simplified99.9%
if -8.9999999999999998e-4 < x < 0.00115Initial program 8.2%
sqr-neg8.2%
+-commutative8.2%
sqr-neg8.2%
hypot-1-def8.2%
Simplified8.2%
Taylor expanded in x around 0 100.0%
distribute-rgt-in100.0%
*-lft-identity100.0%
associate-*l*100.0%
unpow2100.0%
unpow3100.0%
Simplified100.0%
if 0.00115 < x Initial program 48.9%
sqr-neg48.9%
+-commutative48.9%
sqr-neg48.9%
hypot-1-def99.9%
Simplified99.9%
Final simplification100.0%
(FPCore (x)
:precision binary64
(if (<= x -1.25)
(log (/ -0.5 x))
(if (<= x 1.26)
(+ x (* -0.16666666666666666 (pow x 3.0)))
(log (* x 2.0)))))
double code(double x) {
double tmp;
if (x <= -1.25) {
tmp = log((-0.5 / x));
} else if (x <= 1.26) {
tmp = x + (-0.16666666666666666 * pow(x, 3.0));
} else {
tmp = log((x * 2.0));
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: tmp
if (x <= (-1.25d0)) then
tmp = log(((-0.5d0) / x))
else if (x <= 1.26d0) then
tmp = x + ((-0.16666666666666666d0) * (x ** 3.0d0))
else
tmp = log((x * 2.0d0))
end if
code = tmp
end function
public static double code(double x) {
double tmp;
if (x <= -1.25) {
tmp = Math.log((-0.5 / x));
} else if (x <= 1.26) {
tmp = x + (-0.16666666666666666 * Math.pow(x, 3.0));
} else {
tmp = Math.log((x * 2.0));
}
return tmp;
}
def code(x): tmp = 0 if x <= -1.25: tmp = math.log((-0.5 / x)) elif x <= 1.26: tmp = x + (-0.16666666666666666 * math.pow(x, 3.0)) else: tmp = math.log((x * 2.0)) return tmp
function code(x) tmp = 0.0 if (x <= -1.25) tmp = log(Float64(-0.5 / x)); elseif (x <= 1.26) tmp = Float64(x + Float64(-0.16666666666666666 * (x ^ 3.0))); else tmp = log(Float64(x * 2.0)); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= -1.25) tmp = log((-0.5 / x)); elseif (x <= 1.26) tmp = x + (-0.16666666666666666 * (x ^ 3.0)); else tmp = log((x * 2.0)); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, -1.25], N[Log[N[(-0.5 / x), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, 1.26], N[(x + N[(-0.16666666666666666 * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Log[N[(x * 2.0), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.25:\\
\;\;\;\;\log \left(\frac{-0.5}{x}\right)\\
\mathbf{elif}\;x \leq 1.26:\\
\;\;\;\;x + -0.16666666666666666 \cdot {x}^{3}\\
\mathbf{else}:\\
\;\;\;\;\log \left(x \cdot 2\right)\\
\end{array}
\end{array}
if x < -1.25Initial program 4.2%
sqr-neg4.2%
+-commutative4.2%
sqr-neg4.2%
hypot-1-def5.4%
Simplified5.4%
Taylor expanded in x around -inf 99.2%
if -1.25 < x < 1.26000000000000001Initial program 9.7%
sqr-neg9.7%
+-commutative9.7%
sqr-neg9.7%
hypot-1-def9.7%
Simplified9.7%
Taylor expanded in x around 0 99.2%
distribute-rgt-in99.2%
*-lft-identity99.2%
associate-*l*99.2%
unpow299.2%
unpow399.2%
Simplified99.2%
if 1.26000000000000001 < x Initial program 48.3%
sqr-neg48.3%
+-commutative48.3%
sqr-neg48.3%
hypot-1-def100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification99.4%
(FPCore (x) :precision binary64 (if (<= x -1.25) (/ (+ 1.0 (+ -1.0 (* x 2.0))) (- 2.0 x)) (if (<= x 1.05) (* (* x (+ x 2.0)) (+ 0.5 (* x -0.25))) (log (* x 2.0)))))
double code(double x) {
double tmp;
if (x <= -1.25) {
tmp = (1.0 + (-1.0 + (x * 2.0))) / (2.0 - x);
} else if (x <= 1.05) {
tmp = (x * (x + 2.0)) * (0.5 + (x * -0.25));
} else {
tmp = log((x * 2.0));
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: tmp
if (x <= (-1.25d0)) then
tmp = (1.0d0 + ((-1.0d0) + (x * 2.0d0))) / (2.0d0 - x)
else if (x <= 1.05d0) then
tmp = (x * (x + 2.0d0)) * (0.5d0 + (x * (-0.25d0)))
else
tmp = log((x * 2.0d0))
end if
code = tmp
end function
public static double code(double x) {
double tmp;
if (x <= -1.25) {
tmp = (1.0 + (-1.0 + (x * 2.0))) / (2.0 - x);
} else if (x <= 1.05) {
tmp = (x * (x + 2.0)) * (0.5 + (x * -0.25));
} else {
tmp = Math.log((x * 2.0));
}
return tmp;
}
def code(x): tmp = 0 if x <= -1.25: tmp = (1.0 + (-1.0 + (x * 2.0))) / (2.0 - x) elif x <= 1.05: tmp = (x * (x + 2.0)) * (0.5 + (x * -0.25)) else: tmp = math.log((x * 2.0)) return tmp
function code(x) tmp = 0.0 if (x <= -1.25) tmp = Float64(Float64(1.0 + Float64(-1.0 + Float64(x * 2.0))) / Float64(2.0 - x)); elseif (x <= 1.05) tmp = Float64(Float64(x * Float64(x + 2.0)) * Float64(0.5 + Float64(x * -0.25))); else tmp = log(Float64(x * 2.0)); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= -1.25) tmp = (1.0 + (-1.0 + (x * 2.0))) / (2.0 - x); elseif (x <= 1.05) tmp = (x * (x + 2.0)) * (0.5 + (x * -0.25)); else tmp = log((x * 2.0)); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, -1.25], N[(N[(1.0 + N[(-1.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 - x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05], N[(N[(x * N[(x + 2.0), $MachinePrecision]), $MachinePrecision] * N[(0.5 + N[(x * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Log[N[(x * 2.0), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.25:\\
\;\;\;\;\frac{1 + \left(-1 + x \cdot 2\right)}{2 - x}\\
\mathbf{elif}\;x \leq 1.05:\\
\;\;\;\;\left(x \cdot \left(x + 2\right)\right) \cdot \left(0.5 + x \cdot -0.25\right)\\
\mathbf{else}:\\
\;\;\;\;\log \left(x \cdot 2\right)\\
\end{array}
\end{array}
if x < -1.25Initial program 4.2%
sqr-neg4.2%
+-commutative4.2%
sqr-neg4.2%
hypot-1-def5.4%
Simplified5.4%
expm1-log1p-u0.0%
expm1-undefine0.0%
log1p-undefine0.0%
rem-exp-log5.4%
Applied egg-rr5.4%
Taylor expanded in x around 0 5.6%
associate--l+5.6%
flip-+5.3%
metadata-eval5.3%
sub-neg5.3%
metadata-eval5.3%
sub-neg5.3%
metadata-eval5.3%
sub-neg5.3%
metadata-eval5.3%
Applied egg-rr5.3%
sub-neg5.3%
distribute-rgt-neg-in5.3%
distribute-neg-in5.3%
metadata-eval5.3%
+-commutative5.3%
sub-neg5.3%
+-commutative5.3%
associate--r+5.3%
metadata-eval5.3%
Simplified5.3%
Taylor expanded in x around 0 14.5%
if -1.25 < x < 1.05000000000000004Initial program 9.7%
sqr-neg9.7%
+-commutative9.7%
sqr-neg9.7%
hypot-1-def9.7%
Simplified9.7%
expm1-log1p-u9.7%
expm1-undefine9.7%
log1p-undefine9.7%
rem-exp-log9.7%
Applied egg-rr9.7%
Taylor expanded in x around 0 8.6%
flip--8.6%
div-inv8.6%
metadata-eval8.6%
difference-of-sqr-18.6%
+-commutative8.6%
associate-+l+8.6%
metadata-eval8.6%
add-exp-log8.6%
expm1-define8.6%
log1p-define98.4%
expm1-log1p-u98.4%
+-commutative98.4%
associate-+l+98.4%
metadata-eval98.4%
Applied egg-rr98.4%
Taylor expanded in x around 0 98.4%
*-commutative98.4%
Simplified98.4%
if 1.05000000000000004 < x Initial program 48.3%
sqr-neg48.3%
+-commutative48.3%
sqr-neg48.3%
hypot-1-def100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification77.9%
(FPCore (x) :precision binary64 (if (<= x -1.1) (log (/ -0.5 x)) (if (<= x 1.05) (* (* x (+ x 2.0)) (+ 0.5 (* x -0.25))) (log (* x 2.0)))))
double code(double x) {
double tmp;
if (x <= -1.1) {
tmp = log((-0.5 / x));
} else if (x <= 1.05) {
tmp = (x * (x + 2.0)) * (0.5 + (x * -0.25));
} else {
tmp = log((x * 2.0));
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: tmp
if (x <= (-1.1d0)) then
tmp = log(((-0.5d0) / x))
else if (x <= 1.05d0) then
tmp = (x * (x + 2.0d0)) * (0.5d0 + (x * (-0.25d0)))
else
tmp = log((x * 2.0d0))
end if
code = tmp
end function
public static double code(double x) {
double tmp;
if (x <= -1.1) {
tmp = Math.log((-0.5 / x));
} else if (x <= 1.05) {
tmp = (x * (x + 2.0)) * (0.5 + (x * -0.25));
} else {
tmp = Math.log((x * 2.0));
}
return tmp;
}
def code(x): tmp = 0 if x <= -1.1: tmp = math.log((-0.5 / x)) elif x <= 1.05: tmp = (x * (x + 2.0)) * (0.5 + (x * -0.25)) else: tmp = math.log((x * 2.0)) return tmp
function code(x) tmp = 0.0 if (x <= -1.1) tmp = log(Float64(-0.5 / x)); elseif (x <= 1.05) tmp = Float64(Float64(x * Float64(x + 2.0)) * Float64(0.5 + Float64(x * -0.25))); else tmp = log(Float64(x * 2.0)); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= -1.1) tmp = log((-0.5 / x)); elseif (x <= 1.05) tmp = (x * (x + 2.0)) * (0.5 + (x * -0.25)); else tmp = log((x * 2.0)); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, -1.1], N[Log[N[(-0.5 / x), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, 1.05], N[(N[(x * N[(x + 2.0), $MachinePrecision]), $MachinePrecision] * N[(0.5 + N[(x * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Log[N[(x * 2.0), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1:\\
\;\;\;\;\log \left(\frac{-0.5}{x}\right)\\
\mathbf{elif}\;x \leq 1.05:\\
\;\;\;\;\left(x \cdot \left(x + 2\right)\right) \cdot \left(0.5 + x \cdot -0.25\right)\\
\mathbf{else}:\\
\;\;\;\;\log \left(x \cdot 2\right)\\
\end{array}
\end{array}
if x < -1.1000000000000001Initial program 4.2%
sqr-neg4.2%
+-commutative4.2%
sqr-neg4.2%
hypot-1-def5.4%
Simplified5.4%
Taylor expanded in x around -inf 99.2%
if -1.1000000000000001 < x < 1.05000000000000004Initial program 9.7%
sqr-neg9.7%
+-commutative9.7%
sqr-neg9.7%
hypot-1-def9.7%
Simplified9.7%
expm1-log1p-u9.7%
expm1-undefine9.7%
log1p-undefine9.7%
rem-exp-log9.7%
Applied egg-rr9.7%
Taylor expanded in x around 0 8.6%
flip--8.6%
div-inv8.6%
metadata-eval8.6%
difference-of-sqr-18.6%
+-commutative8.6%
associate-+l+8.6%
metadata-eval8.6%
add-exp-log8.6%
expm1-define8.6%
log1p-define98.4%
expm1-log1p-u98.4%
+-commutative98.4%
associate-+l+98.4%
metadata-eval98.4%
Applied egg-rr98.4%
Taylor expanded in x around 0 98.4%
*-commutative98.4%
Simplified98.4%
if 1.05000000000000004 < x Initial program 48.3%
sqr-neg48.3%
+-commutative48.3%
sqr-neg48.3%
hypot-1-def100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification99.1%
(FPCore (x) :precision binary64 (if (<= x -9.5e-7) (/ (+ 1.0 (+ -1.0 (* x 2.0))) (- 2.0 x)) (/ (* x 2.0) (+ x 2.0))))
double code(double x) {
double tmp;
if (x <= -9.5e-7) {
tmp = (1.0 + (-1.0 + (x * 2.0))) / (2.0 - x);
} else {
tmp = (x * 2.0) / (x + 2.0);
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: tmp
if (x <= (-9.5d-7)) then
tmp = (1.0d0 + ((-1.0d0) + (x * 2.0d0))) / (2.0d0 - x)
else
tmp = (x * 2.0d0) / (x + 2.0d0)
end if
code = tmp
end function
public static double code(double x) {
double tmp;
if (x <= -9.5e-7) {
tmp = (1.0 + (-1.0 + (x * 2.0))) / (2.0 - x);
} else {
tmp = (x * 2.0) / (x + 2.0);
}
return tmp;
}
def code(x): tmp = 0 if x <= -9.5e-7: tmp = (1.0 + (-1.0 + (x * 2.0))) / (2.0 - x) else: tmp = (x * 2.0) / (x + 2.0) return tmp
function code(x) tmp = 0.0 if (x <= -9.5e-7) tmp = Float64(Float64(1.0 + Float64(-1.0 + Float64(x * 2.0))) / Float64(2.0 - x)); else tmp = Float64(Float64(x * 2.0) / Float64(x + 2.0)); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= -9.5e-7) tmp = (1.0 + (-1.0 + (x * 2.0))) / (2.0 - x); else tmp = (x * 2.0) / (x + 2.0); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, -9.5e-7], N[(N[(1.0 + N[(-1.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 - x), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] / N[(x + 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{-7}:\\
\;\;\;\;\frac{1 + \left(-1 + x \cdot 2\right)}{2 - x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 2}{x + 2}\\
\end{array}
\end{array}
if x < -9.5000000000000001e-7Initial program 6.7%
sqr-neg6.7%
+-commutative6.7%
sqr-neg6.7%
hypot-1-def7.8%
Simplified7.8%
expm1-log1p-u2.6%
expm1-undefine2.6%
log1p-undefine2.7%
rem-exp-log7.9%
Applied egg-rr7.9%
Taylor expanded in x around 0 7.0%
associate--l+7.0%
flip-+6.7%
metadata-eval6.7%
sub-neg6.7%
metadata-eval6.7%
sub-neg6.7%
metadata-eval6.7%
sub-neg6.7%
metadata-eval6.7%
Applied egg-rr6.7%
sub-neg6.7%
distribute-rgt-neg-in6.7%
distribute-neg-in6.7%
metadata-eval6.7%
+-commutative6.7%
sub-neg6.7%
+-commutative6.7%
associate--r+6.7%
metadata-eval6.7%
Simplified6.7%
Taylor expanded in x around 0 15.1%
if -9.5000000000000001e-7 < x Initial program 24.2%
sqr-neg24.2%
+-commutative24.2%
sqr-neg24.2%
hypot-1-def44.5%
Simplified44.5%
expm1-log1p-u43.8%
expm1-undefine43.8%
log1p-undefine43.8%
rem-exp-log44.5%
Applied egg-rr44.5%
Taylor expanded in x around 0 6.8%
flip--6.7%
metadata-eval6.7%
difference-of-sqr-16.7%
+-commutative6.7%
associate-+l+6.7%
metadata-eval6.7%
add-exp-log6.7%
expm1-define6.7%
log1p-define62.0%
expm1-log1p-u62.0%
+-commutative62.0%
associate-+l+62.0%
metadata-eval62.0%
Applied egg-rr62.0%
Taylor expanded in x around 0 65.1%
*-commutative65.1%
Simplified65.1%
Final simplification52.2%
(FPCore (x) :precision binary64 (if (<= x 1.82) x (/ (* x 2.0) (+ x 2.0))))
double code(double x) {
double tmp;
if (x <= 1.82) {
tmp = x;
} else {
tmp = (x * 2.0) / (x + 2.0);
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: tmp
if (x <= 1.82d0) then
tmp = x
else
tmp = (x * 2.0d0) / (x + 2.0d0)
end if
code = tmp
end function
public static double code(double x) {
double tmp;
if (x <= 1.82) {
tmp = x;
} else {
tmp = (x * 2.0) / (x + 2.0);
}
return tmp;
}
def code(x): tmp = 0 if x <= 1.82: tmp = x else: tmp = (x * 2.0) / (x + 2.0) return tmp
function code(x) tmp = 0.0 if (x <= 1.82) tmp = x; else tmp = Float64(Float64(x * 2.0) / Float64(x + 2.0)); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= 1.82) tmp = x; else tmp = (x * 2.0) / (x + 2.0); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, 1.82], x, N[(N[(x * 2.0), $MachinePrecision] / N[(x + 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.82:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 2}{x + 2}\\
\end{array}
\end{array}
if x < 1.82000000000000006Initial program 7.8%
sqr-neg7.8%
+-commutative7.8%
sqr-neg7.8%
hypot-1-def8.2%
Simplified8.2%
Taylor expanded in x around 0 65.6%
if 1.82000000000000006 < x Initial program 48.3%
sqr-neg48.3%
+-commutative48.3%
sqr-neg48.3%
hypot-1-def100.0%
Simplified100.0%
expm1-log1p-u98.2%
expm1-undefine98.1%
log1p-undefine98.2%
rem-exp-log100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 5.3%
flip--4.9%
metadata-eval4.9%
difference-of-sqr-14.9%
+-commutative4.9%
associate-+l+4.9%
metadata-eval4.9%
add-exp-log4.9%
expm1-define4.9%
log1p-define4.9%
expm1-log1p-u4.9%
+-commutative4.9%
associate-+l+4.9%
metadata-eval4.9%
Applied egg-rr4.9%
Taylor expanded in x around 0 14.4%
*-commutative14.4%
Simplified14.4%
Final simplification50.6%
(FPCore (x) :precision binary64 x)
double code(double x) {
return x;
}
real(8) function code(x)
real(8), intent (in) :: x
code = x
end function
public static double code(double x) {
return x;
}
def code(x): return x
function code(x) return x end
function tmp = code(x) tmp = x; end
code[x_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 19.6%
sqr-neg19.6%
+-commutative19.6%
sqr-neg19.6%
hypot-1-def35.1%
Simplified35.1%
Taylor expanded in x around 0 47.9%
Final simplification47.9%
(FPCore (x) :precision binary64 (let* ((t_0 (sqrt (+ (* x x) 1.0)))) (if (< x 0.0) (log (/ -1.0 (- x t_0))) (log (+ x t_0)))))
double code(double x) {
double t_0 = sqrt(((x * x) + 1.0));
double tmp;
if (x < 0.0) {
tmp = log((-1.0 / (x - t_0)));
} else {
tmp = log((x + t_0));
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt(((x * x) + 1.0d0))
if (x < 0.0d0) then
tmp = log(((-1.0d0) / (x - t_0)))
else
tmp = log((x + t_0))
end if
code = tmp
end function
public static double code(double x) {
double t_0 = Math.sqrt(((x * x) + 1.0));
double tmp;
if (x < 0.0) {
tmp = Math.log((-1.0 / (x - t_0)));
} else {
tmp = Math.log((x + t_0));
}
return tmp;
}
def code(x): t_0 = math.sqrt(((x * x) + 1.0)) tmp = 0 if x < 0.0: tmp = math.log((-1.0 / (x - t_0))) else: tmp = math.log((x + t_0)) return tmp
function code(x) t_0 = sqrt(Float64(Float64(x * x) + 1.0)) tmp = 0.0 if (x < 0.0) tmp = log(Float64(-1.0 / Float64(x - t_0))); else tmp = log(Float64(x + t_0)); end return tmp end
function tmp_2 = code(x) t_0 = sqrt(((x * x) + 1.0)); tmp = 0.0; if (x < 0.0) tmp = log((-1.0 / (x - t_0))); else tmp = log((x + t_0)); end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[Sqrt[N[(N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]}, If[Less[x, 0.0], N[Log[N[(-1.0 / N[(x - t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Log[N[(x + t$95$0), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{x \cdot x + 1}\\
\mathbf{if}\;x < 0:\\
\;\;\;\;\log \left(\frac{-1}{x - t\_0}\right)\\
\mathbf{else}:\\
\;\;\;\;\log \left(x + t\_0\right)\\
\end{array}
\end{array}
herbie shell --seed 2024073
(FPCore (x)
:name "Hyperbolic arcsine"
:precision binary64
:alt
(if (< x 0.0) (log (/ -1.0 (- x (sqrt (+ (* x x) 1.0))))) (log (+ x (sqrt (+ (* x x) 1.0)))))
(log (+ x (sqrt (+ (* x x) 1.0)))))