



Bits error versus N
Results
| Original | 14.6 |
|---|---|
| Target | 0.4 |
| Herbie | 0.4 |
Initial program 14.6
rmApplied diff-atan13.6
Simplified0.4
Final simplification0.4
herbie shell --seed 2019007
(FPCore (N)
:name "2atan (example 3.5)"
:herbie-target
(atan (/ 1 (+ 1 (* N (+ N 1)))))
(- (atan (+ N 1)) (atan N)))
Time bar (total: 6.7s)Debug log
1 calls. Slowest were:
| 4.0ms | (- (atan (+ N 1)) (atan N)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 12.3b
Found 2 expressions with local error:
| 1.0b | (- (atan (+ N 1)) (atan N)) |
| 0.0b | (atan (+ N 1)) |
2 calls. Slowest were:
| 3.0ms | (- (atan (+ N 1)) (atan N)) |
| 0.0ms | (atan (+ N 1)) |
2 calls. Slowest were:
| 7.0ms | (- (atan (+ N 1)) (atan N)) |
| 2.0ms | (atan (+ N 1)) |
12 calls. Slowest were:
| 19.0ms | (- (+ N 1) N) |
| 17.0ms | (+ 1 (* (+ N 1) N)) |
| 12.0ms | (/ (exp (atan (+ N 1))) (exp (atan N))) |
2 alts after pruning (1 fresh and 1 done)
Merged error: 0.2b
Found 2 expressions with local error:
| 0.2b | (atan2 1 (+ 1 (* (+ N 1) N))) |
| 0.0b | (* (+ N 1) N) |
2 calls. Slowest were:
| 5.0ms | (* (+ N 1) N) |
| 0.0ms | (atan2 1 (+ 1 (* (+ N 1) N))) |
2 calls. Slowest were:
| 31.0ms | (* (+ N 1) N) |
| 5.0ms | (atan2 1 (+ 1 (* (+ N 1) N))) |
10 calls. Slowest were:
| 74.0ms | (* (- (* N N) (* 1 1)) N) |
| 29.0ms | (* (+ (pow N 3) (pow 1 3)) N) |
| 25.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
4 alts after pruning (2 fresh and 2 done)
Merged error: 0.2b
Found 4 expressions with local error:
| 17.1b | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 17.1b | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 0.6b | (* (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) |
| 0.2b | (atan2 1 (+ 1 (* (+ N 1) N))) |
4 calls. Slowest were:
| 6.0ms | (* (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) |
| 1.0ms | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 0.0ms | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
4 calls. Slowest were:
| 16.0ms | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 12.0ms | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 3.0ms | (* (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) |
| 2.0ms | (atan2 1 (+ 1 (* (+ N 1) N))) |
42 calls. Slowest were:
| 60.0ms | (* (* (* (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (* (* (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))))) |
| 54.0ms | (sqrt (* (cbrt (atan2 1 (+ 1 (* (+ N 1) N)))) (cbrt (atan2 1 (+ 1 (* (+ N 1) N)))))) |
| 43.0ms | (* (cbrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (cbrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))))) |
6 alts after pruning (3 fresh and 3 done)
Merged error: 0.2b
Found 4 expressions with local error:
| 17.1b | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 17.1b | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 17.1b | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 0.6b | (* (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) (* (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))))) |
4 calls. Slowest were:
| 27.0ms | (* (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) (* (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))))) |
| 1.0ms | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 1.0ms | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
4 calls. Slowest were:
| 16.0ms | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 12.0ms | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 12.0ms | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 6.0ms | (* (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) (* (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))))) |
40 calls. Slowest were:
| 122.0ms | (* (* (* (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (* (* (* (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))))) (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))))) (* (* (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))))) (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))))))) |
| 106.0ms | (* (* (* (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (* (* (* (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))))) (* (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))))) (* (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))))))) |
| 46.0ms | (sqrt (* (cbrt (atan2 1 (+ 1 (* (+ N 1) N)))) (cbrt (atan2 1 (+ 1 (* (+ N 1) N)))))) |
5 alts after pruning (2 fresh and 3 done)
Merged error: 0.2b
0% (0.0b remaining)
Error of 0.4b against oracle of 0.4b and baseline of 0.4b