Average Error: 0.1 → 0.1
Time: 10.7s
Precision: binary64
\[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right|\]
\[\left|\left(ew \cdot \cos t\right) \cdot \sqrt[3]{{\cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)}^{3}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right|\]
\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right|
\left|\left(ew \cdot \cos t\right) \cdot \sqrt[3]{{\cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)}^{3}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right|
(FPCore (eh ew t)
 :precision binary64
 (fabs
  (-
   (* (* ew (cos t)) (cos (atan (/ (* (- eh) (tan t)) ew))))
   (* (* eh (sin t)) (sin (atan (/ (* (- eh) (tan t)) ew)))))))
(FPCore (eh ew t)
 :precision binary64
 (fabs
  (-
   (* (* ew (cos t)) (cbrt (pow (cos (atan (/ (* (- eh) (tan t)) ew))) 3.0)))
   (* (* eh (sin t)) (sin (atan (/ (* (- eh) (tan t)) ew)))))))
double code(double eh, double ew, double t) {
	return fabs(((ew * cos(t)) * cos(atan((-eh * tan(t)) / ew))) - ((eh * sin(t)) * sin(atan((-eh * tan(t)) / ew))));
}
double code(double eh, double ew, double t) {
	return fabs(((ew * cos(t)) * cbrt(pow(cos(atan((-eh * tan(t)) / ew)), 3.0))) - ((eh * sin(t)) * sin(atan((-eh * tan(t)) / ew))));
}

Error

Bits error versus eh

Bits error versus ew

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right|\]
  2. Using strategy rm
  3. Applied add-cbrt-cube_binary64_21600.1

    \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\sqrt[3]{\left(\cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right|\]
  4. Simplified0.1

    \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \sqrt[3]{\color{blue}{{\cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)}^{3}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right|\]
  5. Final simplification0.1

    \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \sqrt[3]{{\cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)}^{3}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right|\]

Reproduce

herbie shell --seed 2020354 
(FPCore (eh ew t)
  :name "Example 2 from Robby"
  :precision binary64
  (fabs (- (* (* ew (cos t)) (cos (atan (/ (* (- eh) (tan t)) ew)))) (* (* eh (sin t)) (sin (atan (/ (* (- eh) (tan t)) ew)))))))