
(FPCore (x) :precision binary64 (asinh x))
double code(double x) {
return asinh(x);
}
def code(x): return math.asinh(x)
function code(x) return asinh(x) end
function tmp = code(x) tmp = asinh(x); end
code[x_] := N[ArcSinh[x], $MachinePrecision]
\begin{array}{l}
\\
\sinh^{-1} x
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 7 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x) :precision binary64 (copysign (log (+ (fabs x) (sqrt (+ (* x x) 1.0)))) x))
double code(double x) {
return copysign(log((fabs(x) + sqrt(((x * x) + 1.0)))), x);
}
public static double code(double x) {
return Math.copySign(Math.log((Math.abs(x) + Math.sqrt(((x * x) + 1.0)))), x);
}
def code(x): return math.copysign(math.log((math.fabs(x) + math.sqrt(((x * x) + 1.0)))), x)
function code(x) return copysign(log(Float64(abs(x) + sqrt(Float64(Float64(x * x) + 1.0)))), x) end
function tmp = code(x) tmp = sign(x) * abs(log((abs(x) + sqrt(((x * x) + 1.0))))); end
code[x_] := N[With[{TMP1 = Abs[N[Log[N[(N[Abs[x], $MachinePrecision] + N[Sqrt[N[(N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{copysign}\left(\log \left(\left|x\right| + \sqrt{x \cdot x + 1}\right), x\right)
\end{array}
(FPCore (x)
:precision binary64
(let* ((t_0 (copysign (log (+ (fabs x) (sqrt (+ (* x x) 1.0)))) x)))
(if (<= t_0 -5.0)
(copysign (- (log (- (hypot 1.0 x) x))) x)
(if (<= t_0 1e-11)
(copysign (+ (* (* x x) 0.5) (log1p x)) x)
(copysign (log (+ x (hypot 1.0 x))) x)))))
double code(double x) {
double t_0 = copysign(log((fabs(x) + sqrt(((x * x) + 1.0)))), x);
double tmp;
if (t_0 <= -5.0) {
tmp = copysign(-log((hypot(1.0, x) - x)), x);
} else if (t_0 <= 1e-11) {
tmp = copysign((((x * x) * 0.5) + log1p(x)), x);
} else {
tmp = copysign(log((x + hypot(1.0, x))), x);
}
return tmp;
}
public static double code(double x) {
double t_0 = Math.copySign(Math.log((Math.abs(x) + Math.sqrt(((x * x) + 1.0)))), x);
double tmp;
if (t_0 <= -5.0) {
tmp = Math.copySign(-Math.log((Math.hypot(1.0, x) - x)), x);
} else if (t_0 <= 1e-11) {
tmp = Math.copySign((((x * x) * 0.5) + Math.log1p(x)), x);
} else {
tmp = Math.copySign(Math.log((x + Math.hypot(1.0, x))), x);
}
return tmp;
}
def code(x): t_0 = math.copysign(math.log((math.fabs(x) + math.sqrt(((x * x) + 1.0)))), x) tmp = 0 if t_0 <= -5.0: tmp = math.copysign(-math.log((math.hypot(1.0, x) - x)), x) elif t_0 <= 1e-11: tmp = math.copysign((((x * x) * 0.5) + math.log1p(x)), x) else: tmp = math.copysign(math.log((x + math.hypot(1.0, x))), x) return tmp
function code(x) t_0 = copysign(log(Float64(abs(x) + sqrt(Float64(Float64(x * x) + 1.0)))), x) tmp = 0.0 if (t_0 <= -5.0) tmp = copysign(Float64(-log(Float64(hypot(1.0, x) - x))), x); elseif (t_0 <= 1e-11) tmp = copysign(Float64(Float64(Float64(x * x) * 0.5) + log1p(x)), x); else tmp = copysign(log(Float64(x + hypot(1.0, x))), x); end return tmp end
code[x_] := Block[{t$95$0 = N[With[{TMP1 = Abs[N[Log[N[(N[Abs[x], $MachinePrecision] + N[Sqrt[N[(N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]}, If[LessEqual[t$95$0, -5.0], N[With[{TMP1 = Abs[(-N[Log[N[(N[Sqrt[1.0 ^ 2 + x ^ 2], $MachinePrecision] - x), $MachinePrecision]], $MachinePrecision])], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision], If[LessEqual[t$95$0, 1e-11], N[With[{TMP1 = Abs[N[(N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision] + N[Log[1 + x], $MachinePrecision]), $MachinePrecision]], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision], N[With[{TMP1 = Abs[N[Log[N[(x + N[Sqrt[1.0 ^ 2 + x ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{copysign}\left(\log \left(\left|x\right| + \sqrt{x \cdot x + 1}\right), x\right)\\
\mathbf{if}\;t\_0 \leq -5:\\
\;\;\;\;\mathsf{copysign}\left(-\log \left(\mathsf{hypot}\left(1, x\right) - x\right), x\right)\\
\mathbf{elif}\;t\_0 \leq 10^{-11}:\\
\;\;\;\;\mathsf{copysign}\left(\left(x \cdot x\right) \cdot 0.5 + \mathsf{log1p}\left(x\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{copysign}\left(\log \left(x + \mathsf{hypot}\left(1, x\right)\right), x\right)\\
\end{array}
\end{array}
if (copysign.f64 (log.f64 (+.f64 (fabs.f64 x) (sqrt.f64 (+.f64 (*.f64 x x) #s(literal 1 binary64))))) x) < -5Initial program 48.3%
+-commutative48.3%
hypot-1-def100.0%
Simplified100.0%
flip-+2.5%
frac-2neg2.5%
log-div2.5%
pow22.5%
add-sqr-sqrt0.0%
fabs-sqr0.0%
add-sqr-sqrt2.5%
pow22.5%
hypot-1-def2.5%
hypot-1-def2.5%
add-sqr-sqrt2.5%
Applied egg-rr4.7%
neg-mul-14.7%
unpow24.7%
unpow24.7%
+-commutative4.7%
associate--r+46.7%
+-inverses100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
neg-sub0100.0%
associate--r-100.0%
neg-sub0100.0%
+-commutative100.0%
sub-neg100.0%
Simplified100.0%
if -5 < (copysign.f64 (log.f64 (+.f64 (fabs.f64 x) (sqrt.f64 (+.f64 (*.f64 x x) #s(literal 1 binary64))))) x) < 9.99999999999999939e-12Initial program 5.8%
+-commutative5.8%
hypot-1-def5.8%
Simplified5.8%
Taylor expanded in x around 0 6.7%
log1p-define100.0%
*-commutative100.0%
associate-*l/100.0%
associate-*r/100.0%
unpow2100.0%
Simplified100.0%
frac-2neg100.0%
associate-*r/100.0%
metadata-eval100.0%
+-commutative100.0%
add-sqr-sqrt42.4%
fabs-sqr42.4%
add-sqr-sqrt100.0%
distribute-neg-in100.0%
*-un-lft-identity100.0%
metadata-eval100.0%
fma-define100.0%
add-sqr-sqrt57.6%
pow1/257.6%
pow1/257.6%
unpow-prod-down100.0%
sqr-abs100.0%
neg-fabs100.0%
neg-fabs100.0%
sqr-abs100.0%
pow1/2100.0%
sqrt-prod42.4%
add-sqr-sqrt100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 6.7%
+-commutative6.7%
unpow26.7%
log1p-define100.0%
rem-square-sqrt42.1%
unpow1/242.1%
unpow1/242.1%
fabs-sqr42.1%
unpow1/242.1%
unpow1/242.1%
rem-square-sqrt100.0%
Simplified100.0%
if 9.99999999999999939e-12 < (copysign.f64 (log.f64 (+.f64 (fabs.f64 x) (sqrt.f64 (+.f64 (*.f64 x x) #s(literal 1 binary64))))) x) Initial program 53.6%
+-commutative53.6%
hypot-1-def100.0%
Simplified100.0%
add-sqr-sqrt100.0%
fabs-sqr100.0%
add-sqr-sqrt100.0%
Applied egg-rr100.0%
Final simplification100.0%
(FPCore (x) :precision binary64 (if (<= x 1.7e-8) (copysign (log1p (fabs x)) x) (copysign (log (+ x (hypot 1.0 x))) x)))
double code(double x) {
double tmp;
if (x <= 1.7e-8) {
tmp = copysign(log1p(fabs(x)), x);
} else {
tmp = copysign(log((x + hypot(1.0, x))), x);
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 1.7e-8) {
tmp = Math.copySign(Math.log1p(Math.abs(x)), x);
} else {
tmp = Math.copySign(Math.log((x + Math.hypot(1.0, x))), x);
}
return tmp;
}
def code(x): tmp = 0 if x <= 1.7e-8: tmp = math.copysign(math.log1p(math.fabs(x)), x) else: tmp = math.copysign(math.log((x + math.hypot(1.0, x))), x) return tmp
function code(x) tmp = 0.0 if (x <= 1.7e-8) tmp = copysign(log1p(abs(x)), x); else tmp = copysign(log(Float64(x + hypot(1.0, x))), x); end return tmp end
code[x_] := If[LessEqual[x, 1.7e-8], N[With[{TMP1 = Abs[N[Log[1 + N[Abs[x], $MachinePrecision]], $MachinePrecision]], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision], N[With[{TMP1 = Abs[N[Log[N[(x + N[Sqrt[1.0 ^ 2 + x ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.7 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{copysign}\left(\mathsf{log1p}\left(\left|x\right|\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{copysign}\left(\log \left(x + \mathsf{hypot}\left(1, x\right)\right), x\right)\\
\end{array}
\end{array}
if x < 1.7e-8Initial program 19.6%
+-commutative19.6%
hypot-1-def36.3%
Simplified36.3%
Taylor expanded in x around 0 14.1%
log1p-define77.6%
Simplified77.6%
if 1.7e-8 < x Initial program 53.6%
+-commutative53.6%
hypot-1-def100.0%
Simplified100.0%
add-sqr-sqrt100.0%
fabs-sqr100.0%
add-sqr-sqrt100.0%
Applied egg-rr100.0%
(FPCore (x) :precision binary64 (copysign (log1p (fabs x)) x))
double code(double x) {
return copysign(log1p(fabs(x)), x);
}
public static double code(double x) {
return Math.copySign(Math.log1p(Math.abs(x)), x);
}
def code(x): return math.copysign(math.log1p(math.fabs(x)), x)
function code(x) return copysign(log1p(abs(x)), x) end
code[x_] := N[With[{TMP1 = Abs[N[Log[1 + N[Abs[x], $MachinePrecision]], $MachinePrecision]], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{copysign}\left(\mathsf{log1p}\left(\left|x\right|\right), x\right)
\end{array}
Initial program 29.0%
+-commutative29.0%
hypot-1-def54.0%
Simplified54.0%
Taylor expanded in x around 0 18.8%
log1p-define64.7%
Simplified64.7%
(FPCore (x) :precision binary64 (if (<= x -0.5) (copysign (- (log (/ -1.0 x))) x) (copysign (log1p x) x)))
double code(double x) {
double tmp;
if (x <= -0.5) {
tmp = copysign(-log((-1.0 / x)), x);
} else {
tmp = copysign(log1p(x), x);
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= -0.5) {
tmp = Math.copySign(-Math.log((-1.0 / x)), x);
} else {
tmp = Math.copySign(Math.log1p(x), x);
}
return tmp;
}
def code(x): tmp = 0 if x <= -0.5: tmp = math.copysign(-math.log((-1.0 / x)), x) else: tmp = math.copysign(math.log1p(x), x) return tmp
function code(x) tmp = 0.0 if (x <= -0.5) tmp = copysign(Float64(-log(Float64(-1.0 / x))), x); else tmp = copysign(log1p(x), x); end return tmp end
code[x_] := If[LessEqual[x, -0.5], N[With[{TMP1 = Abs[(-N[Log[N[(-1.0 / x), $MachinePrecision]], $MachinePrecision])], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision], N[With[{TMP1 = Abs[N[Log[1 + x], $MachinePrecision]], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.5:\\
\;\;\;\;\mathsf{copysign}\left(-\log \left(\frac{-1}{x}\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{copysign}\left(\mathsf{log1p}\left(x\right), x\right)\\
\end{array}
\end{array}
if x < -0.5Initial program 48.3%
+-commutative48.3%
hypot-1-def100.0%
Simplified100.0%
Taylor expanded in x around -inf 31.3%
mul-1-neg31.3%
neg-sub031.3%
Simplified31.3%
if -0.5 < x Initial program 23.1%
+-commutative23.1%
hypot-1-def39.9%
Simplified39.9%
Taylor expanded in x around 0 6.3%
log1p-define65.8%
*-commutative65.8%
associate-*l/65.8%
associate-*r/65.8%
unpow265.8%
Simplified65.8%
frac-2neg65.8%
associate-*r/65.8%
metadata-eval65.8%
+-commutative65.8%
add-sqr-sqrt29.0%
fabs-sqr29.0%
add-sqr-sqrt65.8%
distribute-neg-in65.8%
*-un-lft-identity65.8%
metadata-eval65.8%
fma-define65.8%
add-sqr-sqrt36.7%
pow1/236.7%
pow1/236.7%
unpow-prod-down65.2%
sqr-abs65.2%
neg-fabs65.2%
neg-fabs65.2%
sqr-abs65.2%
pow1/265.2%
sqrt-prod29.0%
add-sqr-sqrt65.8%
metadata-eval65.8%
Applied egg-rr65.8%
Taylor expanded in x around 0 14.9%
log1p-define74.9%
rem-square-sqrt38.0%
unpow1/238.0%
unpow1/238.0%
fabs-sqr38.0%
unpow1/238.0%
unpow1/238.0%
rem-square-sqrt74.9%
Simplified74.9%
Final simplification64.7%
(FPCore (x) :precision binary64 (if (<= x 6.8) (copysign (* x -0.5) x) (copysign (log x) x)))
double code(double x) {
double tmp;
if (x <= 6.8) {
tmp = copysign((x * -0.5), x);
} else {
tmp = copysign(log(x), x);
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 6.8) {
tmp = Math.copySign((x * -0.5), x);
} else {
tmp = Math.copySign(Math.log(x), x);
}
return tmp;
}
def code(x): tmp = 0 if x <= 6.8: tmp = math.copysign((x * -0.5), x) else: tmp = math.copysign(math.log(x), x) return tmp
function code(x) tmp = 0.0 if (x <= 6.8) tmp = copysign(Float64(x * -0.5), x); else tmp = copysign(log(x), x); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= 6.8) tmp = sign(x) * abs((x * -0.5)); else tmp = sign(x) * abs(log(x)); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, 6.8], N[With[{TMP1 = Abs[N[(x * -0.5), $MachinePrecision]], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision], N[With[{TMP1 = Abs[N[Log[x], $MachinePrecision]], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 6.8:\\
\;\;\;\;\mathsf{copysign}\left(x \cdot -0.5, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{copysign}\left(\log x, x\right)\\
\end{array}
\end{array}
if x < 6.79999999999999982Initial program 20.0%
+-commutative20.0%
hypot-1-def36.7%
Simplified36.7%
Taylor expanded in x around 0 6.3%
log1p-define69.0%
*-commutative69.0%
associate-*l/69.0%
associate-*r/69.0%
unpow269.0%
Simplified69.0%
frac-2neg69.0%
associate-*r/69.0%
metadata-eval69.0%
+-commutative69.0%
add-sqr-sqrt28.6%
fabs-sqr28.6%
add-sqr-sqrt69.0%
distribute-neg-in69.0%
*-un-lft-identity69.0%
metadata-eval69.0%
fma-define69.0%
add-sqr-sqrt40.4%
pow1/240.4%
pow1/240.4%
unpow-prod-down68.4%
sqr-abs68.4%
neg-fabs68.4%
neg-fabs68.4%
sqr-abs68.4%
pow1/268.4%
sqrt-prod28.6%
add-sqr-sqrt69.0%
metadata-eval69.0%
Applied egg-rr69.0%
Taylor expanded in x around inf 14.6%
if 6.79999999999999982 < x Initial program 53.0%
+-commutative53.0%
hypot-1-def100.0%
Simplified100.0%
Taylor expanded in x around inf 31.2%
mul-1-neg31.2%
log-rec31.2%
remove-double-neg31.2%
Simplified31.2%
Final simplification19.1%
(FPCore (x) :precision binary64 (copysign (log1p x) x))
double code(double x) {
return copysign(log1p(x), x);
}
public static double code(double x) {
return Math.copySign(Math.log1p(x), x);
}
def code(x): return math.copysign(math.log1p(x), x)
function code(x) return copysign(log1p(x), x) end
code[x_] := N[With[{TMP1 = Abs[N[Log[1 + x], $MachinePrecision]], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{copysign}\left(\mathsf{log1p}\left(x\right), x\right)
\end{array}
Initial program 29.0%
+-commutative29.0%
hypot-1-def54.0%
Simplified54.0%
Taylor expanded in x around 0 6.0%
log1p-define51.6%
*-commutative51.6%
associate-*l/51.6%
associate-*r/51.6%
unpow251.6%
Simplified51.6%
frac-2neg51.6%
associate-*r/51.6%
metadata-eval51.6%
+-commutative51.6%
add-sqr-sqrt22.2%
fabs-sqr22.2%
add-sqr-sqrt51.6%
distribute-neg-in51.6%
*-un-lft-identity51.6%
metadata-eval51.6%
fma-define51.6%
add-sqr-sqrt29.3%
pow1/229.3%
pow1/229.3%
unpow-prod-down50.8%
sqr-abs50.8%
neg-fabs50.8%
neg-fabs50.8%
sqr-abs50.8%
pow1/250.8%
sqrt-prod22.2%
add-sqr-sqrt51.6%
metadata-eval51.6%
Applied egg-rr51.6%
Taylor expanded in x around 0 18.8%
log1p-define64.7%
rem-square-sqrt29.1%
unpow1/229.1%
unpow1/229.1%
fabs-sqr29.1%
unpow1/229.1%
unpow1/229.1%
rem-square-sqrt57.4%
Simplified57.4%
(FPCore (x) :precision binary64 (copysign (* x -0.5) x))
double code(double x) {
return copysign((x * -0.5), x);
}
public static double code(double x) {
return Math.copySign((x * -0.5), x);
}
def code(x): return math.copysign((x * -0.5), x)
function code(x) return copysign(Float64(x * -0.5), x) end
function tmp = code(x) tmp = sign(x) * abs((x * -0.5)); end
code[x_] := N[With[{TMP1 = Abs[N[(x * -0.5), $MachinePrecision]], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{copysign}\left(x \cdot -0.5, x\right)
\end{array}
Initial program 29.0%
+-commutative29.0%
hypot-1-def54.0%
Simplified54.0%
Taylor expanded in x around 0 6.0%
log1p-define51.6%
*-commutative51.6%
associate-*l/51.6%
associate-*r/51.6%
unpow251.6%
Simplified51.6%
frac-2neg51.6%
associate-*r/51.6%
metadata-eval51.6%
+-commutative51.6%
add-sqr-sqrt22.2%
fabs-sqr22.2%
add-sqr-sqrt51.6%
distribute-neg-in51.6%
*-un-lft-identity51.6%
metadata-eval51.6%
fma-define51.6%
add-sqr-sqrt29.3%
pow1/229.3%
pow1/229.3%
unpow-prod-down50.8%
sqr-abs50.8%
neg-fabs50.8%
neg-fabs50.8%
sqr-abs50.8%
pow1/250.8%
sqrt-prod22.2%
add-sqr-sqrt51.6%
metadata-eval51.6%
Applied egg-rr51.6%
Taylor expanded in x around inf 12.1%
Final simplification12.1%
(FPCore (x) :precision binary64 (let* ((t_0 (/ 1.0 (fabs x)))) (copysign (log1p (+ (fabs x) (/ (fabs x) (+ (hypot 1.0 t_0) t_0)))) x)))
double code(double x) {
double t_0 = 1.0 / fabs(x);
return copysign(log1p((fabs(x) + (fabs(x) / (hypot(1.0, t_0) + t_0)))), x);
}
public static double code(double x) {
double t_0 = 1.0 / Math.abs(x);
return Math.copySign(Math.log1p((Math.abs(x) + (Math.abs(x) / (Math.hypot(1.0, t_0) + t_0)))), x);
}
def code(x): t_0 = 1.0 / math.fabs(x) return math.copysign(math.log1p((math.fabs(x) + (math.fabs(x) / (math.hypot(1.0, t_0) + t_0)))), x)
function code(x) t_0 = Float64(1.0 / abs(x)) return copysign(log1p(Float64(abs(x) + Float64(abs(x) / Float64(hypot(1.0, t_0) + t_0)))), x) end
code[x_] := Block[{t$95$0 = N[(1.0 / N[Abs[x], $MachinePrecision]), $MachinePrecision]}, N[With[{TMP1 = Abs[N[Log[1 + N[(N[Abs[x], $MachinePrecision] + N[(N[Abs[x], $MachinePrecision] / N[(N[Sqrt[1.0 ^ 2 + t$95$0 ^ 2], $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\left|x\right|}\\
\mathsf{copysign}\left(\mathsf{log1p}\left(\left|x\right| + \frac{\left|x\right|}{\mathsf{hypot}\left(1, t\_0\right) + t\_0}\right), x\right)
\end{array}
\end{array}
herbie shell --seed 2024107
(FPCore (x)
:name "Rust f64::asinh"
:precision binary64
:alt
(copysign (log1p (+ (fabs x) (/ (fabs x) (+ (hypot 1.0 (/ 1.0 (fabs x))) (/ 1.0 (fabs x)))))) x)
(copysign (log (+ (fabs x) (sqrt (+ (* x x) 1.0)))) x))