



Bits error versus N
Results
| Original | 14.8 |
|---|---|
| Target | 0.3 |
| Herbie | 0.3 |
Initial program 14.8
rmApplied diff-atan13.6
Simplified0.3
Final simplification0.3
herbie shell --seed 2019016
(FPCore (N)
:name "2atan (example 3.5)"
:herbie-target
(atan (/ 1 (+ 1 (* N (+ N 1)))))
(- (atan (+ N 1)) (atan N)))
Time bar (total: 9.0s)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) |
| 4.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)) |
| 3× | add-log-exp |
| 3× | *-un-lft-identity |
| 3× | add-sqr-sqrt |
| 1× | difference-of-squares |
| 1× | distribute-lft-out-- |
| 1× | flip-- |
| 1× | add-cube-cbrt |
| 1× | add-exp-log |
| 1× | diff-atan |
| 1× | diff-log |
| 1× | add-cbrt-cube |
| 1× | flip3-- |
| 1× | sub-neg |
| 1× | pow1 |
| 7.0ms | (- (atan (+ N 1)) (atan N)) |
| 11.0ms | (- (atan (+ N 1)) (atan N)) |
| 50.0ms | (+ 1 (* (+ N 1) N)) |
| 15.0ms | (- (+ N 1) N) |
| 12.0ms | (/ (exp (atan (+ N 1))) (exp (atan N))) |
| 8.0ms | (- (atan (+ N 1)) (atan N)) |
| 8.0ms | (- (atan (+ N 1)) (atan N)) |
2 alts after pruning (1 fresh and 1 done)
Merged error: 0.1b
Found 2 expressions with local error:
| 0.1b | (atan2 1 (+ 1 (* (+ N 1) N))) |
| 0.0b | (* (+ N 1) N) |
| 3× | add-cube-cbrt |
| 3× | associate-*l* |
| 3× | *-un-lft-identity |
| 3× | add-sqr-sqrt |
| 2× | add-log-exp |
| 2× | add-exp-log |
| 2× | associate-*l/ |
| 2× | add-cbrt-cube |
| 2× | pow1 |
| 1× | flip-+ |
| 1× | *-commutative |
| 1× | flip3-+ |
| 4.0ms | (* (+ N 1) N) |
| 0.0ms | (atan2 1 (+ 1 (* (+ N 1) N))) |
| 31.0ms | (* (+ N 1) N) |
| 5.0ms | (atan2 1 (+ 1 (* (+ N 1) N))) |
| 77.0ms | (* (- (* N N) (* 1 1)) N) |
| 26.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
| 24.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
| 21.0ms | (* (+ (pow N 3) (pow 1 3)) N) |
| 14.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
6 alts after pruning (4 fresh and 2 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 15.2b | (cbrt (* (+ N 1) N)) |
| 15.2b | (cbrt (* (+ N 1) N)) |
| 15.2b | (cbrt (* (+ N 1) N)) |
| 0.5b | (* (cbrt (* (+ N 1) N)) (cbrt (* (+ N 1) N))) |
| 20× | associate-*l/ |
| 18× | cbrt-div |
| 9× | flip-+ |
| 9× | flip3-+ |
| 9× | pow1 |
| 7× | pow1/3 |
| 6× | add-cube-cbrt |
| 6× | add-exp-log |
| 6× | *-un-lft-identity |
| 6× | add-sqr-sqrt |
| 5× | cbrt-prod |
| 4× | add-log-exp |
| 4× | associate-*l* |
| 4× | associate-*r* |
| 4× | add-cbrt-cube |
| 4× | frac-times |
| 2× | pow-prod-up |
| 2× | associate-*r/ |
| 2× | pow-prod-down |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | prod-exp |
| 1× | pow-plus |
| 1× | pow2 |
| 17.0ms | (* (cbrt (* (+ N 1) N)) (cbrt (* (+ N 1) N))) |
| 3.0ms | (cbrt (* (+ N 1) N)) |
| 3.0ms | (cbrt (* (+ N 1) N)) |
| 3.0ms | (cbrt (* (+ N 1) N)) |
| 68.0ms | (* (cbrt (* (+ N 1) N)) (cbrt (* (+ N 1) N))) |
| 55.0ms | (cbrt (* (+ N 1) N)) |
| 46.0ms | (cbrt (* (+ N 1) N)) |
| 43.0ms | (cbrt (* (+ N 1) N)) |
| 365.0ms | (* (* (+ N 1) N) (* (+ N 1) N)) |
| 315.0ms | (- (+ (* (pow (pow N 4) 1/3) (pow (cbrt -1) 2)) (* 2/3 (* (pow N 1/3) (pow (cbrt -1) 2)))) (* 1/9 (* (pow (/ 1 (pow N 2)) 1/3) (pow (cbrt -1) 2)))) |
| 287.0ms | (* (* (+ N 1) N) (* (+ N 1) N)) |
| 196.0ms | (* (cbrt (* (- (* N N) (* 1 1)) N)) (cbrt (* (+ N 1) N))) |
| 191.0ms | (- (+ (* (cbrt -1) (exp (* 1/3 (- (log -1) (* 2 (log (/ -1 N))))))) (* 1/3 (/ (* (cbrt -1) (exp (* 1/3 (- (log -1) (* 2 (log (/ -1 N))))))) N))) (* 1/9 (/ (* (cbrt -1) (exp (* 1/3 (- (log -1) (* 2 (log (/ -1 N))))))) (pow N 2)))) |
6 alts after pruning (3 fresh and 3 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 14.9b | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 14.9b | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 0.6b | (* (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) |
| 0.1b | (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))) |
| 21.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))) |
| 67.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)))))) |
| 47.0ms | (+ (log (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) (log (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))))) |
| 45.0ms | (sqrt (* (cbrt (atan2 1 (+ 1 (* (+ N 1) N)))) (cbrt (atan2 1 (+ 1 (* (+ N 1) N)))))) |
| 43.0ms | (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) |
| 43.0ms | (sqrt (* (cbrt (atan2 1 (+ 1 (* (+ N 1) N)))) (cbrt (atan2 1 (+ 1 (* (+ N 1) N)))))) |
8 alts after pruning (4 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) |