
Results
Herbie found 6 alternatives:
| Alternative | Accuracy | Speedup |
|---|
Initial program 99.8%
Final simplification99.8%
if x < 1.15e-5Initial program 100.0%
Taylor expanded in x around 0 99.3%
if 1.15e-5 < x Initial program 99.3%
flip-+98.9%
metadata-eval98.9%
add-sqr-sqrt99.5%
+-commutative99.5%
associate--r+99.5%
metadata-eval99.5%
neg-sub099.5%
associate-/r/99.5%
Applied egg-rr99.5%
remove-double-neg99.5%
distribute-frac-neg99.5%
*-inverses99.5%
metadata-eval99.5%
neg-mul-199.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
remove-double-neg99.5%
metadata-eval99.5%
Simplified99.5%
Final simplification99.4%
if x < 4Initial program 100.0%
Taylor expanded in x around 0 98.9%
if 4 < x Initial program 99.3%
clear-num99.1%
inv-pow99.1%
Applied egg-rr99.1%
unpow-199.1%
clear-num99.3%
expm1-log1p-u90.7%
expm1-udef90.7%
log1p-udef90.7%
+-commutative90.7%
add-exp-log99.3%
add-sqr-sqrt99.9%
metadata-eval99.9%
+-commutative99.9%
metadata-eval99.9%
sub-neg99.9%
flip-+100.0%
pow1/2100.0%
pow-to-exp92.2%
+-commutative92.2%
log1p-udef92.2%
*-commutative92.2%
metadata-eval92.2%
sub-neg92.2%
expm1-udef92.2%
*-un-lft-identity92.2%
Applied egg-rr92.2%
*-lft-identity92.2%
Simplified92.2%
Taylor expanded in x around -inf 0.0%
sub-neg0.0%
metadata-eval0.0%
+-commutative0.0%
*-commutative0.0%
exp-prod0.0%
unpow1/20.0%
+-commutative0.0%
mul-1-neg0.0%
unsub-neg0.0%
metadata-eval0.0%
associate-/r*0.0%
neg-mul-10.0%
log-div88.7%
associate-/l*88.7%
neg-mul-188.7%
remove-double-neg88.7%
/-rgt-identity88.7%
Simplified96.3%
Final simplification98.1%
Initial program 99.8%
Taylor expanded in x around 0 69.8%
Final simplification69.8%
Initial program 99.8%
Taylor expanded in x around 0 69.3%
Final simplification69.3%
Initial program 99.8%
Taylor expanded in x around 0 69.8%
Taylor expanded in x around inf 4.7%
Final simplification4.7%
herbie shell --seed 2023166
(FPCore (x)
:name "Numeric.Log:$clog1p from log-domain-0.10.2.1, B"
:precision binary64
(/ x (+ 1.0 (sqrt (+ x 1.0)))))