Average Error: 15.3 → 1.5
Time: 43.4s
Precision: 64
Internal Precision: 128
\[\cos \left(\frac{K \cdot \left(m + n\right)}{2} - M\right) \cdot e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}\]
\[\sqrt[3]{e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}} \cdot \left(\sqrt[3]{e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}} \cdot \sqrt[3]{e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}}\right)\]

Error

Bits error versus K

Bits error versus m

Bits error versus n

Bits error versus M

Bits error versus l

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 15.3

    \[\cos \left(\frac{K \cdot \left(m + n\right)}{2} - M\right) \cdot e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}\]
  2. Taylor expanded around 0 1.5

    \[\leadsto \color{blue}{1} \cdot e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}\]
  3. Using strategy rm
  4. Applied add-cube-cbrt1.5

    \[\leadsto 1 \cdot \color{blue}{\left(\left(\sqrt[3]{e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}} \cdot \sqrt[3]{e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}}\right) \cdot \sqrt[3]{e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}}\right)}\]
  5. Final simplification1.5

    \[\leadsto \sqrt[3]{e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}} \cdot \left(\sqrt[3]{e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}} \cdot \sqrt[3]{e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}}\right)\]

Reproduce

herbie shell --seed 2018360 
(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)))))))

Details

Time bar (total: 36.3s)Debug log

start206.0ms

Algorithm
intervals

setup209.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 16.6b

localize95.0ms

Local error

Found 4 expressions with local error:

34.9b
(cos (- (/ (* K (+ m n)) 2) M))
0.2b
(/ (* K (+ m n)) 2)
0.0b
(* (cos (- (/ (* K (+ m n)) 2) M)) (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n))))))
0.0b
(* K (+ m n))

rewrite567.0ms

Algorithm
rewrite-expression-head
Counts
4 → 59
Calls

4 calls. Slowest were:

548.0ms
(* (cos (- (/ (* K (+ m n)) 2) M)) (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n))))))
11.0ms
(cos (- (/ (* K (+ m n)) 2) M))
5.0ms
(/ (* K (+ m n)) 2)

series525.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

403.0ms
(* (cos (- (/ (* K (+ m n)) 2) M)) (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n))))))
71.0ms
(cos (- (/ (* K (+ m n)) 2) M))
32.0ms
(/ (* K (+ m n)) 2)
19.0ms
(* K (+ m n))

simplify2.7s

Counts
36 → 71
Calls

36 calls. Slowest were:

375.0ms
(cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n))))))
333.0ms
(exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))))
306.0ms
(* K (- (* m m) (* n n)))

prune1.4s

Pruning

5 alts after pruning (5 fresh and 0 done)

Merged error: 1.0b

localize7.0ms

Local error

Found 3 expressions with local error:

0.0b
(- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n))))
0.0b
(pow (- (/ (+ m n) 2) M) 2)
0.0b
(exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))))

rewrite410.0ms

Algorithm
rewrite-expression-head
Counts
3 → 54
Calls

3 calls. Slowest were:

239.0ms
(exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))))
165.0ms
(- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n))))
5.0ms
(pow (- (/ (+ m n) 2) M) 2)

series319.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

151.0ms
(- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n))))
120.0ms
(exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))))
48.0ms
(pow (- (/ (+ m n) 2) M) 2)

simplify4.2s

Counts
36 → 63
Calls

36 calls. Slowest were:

302.0ms
(/ (/ 1 (exp (pow (- (/ (+ m n) 2) M) 2))) (exp (- l (fabs (- m n)))))
301.0ms
(/ (exp (- (pow (- (/ (+ m n) 2) M) 2))) (exp (- l (fabs (- m n)))))
262.0ms
(exp (* (cbrt (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n))))) (cbrt (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))))))

prune1.2s

Pruning

6 alts after pruning (6 fresh and 0 done)

Merged error: 1.0b

localize24.0ms

Local error

Found 4 expressions with local error:

0.0b
(cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n))))))
0.0b
(cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n))))))
0.0b
(cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n))))))
0.0b
(* (* (cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))))) (cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n))))))) (cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))))))

rewrite1.7s

Algorithm
rewrite-expression-head
Counts
4 → 85
Calls

4 calls. Slowest were:

971.0ms
(* (* (cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))))) (cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n))))))) (cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))))))
270.0ms
(cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n))))))
249.0ms
(cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n))))))

series726.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

229.0ms
(cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n))))))
211.0ms
(cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n))))))
170.0ms
(cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n))))))
117.0ms
(* (* (cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))))) (cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n))))))) (cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))))))

simplify14.5s

Counts
72 → 97
Calls

72 calls. Slowest were:

690.0ms
(* (* (cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))))) (cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n))))))) (cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))))))
382.0ms
(* (* (cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))))) (cbrt (exp (- (pow (- (/ (+ m n) 2) M) 2))))) (cbrt (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))))))
377.0ms
(* (* (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n))))) (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))))) (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n))))))

prune2.4s

Pruning

6 alts after pruning (5 fresh and 1 done)

Merged error: 1.0b

localize51.0ms

Local error

Found 4 expressions with local error:

34.9b
(cos (- (/ (* (* K (* (cbrt (+ m n)) (cbrt (+ m n)))) (cbrt (+ m n))) 2) M))
0.5b
(* (cbrt (+ m n)) (cbrt (+ m n)))
0.5b
(cbrt (+ m n))
0.5b
(cbrt (+ m n))

rewrite15.0ms

Algorithm
rewrite-expression-head
Counts
4 → 72
Calls

4 calls. Slowest were:

8.0ms
(cos (- (/ (* (* K (* (cbrt (+ m n)) (cbrt (+ m n)))) (cbrt (+ m n))) 2) M))
5.0ms
(* (cbrt (+ m n)) (cbrt (+ m n)))
1.0ms
(cbrt (+ m n))

series656.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

215.0ms
(* (cbrt (+ m n)) (cbrt (+ m n)))
169.0ms
(cbrt (+ m n))
150.0ms
(cbrt (+ m n))
122.0ms
(cos (- (/ (* (* K (* (cbrt (+ m n)) (cbrt (+ m n)))) (cbrt (+ m n))) 2) M))

simplify1.8s

Counts
57 → 84
Calls

57 calls. Slowest were:

187.0ms
(- (+ (* 1/3 (* m (pow (/ 1 (pow n 2)) 1/3))) (pow n 1/3)) (* 1/9 (* (pow m 2) (pow (/ 1 (pow n 5)) 1/3))))
185.0ms
(- (+ (* 2/3 (* m (pow (/ 1 n) 1/3))) (pow n 2/3)) (* 1/9 (* (pow m 2) (pow (/ 1 (pow n 4)) 1/3))))
181.0ms
(- (+ (* 1/3 (* m (pow (/ 1 (pow n 2)) 1/3))) (pow n 1/3)) (* 1/9 (* (pow m 2) (pow (/ 1 (pow n 5)) 1/3))))

prune2.0s

Pruning

6 alts after pruning (5 fresh and 1 done)

Merged error: 1.0b

regimes484.0ms

Accuracy

0% (0.3b remaining)

Error of 1.5b against oracle of 1.2b and baseline of 1.5b

bsearch4.0ms