



Bits error versus x
Results
| Original | 52.4 |
|---|---|
| Target | 44.8 |
| Herbie | 0.1 |
if x < -1.089668590230956Initial program 61.7
Simplified60.9
Taylor expanded around -inf 0.1
Simplified0.1
if -1.089668590230956 < x < 0.0073817934974310835Initial program 58.7
Simplified58.7
Taylor expanded around 0 0.1
if 0.0073817934974310835 < x Initial program 31.1
Simplified0.0
rmApplied *-un-lft-identity0.0
Final simplification0.1
herbie shell --seed 2019016 +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: 15.7s)Debug log
| 256× | (pre true 80) |
| 74× | (body real 1280) |
| 56× | (body real 80) |
| 51× | (body real 640) |
| 35× | (body real 2560) |
| 25× | (body real 320) |
| 15× | (body real 160) |
| 9.0ms | (log (+ x (sqrt (+ (* x x) 1)))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 47.8b
Found 3 expressions with local error:
| 3.7b | (log (+ x (hypot 1 x))) |
| 0.9b | (+ x (hypot 1 x)) |
| 0.0b | (hypot 1 x) |
| 4× | add-cube-cbrt |
| 4× | add-exp-log |
| 4× | *-un-lft-identity |
| 4× | pow1 |
| 4× | add-sqr-sqrt |
| 3× | add-log-exp |
| 3× | log1p-expm1-u |
| 3× | add-cbrt-cube |
| 3× | log-prod |
| 3× | expm1-log1p-u |
| 2× | flip-+ |
| 2× | flip3-+ |
| 2× | log-div |
| 1× | log-pow |
| 1× | rem-log-exp |
| 1× | hypot-udef |
| 1× | +-commutative |
| 2.0ms | (log (+ x (hypot 1 x))) |
| 1.0ms | (+ x (hypot 1 x)) |
| 0.0ms | (hypot 1 x) |
| 142.0ms | (log (+ x (hypot 1 x))) |
| 38.0ms | (+ x (hypot 1 x)) |
| 23.0ms | (hypot 1 x) |
| 378.0ms | (- (+ (log 2) (* 1/4 (/ 1 (pow x 2)))) (+ (log (/ 1 x)) (* 3/32 (/ 1 (pow x 4))))) |
| 301.0ms | (- (* 1/8 (/ 1 (pow x 3))) (+ (* 1/16 (/ 1 (pow x 5))) (* 1/2 (/ 1 x)))) |
| 178.0ms | (- (+ (log (/ -1 x)) (+ (log 1/2) (* 3/32 (/ 1 (pow x 4))))) (* 1/4 (/ 1 (pow x 2)))) |
| 168.0ms | (- (* 1/8 (/ 1 (pow x 3))) (+ x (* 1/2 (/ 1 x)))) |
| 159.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.9b | (- (+ x (* 3/40 (pow x 5))) (* 1/6 (pow x 3))) |
| 0.5b | (* 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 |
| 10.0ms | (- (+ x (* 3/40 (pow x 5))) (* 1/6 (pow x 3))) |
| 2.0ms | (* 3/40 (pow x 5)) |
| 2.0ms | (* 1/6 (pow x 3)) |
| 32.0ms | (* 3/40 (pow x 5)) |
| 27.0ms | (- (+ x (* 3/40 (pow x 5))) (* 1/6 (pow x 3))) |
| 26.0ms | (* 1/6 (pow x 3)) |
| 164.0ms | (/ (exp (+ x (* 3/40 (pow x 5)))) (exp (* 1/6 (pow x 3)))) |
| 154.0ms | (fma 1 (+ x (* 3/40 (pow x 5))) (- (* (pow x 3) 1/6))) |
| 136.0ms | (- (+ x (* 3/40 (pow x 5))) (* 1/6 (pow x 3))) |
| 131.0ms | (- (+ x (* 3/40 (pow x 5))) (* 1/6 (pow x 3))) |
| 115.0ms | (- (+ x (* 3/40 (pow x 5))) (* 1/6 (pow x 3))) |
5 alts after pruning (4 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 19.5b | (+ (/ -1/16 (pow x 5)) (/ (/ 1/8 x) (* x x))) |
| 11.1b | (log (+ (/ -1/2 x) (+ (/ -1/16 (pow x 5)) (/ (/ 1/8 x) (* x x))))) |
| 0.4b | (/ -1/16 (pow x 5)) |
| 0.1b | (/ (/ 1/8 x) (* x x)) |
| 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 |
| 15.0ms | (log (+ (/ -1/2 x) (+ (/ -1/16 (pow x 5)) (/ (/ 1/8 x) (* x x))))) |
| 6.0ms | (+ (/ -1/16 (pow x 5)) (/ (/ 1/8 x) (* x x))) |
| 6.0ms | (/ (/ 1/8 x) (* x x)) |
| 1.0ms | (/ -1/16 (pow x 5)) |
| 121.0ms | (log (+ (/ -1/2 x) (+ (/ -1/16 (pow x 5)) (/ (/ 1/8 x) (* x x))))) |
| 90.0ms | (+ (/ -1/16 (pow x 5)) (/ (/ 1/8 x) (* x x))) |
| 19.0ms | (/ -1/16 (pow x 5)) |
| 16.0ms | (/ (/ 1/8 x) (* x x)) |
| 507.0ms | (/ (* (* (/ 1/8 x) (/ 1/8 x)) (/ 1/8 x)) (* (* (* x x) (* x x)) (* x x))) |
| 321.0ms | (- (+ (* 6 (pow x 4)) (log -1/16)) (+ (* 2 (pow x 2)) (* 5 (log x)))) |
| 305.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))))))) |
| 246.0ms | (log (+ (* -1/2 (* (pow x 5) (* x x))) (* x (+ (* -1/16 (* x x)) (* (pow x 5) (/ 1/8 x)))))) |
| 197.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)))))) |
5 alts after pruning (3 fresh and 2 done)
Merged error: 0.0b
Found 3 expressions with local error:
| 3.7b | (log (+ x (* 1 (hypot 1 x)))) |
| 0.9b | (+ x (* 1 (hypot 1 x))) |
| 0.0b | (hypot 1 x) |
| 4× | add-cube-cbrt |
| 4× | add-exp-log |
| 4× | *-un-lft-identity |
| 4× | pow1 |
| 4× | add-sqr-sqrt |
| 3× | add-log-exp |
| 3× | log1p-expm1-u |
| 3× | add-cbrt-cube |
| 3× | log-prod |
| 3× | expm1-log1p-u |
| 2× | flip-+ |
| 2× | flip3-+ |
| 2× | log-div |
| 1× | log-pow |
| 1× | rem-log-exp |
| 1× | hypot-udef |
| 1× | +-commutative |
| 1.0ms | (+ x (* 1 (hypot 1 x))) |
| 1.0ms | (log (+ x (* 1 (hypot 1 x)))) |
| 0.0ms | (hypot 1 x) |
| 138.0ms | (log (+ x (* 1 (hypot 1 x)))) |
| 37.0ms | (+ x (* 1 (hypot 1 x))) |
| 26.0ms | (hypot 1 x) |
| 388.0ms | (- (+ (log 2) (* 1/4 (/ 1 (pow x 2)))) (+ (log (/ 1 x)) (* 3/32 (/ 1 (pow x 4))))) |
| 304.0ms | (- (* 1/8 (/ 1 (pow x 3))) (+ (* 1/16 (/ 1 (pow x 5))) (* 1/2 (/ 1 x)))) |
| 288.0ms | (log (- (* x x) (* (* 1 (hypot 1 x)) (* 1 (hypot 1 x))))) |
| 204.0ms | (- (* 1/8 (/ 1 (pow x 3))) (+ x (* 1/2 (/ 1 x)))) |
| 191.0ms | (- (+ x (* 1/2 (/ 1 x))) (* 1/8 (/ 1 (pow x 3)))) |
5 alts after pruning (2 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
| 8000× | (pre true 80) |
| 2295× | (body real 1280) |
| 2154× | (body real 80) |
| 1593× | (body real 640) |
| 825× | (body real 2560) |
| 740× | (body real 320) |
| 393× | (body real 160) |