| Alternative 1 | |
|---|---|
| Accuracy | 99.4% |
| Cost | 42376 |

(FPCore (x) :precision binary32 (copysign (log (+ (fabs x) (sqrt (+ (* x x) 1.0)))) x))
(FPCore (x)
:precision binary32
(let* ((t_0 (copysign (log (+ (fabs x) (sqrt (+ (* x x) 1.0)))) x)))
(if (<= t_0 -1.0)
(copysign (- (log1p (+ -1.0 (/ (- x (hypot 1.0 x)) -1.0)))) x)
(if (<= t_0 0.15000000596046448)
(copysign
(- x (fma -0.075 (pow x 5.0) (* 0.16666666666666666 (pow x 3.0))))
x)
(copysign (cbrt (pow (log (+ x (hypot 1.0 x))) 3.0)) x)))))float code(float x) {
return copysignf(logf((fabsf(x) + sqrtf(((x * x) + 1.0f)))), x);
}
float code(float x) {
float t_0 = copysignf(logf((fabsf(x) + sqrtf(((x * x) + 1.0f)))), x);
float tmp;
if (t_0 <= -1.0f) {
tmp = copysignf(-log1pf((-1.0f + ((x - hypotf(1.0f, x)) / -1.0f))), x);
} else if (t_0 <= 0.15000000596046448f) {
tmp = copysignf((x - fmaf(-0.075f, powf(x, 5.0f), (0.16666666666666666f * powf(x, 3.0f)))), x);
} else {
tmp = copysignf(cbrtf(powf(logf((x + hypotf(1.0f, x))), 3.0f)), x);
}
return tmp;
}
function code(x) return copysign(log(Float32(abs(x) + sqrt(Float32(Float32(x * x) + Float32(1.0))))), x) end
function code(x) t_0 = copysign(log(Float32(abs(x) + sqrt(Float32(Float32(x * x) + Float32(1.0))))), x) tmp = Float32(0.0) if (t_0 <= Float32(-1.0)) tmp = copysign(Float32(-log1p(Float32(Float32(-1.0) + Float32(Float32(x - hypot(Float32(1.0), x)) / Float32(-1.0))))), x); elseif (t_0 <= Float32(0.15000000596046448)) tmp = copysign(Float32(x - fma(Float32(-0.075), (x ^ Float32(5.0)), Float32(Float32(0.16666666666666666) * (x ^ Float32(3.0))))), x); else tmp = copysign(cbrt((log(Float32(x + hypot(Float32(1.0), x))) ^ Float32(3.0))), x); end return tmp end
\mathsf{copysign}\left(\log \left(\left|x\right| + \sqrt{x \cdot x + 1}\right), x\right)
\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 -1:\\
\;\;\;\;\mathsf{copysign}\left(-\mathsf{log1p}\left(-1 + \frac{x - \mathsf{hypot}\left(1, x\right)}{-1}\right), x\right)\\
\mathbf{elif}\;t_0 \leq 0.15000000596046448:\\
\;\;\;\;\mathsf{copysign}\left(x - \mathsf{fma}\left(-0.075, {x}^{5}, 0.16666666666666666 \cdot {x}^{3}\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{copysign}\left(\sqrt[3]{{\log \left(x + \mathsf{hypot}\left(1, x\right)\right)}^{3}}, x\right)\\
\end{array}
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
| Original | 37.8% |
|---|---|
| Target | 99.5% |
| Herbie | 99.4% |
if (copysign.f32 (log.f32 (+.f32 (fabs.f32 x) (sqrt.f32 (+.f32 (*.f32 x x) 1)))) x) < -1Initial program 55.4%
Applied egg-rr15.3%
[Start]55.4% | \[ \mathsf{copysign}\left(\log \left(\left|x\right| + \sqrt{x \cdot x + 1}\right), x\right)
\] |
|---|---|
flip-+ [=>]10.9% | \[ \mathsf{copysign}\left(\log \color{blue}{\left(\frac{\left|x\right| \cdot \left|x\right| - \sqrt{x \cdot x + 1} \cdot \sqrt{x \cdot x + 1}}{\left|x\right| - \sqrt{x \cdot x + 1}}\right)}, x\right)
\] |
clear-num [=>]10.9% | \[ \mathsf{copysign}\left(\log \color{blue}{\left(\frac{1}{\frac{\left|x\right| - \sqrt{x \cdot x + 1}}{\left|x\right| \cdot \left|x\right| - \sqrt{x \cdot x + 1} \cdot \sqrt{x \cdot x + 1}}}\right)}, x\right)
\] |
log-rec [=>]10.9% | \[ \mathsf{copysign}\left(\color{blue}{-\log \left(\frac{\left|x\right| - \sqrt{x \cdot x + 1}}{\left|x\right| \cdot \left|x\right| - \sqrt{x \cdot x + 1} \cdot \sqrt{x \cdot x + 1}}\right)}, x\right)
\] |
+-commutative [=>]10.9% | \[ \mathsf{copysign}\left(-\log \left(\frac{\left|x\right| - \sqrt{\color{blue}{1 + x \cdot x}}}{\left|x\right| \cdot \left|x\right| - \sqrt{x \cdot x + 1} \cdot \sqrt{x \cdot x + 1}}\right), x\right)
\] |
hypot-1-def [=>]10.9% | \[ \mathsf{copysign}\left(-\log \left(\frac{\left|x\right| - \color{blue}{\mathsf{hypot}\left(1, x\right)}}{\left|x\right| \cdot \left|x\right| - \sqrt{x \cdot x + 1} \cdot \sqrt{x \cdot x + 1}}\right), x\right)
\] |
add-sqr-sqrt [=>]-0.0% | \[ \mathsf{copysign}\left(-\log \left(\frac{\left|\color{blue}{\sqrt{x} \cdot \sqrt{x}}\right| - \mathsf{hypot}\left(1, x\right)}{\left|x\right| \cdot \left|x\right| - \sqrt{x \cdot x + 1} \cdot \sqrt{x \cdot x + 1}}\right), x\right)
\] |
fabs-sqr [=>]-0.0% | \[ \mathsf{copysign}\left(-\log \left(\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}} - \mathsf{hypot}\left(1, x\right)}{\left|x\right| \cdot \left|x\right| - \sqrt{x \cdot x + 1} \cdot \sqrt{x \cdot x + 1}}\right), x\right)
\] |
add-sqr-sqrt [<=]12.1% | \[ \mathsf{copysign}\left(-\log \left(\frac{\color{blue}{x} - \mathsf{hypot}\left(1, x\right)}{\left|x\right| \cdot \left|x\right| - \sqrt{x \cdot x + 1} \cdot \sqrt{x \cdot x + 1}}\right), x\right)
\] |
sqr-abs [=>]12.1% | \[ \mathsf{copysign}\left(-\log \left(\frac{x - \mathsf{hypot}\left(1, x\right)}{\color{blue}{x \cdot x} - \sqrt{x \cdot x + 1} \cdot \sqrt{x \cdot x + 1}}\right), x\right)
\] |
add-sqr-sqrt [<=]14.7% | \[ \mathsf{copysign}\left(-\log \left(\frac{x - \mathsf{hypot}\left(1, x\right)}{x \cdot x - \color{blue}{\left(x \cdot x + 1\right)}}\right), x\right)
\] |
+-commutative [=>]14.7% | \[ \mathsf{copysign}\left(-\log \left(\frac{x - \mathsf{hypot}\left(1, x\right)}{x \cdot x - \color{blue}{\left(1 + x \cdot x\right)}}\right), x\right)
\] |
Applied egg-rr15.3%
[Start]15.3% | \[ \mathsf{copysign}\left(-\log \left(\frac{x - \mathsf{hypot}\left(1, x\right)}{\mathsf{fma}\left(x, x, -1\right) - x \cdot x}\right), x\right)
\] |
|---|---|
log1p-expm1-u [=>]15.3% | \[ \mathsf{copysign}\left(-\color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\log \left(\frac{x - \mathsf{hypot}\left(1, x\right)}{\mathsf{fma}\left(x, x, -1\right) - x \cdot x}\right)\right)\right)}, x\right)
\] |
expm1-udef [=>]15.3% | \[ \mathsf{copysign}\left(-\mathsf{log1p}\left(\color{blue}{e^{\log \left(\frac{x - \mathsf{hypot}\left(1, x\right)}{\mathsf{fma}\left(x, x, -1\right) - x \cdot x}\right)} - 1}\right), x\right)
\] |
add-exp-log [<=]15.3% | \[ \mathsf{copysign}\left(-\mathsf{log1p}\left(\color{blue}{\frac{x - \mathsf{hypot}\left(1, x\right)}{\mathsf{fma}\left(x, x, -1\right) - x \cdot x}} - 1\right), x\right)
\] |
Simplified99.9%
[Start]15.3% | \[ \mathsf{copysign}\left(-\mathsf{log1p}\left(\frac{x - \mathsf{hypot}\left(1, x\right)}{\mathsf{fma}\left(x, x, -1\right) - x \cdot x} - 1\right), x\right)
\] |
|---|---|
sub-neg [=>]15.3% | \[ \mathsf{copysign}\left(-\mathsf{log1p}\left(\color{blue}{\frac{x - \mathsf{hypot}\left(1, x\right)}{\mathsf{fma}\left(x, x, -1\right) - x \cdot x} + \left(-1\right)}\right), x\right)
\] |
fma-udef [=>]14.7% | \[ \mathsf{copysign}\left(-\mathsf{log1p}\left(\frac{x - \mathsf{hypot}\left(1, x\right)}{\color{blue}{\left(x \cdot x + -1\right)} - x \cdot x} + \left(-1\right)\right), x\right)
\] |
associate-+r- [<=]14.7% | \[ \mathsf{copysign}\left(-\mathsf{log1p}\left(\frac{x - \mathsf{hypot}\left(1, x\right)}{\color{blue}{x \cdot x + \left(-1 - x \cdot x\right)}} + \left(-1\right)\right), x\right)
\] |
+-commutative [=>]14.7% | \[ \mathsf{copysign}\left(-\mathsf{log1p}\left(\frac{x - \mathsf{hypot}\left(1, x\right)}{\color{blue}{\left(-1 - x \cdot x\right) + x \cdot x}} + \left(-1\right)\right), x\right)
\] |
associate-+l- [=>]52.4% | \[ \mathsf{copysign}\left(-\mathsf{log1p}\left(\frac{x - \mathsf{hypot}\left(1, x\right)}{\color{blue}{-1 - \left(x \cdot x - x \cdot x\right)}} + \left(-1\right)\right), x\right)
\] |
+-inverses [=>]99.9% | \[ \mathsf{copysign}\left(-\mathsf{log1p}\left(\frac{x - \mathsf{hypot}\left(1, x\right)}{-1 - \color{blue}{0}} + \left(-1\right)\right), x\right)
\] |
metadata-eval [=>]99.9% | \[ \mathsf{copysign}\left(-\mathsf{log1p}\left(\frac{x - \mathsf{hypot}\left(1, x\right)}{\color{blue}{-1}} + \left(-1\right)\right), x\right)
\] |
metadata-eval [=>]99.9% | \[ \mathsf{copysign}\left(-\mathsf{log1p}\left(\frac{x - \mathsf{hypot}\left(1, x\right)}{-1} + \color{blue}{-1}\right), x\right)
\] |
if -1 < (copysign.f32 (log.f32 (+.f32 (fabs.f32 x) (sqrt.f32 (+.f32 (*.f32 x x) 1)))) x) < 0.150000006Initial program 21.6%
Applied egg-rr21.6%
[Start]21.6% | \[ \mathsf{copysign}\left(\log \left(\left|x\right| + \sqrt{x \cdot x + 1}\right), x\right)
\] |
|---|---|
flip-+ [=>]21.3% | \[ \mathsf{copysign}\left(\log \color{blue}{\left(\frac{\left|x\right| \cdot \left|x\right| - \sqrt{x \cdot x + 1} \cdot \sqrt{x \cdot x + 1}}{\left|x\right| - \sqrt{x \cdot x + 1}}\right)}, x\right)
\] |
clear-num [=>]21.3% | \[ \mathsf{copysign}\left(\log \color{blue}{\left(\frac{1}{\frac{\left|x\right| - \sqrt{x \cdot x + 1}}{\left|x\right| \cdot \left|x\right| - \sqrt{x \cdot x + 1} \cdot \sqrt{x \cdot x + 1}}}\right)}, x\right)
\] |
log-rec [=>]21.7% | \[ \mathsf{copysign}\left(\color{blue}{-\log \left(\frac{\left|x\right| - \sqrt{x \cdot x + 1}}{\left|x\right| \cdot \left|x\right| - \sqrt{x \cdot x + 1} \cdot \sqrt{x \cdot x + 1}}\right)}, x\right)
\] |
+-commutative [=>]21.7% | \[ \mathsf{copysign}\left(-\log \left(\frac{\left|x\right| - \sqrt{\color{blue}{1 + x \cdot x}}}{\left|x\right| \cdot \left|x\right| - \sqrt{x \cdot x + 1} \cdot \sqrt{x \cdot x + 1}}\right), x\right)
\] |
hypot-1-def [=>]21.6% | \[ \mathsf{copysign}\left(-\log \left(\frac{\left|x\right| - \color{blue}{\mathsf{hypot}\left(1, x\right)}}{\left|x\right| \cdot \left|x\right| - \sqrt{x \cdot x + 1} \cdot \sqrt{x \cdot x + 1}}\right), x\right)
\] |
add-sqr-sqrt [=>]9.0% | \[ \mathsf{copysign}\left(-\log \left(\frac{\left|\color{blue}{\sqrt{x} \cdot \sqrt{x}}\right| - \mathsf{hypot}\left(1, x\right)}{\left|x\right| \cdot \left|x\right| - \sqrt{x \cdot x + 1} \cdot \sqrt{x \cdot x + 1}}\right), x\right)
\] |
fabs-sqr [=>]9.0% | \[ \mathsf{copysign}\left(-\log \left(\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}} - \mathsf{hypot}\left(1, x\right)}{\left|x\right| \cdot \left|x\right| - \sqrt{x \cdot x + 1} \cdot \sqrt{x \cdot x + 1}}\right), x\right)
\] |
add-sqr-sqrt [<=]21.4% | \[ \mathsf{copysign}\left(-\log \left(\frac{\color{blue}{x} - \mathsf{hypot}\left(1, x\right)}{\left|x\right| \cdot \left|x\right| - \sqrt{x \cdot x + 1} \cdot \sqrt{x \cdot x + 1}}\right), x\right)
\] |
sqr-abs [=>]21.4% | \[ \mathsf{copysign}\left(-\log \left(\frac{x - \mathsf{hypot}\left(1, x\right)}{\color{blue}{x \cdot x} - \sqrt{x \cdot x + 1} \cdot \sqrt{x \cdot x + 1}}\right), x\right)
\] |
add-sqr-sqrt [<=]21.5% | \[ \mathsf{copysign}\left(-\log \left(\frac{x - \mathsf{hypot}\left(1, x\right)}{x \cdot x - \color{blue}{\left(x \cdot x + 1\right)}}\right), x\right)
\] |
+-commutative [=>]21.5% | \[ \mathsf{copysign}\left(-\log \left(\frac{x - \mathsf{hypot}\left(1, x\right)}{x \cdot x - \color{blue}{\left(1 + x \cdot x\right)}}\right), x\right)
\] |
Applied egg-rr-0.0%
[Start]21.6% | \[ \mathsf{copysign}\left(-\log \left(\frac{x - \mathsf{hypot}\left(1, x\right)}{\mathsf{fma}\left(x, x, -1\right) - x \cdot x}\right), x\right)
\] |
|---|---|
div-inv [=>]21.6% | \[ \mathsf{copysign}\left(-\log \color{blue}{\left(\left(x - \mathsf{hypot}\left(1, x\right)\right) \cdot \frac{1}{\mathsf{fma}\left(x, x, -1\right) - x \cdot x}\right)}, x\right)
\] |
log-prod [=>]-0.0% | \[ \mathsf{copysign}\left(-\color{blue}{\left(\log \left(x - \mathsf{hypot}\left(1, x\right)\right) + \log \left(\frac{1}{\mathsf{fma}\left(x, x, -1\right) - x \cdot x}\right)\right)}, x\right)
\] |
Simplified21.6%
[Start]-0.0% | \[ \mathsf{copysign}\left(-\left(\log \left(x - \mathsf{hypot}\left(1, x\right)\right) + \log \left(\frac{1}{\mathsf{fma}\left(x, x, -1\right) - x \cdot x}\right)\right), x\right)
\] |
|---|---|
+-commutative [=>]-0.0% | \[ \mathsf{copysign}\left(-\color{blue}{\left(\log \left(\frac{1}{\mathsf{fma}\left(x, x, -1\right) - x \cdot x}\right) + \log \left(x - \mathsf{hypot}\left(1, x\right)\right)\right)}, x\right)
\] |
fma-udef [=>]-0.0% | \[ \mathsf{copysign}\left(-\left(\log \left(\frac{1}{\color{blue}{\left(x \cdot x + -1\right)} - x \cdot x}\right) + \log \left(x - \mathsf{hypot}\left(1, x\right)\right)\right), x\right)
\] |
associate-+r- [<=]-0.0% | \[ \mathsf{copysign}\left(-\left(\log \left(\frac{1}{\color{blue}{x \cdot x + \left(-1 - x \cdot x\right)}}\right) + \log \left(x - \mathsf{hypot}\left(1, x\right)\right)\right), x\right)
\] |
+-commutative [=>]-0.0% | \[ \mathsf{copysign}\left(-\left(\log \left(\frac{1}{\color{blue}{\left(-1 - x \cdot x\right) + x \cdot x}}\right) + \log \left(x - \mathsf{hypot}\left(1, x\right)\right)\right), x\right)
\] |
associate-+l- [=>]-0.0% | \[ \mathsf{copysign}\left(-\left(\log \left(\frac{1}{\color{blue}{-1 - \left(x \cdot x - x \cdot x\right)}}\right) + \log \left(x - \mathsf{hypot}\left(1, x\right)\right)\right), x\right)
\] |
+-inverses [=>]-0.0% | \[ \mathsf{copysign}\left(-\left(\log \left(\frac{1}{-1 - \color{blue}{0}}\right) + \log \left(x - \mathsf{hypot}\left(1, x\right)\right)\right), x\right)
\] |
metadata-eval [=>]-0.0% | \[ \mathsf{copysign}\left(-\left(\log \left(\frac{1}{\color{blue}{-1}}\right) + \log \left(x - \mathsf{hypot}\left(1, x\right)\right)\right), x\right)
\] |
metadata-eval [=>]-0.0% | \[ \mathsf{copysign}\left(-\left(\log \color{blue}{-1} + \log \left(x - \mathsf{hypot}\left(1, x\right)\right)\right), x\right)
\] |
log-prod [<=]21.6% | \[ \mathsf{copysign}\left(-\color{blue}{\log \left(-1 \cdot \left(x - \mathsf{hypot}\left(1, x\right)\right)\right)}, x\right)
\] |
neg-mul-1 [<=]21.6% | \[ \mathsf{copysign}\left(-\log \color{blue}{\left(-\left(x - \mathsf{hypot}\left(1, x\right)\right)\right)}, x\right)
\] |
sub-neg [=>]21.6% | \[ \mathsf{copysign}\left(-\log \left(-\color{blue}{\left(x + \left(-\mathsf{hypot}\left(1, x\right)\right)\right)}\right), x\right)
\] |
+-commutative [=>]21.6% | \[ \mathsf{copysign}\left(-\log \left(-\color{blue}{\left(\left(-\mathsf{hypot}\left(1, x\right)\right) + x\right)}\right), x\right)
\] |
distribute-neg-in [=>]21.6% | \[ \mathsf{copysign}\left(-\log \color{blue}{\left(\left(-\left(-\mathsf{hypot}\left(1, x\right)\right)\right) + \left(-x\right)\right)}, x\right)
\] |
remove-double-neg [=>]21.6% | \[ \mathsf{copysign}\left(-\log \left(\color{blue}{\mathsf{hypot}\left(1, x\right)} + \left(-x\right)\right), x\right)
\] |
sub-neg [<=]21.6% | \[ \mathsf{copysign}\left(-\log \color{blue}{\left(\mathsf{hypot}\left(1, x\right) - x\right)}, x\right)
\] |
Taylor expanded in x around 0 99.9%
Simplified100.0%
[Start]99.9% | \[ \mathsf{copysign}\left(-\left(0.16666666666666666 \cdot {x}^{3} + \left(-1 \cdot x + -0.075 \cdot {x}^{5}\right)\right), x\right)
\] |
|---|---|
+-commutative [=>]99.9% | \[ \mathsf{copysign}\left(-\left(0.16666666666666666 \cdot {x}^{3} + \color{blue}{\left(-0.075 \cdot {x}^{5} + -1 \cdot x\right)}\right), x\right)
\] |
associate-+r+ [=>]100.0% | \[ \mathsf{copysign}\left(-\color{blue}{\left(\left(0.16666666666666666 \cdot {x}^{3} + -0.075 \cdot {x}^{5}\right) + -1 \cdot x\right)}, x\right)
\] |
mul-1-neg [=>]100.0% | \[ \mathsf{copysign}\left(-\left(\left(0.16666666666666666 \cdot {x}^{3} + -0.075 \cdot {x}^{5}\right) + \color{blue}{\left(-x\right)}\right), x\right)
\] |
unsub-neg [=>]100.0% | \[ \mathsf{copysign}\left(-\color{blue}{\left(\left(0.16666666666666666 \cdot {x}^{3} + -0.075 \cdot {x}^{5}\right) - x\right)}, x\right)
\] |
+-commutative [=>]100.0% | \[ \mathsf{copysign}\left(-\left(\color{blue}{\left(-0.075 \cdot {x}^{5} + 0.16666666666666666 \cdot {x}^{3}\right)} - x\right), x\right)
\] |
fma-def [=>]100.0% | \[ \mathsf{copysign}\left(-\left(\color{blue}{\mathsf{fma}\left(-0.075, {x}^{5}, 0.16666666666666666 \cdot {x}^{3}\right)} - x\right), x\right)
\] |
if 0.150000006 < (copysign.f32 (log.f32 (+.f32 (fabs.f32 x) (sqrt.f32 (+.f32 (*.f32 x x) 1)))) x) Initial program 46.7%
Applied egg-rr100.0%
[Start]46.7% | \[ \mathsf{copysign}\left(\log \left(\left|x\right| + \sqrt{x \cdot x + 1}\right), x\right)
\] |
|---|---|
add-cbrt-cube [=>]46.7% | \[ \mathsf{copysign}\left(\color{blue}{\sqrt[3]{\left(\log \left(\left|x\right| + \sqrt{x \cdot x + 1}\right) \cdot \log \left(\left|x\right| + \sqrt{x \cdot x + 1}\right)\right) \cdot \log \left(\left|x\right| + \sqrt{x \cdot x + 1}\right)}}, x\right)
\] |
pow3 [=>]46.7% | \[ \mathsf{copysign}\left(\sqrt[3]{\color{blue}{{\log \left(\left|x\right| + \sqrt{x \cdot x + 1}\right)}^{3}}}, x\right)
\] |
add-sqr-sqrt [=>]46.7% | \[ \mathsf{copysign}\left(\sqrt[3]{{\log \left(\left|\color{blue}{\sqrt{x} \cdot \sqrt{x}}\right| + \sqrt{x \cdot x + 1}\right)}^{3}}, x\right)
\] |
fabs-sqr [=>]46.7% | \[ \mathsf{copysign}\left(\sqrt[3]{{\log \left(\color{blue}{\sqrt{x} \cdot \sqrt{x}} + \sqrt{x \cdot x + 1}\right)}^{3}}, x\right)
\] |
add-sqr-sqrt [<=]46.7% | \[ \mathsf{copysign}\left(\sqrt[3]{{\log \left(\color{blue}{x} + \sqrt{x \cdot x + 1}\right)}^{3}}, x\right)
\] |
+-commutative [=>]46.7% | \[ \mathsf{copysign}\left(\sqrt[3]{{\log \left(x + \sqrt{\color{blue}{1 + x \cdot x}}\right)}^{3}}, x\right)
\] |
hypot-1-def [=>]100.0% | \[ \mathsf{copysign}\left(\sqrt[3]{{\log \left(x + \color{blue}{\mathsf{hypot}\left(1, x\right)}\right)}^{3}}, x\right)
\] |
Final simplification100.0%
| Alternative 1 | |
|---|---|
| Accuracy | 99.4% |
| Cost | 42376 |
| Alternative 2 | |
|---|---|
| Accuracy | 99.4% |
| Cost | 39304 |
| Alternative 3 | |
|---|---|
| Accuracy | 99.2% |
| Cost | 35976 |
| Alternative 4 | |
|---|---|
| Accuracy | 98.7% |
| Cost | 9928 |
| Alternative 5 | |
|---|---|
| Accuracy | 99.2% |
| Cost | 9928 |
| Alternative 6 | |
|---|---|
| Accuracy | 97.9% |
| Cost | 9796 |
| Alternative 7 | |
|---|---|
| Accuracy | 97.7% |
| Cost | 6984 |
| Alternative 8 | |
|---|---|
| Accuracy | 84.2% |
| Cost | 6792 |
| Alternative 9 | |
|---|---|
| Accuracy | 97.6% |
| Cost | 6792 |
| Alternative 10 | |
|---|---|
| Accuracy | 97.4% |
| Cost | 6792 |
| Alternative 11 | |
|---|---|
| Accuracy | 68.7% |
| Cost | 6628 |
| Alternative 12 | |
|---|---|
| Accuracy | 68.7% |
| Cost | 6564 |
| Alternative 13 | |
|---|---|
| Accuracy | 62.0% |
| Cost | 6532 |
| Alternative 14 | |
|---|---|
| Accuracy | 53.7% |
| Cost | 3264 |
herbie shell --seed 2023269
(FPCore (x)
:name "Rust f32::asinh"
:precision binary32
:herbie-target
(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))