Average Error: 0.1 → 0.1
Time: 12.6s
Precision: binary64
\[\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|ew \cdot \left(\cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right) \cdot \sin t\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{1}{\sqrt[3]{\tan t} \cdot \sqrt[3]{\tan t}} \cdot \frac{\frac{eh}{ew}}{\sqrt[3]{\tan t}}\right)\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|ew \cdot \left(\cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right) \cdot \sin t\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{1}{\sqrt[3]{\tan t} \cdot \sqrt[3]{\tan t}} \cdot \frac{\frac{eh}{ew}}{\sqrt[3]{\tan t}}\right)\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
  (+
   (* ew (* (cos (atan (/ eh (* ew (tan t))))) (sin t)))
   (*
    (* eh (cos t))
    (sin
     (atan
      (*
       (/ 1.0 (* (cbrt (tan t)) (cbrt (tan t))))
       (/ (/ eh ew) (cbrt (tan t))))))))))
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((ew * (cos(atan(eh / (ew * tan(t)))) * sin(t))) + ((eh * cos(t)) * sin(atan((1.0 / (cbrt(tan(t)) * cbrt(tan(t)))) * ((eh / ew) / cbrt(tan(t)))))));
}

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 \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 associate-*l*_binary640.1

    \[\leadsto \left|\color{blue}{ew \cdot \left(\sin t \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\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|ew \cdot \color{blue}{\left(\cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right) \cdot \sin t\right)} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right|\]
  5. Using strategy rm
  6. Applied add-cube-cbrt_binary640.1

    \[\leadsto \left|ew \cdot \left(\cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right) \cdot \sin t\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\color{blue}{\left(\sqrt[3]{\tan t} \cdot \sqrt[3]{\tan t}\right) \cdot \sqrt[3]{\tan t}}}\right)\right|\]
  7. Applied *-un-lft-identity_binary640.1

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

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

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

Alternatives

Reproduce

herbie shell --seed 2021118 
(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))))))))