



Bits error versus N
| Original | 14.8 |
|---|---|
| Target | 0.3 |
| Herbie | 0.3 |
Initial program 14.8
rmApplied diff-atan13.6
Simplified0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019016 +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: 6.1s)Debug log
| 256× | (pre true 80) |
| 129× | (body real 80) |
| 93× | (body real 1280) |
| 16× | (body real 640) |
| 10× | (body real 320) |
| 8× | (body real 160) |
| 7.0ms | (- (atan (+ N 1)) (atan N)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 15.3b
Found 1 expressions with local error:
| 1.8b | (- (atan (+ N 1)) (atan N)) |
| 10× | *-un-lft-identity |
| 10× | add-sqr-sqrt |
| 9× | prod-diff |
| 8× | add-cube-cbrt |
| 3× | add-log-exp |
| 3× | fma-neg |
| 1× | difference-of-squares |
| 1× | distribute-lft-out-- |
| 1× | flip-- |
| 1× | log1p-expm1-u |
| 1× | add-exp-log |
| 1× | diff-atan |
| 1× | diff-log |
| 1× | add-cbrt-cube |
| 1× | flip3-- |
| 1× | sub-neg |
| 1× | pow1 |
| 1× | expm1-log1p-u |
| 7.0ms | (- (atan (+ N 1)) (atan N)) |
| 10.0ms | (- (atan (+ N 1)) (atan N)) |
| 35.0ms | (fma (- (cbrt (atan N))) (* (cbrt (atan N)) (cbrt (atan N))) (* (cbrt (atan N)) (* (cbrt (atan N)) (cbrt (atan N))))) |
| 28.0ms | (+ 1 (* (+ N 1) N)) |
| 25.0ms | (fma (* (cbrt (atan (+ N 1))) (cbrt (atan (+ N 1)))) (cbrt (atan (+ N 1))) (- (* (cbrt (atan N)) (* (cbrt (atan N)) (cbrt (atan N)))))) |
| 24.0ms | (fma (- (cbrt (atan N))) (* (cbrt (atan N)) (cbrt (atan N))) (* (cbrt (atan N)) (* (cbrt (atan N)) (cbrt (atan N))))) |
| 24.0ms | (fma (- (cbrt (atan N))) (* (cbrt (atan N)) (cbrt (atan N))) (* (cbrt (atan N)) (* (cbrt (atan N)) (cbrt (atan N))))) |
2 alts after pruning (1 fresh and 1 done)
Merged error: 0.1b
Found 1 expressions with local error:
| 0.1b | (atan2 1 (fma N (+ N 1) 1)) |
| 1× | add-log-exp |
| 1× | log1p-expm1-u |
| 1× | add-cube-cbrt |
| 1× | add-exp-log |
| 1× | add-cbrt-cube |
| 1× | *-un-lft-identity |
| 1× | pow1 |
| 1× | expm1-log1p-u |
| 1× | add-sqr-sqrt |
| 0.0ms | (atan2 1 (fma N (+ N 1) 1)) |
| 2.0ms | (atan2 1 (fma N (+ N 1) 1)) |
| 14.0ms | (atan2 1 (fma N (+ N 1) 1)) |
| 11.0ms | (atan2 1 (fma N (+ N 1) 1)) |
| 10.0ms | (atan2 1 (fma N (+ N 1) 1)) |
4 alts after pruning (2 fresh and 2 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 14.9b | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 14.9b | (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.1b | (atan2 1 (fma N (+ N 1) 1)) |
| 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 |
| 4× | log1p-expm1-u |
| 4× | expm1-log1p-u |
| 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 (fma N (+ N 1) 1))) (sqrt (atan2 1 (fma N (+ N 1) 1)))) |
| 2.0ms | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 1.0ms | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 0.0ms | (atan2 1 (fma N (+ N 1) 1)) |
| 18.0ms | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 18.0ms | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 4.0ms | (* (sqrt (atan2 1 (fma N (+ N 1) 1))) (sqrt (atan2 1 (fma N (+ N 1) 1)))) |
| 3.0ms | (atan2 1 (fma N (+ N 1) 1)) |
| 37.0ms | (sqrt (* (cbrt (atan2 1 (fma N (+ N 1) 1))) (cbrt (atan2 1 (fma N (+ N 1) 1))))) |
| 31.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))))) |
| 29.0ms | (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1)))) |
| 28.0ms | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 26.0ms | (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1)))) |
6 alts after pruning (3 fresh and 3 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 14.9b | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 14.9b | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 14.9b | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 0.1b | (* (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1)))) (sqrt (atan2 1 (fma N (+ N 1) 1)))) |
| 22× | sqrt-prod |
| 17× | add-sqr-sqrt |
| 12× | add-cube-cbrt |
| 12× | *-un-lft-identity |
| 9× | associate-*l* |
| 7× | pow1/2 |
| 7× | pow1 |
| 6× | add-exp-log |
| 6× | associate-*r* |
| 6× | add-cbrt-cube |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | expm1-log1p-u |
| 3× | rem-sqrt-square |
| 2× | pow-prod-down |
| 2× | cube-unmult |
| 1× | cbrt-unprod |
| 1× | pow-prod-up |
| 1× | *-commutative |
| 1× | prod-exp |
| 1× | sqrt-unprod |
| 1× | pow-plus |
| 10.0ms | (* (sqrt (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))) |
| 1.0ms | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 161.0ms | (* (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1)))) (sqrt (atan2 1 (fma N (+ N 1) 1)))) |
| 12.0ms | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 11.0ms | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 11.0ms | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 70.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 (atan2 1 (fma N (+ N 1) 1))) (sqrt (atan2 1 (fma N (+ N 1) 1)))) (sqrt (atan2 1 (fma N (+ N 1) 1))))) |
| 38.0ms | (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1)))) |
| 36.0ms | (sqrt (* (cbrt (atan2 1 (fma N (+ N 1) 1))) (cbrt (atan2 1 (fma N (+ N 1) 1))))) |
| 34.0ms | (pow (pow (atan2 1 (fma N (+ N 1) 1)) 3) 1/4) |
| 32.0ms | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
7 alts after pruning (3 fresh and 4 done)
Merged error: 0.0b
0% (0.0b remaining)
Error of 0.3b against oracle of 0.3b and baseline of 0.3b
| 8000× | (pre true 80) |
| 4032× | (body real 80) |
| 2874× | (body real 1280) |
| 631× | (body real 640) |
| 297× | (body real 320) |
| 166× | (body real 160) |