



Bits error versus x
| Original | 59.9 |
|---|---|
| Target | 0.1 |
| Herbie | 0.3 |
Initial program 59.9
Initial simplification59.9
Taylor expanded around 0 0.3
Simplified0.3
rmApplied expm1-log1p-u0.3
Final simplification0.3
Time bar (total: 31.9s)Debug logProfile
| Baseline | Herbie | Oracle | Span | % | |
|---|---|---|---|---|---|
| Regimes | 0.3 | 0.3 | 0.2 | 0.1 | 0% |
herbie shell --seed 2018290 +o rules:numerics
(FPCore (x)
:name "invcot (example 3.9)"
:pre (and (< -0.026 x) (< x 0.026))
:herbie-target
(if (< (fabs x) 0.026) (* (/ x 3) (+ 1 (/ (* x x) 15))) (- (/ 1 x) (/ 1 (tan x))))
(- (/ 1 x) (/ 1 (tan x))))