


Bits error versus K



Bits error versus m



Bits error versus n



Bits error versus M



Bits error versus l
Results
Initial program 14.9
Taylor expanded around 0 1.3
Final simplification1.3
herbie shell --seed 2019016 +o rules:numerics
(FPCore (K m n M l)
:name "Maksimov and Kolovsky, Equation (32)"
(* (cos (- (/ (* K (+ m n)) 2) M)) (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))))))
Time bar (total: 1.4m)Debug log
| 268× | (pre true 80) |
| 262× | (body real 80) |
| 3× | (body real 640) |
| 3× | (body real 1280) |
| 156.0ms | (* (cos (- (/ (* K (+ m n)) 2) M)) (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 16.7b
Found 4 expressions with local error:
| 34.5b | (cos (- (/ (* K (+ m n)) 2) M)) |
| 0.0b | (* K (+ m n)) |
| 0.0b | (pow (- (/ (+ m n) 2) M) 2) |
| 0.0b | (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))) |
| 54× | prod-diff |
| 48× | *-un-lft-identity |
| 46× | add-sqr-sqrt |
| 44× | add-cube-cbrt |
| 29× | distribute-rgt-neg-in |
| 28× | distribute-lft-neg-in |
| 27× | unpow-prod-down |
| 18× | fma-neg |
| 9× | unpow2 |
| 8× | add-log-exp |
| 5× | add-exp-log |
| 5× | pow1 |
| 4× | log1p-expm1-u |
| 4× | add-cbrt-cube |
| 4× | neg-mul-1 |
| 4× | expm1-log1p-u |
| 3× | associate-*r* |
| 3× | sub-neg |
| 2× | distribute-lft-out-- |
| 2× | associate--r+ |
| 2× | associate-*r/ |
| 2× | diff-log |
| 2× | cos-sum |
| 1× | difference-of-squares |
| 1× | associate--r- |
| 1× | flip-- |
| 1× | flip-+ |
| 1× | *-commutative |
| 1× | pow-exp |
| 1× | neg-log |
| 1× | flip3-- |
| 1× | flip3-+ |
| 1× | distribute-lft-in |
| 1× | pow-pow |
| 1× | pow-to-exp |
| 1× | cos-diff |
| 1× | distribute-rgt-in |
| 1× | neg-sub0 |
| 1× | associate--l- |
| 159.0ms | (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))) |
| 6.0ms | (cos (- (/ (* K (+ m n)) 2) M)) |
| 6.0ms | (pow (- (/ (+ m n) 2) M) 2) |
| 1.0ms | (* K (+ m n)) |
| 136.0ms | (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))) |
| 52.0ms | (cos (- (/ (* K (+ m n)) 2) M)) |
| 42.0ms | (pow (- (/ (+ m n) 2) M) 2) |
| 27.0ms | (* K (+ m n)) |
| 652.0ms | (fma (- (- l (fabs (- m n)))) 1 (* (- l (fabs (- m n))) 1)) |
| 648.0ms | (fma (- (- l (fabs (- m n)))) 1 (* (- l (fabs (- m n))) 1)) |
| 625.0ms | (fma (- (- l (fabs (- m n)))) 1 (* (- l (fabs (- m n))) 1)) |
| 612.0ms | (fma (- (- l (fabs (- m n)))) 1 (* (- l (fabs (- m n))) 1)) |
| 598.0ms | (fma (- (- l (fabs (- m n)))) 1 (* (- l (fabs (- m n))) 1)) |
5 alts after pruning (5 fresh and 0 done)
Merged error: 0.8b
Found 3 expressions with local error:
| 0.0b | (pow (- (/ (+ m n) 2) M) 2) |
| 0.0b | (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))) |
| 0.0b | (- (/ (+ m n) 2) M) |
| 54× | prod-diff |
| 47× | *-un-lft-identity |
| 45× | add-sqr-sqrt |
| 43× | add-cube-cbrt |
| 29× | distribute-rgt-neg-in |
| 28× | distribute-lft-neg-in |
| 27× | unpow-prod-down |
| 22× | fma-neg |
| 9× | unpow2 |
| 7× | add-log-exp |
| 4× | add-exp-log |
| 4× | neg-mul-1 |
| 4× | pow1 |
| 3× | log1p-expm1-u |
| 3× | add-cbrt-cube |
| 3× | sub-neg |
| 3× | expm1-log1p-u |
| 2× | distribute-lft-out-- |
| 2× | associate--r+ |
| 2× | flip-- |
| 2× | diff-log |
| 2× | flip3-- |
| 1× | difference-of-squares |
| 1× | associate--r- |
| 1× | div-inv |
| 1× | pow-exp |
| 1× | neg-log |
| 1× | pow-pow |
| 1× | pow-to-exp |
| 1× | neg-sub0 |
| 1× | associate--l- |
| 185.0ms | (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))) |
| 10.0ms | (pow (- (/ (+ m n) 2) M) 2) |
| 5.0ms | (- (/ (+ m n) 2) M) |
| 137.0ms | (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))) |
| 46.0ms | (pow (- (/ (+ m n) 2) M) 2) |
| 25.0ms | (- (/ (+ m n) 2) M) |
| 813.0ms | (fma 1 (- (pow (- (/ (+ m n) 2) M) 2)) (- (* (- l (fabs (- m n))) 1))) |
| 619.0ms | (fma (- (- l (fabs (- m n)))) 1 (* (- l (fabs (- m n))) 1)) |
| 614.0ms | (fma (- (- l (fabs (- m n)))) 1 (* (- l (fabs (- m n))) 1)) |
| 614.0ms | (fma (- (- l (fabs (- m n)))) 1 (* (- l (fabs (- m n))) 1)) |
| 609.0ms | (fma (- (- l (fabs (- m n)))) 1 (* (- l (fabs (- m n))) 1)) |
5 alts after pruning (4 fresh and 1 done)
Merged error: 0.8b
Found 4 expressions with local error:
| 34.5b | (cos (- (/ (* K (+ m n)) 2) M)) |
| 34.5b | (cos (- (/ (* K (+ m n)) 2) M)) |
| 34.5b | (cos (- (/ (* K (+ m n)) 2) M)) |
| 0.5b | (cbrt (cos (- (/ (* K (+ m n)) 2) M))) |
| 6× | cos-sum |
| 5× | add-cube-cbrt |
| 5× | *-un-lft-identity |
| 5× | add-sqr-sqrt |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | pow1 |
| 4× | expm1-log1p-u |
| 3× | sub-neg |
| 3× | cos-diff |
| 3× | cbrt-prod |
| 1× | pow1/3 |
| 16.0ms | (cos (- (/ (* K (+ m n)) 2) M)) |
| 13.0ms | (cos (- (/ (* K (+ m n)) 2) M)) |
| 13.0ms | (cos (- (/ (* K (+ m n)) 2) M)) |
| 2.0ms | (cbrt (cos (- (/ (* K (+ m n)) 2) M))) |
| 198.0ms | (cbrt (cos (- (/ (* K (+ m n)) 2) M))) |
| 83.0ms | (cos (- (/ (* K (+ m n)) 2) M)) |
| 79.0ms | (cos (- (/ (* K (+ m n)) 2) M)) |
| 65.0ms | (cos (- (/ (* K (+ m n)) 2) M)) |
| 174.0ms | (pow (cos (- (+ (* 1/2 (* m K)) (* 1/2 (* K n))) M)) 1/3) |
| 141.0ms | (cos (- (+ (* 1/2 (* m K)) (* 1/2 (* K n))) M)) |
| 134.0ms | (cos (- (+ (* 1/2 (* m K)) (* 1/2 (* K n))) M)) |
| 124.0ms | (cos (- (+ (* 1/2 (* m K)) (* 1/2 (* K n))) M)) |
| 114.0ms | (cos (- (+ (* 1/2 (* m K)) (* 1/2 (* K n))) M)) |
5 alts after pruning (3 fresh and 2 done)
Merged error: 0.8b
Found 4 expressions with local error:
| 34.5b | (cos (- (/ (* K (+ m n)) 2) M)) |
| 34.5b | (cos (- (/ (* K (+ m n)) 2) M)) |
| 34.5b | (cos (- (/ (* K (+ m n)) 2) M)) |
| 34.5b | (cos (- (/ (* K (+ m n)) 2) M)) |
| 8× | cos-sum |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | add-cube-cbrt |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | *-un-lft-identity |
| 4× | sub-neg |
| 4× | pow1 |
| 4× | expm1-log1p-u |
| 4× | add-sqr-sqrt |
| 4× | cos-diff |
| 9.0ms | (cos (- (/ (* K (+ m n)) 2) M)) |
| 6.0ms | (cos (- (/ (* K (+ m n)) 2) M)) |
| 6.0ms | (cos (- (/ (* K (+ m n)) 2) M)) |
| 6.0ms | (cos (- (/ (* K (+ m n)) 2) M)) |
| 80.0ms | (cos (- (/ (* K (+ m n)) 2) M)) |
| 59.0ms | (cos (- (/ (* K (+ m n)) 2) M)) |
| 54.0ms | (cos (- (/ (* K (+ m n)) 2) M)) |
| 48.0ms | (cos (- (/ (* K (+ m n)) 2) M)) |
| 161.0ms | (cos (- (+ (* 1/2 (* m K)) (* 1/2 (* K n))) M)) |
| 141.0ms | (cos (- (+ (* 1/2 (* m K)) (* 1/2 (* K n))) M)) |
| 138.0ms | (cos (- (+ (* 1/2 (* m K)) (* 1/2 (* K n))) M)) |
| 101.0ms | (cos (- (+ (* 1/2 (* m K)) (* 1/2 (* K n))) M)) |
| 95.0ms | (cos (- (+ (* 1/2 (* m K)) (* 1/2 (* K n))) M)) |
5 alts after pruning (3 fresh and 2 done)
Merged error: 0.8b
0% (0.2b remaining)
Error of 1.3b against oracle of 1.1b and baseline of 1.3b
| 8511× | (pre true 80) |
| 8096× | (body real 80) |
| 141× | (body real 640) |
| 128× | (body real 1280) |
| 87× | (body real 320) |
| 59× | (body real 160) |