



Bits error versus x
Results
| Original | 39.6 |
|---|---|
| Target | 38.7 |
| Herbie | 0.1 |
Initial program 39.6
Simplified0.0
rmApplied log1p-expm1-u0.1
Final simplification0.1
herbie shell --seed 2019004 +o rules:numerics
(FPCore (x)
:name "Kahan's exp quotient"
:herbie-target
(if (and (< x 1) (> x -1)) (/ (- (exp x) 1) (log (exp x))) (/ (- (exp x) 1) x))
(/ (- (exp x) 1) x))
Time bar (total: 9.6s)Debug log
1 calls. Slowest were:
| 16.0ms | (/ (- (exp x) 1) x) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 0.0b
Found 1 expressions with local error:
| 0.0b | (/ (expm1 x) x) |
1 calls. Slowest were:
| 5.0ms | (/ (expm1 x) x) |
1 calls. Slowest were:
| 35.0ms | (/ (expm1 x) x) |
6 calls. Slowest were:
| 107.0ms | (* -1 (/ (- 1 (exp x)) x)) |
| 67.0ms | (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1)) |
| 14.0ms | (/ (- (exp x) 1) x) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 0b
Found 3 expressions with local error:
| 0.6b | (expm1 (/ (expm1 x) x)) |
| 0.0b | (log1p (expm1 (/ (expm1 x) x))) |
| 0.0b | (/ (expm1 x) x) |
3 calls. Slowest were:
| 5.0ms | (/ (expm1 x) x) |
| 1.0ms | (expm1 (/ (expm1 x) x)) |
| 0.0ms | (log1p (expm1 (/ (expm1 x) x))) |
3 calls. Slowest were:
| 262.0ms | (log1p (expm1 (/ (expm1 x) x))) |
| 50.0ms | (expm1 (/ (expm1 x) x)) |
| 24.0ms | (/ (expm1 x) x) |
14 calls. Slowest were:
| 402.0ms | (- (+ (* 7/24 (* (pow x 2) E)) (+ E (* 1/2 (* x E)))) 1) |
| 302.0ms | (- (+ (/ (exp x) x) (+ (* 1/2 (/ 1 (pow x 2))) (+ (* 1/6 (/ (pow (exp x) 3) (pow x 3))) (+ (* 1/2 (/ (pow (exp x) 2) (pow x 2))) (* 1/2 (/ (exp x) (pow x 3))))))) (+ (/ (exp x) (pow x 2)) (+ (* 1/2 (/ (pow (exp x) 2) (pow x 3))) (+ (* 1/6 (/ 1 (pow x 3))) (/ 1 x))))) |
| 243.0ms | (- (+ (/ (exp x) x) (+ (* 1/2 (/ 1 (pow x 2))) (+ (* 1/6 (/ (pow (exp x) 3) (pow x 3))) (+ (* 1/2 (/ (pow (exp x) 2) (pow x 2))) (* 1/2 (/ (exp x) (pow x 3))))))) (+ (/ (exp x) (pow x 2)) (+ (* 1/2 (/ (pow (exp x) 2) (pow x 3))) (+ (* 1/6 (/ 1 (pow x 3))) (/ 1 x))))) |
2 alts after pruning (1 fresh and 1 done)
Merged error: 0b
Found 4 expressions with local error:
| 0.8b | (* (sqrt (expm1 (/ (expm1 x) x))) (sqrt (expm1 (/ (expm1 x) x)))) |
| 0.6b | (expm1 (/ (expm1 x) x)) |
| 0.6b | (expm1 (/ (expm1 x) x)) |
| 0.1b | (sqrt (expm1 (/ (expm1 x) x))) |
4 calls. Slowest were:
| 10.0ms | (* (sqrt (expm1 (/ (expm1 x) x))) (sqrt (expm1 (/ (expm1 x) x)))) |
| 1.0ms | (sqrt (expm1 (/ (expm1 x) x))) |
| 1.0ms | (expm1 (/ (expm1 x) x)) |
4 calls. Slowest were:
| 56.0ms | (sqrt (expm1 (/ (expm1 x) x))) |
| 48.0ms | (expm1 (/ (expm1 x) x)) |
| 46.0ms | (* (sqrt (expm1 (/ (expm1 x) x))) (sqrt (expm1 (/ (expm1 x) x)))) |
| 41.0ms | (expm1 (/ (expm1 x) x)) |
40 calls. Slowest were:
| 429.0ms | (- (+ (* 7/24 (* (pow x 2) E)) (+ E (* 1/2 (* x E)))) 1) |
| 390.0ms | (- (+ (* 7/24 (* (pow x 2) E)) (+ E (* 1/2 (* x E)))) 1) |
| 375.0ms | (- (+ (* 7/24 (* (pow x 2) E)) (+ E (* 1/2 (* x E)))) 1) |
2 alts after pruning (0 fresh and 2 done)
Merged error: 0b
0% (0.0b remaining)
Error of 0.1b against oracle of 0.1b and baseline of 0.1b