



Bits error versus x
Results
| Original | 32.3 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 32.3
Simplified31.2
Taylor expanded around -inf 0
Final simplification0
herbie shell --seed 2019022 +o rules:numerics
(FPCore (x)
:name "sqrt sqr"
:herbie-target
(if (< x 0) 2 0)
(- (/ x x) (* (/ 1 x) (sqrt (* x x)))))
Time bar (total: 3.6s)Debug log
| 77.0ms | 125× | body | 1280 | valid |
| 19.0ms | 131× | body | 80 | valid |
| 67.0ms | (- (/ x x) (* (/ 1 x) (sqrt (* x x)))) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 18.0b
Found 1 expressions with local error:
| 30.2b | (fma (/ -1 x) (fabs x) 1) |
| 1× | add-log-exp |
| 1× | log1p-expm1-u |
| 1× | fma-udef |
| 1× | add-cube-cbrt |
| 1× | add-exp-log |
| 1× | add-cbrt-cube |
| 1× | *-un-lft-identity |
| 1× | pow1 |
| 1× | expm1-log1p-u |
| 1× | add-sqr-sqrt |
| 0.0ms | (fma (/ -1 x) (fabs x) 1) |
| 18.0ms | (fma (/ -1 x) (fabs x) 1) |
| 8.0ms | (- 1 (/ (fabs x) x)) |
| 7.0ms | (- 1 (/ (fabs x) x)) |
| 7.0ms | (- 1 (/ (fabs x) x)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 0b
Found 0 expressions with local error:
1 alts after pruning (0 fresh and 1 done)
Merged error: 0b
| 2.1s | 4028× | body | 1280 | valid |
| 1.0s | 3972× | body | 80 | valid |