



Bits error versus x
Results
| Original | 52.3 |
|---|---|
| Target | 44.5 |
| Herbie | 0.1 |
if x < -1.0504041428544855Initial program 61.6
Simplified60.9
Taylor expanded around -inf 0.3
Simplified0.3
if -1.0504041428544855 < x < 0.007939929311480388Initial program 58.8
Simplified58.8
Taylor expanded around 0 0.1
if 0.007939929311480388 < x Initial program 30.1
Simplified0.1
rmApplied add-sqr-sqrt0.1
Applied log-prod0.1
Final simplification0.1
herbie shell --seed 2019005 +o rules:numerics
(FPCore (x)
:name "Hyperbolic arcsine"
:herbie-target
(if (< x 0) (log (/ -1 (- x (sqrt (+ (* x x) 1))))) (log (+ x (sqrt (+ (* x x) 1)))))
(log (+ x (sqrt (+ (* x x) 1)))))
Time bar (total: 16.8s)Debug log
1 calls. Slowest were:
| 5.0ms | (log (+ x (sqrt (+ (* x x) 1)))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 42.4b
Found 3 expressions with local error:
| 3.3b | (log (+ x (hypot 1 x))) |
| 0.4b | (+ x (hypot 1 x)) |
| 0.0b | (hypot 1 x) |
3 calls. Slowest were:
| 1.0ms | (log (+ x (hypot 1 x))) |
| 1.0ms | (+ x (hypot 1 x)) |
| 0.0ms | (hypot 1 x) |
3 calls. Slowest were:
| 157.0ms | (log (+ x (hypot 1 x))) |
| 47.0ms | (+ x (hypot 1 x)) |
| 37.0ms | (hypot 1 x) |
15 calls. Slowest were:
| 417.0ms | (- (+ (log 2) (* 1/4 (/ 1 (pow x 2)))) (+ (log (/ 1 x)) (* 3/32 (/ 1 (pow x 4))))) |
| 307.0ms | (- (* 1/8 (/ 1 (pow x 3))) (+ (* 1/16 (/ 1 (pow x 5))) (* 1/2 (/ 1 x)))) |
| 204.0ms | (- (+ (log (/ -1 x)) (+ (log 1/2) (* 3/32 (/ 1 (pow x 4))))) (* 1/4 (/ 1 (pow x 2)))) |
4 alts after pruning (4 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 18.3b | (- (+ x (* 3/40 (pow x 5))) (* 1/6 (pow x 3))) |
| 0.1b | (* 1/6 (pow x 3)) |
| 0.1b | (* 3/40 (pow x 5)) |
| 0.0b | (+ x (* 3/40 (pow x 5))) |
4 calls. Slowest were:
| 11.0ms | (- (+ x (* 3/40 (pow x 5))) (* 1/6 (pow x 3))) |
| 2.0ms | (* 1/6 (pow x 3)) |
| 2.0ms | (* 3/40 (pow x 5)) |
4 calls. Slowest were:
| 63.0ms | (+ x (* 3/40 (pow x 5))) |
| 39.0ms | (- (+ x (* 3/40 (pow x 5))) (* 1/6 (pow x 3))) |
| 33.0ms | (* 3/40 (pow x 5)) |
| 26.0ms | (* 1/6 (pow x 3)) |
28 calls. Slowest were:
| 195.0ms | (/ (exp (+ x (* 3/40 (pow x 5)))) (exp (* 1/6 (pow x 3)))) |
| 169.0ms | (fma 1 (+ x (* 3/40 (pow x 5))) (- (* (pow x 3) 1/6))) |
| 125.0ms | (- (+ x (* 3/40 (pow x 5))) (* 1/6 (pow x 3))) |
4 alts after pruning (3 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 3.4b | (log (sqrt (+ x (hypot 1 x)))) |
| 3.4b | (log (sqrt (+ x (hypot 1 x)))) |
| 0.4b | (+ x (hypot 1 x)) |
| 0.4b | (+ x (hypot 1 x)) |
4 calls. Slowest were:
| 3.0ms | (log (sqrt (+ x (hypot 1 x)))) |
| 3.0ms | (log (sqrt (+ x (hypot 1 x)))) |
| 1.0ms | (+ x (hypot 1 x)) |
4 calls. Slowest were:
| 112.0ms | (log (sqrt (+ x (hypot 1 x)))) |
| 73.0ms | (log (sqrt (+ x (hypot 1 x)))) |
| 38.0ms | (+ x (hypot 1 x)) |
| 36.0ms | (+ x (hypot 1 x)) |
30 calls. Slowest were:
| 286.0ms | (- (* 1/8 (/ 1 (pow x 3))) (+ (* 1/16 (/ 1 (pow x 5))) (* 1/2 (/ 1 x)))) |
| 204.0ms | (- (* 1/8 (/ 1 (pow x 3))) (+ (* 1/16 (/ 1 (pow x 5))) (* 1/2 (/ 1 x)))) |
| 153.0ms | (- (+ (* 2 x) (* 1/2 (/ 1 x))) (* 1/8 (/ 1 (pow x 3)))) |
4 alts after pruning (2 fresh and 2 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 20.2b | (+ (/ -1/16 (pow x 5)) (/ (/ 1/8 x) (* x x))) |
| 13.3b | (log (+ (/ -1/2 x) (+ (/ -1/16 (pow x 5)) (/ (/ 1/8 x) (* x x))))) |
| 0.1b | (/ (/ 1/8 x) (* x x)) |
| 0.1b | (/ -1/16 (pow x 5)) |
4 calls. Slowest were:
| 22.0ms | (log (+ (/ -1/2 x) (+ (/ -1/16 (pow x 5)) (/ (/ 1/8 x) (* x x))))) |
| 11.0ms | (+ (/ -1/16 (pow x 5)) (/ (/ 1/8 x) (* x x))) |
| 6.0ms | (/ (/ 1/8 x) (* x x)) |
4 calls. Slowest were:
| 86.0ms | (+ (/ -1/16 (pow x 5)) (/ (/ 1/8 x) (* x x))) |
| 78.0ms | (log (+ (/ -1/2 x) (+ (/ -1/16 (pow x 5)) (/ (/ 1/8 x) (* x x))))) |
| 20.0ms | (/ -1/16 (pow x 5)) |
| 15.0ms | (/ (/ 1/8 x) (* x x)) |
44 calls. Slowest were:
| 649.0ms | (/ (* (* (/ 1/8 x) (/ 1/8 x)) (/ 1/8 x)) (* (* (* x x) (* x x)) (* x x))) |
| 417.0ms | (- (+ (* 6 (pow x 4)) (log -1/16)) (+ (* 2 (pow x 2)) (* 5 (log x)))) |
| 274.0ms | (log (+ (* -1/2 (- (/ -1/16 (pow x 5)) (/ (/ 1/8 x) (* x x)))) (* x (- (* (/ -1/16 (pow x 5)) (/ -1/16 (pow x 5))) (* (/ (/ 1/8 x) (* x x)) (/ (/ 1/8 x) (* x x))))))) |
4 alts after pruning (1 fresh and 3 done)
Merged error: 0.0b
99.7% (0.1b remaining)
Error of 0.1b against oracle of 0.0b and baseline of 31.4b