Average Error: 0.5 → 0.4
Time: 32.4s
Precision: 64
Internal Precision: 576
\[\frac{\cos th}{\sqrt{2}} \cdot \left(a1 \cdot a1\right) + \frac{\cos th}{\sqrt{2}} \cdot \left(a2 \cdot a2\right)\]
\[\frac{\left(\cos th \cdot \sqrt[3]{\frac{1}{2}}\right) \cdot \left(a1 \cdot a1 + a2 \cdot a2\right)}{\sqrt[3]{\sqrt{2}}}\]

Error

Bits error versus a1

Bits error versus a2

Bits error versus th

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.5

    \[\frac{\cos th}{\sqrt{2}} \cdot \left(a1 \cdot a1\right) + \frac{\cos th}{\sqrt{2}} \cdot \left(a2 \cdot a2\right)\]
  2. Initial simplification0.5

    \[\leadsto \frac{\cos th}{\sqrt{2}} \cdot \left(a1 \cdot a1 + a2 \cdot a2\right)\]
  3. Using strategy rm
  4. Applied associate-*l/0.5

    \[\leadsto \color{blue}{\frac{\cos th \cdot \left(a1 \cdot a1 + a2 \cdot a2\right)}{\sqrt{2}}}\]
  5. Using strategy rm
  6. Applied add-cube-cbrt0.5

    \[\leadsto \frac{\cos th \cdot \left(a1 \cdot a1 + a2 \cdot a2\right)}{\color{blue}{\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \sqrt[3]{\sqrt{2}}}}\]
  7. Applied associate-/r*0.5

    \[\leadsto \color{blue}{\frac{\frac{\cos th \cdot \left(a1 \cdot a1 + a2 \cdot a2\right)}{\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}}}{\sqrt[3]{\sqrt{2}}}}\]
  8. Taylor expanded around -inf 0.6

    \[\leadsto \frac{\color{blue}{{\left(\frac{1}{{\left(\sqrt{2}\right)}^{2}}\right)}^{\frac{1}{3}} \cdot \left(\cos th \cdot {a2}^{2}\right) + \left({a1}^{2} \cdot \cos th\right) \cdot {\left(\frac{1}{{\left(\sqrt{2}\right)}^{2}}\right)}^{\frac{1}{3}}}}{\sqrt[3]{\sqrt{2}}}\]
  9. Simplified0.4

    \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{\frac{1}{2}} \cdot \cos th\right) \cdot \left(a2 \cdot a2 + a1 \cdot a1\right)}}{\sqrt[3]{\sqrt{2}}}\]
  10. Final simplification0.4

    \[\leadsto \frac{\left(\cos th \cdot \sqrt[3]{\frac{1}{2}}\right) \cdot \left(a1 \cdot a1 + a2 \cdot a2\right)}{\sqrt[3]{\sqrt{2}}}\]

Runtime

Time bar (total: 32.4s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes0.40.40.00.40%
herbie shell --seed 2018296 
(FPCore (a1 a2 th)
  :name "Migdal et al, Equation (64)"
  (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))))