



Bits error versus x
| Original | 60.0 |
|---|---|
| Target | 0.1 |
| Herbie | 0.3 |
Initial program 60.0
Taylor expanded around 0 0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019002 +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))))
Time bar (total: 32.0s)Debug log
1 calls. Slowest were:
| 4.0ms | (- (/ 1 x) (/ 1 (tan x))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 60.2b
Found 2 expressions with local error:
| 2.9b | (- (/ 1 x) (/ 1 (tan x))) |
| 0.0b | (/ 1 (tan x)) |
2 calls. Slowest were:
| 5.0ms | (- (/ 1 x) (/ 1 (tan x))) |
| 1.0ms | (/ 1 (tan x)) |
2 calls. Slowest were:
| 92.0ms | (- (/ 1 x) (/ 1 (tan x))) |
| 25.0ms | (/ 1 (tan x)) |
62 calls. Slowest were:
| 245.0ms | (- (/ 1 x) (+ (* 1/3 x) (* 1/45 (pow x 3)))) |
| 128.0ms | (fma (- (cos x)) (/ 1 (sin x)) (* (cos x) (/ 1 (sin x)))) |
| 109.0ms | (fma (- (cos x)) (/ 1 (sin x)) (* (cos x) (/ 1 (sin x)))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 0.3b
Found 3 expressions with local error:
| 0.3b | (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945)) |
| 0.1b | (* (pow x 5) 2/945) |
| 0.0b | (fma 1/45 (* x x) 1/3) |
3 calls. Slowest were:
| 5.0ms | (* (pow x 5) 2/945) |
| 0.0ms | (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945)) |
| 0.0ms | (fma 1/45 (* x x) 1/3) |
3 calls. Slowest were:
| 34.0ms | (fma 1/45 (* x x) 1/3) |
| 28.0ms | (* (pow x 5) 2/945) |
| 27.0ms | (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945)) |
11 calls. Slowest were:
| 82.0ms | (+ (* 1/3 x) (+ (* 1/45 (pow x 3)) (* 2/945 (pow x 5)))) |
| 71.0ms | (+ (* 1/3 x) (+ (* 1/45 (pow x 3)) (* 2/945 (pow x 5)))) |
| 55.0ms | (+ (* 1/3 x) (+ (* 1/45 (pow x 3)) (* 2/945 (pow x 5)))) |
4 alts after pruning (3 fresh and 1 done)
Merged error: 0.3b
Found 4 expressions with local error:
| 0.6b | (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945))) |
| 0.6b | (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945))) |
| 0.6b | (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945))) |
| 0.5b | (* (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945))) (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945)))) |
4 calls. Slowest were:
| 10.0ms | (* (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945))) (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945)))) |
| 1.0ms | (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945))) |
| 1.0ms | (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945))) |
4 calls. Slowest were:
| 156.0ms | (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945))) |
| 145.0ms | (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945))) |
| 140.0ms | (* (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945))) (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945)))) |
| 139.0ms | (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945))) |
41 calls. Slowest were:
| 395.0ms | (+ (exp (* 1/3 (+ (log 1/3) (log x)))) (+ (* 23/14175 (* (pow x 4) (exp (* 1/3 (+ (log 1/3) (log x)))))) (* 1/45 (* (pow x 2) (exp (* 1/3 (+ (log 1/3) (log x)))))))) |
| 391.0ms | (+ (* 7/2 (/ (exp (* 1/3 (- (log 2/945) (* 5 (log (/ 1 x)))))) (pow x 2))) (+ (exp (* 1/3 (- (log 2/945) (* 5 (log (/ 1 x)))))) (* 161/4 (/ (exp (* 1/3 (- (log 2/945) (* 5 (log (/ 1 x)))))) (pow x 4))))) |
| 360.0ms | (+ (* 7/2 (/ (exp (* 1/3 (- (log 2/945) (* 5 (log (/ 1 x)))))) (pow x 2))) (+ (exp (* 1/3 (- (log 2/945) (* 5 (log (/ 1 x)))))) (* 161/4 (/ (exp (* 1/3 (- (log 2/945) (* 5 (log (/ 1 x)))))) (pow x 4))))) |
12 alts after pruning (10 fresh and 2 done)
Merged error: 0.2b
Found 4 expressions with local error:
| 0.7b | (cbrt (* (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945))) (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945))))) |
| 0.7b | (cbrt (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945)))) |
| 0.6b | (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945))) |
| 0.6b | (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945))) |
4 calls. Slowest were:
| 6.0ms | (cbrt (* (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945))) (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945))))) |
| 2.0ms | (cbrt (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945)))) |
| 1.0ms | (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945))) |
4 calls. Slowest were:
| 167.0ms | (cbrt (* (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945))) (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945))))) |
| 156.0ms | (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945))) |
| 151.0ms | (cbrt (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945)))) |
| 122.0ms | (cbrt (fma (fma 1/45 (* x x) 1/3) x (* (pow x 5) 2/945))) |
25 calls. Slowest were:
| 492.0ms | (+ (* 917/36 (/ (exp (* 1/9 (- (log 4/893025) (* 10 (log (/ 1 x)))))) (pow x 4))) (+ (exp (* 1/9 (- (log 4/893025) (* 10 (log (/ 1 x)))))) (* 7/3 (/ (exp (* 1/9 (- (log 4/893025) (* 10 (log (/ 1 x)))))) (pow x 2))))) |
| 401.0ms | (+ (* 7/2 (/ (exp (* 1/3 (- (log 2/945) (* 5 (log (/ 1 x)))))) (pow x 2))) (+ (exp (* 1/3 (- (log 2/945) (* 5 (log (/ 1 x)))))) (* 161/4 (/ (exp (* 1/3 (- (log 2/945) (* 5 (log (/ 1 x)))))) (pow x 4))))) |
| 389.0ms | (+ (* 7/6 (/ (exp (* 1/9 (- (log 2/945) (* 5 (log (/ 1 x)))))) (pow x 2))) (+ (exp (* 1/9 (- (log 2/945) (* 5 (log (/ 1 x)))))) (* 217/18 (/ (exp (* 1/9 (- (log 2/945) (* 5 (log (/ 1 x)))))) (pow x 4))))) |
15 alts after pruning (13 fresh and 2 done)
Merged error: 0.2b
0% (0.1b remaining)
Error of 0.3b against oracle of 0.2b and baseline of 0.3b