Average Error: 0.5 → 0.4
Time: 22.5s
Precision: 64
Internal precision: 128
\[\frac{\cos th}{\sqrt{2}} \cdot {a1}^2 + \frac{\cos th}{\sqrt{2}} \cdot {a2}^2\]
\[\frac{\cos th \cdot \left({a2}^2 + {a1}^2\right)}{\sqrt{2}}\]

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 {a1}^2 + \frac{\cos th}{\sqrt{2}} \cdot {a2}^2\]
  2. Applied simplify 0.5

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

    \[\leadsto \color{blue}{\frac{\cos th \cdot \left({a2}^2 + {a1}^2\right)}{\sqrt{2}}}\]
  5. Removed slow pow expressions

Runtime

Time bar (total: 22.5s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(3333315518 4264526002 717944848 2749081850 3344145543 2353658393)'
(FPCore (a1 a2 th)
  :name "Migdal et al, Equation (64)"
  (+ (* (/ (cos th) (sqrt 2)) (sqr a1)) (* (/ (cos th) (sqrt 2)) (sqr a2))))