
Results
Herbie found 6 alternatives:
| Alternative | Accuracy | Speedup |
|---|
Initial program 8.0%
+-commutative8.0%
metadata-eval8.0%
sub-neg8.0%
Simplified8.0%
flip--8.0%
div-inv8.0%
add-sqr-sqrt8.1%
add-sqr-sqrt8.1%
associate--r-20.7%
sub-neg20.7%
metadata-eval20.7%
+-commutative20.7%
add-exp-log20.7%
log1p-udef20.7%
expm1-udef100.0%
expm1-log1p-u100.0%
sub-neg100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Final simplification100.0%
Initial program 8.0%
+-commutative8.0%
metadata-eval8.0%
sub-neg8.0%
Simplified8.0%
flip--8.0%
div-inv8.0%
add-sqr-sqrt8.1%
add-sqr-sqrt8.1%
associate--r-20.7%
sub-neg20.7%
metadata-eval20.7%
+-commutative20.7%
add-exp-log20.7%
log1p-udef20.7%
expm1-udef100.0%
expm1-log1p-u100.0%
sub-neg100.0%
metadata-eval100.0%
Applied egg-rr100.0%
associate-*r/100.0%
*-rgt-identity100.0%
count-2100.0%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
Initial program 8.0%
+-commutative8.0%
metadata-eval8.0%
sub-neg8.0%
Simplified8.0%
flip--8.0%
add-sqr-sqrt8.1%
add-sqr-sqrt8.1%
associate--r-20.7%
sub-neg20.7%
metadata-eval20.7%
+-commutative20.7%
add-exp-log20.7%
log1p-udef20.7%
expm1-udef100.0%
expm1-log1p-u100.0%
sub-neg100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Final simplification100.0%
Initial program 8.0%
+-commutative8.0%
metadata-eval8.0%
sub-neg8.0%
Simplified8.0%
flip--8.0%
div-inv8.0%
add-sqr-sqrt8.1%
add-sqr-sqrt8.1%
associate--r-20.7%
sub-neg20.7%
metadata-eval20.7%
+-commutative20.7%
add-exp-log20.7%
log1p-udef20.7%
expm1-udef100.0%
expm1-log1p-u100.0%
sub-neg100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 99.3%
add-log-exp99.3%
*-un-lft-identity99.3%
log-prod99.3%
metadata-eval99.3%
add-log-exp99.3%
*-commutative99.3%
unpow299.3%
associate-*l*99.3%
Applied egg-rr99.3%
+-lft-identity99.3%
Simplified99.3%
Final simplification99.3%
Initial program 8.0%
+-commutative8.0%
metadata-eval8.0%
sub-neg8.0%
Simplified8.0%
flip--8.0%
add-sqr-sqrt8.1%
add-sqr-sqrt8.1%
associate--r-20.7%
sub-neg20.7%
metadata-eval20.7%
+-commutative20.7%
add-exp-log20.7%
log1p-udef20.7%
expm1-udef100.0%
expm1-log1p-u100.0%
sub-neg100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 99.3%
add-log-exp99.3%
*-un-lft-identity99.3%
log-prod99.3%
metadata-eval99.3%
add-log-exp99.3%
*-commutative99.3%
unpow299.3%
associate-*l*99.3%
Applied egg-rr99.3%
+-lft-identity99.3%
Simplified99.3%
Final simplification99.3%
Initial program 8.0%
+-commutative8.0%
metadata-eval8.0%
sub-neg8.0%
Simplified8.0%
Taylor expanded in x around 0 99.1%
Final simplification99.1%
herbie shell --seed 2023167
(FPCore (x)
:name "bug333 (missed optimization)"
:precision binary64
:pre (and (<= -1.0 x) (<= x 1.0))
:herbie-target
(/ (* 2.0 x) (+ (sqrt (+ 1.0 x)) (sqrt (- 1.0 x))))
(- (sqrt (+ 1.0 x)) (sqrt (- 1.0 x))))