



Bits error versus x
Results
| Original | 52.4 |
|---|---|
| Target | 44.9 |
| Herbie | 0.1 |
if x < -1.0758538884884035Initial program 61.7
Simplified60.9
Taylor expanded around -inf 0.2
Simplified0.2
if -1.0758538884884035 < x < 0.007171326267842194Initial program 58.9
Simplified58.9
Taylor expanded around 0 0.1
if 0.007171326267842194 < x Initial program 30.3
Simplified0.1
Final simplification0.1
herbie shell --seed 2019010 +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: 18.5s)Debug log
| 9.0ms | (log (+ x (sqrt (+ (* x x) 1)))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 48.8b
Found 2 expressions with local error:
| 2.3b | (log (+ x (hypot 1 x))) |
| 0.5b | (+ x (hypot 1 x)) |
| 3× | add-cube-cbrt |
| 3× | add-exp-log |
| 3× | *-un-lft-identity |
| 3× | log-prod |
| 3× | pow1 |
| 3× | add-sqr-sqrt |
| 2× | add-log-exp |
| 2× | log1p-expm1-u |
| 2× | flip-+ |
| 2× | add-cbrt-cube |
| 2× | flip3-+ |
| 2× | log-div |
| 2× | expm1-log1p-u |
| 1× | log-pow |
| 1× | rem-log-exp |
| 1× | +-commutative |
| 2.0ms | (log (+ x (hypot 1 x))) |
| 1.0ms | (+ x (hypot 1 x)) |
| 176.0ms | (log (+ x (hypot 1 x))) |
| 49.0ms | (+ x (hypot 1 x)) |
| 439.0ms | (- (+ (log 2) (* 1/4 (/ 1 (pow x 2)))) (+ (log (/ 1 x)) (* 3/32 (/ 1 (pow x 4))))) |
| 239.0ms | (- (* 1/8 (/ 1 (pow x 3))) (+ (* 1/16 (/ 1 (pow x 5))) (* 1/2 (/ 1 x)))) |
| 196.0ms | (- (+ (log (/ -1 x)) (+ (log 1/2) (* 3/32 (/ 1 (pow x 4))))) (* 1/4 (/ 1 (pow x 2)))) |
| 170.0ms | (- (+ (* 2 x) (* 1/2 (/ 1 x))) (* 1/8 (/ 1 (pow x 3)))) |
| 137.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 3 expressions with local error:
| 18.4b | (- (+ 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)) |
| 8× | associate-*r* |
| 7× | add-cube-cbrt |
| 7× | *-un-lft-identity |
| 7× | add-sqr-sqrt |
| 5× | add-log-exp |
| 3× | log1p-expm1-u |
| 3× | add-exp-log |
| 3× | prod-diff |
| 3× | fma-neg |
| 3× | add-cbrt-cube |
| 3× | pow1 |
| 3× | expm1-log1p-u |
| 2× | *-commutative |
| 1× | flip-- |
| 1× | associate--l+ |
| 1× | unpow3 |
| 1× | diff-log |
| 1× | flip3-- |
| 1× | sub-neg |
| 1× | cube-mult |
| 6.0ms | (- (+ x (* 3/40 (pow x 5))) (* 1/6 (pow x 3))) |
| 1.0ms | (* 1/6 (pow x 3)) |
| 1.0ms | (* 3/40 (pow x 5)) |
| 32.0ms | (- (+ x (* 3/40 (pow x 5))) (* 1/6 (pow x 3))) |
| 23.0ms | (* 1/6 (pow x 3)) |
| 19.0ms | (* 3/40 (pow x 5)) |
| 149.0ms | (fma 1 (+ x (* 3/40 (pow x 5))) (- (* (pow x 3) 1/6))) |
| 147.0ms | (- (+ x (* 3/40 (pow x 5))) (* 1/6 (pow x 3))) |
| 131.0ms | (/ (exp (+ x (* 3/40 (pow x 5)))) (exp (* 1/6 (pow x 3)))) |
| 111.0ms | (- (+ x (* 3/40 (pow x 5))) (* 1/6 (pow x 3))) |
| 110.0ms | (fma (sqrt (+ x (* 3/40 (pow x 5)))) (sqrt (+ x (* 3/40 (pow x 5)))) (- (* (pow x 3) 1/6))) |
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))) |
| 12.1b | (log (+ (/ -1/2 x) (+ (/ -1/16 (pow x 5)) (/ (/ 1/8 x) (* x x))))) |
| 0.1b | (/ (/ 1/8 x) (* x x)) |
| 0.0b | (/ -1/16 (pow x 5)) |
| 16× | *-un-lft-identity |
| 9× | add-cube-cbrt |
| 9× | add-sqr-sqrt |
| 7× | add-exp-log |
| 6× | add-log-exp |
| 6× | add-cbrt-cube |
| 5× | div-inv |
| 5× | frac-add |
| 5× | log-prod |
| 5× | log-div |
| 5× | pow1 |
| 4× | associate-/l* |
| 4× | distribute-lft-out |
| 4× | log1p-expm1-u |
| 4× | times-frac |
| 4× | fma-def |
| 4× | associate-/r* |
| 4× | expm1-log1p-u |
| 3× | flip-+ |
| 3× | flip3-+ |
| 2× | frac-2neg |
| 2× | clear-num |
| 1× | associate-/l/ |
| 1× | log-pow |
| 1× | rem-log-exp |
| 1× | div-exp |
| 1× | sum-log |
| 1× | +-commutative |
| 1× | cbrt-undiv |
| 16.0ms | (log (+ (/ -1/2 x) (+ (/ -1/16 (pow x 5)) (/ (/ 1/8 x) (* x x))))) |
| 10.0ms | (+ (/ -1/16 (pow x 5)) (/ (/ 1/8 x) (* x x))) |
| 3.0ms | (/ (/ 1/8 x) (* x x)) |
| 0.0ms | (/ -1/16 (pow x 5)) |
| 79.0ms | (log (+ (/ -1/2 x) (+ (/ -1/16 (pow x 5)) (/ (/ 1/8 x) (* x x))))) |
| 49.0ms | (+ (/ -1/16 (pow x 5)) (/ (/ 1/8 x) (* x x))) |
| 30.0ms | (/ -1/16 (pow x 5)) |
| 26.0ms | (/ (/ 1/8 x) (* x x)) |
| 561.0ms | (/ (* (* (/ 1/8 x) (/ 1/8 x)) (/ 1/8 x)) (* (* (* x x) (* x x)) (* x x))) |
| 382.0ms | (- (+ (* 6 (pow x 4)) (log -1/16)) (+ (* 2 (pow x 2)) (* 5 (log x)))) |
| 301.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))))))) |
| 256.0ms | (log (+ (* -1/2 (* (pow x 5) (* x x))) (* x (+ (* -1/16 (* x x)) (* (pow x 5) (/ 1/8 x)))))) |
| 221.0ms | (log (- (* (/ -1/2 x) (/ -1/2 x)) (* (+ (/ -1/16 (pow x 5)) (/ (/ 1/8 x) (* x x))) (+ (/ -1/16 (pow x 5)) (/ (/ 1/8 x) (* x x)))))) |
4 alts after pruning (1 fresh and 3 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 15.4b | (log (+ (* x x) (- (* (hypot 1 x) (hypot 1 x)) (* x (hypot 1 x))))) |
| 12.3b | (+ (pow x 3) (pow (hypot 1 x) 3)) |
| 9.3b | (log (+ (pow x 3) (pow (hypot 1 x) 3))) |
| 4.9b | (- (* (hypot 1 x) (hypot 1 x)) (* x (hypot 1 x))) |
| 11× | *-un-lft-identity |
| 8× | add-log-exp |
| 8× | log-prod |
| 7× | add-cube-cbrt |
| 7× | add-sqr-sqrt |
| 6× | add-exp-log |
| 6× | pow1 |
| 5× | fma-def |
| 4× | log1p-expm1-u |
| 4× | add-cbrt-cube |
| 4× | log-div |
| 4× | expm1-log1p-u |
| 3× | flip-+ |
| 3× | flip3-+ |
| 2× | distribute-lft-out |
| 2× | sum-cubes |
| 2× | log-pow |
| 2× | rem-log-exp |
| 1× | flip-- |
| 1× | prod-diff |
| 1× | unpow3 |
| 1× | diff-log |
| 1× | fma-neg |
| 1× | distribute-rgt-out-- |
| 1× | flip3-- |
| 1× | sub-neg |
| 1× | sum-log |
| 1× | +-commutative |
| 1× | cube-mult |
| 14.0ms | (log (+ (* x x) (- (* (hypot 1 x) (hypot 1 x)) (* x (hypot 1 x))))) |
| 13.0ms | (- (* (hypot 1 x) (hypot 1 x)) (* x (hypot 1 x))) |
| 10.0ms | (+ (pow x 3) (pow (hypot 1 x) 3)) |
| 7.0ms | (log (+ (pow x 3) (pow (hypot 1 x) 3))) |
| 188.0ms | (log (+ (* x x) (- (* (hypot 1 x) (hypot 1 x)) (* x (hypot 1 x))))) |
| 136.0ms | (log (+ (pow x 3) (pow (hypot 1 x) 3))) |
| 68.0ms | (- (* (hypot 1 x) (hypot 1 x)) (* x (hypot 1 x))) |
| 62.0ms | (+ (pow x 3) (pow (hypot 1 x) 3)) |
| 639.0ms | (log (- (* (pow x 3) (pow x 3)) (* (pow (hypot 1 x) 3) (pow (hypot 1 x) 3)))) |
| 529.0ms | (- (+ (log 3/2) (* 1/4 (/ 1 (pow x 2)))) (+ (log (/ -1 x)) (* 7/96 (/ 1 (pow x 4))))) |
| 310.0ms | (- (+ (log 3) (* 1/2 (/ 1 (pow x 2)))) (+ (* 2 (log (/ -1 x))) (* 1/6 (/ 1 (pow x 4))))) |
| 301.0ms | (log (+ (pow (* x x) 3) (pow (- (* (hypot 1 x) (hypot 1 x)) (* x (hypot 1 x))) 3))) |
| 210.0ms | (- (* 1/16 (/ 1 (pow x 3))) (+ (* 3/2 x) (* 3/8 (/ 1 x)))) |
4 alts after pruning (1 fresh and 3 done)
Merged error: 0b
99.7% (0.1b remaining)
Error of 0.1b against oracle of 0.0b and baseline of 30.7b