



Bits error versus x
Results
| Original | 52.7 |
|---|---|
| Target | 45.0 |
| Herbie | 0.1 |
if x < -1.072687741282904Initial program 61.8
Simplified61.0
Taylor expanded around -inf 0.1
Simplified0.1
if -1.072687741282904 < x < 0.00772616579663237Initial program 58.5
Simplified58.5
Taylor expanded around 0 0.1
rmApplied associate--l+0.1
if 0.00772616579663237 < x Initial program 32.0
Simplified0.1
rmApplied expm1-log1p-u0.1
rmApplied add-exp-log0.1
Final simplification0.1
herbie shell --seed 2019007 +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: 12.8s)Debug log
1 calls. Slowest were:
| 9.0ms | (log (+ x (sqrt (+ (* x x) 1)))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 42.0b
Found 3 expressions with local error:
| 4.6b | (log (+ x (hypot 1 x))) |
| 0.7b | (+ x (hypot 1 x)) |
| 0.0b | (hypot 1 x) |
3 calls. Slowest were:
| 2.0ms | (log (+ x (hypot 1 x))) |
| 2.0ms | (+ x (hypot 1 x)) |
| 0.0ms | (hypot 1 x) |
3 calls. Slowest were:
| 135.0ms | (log (+ x (hypot 1 x))) |
| 37.0ms | (+ x (hypot 1 x)) |
| 24.0ms | (hypot 1 x) |
15 calls. Slowest were:
| 367.0ms | (- (+ (log 2) (* 1/4 (/ 1 (pow x 2)))) (+ (log (/ 1 x)) (* 3/32 (/ 1 (pow x 4))))) |
| 266.0ms | (- (* 1/8 (/ 1 (pow x 3))) (+ (* 1/16 (/ 1 (pow x 5))) (* 1/2 (/ 1 x)))) |
| 193.0ms | (- (+ x (* 1/2 (/ 1 x))) (* 1/8 (/ 1 (pow x 3)))) |
4 alts after pruning (4 fresh and 0 done)
Merged error: 0.0b
Found 3 expressions with local error:
| 19.2b | (- (+ 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)) |
3 calls. Slowest were:
| 9.0ms | (- (+ x (* 3/40 (pow x 5))) (* 1/6 (pow x 3))) |
| 3.0ms | (* 1/6 (pow x 3)) |
| 2.0ms | (* 3/40 (pow x 5)) |
3 calls. Slowest were:
| 44.0ms | (- (+ x (* 3/40 (pow x 5))) (* 1/6 (pow x 3))) |
| 27.0ms | (* 3/40 (pow x 5)) |
| 26.0ms | (* 1/6 (pow x 3)) |
25 calls. Slowest were:
| 166.0ms | (fma 1 (+ x (* 3/40 (pow x 5))) (- (* (pow x 3) 1/6))) |
| 148.0ms | (/ (exp (+ x (* 3/40 (pow x 5)))) (exp (* 1/6 (pow x 3)))) |
| 144.0ms | (- (+ x (* 3/40 (pow x 5))) (* 1/6 (pow x 3))) |
4 alts after pruning (4 fresh and 0 done)
Merged error: 0.0b
Found 3 expressions with local error:
| 19.2b | (- (* 3/40 (pow x 5)) (* 1/6 (pow x 3))) |
| 0.1b | (* 1/6 (pow x 3)) |
| 0.1b | (* 3/40 (pow x 5)) |
3 calls. Slowest were:
| 3.0ms | (- (* 3/40 (pow x 5)) (* 1/6 (pow x 3))) |
| 2.0ms | (* 3/40 (pow x 5)) |
| 1.0ms | (* 1/6 (pow x 3)) |
3 calls. Slowest were:
| 70.0ms | (- (* 3/40 (pow x 5)) (* 1/6 (pow x 3))) |
| 32.0ms | (* 3/40 (pow x 5)) |
| 15.0ms | (* 1/6 (pow x 3)) |
19 calls. Slowest were:
| 66.0ms | (/ (exp (* 3/40 (pow x 5))) (exp (* 1/6 (pow x 3)))) |
| 53.0ms | (- (* 3/40 (pow x 5)) (* 1/6 (pow x 3))) |
| 50.0ms | (- (* 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:
| 29.9b | (log (expm1 (log1p (+ x (hypot 1 x))))) |
| 1.6b | (expm1 (log1p (+ x (hypot 1 x)))) |
| 0.7b | (+ x (hypot 1 x)) |
| 0.0b | (hypot 1 x) |
4 calls. Slowest were:
| 2.0ms | (log (expm1 (log1p (+ x (hypot 1 x))))) |
| 1.0ms | (+ x (hypot 1 x)) |
| 0.0ms | (expm1 (log1p (+ x (hypot 1 x)))) |
4 calls. Slowest were:
| 216.0ms | (log (expm1 (log1p (+ x (hypot 1 x))))) |
| 111.0ms | (expm1 (log1p (+ x (hypot 1 x)))) |
| 49.0ms | (+ x (hypot 1 x)) |
| 36.0ms | (hypot 1 x) |
16 calls. Slowest were:
| 488.0ms | (- (+ (exp (- (log 2) (log (/ 1 x)))) (+ (* 1/2 (/ (exp (- (log 2) (log (/ 1 x)))) x)) (* 1/4 (/ (exp (- (log 2) (log (/ 1 x)))) (pow x 2))))) 1) |
| 273.0ms | (- (* 1/8 (/ 1 (pow x 3))) (+ (* 1/16 (/ 1 (pow x 5))) (* 1/2 (/ 1 x)))) |
| 225.0ms | (- (* 1/8 (/ 1 (pow x 3))) (+ (* 1/16 (/ 1 (pow x 5))) (* 1/2 (/ 1 x)))) |
3 alts after pruning (2 fresh and 1 done)
Merged error: 0.0b
99.8% (0.1b remaining)
Error of 0.1b against oracle of 0.0b and baseline of 31.3b