Average Error: 0.5 → 0.5
Time: 41.0s
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{\cos th \cdot \left(a2 \cdot a2\right)}{\sqrt{2}} + a1 \cdot \left(\frac{\cos th}{\sqrt{2}} \cdot a1\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 associate-*l/0.5

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

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

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

Runtime

Time bar (total: 41.0s)Debug logProfile

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