



Bits error versus N
Results
| Original | 14.9 |
|---|---|
| Target | 0.4 |
| Herbie | 0.4 |
Initial program 14.9
rmApplied diff-atan13.6
Simplified0.4
Taylor expanded around -inf 0.4
Final simplification0.4
herbie shell --seed 2019022
(FPCore (N)
:name "2atan (example 3.5)"
:herbie-target
(atan (/ 1 (+ 1 (* N (+ N 1)))))
(- (atan (+ N 1)) (atan N)))
Time bar (total: 4.6s)Debug log
| 22.0ms | 80× | body | 1280 | valid |
| 8.0ms | 132× | body | 80 | valid |
| 5.0ms | 25× | body | 640 | valid |
| 2.0ms | 15× | body | 320 | valid |
| 1.0ms | 4× | body | 160 | valid |
| 8.0ms | (- (atan (+ N 1)) (atan N)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 15.6b
Found 1 expressions with local error:
| 1.5b | (- (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)) |
| 30.0ms | (- (atan (+ N 1)) (atan N)) |
| 33.0ms | (+ 1 (* (+ N 1) N)) |
| 25.0ms | (/ (exp (atan (+ N 1))) (exp (atan N))) |
| 14.0ms | (- (+ N 1) N) |
| 10.0ms | (- (sqrt (atan (+ N 1))) (sqrt (atan N))) |
| 8.0ms | (- (atan (+ N 1)) (atan N)) |
3 alts after pruning (3 fresh and 0 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-+ |
| 2.0ms | (* (+ N 1) N) |
| 0.0ms | (atan2 1 (+ 1 (* (+ N 1) N))) |
| 32.0ms | (* (+ N 1) N) |
| 2.0ms | (atan2 1 (+ 1 (* (+ N 1) N))) |
| 71.0ms | (* (- (* N N) (* 1 1)) N) |
| 25.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
| 25.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
| 22.0ms | (* (+ (pow N 3) (pow 1 3)) N) |
| 21.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
3 alts after pruning (3 fresh and 0 done)
Merged error: 0.1b
Found 2 expressions with local error:
| 0.1b | (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 |
| 5.0ms | (+ N (+ (pow N 2) 1)) |
| 0.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
| 12.0ms | (+ N (+ (pow N 2) 1)) |
| 4.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
| 28.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
| 24.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
| 24.0ms | (atan2 1 (+ N (+ (pow N 2) 1))) |
| 22.0ms | (+ N (+ (pow N 2) 1)) |
| 21.0ms | (+ N (+ (pow N 2) 1)) |
3 alts after pruning (2 fresh and 1 done)
Merged error: 0.1b
Found 4 expressions with local error:
| 14.0b | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 14.0b | (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 |
| 5.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)))) |
| 13.0ms | (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) |
| 3.0ms | (* (sqrt (atan2 1 (+ 1 (* (+ N 1) N)))) (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) |
| 2.0ms | (atan2 1 (+ 1 (* (+ N 1) N))) |
| 44.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)))))) |
| 43.0ms | (sqrt (* (cbrt (atan2 1 (+ 1 (* (+ N 1) N)))) (cbrt (atan2 1 (+ 1 (* (+ N 1) N)))))) |
| 41.0ms | (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) |
| 41.0ms | (sqrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) |
| 40.0ms | (cbrt (sqrt (atan2 1 (+ 1 (* (+ N 1) N))))) |
6 alts after pruning (4 fresh and 2 done)
Merged error: 0.1b
0% (0.0b remaining)
Error of 0.4b against oracle of 0.3b and baseline of 0.4b
| 901.0ms | 2786× | body | 1280 | valid |
| 328.0ms | 4072× | body | 80 | valid |
| 220.0ms | 640× | body | 640 | valid |
| 64.0ms | 320× | body | 320 | valid |
| 54.0ms | 182× | body | 160 | valid |