Average Error: 0.5 → 0.5
Time: 47.9s
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)\]
\[\cos th \cdot \left(\frac{a1}{\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}} \cdot \frac{a1}{\sqrt[3]{\sqrt{2}}}\right) + \frac{\cos th}{\sqrt{2}} \cdot \left(a2 \cdot a2\right)\]

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. Using strategy rm
  3. Applied div-inv0.5

    \[\leadsto \color{blue}{\left(\cos th \cdot \frac{1}{\sqrt{2}}\right)} \cdot \left(a1 \cdot a1\right) + \frac{\cos th}{\sqrt{2}} \cdot \left(a2 \cdot a2\right)\]
  4. Applied associate-*l*0.5

    \[\leadsto \color{blue}{\cos th \cdot \left(\frac{1}{\sqrt{2}} \cdot \left(a1 \cdot a1\right)\right)} + \frac{\cos th}{\sqrt{2}} \cdot \left(a2 \cdot a2\right)\]
  5. Applied simplify0.5

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

    \[\leadsto \cos th \cdot \frac{a1 \cdot a1}{\color{blue}{\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \sqrt[3]{\sqrt{2}}}} + \frac{\cos th}{\sqrt{2}} \cdot \left(a2 \cdot a2\right)\]
  8. Applied times-frac0.5

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

Runtime

Time bar (total: 47.9s)Debug logProfile

herbie shell --seed '#(1072967564 1937075727 894099792 790700740 1036514779 1027793188)' +o rules:numerics
(FPCore (a1 a2 th)
  :name "Migdal et al, Equation (64)"
  (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))))