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

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

Alternatives

Alternative 1
Error0.1
Cost58816
\[\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right|\]
Alternative 2
Error0.6
Cost52416
\[\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{eh}{t \cdot ew}\right)\right|\]
Alternative 3
Error60.4
Cost64
\[1\]

Error

Derivation

  1. Initial program 0.1

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

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

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

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

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

Reproduce

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