
Results
Herbie found 2 alternatives:
| Alternative | Accuracy | Speedup |
|---|
| Original | 1.6% |
|---|---|
| Target | 100.0% |
| Herbie | 100.0% |
Initial program 1.5%
sub-neg1.5%
+-commutative1.5%
associate-+r-3.1%
+-commutative3.1%
fma-def3.1%
+-commutative3.1%
log1p-def3.1%
metadata-eval3.1%
Simplified3.1%
Taylor expanded in n around inf 100.0%
log-rec100.0%
mul-1-neg100.0%
remove-double-neg100.0%
Simplified100.0%
Final simplification100.0%
Initial program 1.5%
sub-neg1.5%
+-commutative1.5%
associate-+r-3.1%
+-commutative3.1%
fma-def3.1%
+-commutative3.1%
log1p-def3.1%
metadata-eval3.1%
Simplified3.1%
Taylor expanded in n around -inf 0.0%
*-commutative0.0%
+-commutative0.0%
+-inverses3.1%
mul0-lft3.1%
metadata-eval3.1%
Simplified3.1%
Final simplification3.1%
herbie shell --seed 2023166
(FPCore (n)
:name "logs (example 3.8)"
:precision binary64
:pre (> n 6.8e+15)
:herbie-target
(- (log (+ n 1.0)) (- (/ 1.0 (* 2.0 n)) (- (/ 1.0 (* 3.0 (* n n))) (/ 4.0 (pow n 3.0)))))
(- (- (* (+ n 1.0) (log (+ n 1.0))) (* n (log n))) 1.0))