



Bits error versus N
Results
| Original | 15.6 |
|---|---|
| Target | 0.4 |
| Herbie | 0.4 |
Initial program 15.6
rmApplied diff-atan14.5
Simplified0.4
Taylor expanded around 0 0.4
Final simplification0.4
herbie shell --seed 1137770271
(FPCore (N)
:name "2atan (example 3.5)"
:herbie-target
(atan (/ 1 (+ 1 (* N (+ N 1)))))
(- (atan (+ N 1)) (atan N)))
Time bar (total: 8.5s)Debug log
| 87× | 48.0ms | (body real 1280) |
| 138× | 15.0ms | (body real 80) |
| 19× | 9.0ms | (body real 640) |
| 256× | 6.0ms | (pre true 80) |
| 9× | 3.0ms | (body real 320) |
| 3× | 1.0ms | (body real 160) |
| 8.0ms | (- (atan (+ N 1)) (atan N)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 12.4b
Found 2 expressions with local error:
| 1.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 |
| 8.0ms | (- (atan (+ N 1)) (atan N)) |
| 1.0ms | (atan (+ N 1)) |
| 27.0ms | (- (atan (+ N 1)) (atan N)) |
| 3.0ms | (atan (+ N 1)) |
| 40.0ms | (+ 1 (* (+ N 1) N)) |
| 28.0ms | (/ (exp (atan (+ N 1))) (exp (atan N))) |
| 16.0ms | (- (+ N 1) N) |
| 10.0ms | (- (sqrt (atan (+ N 1))) (sqrt (atan N))) |
| 9.0ms | (- (atan (+ N 1)) (atan N)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 0.9b
Found 2 expressions with local error:
| 0.9b | (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-+ |
| 6.0ms | (* (+ N 1) N) |
| 0.0ms | (atan2 1 (+ 1 (* (+ N 1) N))) |
| 39.0ms | (* (+ N 1) N) |
| 5.0ms | (atan2 1 (+ 1 (* (+ N 1) N))) |
| 135.0ms | (* (- (* N N) (* 1 1)) N) |
| 28.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
| 27.0ms | (* (+ (pow N 3) (pow 1 3)) N) |
| 27.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
| 27.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
4 alts after pruning (4 fresh and 0 done)
Merged error: 0.8b
Found 2 expressions with local error:
| 0.9b | (atan2 1 (+ N (+ (pow N 2) 1))) |
| 0.0b | (+ N (+ (pow N 2) 1)) |
| 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× | associate-+r+ |
| 1× | +-commutative |
| 6.0ms | (+ N (+ (pow N 2) 1)) |
| 0.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
| 15.0ms | (+ N (+ (pow N 2) 1)) |
| 5.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
| 31.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
| 28.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
| 28.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
| 26.0ms | (+ N (+ (pow N 2) 1)) |
| 26.0ms | (+ N (+ (pow N 2) 1)) |
4 alts after pruning (3 fresh and 1 done)
Merged error: 0.8b
Found 4 expressions with local error:
| 16.9b | (cbrt (* (+ N 1) N)) |
| 16.9b | (cbrt (* (+ N 1) N)) |
| 16.9b | (cbrt (* (+ N 1) N)) |
| 0.9b | (atan2 1 (+ 1 (* (* (cbrt (* (+ N 1) N)) (cbrt (* (+ N 1) N))) (cbrt (* (+ N 1) N))))) |
| 6× | associate-*l/ |
| 6× | cbrt-div |
| 4× | add-log-exp |
| 4× | add-cube-cbrt |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | *-un-lft-identity |
| 4× | pow1 |
| 4× | add-sqr-sqrt |
| 3× | flip-+ |
| 3× | pow1/3 |
| 3× | flip3-+ |
| 3× | cbrt-prod |
| 4.0ms | (cbrt (* (+ N 1) N)) |
| 4.0ms | (cbrt (* (+ N 1) N)) |
| 4.0ms | (cbrt (* (+ N 1) N)) |
| 0.0ms | (atan2 1 (+ 1 (* (* (cbrt (* (+ N 1) N)) (cbrt (* (+ N 1) N))) (cbrt (* (+ N 1) N))))) |
| 85.0ms | (cbrt (* (+ N 1) N)) |
| 82.0ms | (cbrt (* (+ N 1) N)) |
| 80.0ms | (cbrt (* (+ N 1) N)) |
| 10.0ms | (atan2 1 (+ 1 (* (* (cbrt (* (+ N 1) N)) (cbrt (* (+ N 1) N))) (cbrt (* (+ N 1) N))))) |
| 290.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)))) |
| 261.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)))) |
| 256.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)))) |
| 156.0ms | (cbrt (* (- (* N N) (* 1 1)) N)) |
| 155.0ms | (cbrt (* (- (* N N) (* 1 1)) N)) |
4 alts after pruning (2 fresh and 2 done)
Merged error: 0.8b
0% (0.0b remaining)
Error of 0.4b against oracle of 0.3b and baseline of 0.4b
| 2836× | 2.0s | (body real 1280) |
| 3971× | 489.0ms | (body real 80) |
| 690× | 285.0ms | (body real 640) |
| 8000× | 173.0ms | (pre true 80) |
| 339× | 109.0ms | (body real 320) |
| 164× | 38.0ms | (body real 160) |