


Bits error versus x
Initial program 31.2
Simplified31.2
Taylor expanded around inf 0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019022 +o rules:numerics
(FPCore (x)
:name "Hyperbolic arc-cosine"
(log (+ x (sqrt (- (* x x) 1)))))
Time bar (total: 21.2s)Debug log
| 33.0ms | 235× | body | 160 | nan |
| 25.0ms | 518× | body | 80 | nan |
| 16.0ms | 256× | body | 80 | valid |
| 96.0ms | (log (+ x (sqrt (- (* x x) 1)))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 30.9b
Found 3 expressions with local error:
| 29.7b | (sqrt (fma x x -1)) |
| 0.0b | (+ x (sqrt (fma x x -1))) |
| 0.0b | (log (+ x (sqrt (fma 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× | log1p-expm1-u |
| 3× | sqrt-prod |
| 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× | pow1/2 |
| 1× | rem-sqrt-square |
| 1× | +-commutative |
| 2.0ms | (log (+ x (sqrt (fma x x -1)))) |
| 2.0ms | (+ x (sqrt (fma x x -1))) |
| 2.0ms | (sqrt (fma x x -1)) |
| 73.0ms | (log (+ x (sqrt (fma x x -1)))) |
| 28.0ms | (+ x (sqrt (fma x x -1))) |
| 27.0ms | (sqrt (fma x x -1)) |
| 353.0ms | (- (+ (* 1/2 (/ (pow x 2) (sqrt -1))) (sqrt -1)) (* 1/8 (/ (pow x 4) (pow (sqrt -1) 3)))) |
| 320.0ms | (+ (log -1/2) (+ (log (/ -1 x)) (+ (* 3/32 (/ 1 (pow x 4))) (* 1/4 (/ 1 (pow x 2)))))) |
| 314.0ms | (log (- (* x x) (* (sqrt (fma x x -1)) (sqrt (fma x x -1))))) |
| 279.0ms | (- (log 2) (+ (log (/ 1 x)) (+ (* 3/32 (/ 1 (pow x 4))) (* 1/4 (/ 1 (pow x 2)))))) |
| 274.0ms | (- (* 2 x) (+ (* 1/8 (/ 1 (pow x 3))) (* 1/2 (/ 1 x)))) |
2 alts after pruning (1 fresh and 1 done)
Merged error: 0b
Found 3 expressions with local error:
| 0.1b | (/ (/ 1/8 x) (* x x)) |
| 0.0b | (log (- (fma 2 x (/ -1/2 x)) (/ (/ 1/8 x) (* x x)))) |
| 0.0b | (- (fma 2 x (/ -1/2 x)) (/ (/ 1/8 x) (* x x))) |
| 29× | add-sqr-sqrt |
| 25× | *-un-lft-identity |
| 24× | prod-diff |
| 21× | add-cube-cbrt |
| 18× | times-frac |
| 9× | div-inv |
| 6× | add-exp-log |
| 6× | log-prod |
| 5× | add-log-exp |
| 5× | add-cbrt-cube |
| 4× | difference-of-squares |
| 4× | associate-/l* |
| 4× | pow1 |
| 3× | log1p-expm1-u |
| 3× | fma-neg |
| 3× | expm1-log1p-u |
| 2× | distribute-lft-out-- |
| 2× | flip-- |
| 2× | flip3-- |
| 2× | log-div |
| 1× | associate-/l/ |
| 1× | fma-udef |
| 1× | log-pow |
| 1× | associate--l+ |
| 1× | rem-log-exp |
| 1× | div-exp |
| 1× | diff-log |
| 1× | frac-2neg |
| 1× | sub-neg |
| 1× | associate-/r* |
| 1× | clear-num |
| 1× | cbrt-undiv |
| 10.0ms | (- (fma 2 x (/ -1/2 x)) (/ (/ 1/8 x) (* x x))) |
| 9.0ms | (log (- (fma 2 x (/ -1/2 x)) (/ (/ 1/8 x) (* x x)))) |
| 6.0ms | (/ (/ 1/8 x) (* x x)) |
| 103.0ms | (log (- (fma 2 x (/ -1/2 x)) (/ (/ 1/8 x) (* x x)))) |
| 27.0ms | (/ (/ 1/8 x) (* x x)) |
| 18.0ms | (- (fma 2 x (/ -1/2 x)) (/ (/ 1/8 x) (* x x))) |
| 764.0ms | (fma (- (/ 1 (* x x))) (/ 1/8 x) (* (/ 1 (* x x)) (/ 1/8 x))) |
| 479.0ms | (/ (* (* (/ 1/8 x) (/ 1/8 x)) (/ 1/8 x)) (* (* (* x x) (* x x)) (* x x))) |
| 393.0ms | (fma (sqrt (fma 2 x (/ -1/2 x))) (sqrt (fma 2 x (/ -1/2 x))) (- (* (/ (/ 1/8 x) (* x x)) 1))) |
| 389.0ms | (fma (- (/ (/ 1 x) x)) (/ 1/8 x) (* (/ (/ 1 x) x) (/ 1/8 x))) |
| 380.0ms | (fma (- (/ (/ 1 x) x)) (/ 1/8 x) (* (/ (/ 1 x) x) (/ 1/8 x))) |
2 alts after pruning (0 fresh and 2 done)
Merged error: 0b
0% (0.2b remaining)
Error of 0.3b against oracle of 0.1b and baseline of 0.3b
| 1.7s | 16473× | body | 80 | nan |
| 1.4s | 7733× | body | 160 | nan |
| 736.0ms | 8000× | body | 80 | valid |