



Bits error versus N
| Original | 14.9 |
|---|---|
| Target | 0.3 |
| Herbie | 0.3 |
Initial program 14.9
rmApplied diff-atan13.8
Simplified0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019010 +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.7s)Debug log
| 4.0ms | (- (atan (+ N 1)) (atan N)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 16.1b
Found 2 expressions with local error:
| 0.9b | (- (atan (+ N 1)) (atan N)) |
| 0.0b | (atan (+ N 1)) |
| 11× | *-un-lft-identity |
| 11× | add-sqr-sqrt |
| 9× | add-cube-cbrt |
| 9× | prod-diff |
| 4× | add-log-exp |
| 3× | fma-neg |
| 2× | log1p-expm1-u |
| 2× | add-exp-log |
| 2× | add-cbrt-cube |
| 2× | pow1 |
| 2× | expm1-log1p-u |
| 1× | difference-of-squares |
| 1× | distribute-lft-out-- |
| 1× | flip-- |
| 1× | diff-atan |
| 1× | diff-log |
| 1× | flip3-- |
| 1× | sub-neg |
| 4.0ms | (- (atan (+ N 1)) (atan N)) |
| 1.0ms | (atan (+ N 1)) |
| 7.0ms | (- (atan (+ N 1)) (atan N)) |
| 2.0ms | (atan (+ N 1)) |
| 42.0ms | (fma (sqrt (atan (+ N 1))) (sqrt (atan (+ N 1))) (- (* (sqrt (atan N)) (sqrt (atan N))))) |
| 33.0ms | (fma (- (cbrt (atan N))) (* (cbrt (atan N)) (cbrt (atan N))) (* (cbrt (atan N)) (* (cbrt (atan N)) (cbrt (atan N))))) |
| 30.0ms | (fma (- (cbrt (atan N))) (* (cbrt (atan N)) (cbrt (atan N))) (* (cbrt (atan N)) (* (cbrt (atan N)) (cbrt (atan N))))) |
| 30.0ms | (fma 1 (atan (+ N 1)) (- (* (atan N) 1))) |
| 28.0ms | (fma 1 (atan (+ N 1)) (- (* (cbrt (atan N)) (* (cbrt (atan N)) (cbrt (atan N)))))) |
2 alts after pruning (1 fresh and 1 done)
Merged error: 0.2b
Found 2 expressions with local error:
| 0.3b | (atan2 1 (fma N (+ N 1) 1)) |
| 0.0b | (fma N (+ N 1) 1) |
| 2× | add-log-exp |
| 2× | log1p-expm1-u |
| 2× | add-cube-cbrt |
| 2× | add-exp-log |
| 2× | add-cbrt-cube |
| 2× | *-un-lft-identity |
| 2× | pow1 |
| 2× | expm1-log1p-u |
| 2× | add-sqr-sqrt |
| 1× | fma-udef |
| 0.0ms | (atan2 1 (fma N (+ N 1) 1)) |
| 0.0ms | (fma N (+ N 1) 1) |
| 17.0ms | (fma N (+ N 1) 1) |
| 3.0ms | (atan2 1 (fma N (+ N 1) 1)) |
| 30.0ms | (+ N (+ (pow N 2) 1)) |
| 20.0ms | (atan2 1 (fma N (+ N 1) 1)) |
| 20.0ms | (atan2 1 (fma N (+ N 1) 1)) |
| 19.0ms | (atan2 1 (fma N (+ N 1) 1)) |
| 19.0ms | (+ N (+ (pow N 2) 1)) |
5 alts after pruning (4 fresh and 1 done)
Merged error: 0.2b
Found 4 expressions with local error:
| 12.9b | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 12.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.3b | (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)) |
| 21.0ms | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 19.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)))) |
| 4.0ms | (atan2 1 (fma N (+ N 1) 1)) |
| 60.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))))) |
| 39.0ms | (sqrt (* (cbrt (atan2 1 (fma N (+ N 1) 1))) (cbrt (atan2 1 (fma N (+ N 1) 1))))) |
| 37.0ms | (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1)))) |
| 35.0ms | (sqrt (sqrt (atan2 1 (fma N (+ N 1) 1)))) |
| 31.0ms | (cbrt (sqrt (atan2 1 (fma N (+ N 1) 1)))) |
5 alts after pruning (3 fresh and 2 done)
Merged error: 0.2b
Found 4 expressions with local error:
| 13.3b | (cbrt (atan2 1 (fma N (+ N 1) 1))) |
| 13.3b | (cbrt (atan2 1 (fma N (+ N 1) 1))) |
| 13.3b | (cbrt (atan2 1 (fma N (+ N 1) 1))) |
| 12.9b | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 9× | add-sqr-sqrt |
| 9× | cbrt-prod |
| 8× | add-cube-cbrt |
| 8× | *-un-lft-identity |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | pow1 |
| 4× | expm1-log1p-u |
| 3× | sqrt-prod |
| 3× | pow1/3 |
| 1× | pow1/2 |
| 1× | rem-sqrt-square |
| 1.0ms | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 1.0ms | (cbrt (atan2 1 (fma N (+ N 1) 1))) |
| 1.0ms | (cbrt (atan2 1 (fma N (+ N 1) 1))) |
| 1.0ms | (cbrt (atan2 1 (fma N (+ N 1) 1))) |
| 194.0ms | (cbrt (atan2 1 (fma N (+ N 1) 1))) |
| 175.0ms | (cbrt (atan2 1 (fma N (+ N 1) 1))) |
| 136.0ms | (cbrt (atan2 1 (fma N (+ N 1) 1))) |
| 11.0ms | (sqrt (atan2 1 (fma N (+ N 1) 1))) |
| 21.0ms | (cbrt (* (cbrt (atan2 1 (fma N (+ N 1) 1))) (cbrt (atan2 1 (fma N (+ N 1) 1))))) |
| 20.0ms | (cbrt (sqrt (atan2 1 (fma N (+ N 1) 1)))) |
| 20.0ms | (cbrt (* (cbrt (atan2 1 (fma N (+ N 1) 1))) (cbrt (atan2 1 (fma N (+ N 1) 1))))) |
| 20.0ms | (sqrt (* (cbrt (atan2 1 (fma N (+ N 1) 1))) (cbrt (atan2 1 (fma N (+ N 1) 1))))) |
| 19.0ms | (cbrt (* (cbrt (atan2 1 (fma N (+ N 1) 1))) (cbrt (atan2 1 (fma N (+ N 1) 1))))) |
6 alts after pruning (3 fresh and 3 done)
Merged error: 0.2b
0% (0.0b remaining)
Error of 0.3b against oracle of 0.3b and baseline of 0.3b