



Bits error versus N
Results
| Original | 14.7 |
|---|---|
| Target | 0.3 |
| Herbie | 0.3 |
Initial program 14.7
rmApplied diff-atan13.5
Simplified0.3
Final simplification0.3
herbie shell --seed 2019018
(FPCore (N)
:name "2atan (example 3.5)"
:herbie-target
(atan (/ 1 (+ 1 (* N (+ N 1)))))
(- (atan (+ N 1)) (atan N)))
Time bar (total: 7.0s)Debug log
| 31.0ms | 81× | body | 1280 | valid |
| 10.0ms | 122× | body | 80 | valid |
| 10.0ms | 32× | body | 640 | valid |
| 3.0ms | 12× | body | 320 | valid |
| 2.0ms | 9× | body | 160 | valid |
| 8.0ms | (- (atan (+ N 1)) (atan N)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 18.9b
Found 2 expressions with local error:
| 2.0b | (- (atan (+ N 1)) (atan N)) |
| 0.0b | (atan (+ N 1)) |
| 4× | add-log-exp |
| 4× | *-un-lft-identity |
| 4× | add-sqr-sqrt |
| 2× | add-cube-cbrt |
| 2× | add-exp-log |
| 2× | add-cbrt-cube |
| 2× | pow1 |
| 1× | difference-of-squares |
| 1× | distribute-lft-out-- |
| 1× | flip-- |
| 1× | diff-atan |
| 1× | diff-log |
| 1× | flip3-- |
| 1× | sub-neg |
| 7.0ms | (- (atan (+ N 1)) (atan N)) |
| 1.0ms | (atan (+ N 1)) |
| 27.0ms | (- (atan (+ N 1)) (atan N)) |
| 2.0ms | (atan (+ N 1)) |
| 17.0ms | (+ 1 (* (+ N 1) N)) |
| 13.0ms | (/ (exp (atan (+ N 1))) (exp (atan N))) |
| 9.0ms | (- (sqrt (atan (+ N 1))) (sqrt (atan N))) |
| 8.0ms | (- (atan (+ N 1)) (atan N)) |
| 8.0ms | (- (atan (+ N 1)) (atan N)) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 0.2b
Found 2 expressions with local error:
| 0.2b | (atan2 1 (+ 1 (* (+ N 1) N))) |
| 0.0b | (+ 1 (* (+ N 1) N)) |
| 2× | add-log-exp |
| 2× | add-cube-cbrt |
| 2× | add-exp-log |
| 2× | add-cbrt-cube |
| 2× | *-un-lft-identity |
| 2× | pow1 |
| 2× | add-sqr-sqrt |
| 1× | flip-+ |
| 1× | flip3-+ |
| 1× | +-commutative |
| 1.0ms | (+ 1 (* (+ N 1) N)) |
| 0.0ms | (atan2 1 (+ 1 (* (+ N 1) N))) |
| 7.0ms | (+ 1 (* (+ N 1) N)) |
| 3.0ms | (atan2 1 (+ 1 (* (+ N 1) N))) |
| 28.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
| 26.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
| 23.0ms | (+ N (+ (pow N 2) 1)) |
| 23.0ms | (+ N (+ (pow N 2) 1)) |
| 23.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
4 alts after pruning (3 fresh and 1 done)
Merged error: 0.2b
Found 4 expressions with local error:
| 12.6b | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 12.6b | (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))) |
| 12× | sqrt-prod |
| 12× | add-sqr-sqrt |
| 10× | add-cube-cbrt |
| 10× | *-un-lft-identity |
| 9× | pow1 |
| 6× | add-exp-log |
| 6× | associate-*l* |
| 6× | associate-*r* |
| 6× | pow1/2 |
| 6× | add-cbrt-cube |
| 4× | add-log-exp |
| 2× | pow-prod-up |
| 2× | pow-prod-down |
| 2× | rem-sqrt-square |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | prod-exp |
| 1× | sqrt-unprod |
| 1× | pow-plus |
| 1× | rem-square-sqrt |
| 1× | pow2 |
| 9.0ms | (* (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) (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)))) |
| 0.0ms | (atan2 1 (+ 1 (* (+ N 1) N))) |
| 22.0ms | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 20.0ms | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 5.0ms | (* (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) |
| 4.0ms | (atan2 1 (+ 1 (* (+ N 1) N))) |
| 44.0ms | (* (cbrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (cbrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))))) |
| 44.0ms | (sqrt (* (cbrt (atan2 1 (+ 1 (* (+ N 1) N)))) (cbrt (atan2 1 (+ 1 (* (+ N 1) N)))))) |
| 44.0ms | (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) |
| 42.0ms | (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) |
| 42.0ms | (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) |
6 alts after pruning (4 fresh and 2 done)
Merged error: 0.1b
Found 4 expressions with local error:
| 12.6b | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 12.6b | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 12.6b | (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))))))) |
| 12× | sqrt-prod |
| 12× | add-sqr-sqrt |
| 10× | pow1 |
| 9× | add-cube-cbrt |
| 9× | add-exp-log |
| 9× | add-cbrt-cube |
| 9× | *-un-lft-identity |
| 8× | pow1/2 |
| 6× | associate-*l* |
| 5× | pow-prod-down |
| 4× | add-log-exp |
| 3× | cbrt-unprod |
| 3× | prod-exp |
| 3× | rem-sqrt-square |
| 2× | pow-prod-up |
| 2× | sqrt-unprod |
| 1× | *-commutative |
| 1× | associate-*r* |
| 29.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)))) |
| 1.0ms | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 21.0ms | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 21.0ms | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 19.0ms | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 5.0ms | (* (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) (* (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))))) |
| 168.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)))))))) |
| 162.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)))))))) |
| 55.0ms | (+ (log (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (log (* (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))))))) |
| 54.0ms | (+ (log (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (+ (log (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))))) (log (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))))))) |
| 54.0ms | (* (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) (* (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))))) |
7 alts after pruning (4 fresh and 3 done)
Merged error: 0.1b
0% (0.0b remaining)
Error of 0.3b against oracle of 0.3b and baseline of 0.3b
| 1.4s | 2786× | body | 1280 | valid |
| 242.0ms | 4114× | body | 80 | valid |
| 178.0ms | 602× | body | 640 | valid |
| 64.0ms | 166× | body | 160 | valid |
| 58.0ms | 332× | body | 320 | valid |