



Bits error versus x
Results
| Original | 52.3 |
|---|---|
| Target | 44.9 |
| Herbie | 0.2 |
if x < -1.07332091780053Initial program 61.5
Taylor expanded around -inf 0.2
Simplified0.2
if -1.07332091780053 < x < 0.9631561982799212Initial program 58.7
Taylor expanded around 0 0.2
if 0.9631561982799212 < x Initial program 30.8
Taylor expanded around inf 0.3
Simplified0.3
Final simplification0.2
herbie shell --seed 2019022
(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: 17.6s)Debug log
| 59.0ms | 74× | body | 1280 | valid |
| 22.0ms | 47× | body | 640 | valid |
| 16.0ms | 26× | body | 2560 | valid |
| 8.0ms | 27× | body | 320 | valid |
| 5.0ms | 75× | body | 80 | valid |
| 1.0ms | 7× | body | 160 | valid |
| 3.0ms | (log (+ x (sqrt (+ (* x x) 1)))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 50.1b
Found 3 expressions with local error:
| 13.6b | (sqrt (+ (* x x) 1)) |
| 3.3b | (log (+ x (sqrt (+ (* x x) 1)))) |
| 0.4b | (+ x (sqrt (+ (* x x) 1))) |
| 6× | add-sqr-sqrt |
| 5× | add-cube-cbrt |
| 5× | *-un-lft-identity |
| 4× | add-exp-log |
| 4× | pow1 |
| 3× | add-log-exp |
| 3× | flip-+ |
| 3× | sqrt-prod |
| 3× | add-cbrt-cube |
| 3× | flip3-+ |
| 3× | log-prod |
| 2× | sqrt-div |
| 2× | log-div |
| 1× | log-pow |
| 1× | rem-log-exp |
| 1× | pow1/2 |
| 1× | rem-sqrt-square |
| 1× | +-commutative |
| 22.0ms | (log (+ x (sqrt (+ (* x x) 1)))) |
| 2.0ms | (+ x (sqrt (+ (* x x) 1))) |
| 2.0ms | (sqrt (+ (* x x) 1)) |
| 126.0ms | (log (+ x (sqrt (+ (* x x) 1)))) |
| 35.0ms | (+ x (sqrt (+ (* x x) 1))) |
| 25.0ms | (sqrt (+ (* x x) 1)) |
| 397.0ms | (- (+ (log (/ -1 x)) (+ (log 1/2) (* 3/32 (/ 1 (pow x 4))))) (* 1/4 (/ 1 (pow x 2)))) |
| 254.0ms | (- (+ (log 2) (* 1/4 (/ 1 (pow x 2)))) (+ (log (/ 1 x)) (* 3/32 (/ 1 (pow x 4))))) |
| 135.0ms | (- (+ x (* 1/2 (/ 1 x))) (* 1/8 (/ 1 (pow x 3)))) |
| 126.0ms | (sqrt (- (* (* x x) (* x x)) (* 1 1))) |
| 122.0ms | (- (* 1/8 (/ 1 (pow x 3))) (+ x (* 1/2 (/ 1 x)))) |
5 alts after pruning (5 fresh and 0 done)
Merged error: 0b
Found 4 expressions with local error:
| 16.4b | (- (+ x (* 3/40 (pow x 5))) (* 1/6 (pow x 3))) |
| 0.3b | (* 3/40 (pow x 5)) |
| 0.1b | (* 1/6 (pow x 3)) |
| 0.0b | (+ x (* 3/40 (pow x 5))) |
| 8× | associate-*r* |
| 6× | add-log-exp |
| 6× | add-cube-cbrt |
| 6× | *-un-lft-identity |
| 6× | add-sqr-sqrt |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | pow1 |
| 2× | *-commutative |
| 1× | flip-- |
| 1× | flip-+ |
| 1× | associate--l+ |
| 1× | unpow3 |
| 1× | diff-log |
| 1× | flip3-- |
| 1× | flip3-+ |
| 1× | sub-neg |
| 1× | +-commutative |
| 1× | cube-mult |
| 8.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)) |
| 2.0ms | (+ x (* 3/40 (pow x 5))) |
| 50.0ms | (+ x (* 3/40 (pow x 5))) |
| 36.0ms | (- (+ x (* 3/40 (pow x 5))) (* 1/6 (pow x 3))) |
| 31.0ms | (* 3/40 (pow x 5)) |
| 29.0ms | (* 1/6 (pow x 3)) |
| 121.0ms | (/ (exp (+ x (* 3/40 (pow x 5)))) (exp (* 1/6 (pow x 3)))) |
| 85.0ms | (- (+ x (* 3/40 (pow x 5))) (* 1/6 (pow x 3))) |
| 66.0ms | (- (+ x (* 3/40 (pow x 5))) (* 1/6 (pow x 3))) |
| 62.0ms | (- (+ x (* 3/40 (pow x 5))) (* 1/6 (pow x 3))) |
| 5.0ms | (sqrt (pow x 3)) |
5 alts after pruning (4 fresh and 1 done)
Merged error: 0b
Found 4 expressions with local error:
| 13.1b | (log (+ x (+ (+ x (/ 1/2 x)) (/ (/ -1/8 x) (* x x))))) |
| 0.2b | (+ (+ x (/ 1/2 x)) (/ (/ -1/8 x) (* x x))) |
| 0.1b | (/ (/ -1/8 x) (* x x)) |
| 0.0b | (+ x (+ (+ x (/ 1/2 x)) (/ (/ -1/8 x) (* x x)))) |
| 9× | *-un-lft-identity |
| 7× | add-cube-cbrt |
| 7× | add-exp-log |
| 7× | add-sqr-sqrt |
| 6× | add-log-exp |
| 6× | add-cbrt-cube |
| 5× | pow1 |
| 4× | associate-/l* |
| 4× | flip-+ |
| 4× | times-frac |
| 4× | flip3-+ |
| 3× | div-inv |
| 3× | log-prod |
| 2× | frac-add |
| 2× | log-div |
| 2× | +-commutative |
| 1× | associate-/l/ |
| 1× | distribute-lft-out |
| 1× | log-pow |
| 1× | rem-log-exp |
| 1× | div-exp |
| 1× | frac-2neg |
| 1× | sum-log |
| 1× | associate-/r* |
| 1× | clear-num |
| 1× | associate-+r+ |
| 1× | associate-+l+ |
| 1× | cbrt-undiv |
| 12.0ms | (+ (+ x (/ 1/2 x)) (/ (/ -1/8 x) (* x x))) |
| 8.0ms | (log (+ x (+ (+ x (/ 1/2 x)) (/ (/ -1/8 x) (* x x))))) |
| 6.0ms | (+ x (+ (+ x (/ 1/2 x)) (/ (/ -1/8 x) (* x x)))) |
| 5.0ms | (/ (/ -1/8 x) (* x x)) |
| 71.0ms | (log (+ x (+ (+ x (/ 1/2 x)) (/ (/ -1/8 x) (* x x))))) |
| 22.0ms | (+ x (+ (+ x (/ 1/2 x)) (/ (/ -1/8 x) (* x x)))) |
| 20.0ms | (/ (/ -1/8 x) (* x x)) |
| 15.0ms | (+ (+ x (/ 1/2 x)) (/ (/ -1/8 x) (* x x))) |
| 639.0ms | (log (+ (pow x 3) (pow (+ (+ x (/ 1/2 x)) (/ (/ -1/8 x) (* x x))) 3))) |
| 506.0ms | (/ (* (* (/ -1/8 x) (/ -1/8 x)) (/ -1/8 x)) (* (* (* x x) (* x x)) (* x x))) |
| 403.0ms | (- (+ (log -2) (* 1/4 (/ 1 (pow x 2)))) (+ (log (/ -1 x)) (* 3/32 (/ 1 (pow x 4))))) |
| 271.0ms | (- (+ (log 2) (* 1/4 (/ 1 (pow x 2)))) (+ (log (/ 1 x)) (* 3/32 (/ 1 (pow x 4))))) |
| 236.0ms | (- (log -1/8) (+ (* 4 (pow x 2)) (+ (* 24 (pow x 4)) (* 3 (log x))))) |
5 alts after pruning (3 fresh and 2 done)
Merged error: 0b
Found 4 expressions with local error:
| 20.6b | (- (/ -1/16 (pow x 5)) (- (/ 1/2 x) (/ (/ 1/8 x) (* x x)))) |
| 15.1b | (log (- (/ -1/16 (pow x 5)) (- (/ 1/2 x) (/ (/ 1/8 x) (* x x))))) |
| 0.3b | (/ -1/16 (pow x 5)) |
| 0.2b | (- (/ 1/2 x) (/ (/ 1/8 x) (* x x))) |
| 18× | *-un-lft-identity |
| 14× | add-sqr-sqrt |
| 11× | add-log-exp |
| 9× | frac-sub |
| 7× | distribute-lft-out-- |
| 6× | add-cube-cbrt |
| 6× | log-prod |
| 5× | flip-- |
| 5× | add-exp-log |
| 5× | flip3-- |
| 5× | log-div |
| 5× | pow1 |
| 4× | difference-of-squares |
| 4× | diff-log |
| 4× | add-cbrt-cube |
| 3× | sub-neg |
| 3× | associate-/r* |
| 2× | associate--r+ |
| 1× | associate--r- |
| 1× | div-inv |
| 1× | log-pow |
| 1× | rem-log-exp |
| 1× | times-frac |
| 1× | frac-2neg |
| 1× | clear-num |
| 23.0ms | (log (- (/ -1/16 (pow x 5)) (- (/ 1/2 x) (/ (/ 1/8 x) (* x x))))) |
| 22.0ms | (- (/ -1/16 (pow x 5)) (- (/ 1/2 x) (/ (/ 1/8 x) (* x x)))) |
| 7.0ms | (- (/ 1/2 x) (/ (/ 1/8 x) (* x x))) |
| 1.0ms | (/ -1/16 (pow x 5)) |
| 94.0ms | (log (- (/ -1/16 (pow x 5)) (- (/ 1/2 x) (/ (/ 1/8 x) (* x x))))) |
| 37.0ms | (- (/ 1/2 x) (/ (/ 1/8 x) (* x x))) |
| 33.0ms | (- (/ -1/16 (pow x 5)) (- (/ 1/2 x) (/ (/ 1/8 x) (* x x)))) |
| 24.0ms | (/ -1/16 (pow x 5)) |
| 327.0ms | (- (+ (log (/ -1 x)) (+ (log 1/2) (* 3/32 (/ 1 (pow x 4))))) (* 1/4 (/ 1 (pow x 2)))) |
| 318.0ms | (- (+ (log (/ 1 x)) (+ (* 3/32 (/ 1 (pow x 4))) (log -1/2))) (* 1/4 (/ 1 (pow x 2)))) |
| 278.0ms | (* (pow x 5) (+ (* (/ 1/2 x) (/ 1/2 x)) (+ (* (/ (/ 1/8 x) (* x x)) (/ (/ 1/8 x) (* x x))) (* (/ 1/2 x) (/ (/ 1/8 x) (* x x)))))) |
| 240.0ms | (- (* -1/16 (+ (/ 1/2 x) (/ (/ 1/8 x) (* x x)))) (* (pow x 5) (- (* (/ 1/2 x) (/ 1/2 x)) (* (/ (/ 1/8 x) (* x x)) (/ (/ 1/8 x) (* x x)))))) |
| 233.0ms | (log (- (* -1/16 (* x (* x x))) (* (pow x 5) (- (* 1/2 (* x x)) (* x (/ 1/8 x)))))) |
5 alts after pruning (2 fresh and 3 done)
Merged error: 0b
99.4% (0.2b remaining)
Error of 0.2b against oracle of 0.0b and baseline of 31.1b
| 2.3s | 2295× | body | 1280 | valid |
| 817.0ms | 1557× | body | 640 | valid |
| 605.0ms | 787× | body | 2560 | valid |
| 312.0ms | 824× | body | 320 | valid |
| 226.0ms | 2164× | body | 80 | valid |
| 69.0ms | 373× | body | 160 | valid |