


Bits error versus x
Initial program 0.3
Simplified0.3
rmApplied expm1-log1p-u0.4
Final simplification0.4
herbie shell --seed 2019005 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))
Time bar (total: 25.7s)Debug log
1 calls. Slowest were:
| 59.0ms | (/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 0.3b
Found 4 expressions with local error:
| 0.2b | (* (tan x) (tan x)) |
| 0.2b | (- 1 (* (tan x) (tan x))) |
| 0.1b | (/ (- 1 (* (tan x) (tan x))) (fma (tan x) (tan x) 1)) |
| 0.1b | (fma (tan x) (tan x) 1) |
4 calls. Slowest were:
| 5.0ms | (* (tan x) (tan x)) |
| 4.0ms | (/ (- 1 (* (tan x) (tan x))) (fma (tan x) (tan x) 1)) |
| 1.0ms | (- 1 (* (tan x) (tan x))) |
4 calls. Slowest were:
| 87.0ms | (/ (- 1 (* (tan x) (tan x))) (fma (tan x) (tan x) 1)) |
| 58.0ms | (* (tan x) (tan x)) |
| 39.0ms | (- 1 (* (tan x) (tan x))) |
| 31.0ms | (fma (tan x) (tan x) 1) |
55 calls. Slowest were:
| 266.0ms | (/ (* (* (- 1 (* (tan x) (tan x))) (- 1 (* (tan x) (tan x)))) (- 1 (* (tan x) (tan x)))) (* (* (fma (tan x) (tan x) 1) (fma (tan x) (tan x) 1)) (fma (tan x) (tan x) 1))) |
| 219.0ms | (/ (- 1 (/ (pow (sin x) 2) (pow (cos x) 2))) (+ (/ (pow (sin x) 2) (pow (cos x) 2)) 1)) |
| 193.0ms | (/ (- 1 (/ (pow (sin x) 2) (pow (cos x) 2))) (+ (/ (pow (sin x) 2) (pow (cos x) 2)) 1)) |
13 alts after pruning (13 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.3b | (log1p (/ (- 1 (* (tan x) (tan x))) (fma (tan x) (tan x) 1))) |
| 0.2b | (* (tan x) (tan x)) |
| 0.2b | (expm1 (log1p (/ (- 1 (* (tan x) (tan x))) (fma (tan x) (tan x) 1)))) |
| 0.2b | (- 1 (* (tan x) (tan x))) |
4 calls. Slowest were:
| 7.0ms | (* (tan x) (tan x)) |
| 3.0ms | (- 1 (* (tan x) (tan x))) |
| 0.0ms | (expm1 (log1p (/ (- 1 (* (tan x) (tan x))) (fma (tan x) (tan x) 1)))) |
4 calls. Slowest were:
| 255.0ms | (expm1 (log1p (/ (- 1 (* (tan x) (tan x))) (fma (tan x) (tan x) 1)))) |
| 243.0ms | (log1p (/ (- 1 (* (tan x) (tan x))) (fma (tan x) (tan x) 1))) |
| 34.0ms | (- 1 (* (tan x) (tan x))) |
| 25.0ms | (* (tan x) (tan x)) |
29 calls. Slowest were:
| 198.0ms | (- (/ 1 (+ (/ (pow (sin x) 2) (pow (cos x) 2)) 1)) (/ (pow (sin x) 2) (* (pow (cos x) 2) (+ (/ (pow (sin x) 2) (pow (cos x) 2)) 1)))) |
| 198.0ms | (log (- (+ (/ 1 (+ (/ (pow (sin x) 2) (pow (cos x) 2)) 1)) 1) (/ (pow (sin x) 2) (* (pow (cos x) 2) (+ (/ (pow (sin x) 2) (pow (cos x) 2)) 1))))) |
| 150.0ms | (- (/ 1 (+ (/ (pow (sin x) 2) (pow (cos x) 2)) 1)) (/ (pow (sin x) 2) (* (pow (cos x) 2) (+ (/ (pow (sin x) 2) (pow (cos x) 2)) 1)))) |
13 alts after pruning (12 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.2b | (* (tan x) (tan x)) |
| 0.2b | (/ 1 (/ (fma (tan x) (tan x) 1) (- 1 (* (tan x) (tan x))))) |
| 0.2b | (- 1 (* (tan x) (tan x))) |
| 0.1b | (/ (fma (tan x) (tan x) 1) (- 1 (* (tan x) (tan x)))) |
4 calls. Slowest were:
| 4.0ms | (* (tan x) (tan x)) |
| 4.0ms | (/ (fma (tan x) (tan x) 1) (- 1 (* (tan x) (tan x)))) |
| 3.0ms | (/ 1 (/ (fma (tan x) (tan x) 1) (- 1 (* (tan x) (tan x))))) |
4 calls. Slowest were:
| 115.0ms | (/ (fma (tan x) (tan x) 1) (- 1 (* (tan x) (tan x)))) |
| 86.0ms | (/ 1 (/ (fma (tan x) (tan x) 1) (- 1 (* (tan x) (tan x))))) |
| 32.0ms | (* (tan x) (tan x)) |
| 22.0ms | (- 1 (* (tan x) (tan x))) |
71 calls. Slowest were:
| 236.0ms | (/ (- 1 (/ (pow (sin x) 2) (pow (cos x) 2))) (+ (/ (pow (sin x) 2) (pow (cos x) 2)) 1)) |
| 223.0ms | (/ (* (* (fma (tan x) (tan x) 1) (fma (tan x) (tan x) 1)) (fma (tan x) (tan x) 1)) (* (* (- 1 (* (tan x) (tan x))) (- 1 (* (tan x) (tan x)))) (- 1 (* (tan x) (tan x))))) |
| 183.0ms | (/ (- 1 (/ (pow (sin x) 2) (pow (cos x) 2))) (+ (/ (pow (sin x) 2) (pow (cos x) 2)) 1)) |
13 alts after pruning (12 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.2b | (/ (/ 1 (fma (tan x) (tan x) 1)) (/ 1 (- 1 (* (tan x) (tan x))))) |
| 0.2b | (* (tan x) (tan x)) |
| 0.2b | (/ 1 (fma (tan x) (tan x) 1)) |
| 0.2b | (- 1 (* (tan x) (tan x))) |
4 calls. Slowest were:
| 4.0ms | (/ (/ 1 (fma (tan x) (tan x) 1)) (/ 1 (- 1 (* (tan x) (tan x))))) |
| 4.0ms | (* (tan x) (tan x)) |
| 1.0ms | (- 1 (* (tan x) (tan x))) |
4 calls. Slowest were:
| 111.0ms | (/ (/ 1 (fma (tan x) (tan x) 1)) (/ 1 (- 1 (* (tan x) (tan x))))) |
| 67.0ms | (/ 1 (fma (tan x) (tan x) 1)) |
| 38.0ms | (- 1 (* (tan x) (tan x))) |
| 26.0ms | (* (tan x) (tan x)) |
93 calls. Slowest were:
| 1.8s | (/ (* (* (/ 1 (fma (tan x) (tan x) 1)) (/ 1 (fma (tan x) (tan x) 1))) (/ 1 (fma (tan x) (tan x) 1))) (* (* (/ 1 (- 1 (* (tan x) (tan x)))) (/ 1 (- 1 (* (tan x) (tan x))))) (/ 1 (- 1 (* (tan x) (tan x)))))) |
| 677.0ms | (/ (* (cbrt (/ 1 (fma (tan x) (tan x) 1))) (cbrt (/ 1 (fma (tan x) (tan x) 1)))) (/ 1 (- (pow 1 3) (pow (* (tan x) (tan x)) 3)))) |
| 409.0ms | (/ (sqrt (/ 1 (fma (tan x) (tan x) 1))) (/ 1 (- (pow 1 3) (pow (* (tan x) (tan x)) 3)))) |
12 alts after pruning (10 fresh and 2 done)
Merged error: 0.0b
0% (0.3b remaining)
Error of 0.4b against oracle of 0.1b and baseline of 0.4b