



Bits error versus N
| Original | 15.3 |
|---|---|
| Target | 0.4 |
| Herbie | 0.4 |
Initial program 15.3
rmApplied diff-atan14.2
Simplified0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019005 +o rules:numerics
(FPCore (N)
:name "2atan (example 3.5)"
:herbie-target
(atan (/ 1 (+ 1 (* N (+ N 1)))))
(- (atan (+ N 1)) (atan N)))
Time bar (total: 5.4s)Debug log
1 calls. Slowest were:
| 8.0ms | (- (atan (+ N 1)) (atan N)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 14.9b
Found 2 expressions with local error:
| 1.2b | (- (atan (+ N 1)) (atan N)) |
| 0.0b | (atan (+ N 1)) |
2 calls. Slowest were:
| 7.0ms | (- (atan (+ N 1)) (atan N)) |
| 1.0ms | (atan (+ N 1)) |
2 calls. Slowest were:
| 10.0ms | (- (atan (+ N 1)) (atan N)) |
| 2.0ms | (atan (+ N 1)) |
32 calls. Slowest were:
| 34.0ms | (fma 1 (atan (+ N 1)) (- (* (atan N) 1))) |
| 30.0ms | (fma (- (cbrt (atan N))) (* (cbrt (atan N)) (cbrt (atan N))) (* (cbrt (atan N)) (* (cbrt (atan N)) (cbrt (atan N))))) |
| 29.0ms | (fma (- (cbrt (atan N))) (* (cbrt (atan N)) (cbrt (atan N))) (* (cbrt (atan N)) (* (cbrt (atan N)) (cbrt (atan N))))) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 0.2b
Found 1 expressions with local error:
| 0.2b | (atan2 1 (fma N (+ N 1) 1)) |
1 calls. Slowest were:
| 0.0ms | (atan2 1 (fma N (+ N 1) 1)) |
1 calls. Slowest were:
| 2.0ms | (atan2 1 (fma N (+ N 1) 1)) |
3 calls. Slowest were:
| 12.0ms | (atan2 1 (fma N (+ N 1) 1)) |
| 12.0ms | (atan2 1 (fma N (+ N 1) 1)) |
| 10.0ms | (atan2 1 (fma N (+ N 1) 1)) |
5 alts after pruning (4 fresh and 1 done)
Merged error: 0.2b
Found 4 expressions with local error:
| 14.5b | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 14.5b | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 0.6b | (* (sqrt (atan2 1 (fma N (+ N 1) 1))) (sqrt (atan2 1 (fma N (+ N 1) 1)))) |
| 0.2b | (atan2 1 (fma N (+ N 1) 1)) |
4 calls. Slowest were:
| 5.0ms | (* (sqrt (atan2 1 (fma N (+ N 1) 1))) (sqrt (atan2 1 (fma N (+ N 1) 1)))) |
| 1.0ms | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 1.0ms | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
4 calls. Slowest were:
| 12.0ms | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 11.0ms | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 2.0ms | (* (sqrt (atan2 1 (fma N (+ N 1) 1))) (sqrt (atan2 1 (fma N (+ N 1) 1)))) |
| 2.0ms | (atan2 1 (fma N (+ N 1) 1)) |
42 calls. Slowest were:
| 48.0ms | (* (* (* (sqrt (atan2 1 (fma N (+ N 1) 1))) (sqrt (atan2 1 (fma N (+ N 1) 1)))) (sqrt (atan2 1 (fma N (+ N 1) 1)))) (* (* (sqrt (atan2 1 (fma N (+ N 1) 1))) (sqrt (atan2 1 (fma N (+ N 1) 1)))) (sqrt (atan2 1 (fma N (+ N 1) 1))))) |
| 34.0ms | (sqrt (* (cbrt (atan2 1 (fma N (+ N 1) 1))) (cbrt (atan2 1 (fma N (+ N 1) 1))))) |
| 33.0ms | (sqrt (cbrt (atan2 1 (fma N (+ N 1) 1)))) |
6 alts after pruning (5 fresh and 1 done)
Merged error: 0.1b
Found 4 expressions with local error:
| 14.5b | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 14.5b | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 14.5b | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 0.6b | (* (* (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1)))) (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1))))) (sqrt (atan2 1 (fma N (+ N 1) 1)))) |
4 calls. Slowest were:
| 15.0ms | (* (* (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1)))) (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1))))) (sqrt (atan2 1 (fma N (+ N 1) 1)))) |
| 4.0ms | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 1.0ms | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
4 calls. Slowest were:
| 11.0ms | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 11.0ms | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 10.0ms | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 3.0ms | (* (* (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1)))) (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1))))) (sqrt (atan2 1 (fma N (+ N 1) 1)))) |
42 calls. Slowest were:
| 88.0ms | (* (* (* (* (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1)))) (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1))))) (* (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1)))) (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1)))))) (* (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1)))) (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1)))))) (* (* (sqrt (atan2 1 (fma N (+ N 1) 1))) (sqrt (atan2 1 (fma N (+ N 1) 1)))) (sqrt (atan2 1 (fma N (+ N 1) 1))))) |
| 79.0ms | (* (* (* (* (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1)))) (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1))))) (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1))))) (* (* (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1)))) (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1))))) (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1)))))) (* (* (sqrt (atan2 1 (fma N (+ N 1) 1))) (sqrt (atan2 1 (fma N (+ N 1) 1)))) (sqrt (atan2 1 (fma N (+ N 1) 1))))) |
| 27.0ms | (+ (log (* (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1)))) (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1)))))) (log (sqrt (atan2 1 (fma N (+ N 1) 1))))) |
6 alts after pruning (5 fresh and 1 done)
Merged error: 0.1b
0% (0.0b remaining)
Error of 0.4b against oracle of 0.4b and baseline of 0.4b