Average Error: 0.5 → 0.6
Time: 1.1m
Precision: 64
Internal Precision: 384
\[\frac{\cos th}{\sqrt{2}} \cdot \left(a1 \cdot a1\right) + \frac{\cos th}{\sqrt{2}} \cdot \left(a2 \cdot a2\right)\]
\[\sqrt[3]{\frac{{\left(\cos th\right)}^{3}}{\sqrt{2} + \sqrt{2}}} \cdot \left(a2 \cdot a2 + a1 \cdot a1\right)\]

Error

Bits error versus a1

Bits error versus a2

Bits error versus th

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. Applied simplify0.5

    \[\leadsto \color{blue}{\frac{\cos th}{\sqrt{2}} \cdot \left(a2 \cdot a2 + a1 \cdot a1\right)}\]
  3. Using strategy rm
  4. Applied add-cbrt-cube1.1

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

    \[\leadsto \frac{\color{blue}{\sqrt[3]{\left(\cos th \cdot \cos th\right) \cdot \cos th}}}{\sqrt[3]{\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \sqrt{2}}} \cdot \left(a2 \cdot a2 + a1 \cdot a1\right)\]
  6. Applied cbrt-undiv0.7

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

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

Runtime

Time bar (total: 1.1m)Debug logProfile

herbie shell --seed '#(1070100504 930361288 1279167582 284574201 1450237281 2578255382)' 
(FPCore (a1 a2 th)
  :name "Migdal et al, Equation (64)"
  (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))))