?

Average Accuracy: 99.8% → 99.8%
Time: 17.2s
Precision: binary64
Cost: 65536

?

\[\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({\left(\mathsf{hypot}\left(1, \frac{eh}{ew} \cdot \tan t\right)\right)}^{-0.3333333333333333}\right)}^{3} \cdot \left(ew \cdot \cos t\right) + \sin \tan^{-1} \left(\frac{eh \cdot \left(-\tan t\right)}{ew}\right) \cdot \left(eh \cdot \left(-\sin t\right)\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
  (+
   (*
    (pow (pow (hypot 1.0 (* (/ eh ew) (tan t))) -0.3333333333333333) 3.0)
    (* ew (cos t)))
   (* (sin (atan (/ (* eh (- (tan t))) ew))) (* eh (- (sin t)))))))
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(((pow(pow(hypot(1.0, ((eh / ew) * tan(t))), -0.3333333333333333), 3.0) * (ew * cos(t))) + (sin(atan(((eh * -tan(t)) / ew))) * (eh * -sin(t)))));
}
public static double code(double eh, double ew, double t) {
	return Math.abs((((ew * Math.cos(t)) * Math.cos(Math.atan(((-eh * Math.tan(t)) / ew)))) - ((eh * Math.sin(t)) * Math.sin(Math.atan(((-eh * Math.tan(t)) / ew))))));
}
public static double code(double eh, double ew, double t) {
	return Math.abs(((Math.pow(Math.pow(Math.hypot(1.0, ((eh / ew) * Math.tan(t))), -0.3333333333333333), 3.0) * (ew * Math.cos(t))) + (Math.sin(Math.atan(((eh * -Math.tan(t)) / ew))) * (eh * -Math.sin(t)))));
}
def code(eh, ew, t):
	return math.fabs((((ew * math.cos(t)) * math.cos(math.atan(((-eh * math.tan(t)) / ew)))) - ((eh * math.sin(t)) * math.sin(math.atan(((-eh * math.tan(t)) / ew))))))
def code(eh, ew, t):
	return math.fabs(((math.pow(math.pow(math.hypot(1.0, ((eh / ew) * math.tan(t))), -0.3333333333333333), 3.0) * (ew * math.cos(t))) + (math.sin(math.atan(((eh * -math.tan(t)) / ew))) * (eh * -math.sin(t)))))
function code(eh, ew, t)
	return abs(Float64(Float64(Float64(ew * cos(t)) * cos(atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)))) - Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(Float64(-eh) * tan(t)) / ew))))))
end
function code(eh, ew, t)
	return abs(Float64(Float64(((hypot(1.0, Float64(Float64(eh / ew) * tan(t))) ^ -0.3333333333333333) ^ 3.0) * Float64(ew * cos(t))) + Float64(sin(atan(Float64(Float64(eh * Float64(-tan(t))) / ew))) * Float64(eh * Float64(-sin(t))))))
end
function tmp = code(eh, ew, t)
	tmp = abs((((ew * cos(t)) * cos(atan(((-eh * tan(t)) / ew)))) - ((eh * sin(t)) * sin(atan(((-eh * tan(t)) / ew))))));
end
function tmp = code(eh, ew, t)
	tmp = abs(((((hypot(1.0, ((eh / ew) * tan(t))) ^ -0.3333333333333333) ^ 3.0) * (ew * cos(t))) + (sin(atan(((eh * -tan(t)) / ew))) * (eh * -sin(t)))));
end
code[eh_, ew_, t_] := N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
code[eh_, ew_, t_] := N[Abs[N[(N[(N[Power[N[Power[N[Sqrt[1.0 ^ 2 + N[(N[(eh / ew), $MachinePrecision] * N[Tan[t], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision], -0.3333333333333333], $MachinePrecision], 3.0], $MachinePrecision] * N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sin[N[ArcTan[N[(N[(eh * (-N[Tan[t], $MachinePrecision])), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(eh * (-N[Sin[t], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\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({\left(\mathsf{hypot}\left(1, \frac{eh}{ew} \cdot \tan t\right)\right)}^{-0.3333333333333333}\right)}^{3} \cdot \left(ew \cdot \cos t\right) + \sin \tan^{-1} \left(\frac{eh \cdot \left(-\tan t\right)}{ew}\right) \cdot \left(eh \cdot \left(-\sin t\right)\right)\right|

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 99.8%

    \[\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. Applied egg-rr99.8%

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

    [Start]99.8

    \[ \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| \]

    add-cube-cbrt [=>]99.8

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

    pow3 [=>]99.8

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

    associate-/l* [=>]99.8

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

    associate-/r/ [=>]99.8

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

    add-sqr-sqrt [=>]50.0

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

    sqrt-unprod [=>]93.9

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

    sqr-neg [=>]93.9

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

    sqrt-unprod [<=]49.8

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

    add-sqr-sqrt [<=]99.8

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

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

    [Start]99.8

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

    cos-atan [=>]99.8

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

    hypot-1-def [=>]99.8

    \[ \left|\left(ew \cdot \cos t\right) \cdot {\left(\sqrt[3]{\frac{1}{\color{blue}{\mathsf{hypot}\left(1, \frac{eh}{ew} \cdot \tan t\right)}}}\right)}^{3} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
  4. Applied egg-rr99.8%

    \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot {\color{blue}{\left({\left(\mathsf{hypot}\left(1, \frac{eh}{ew} \cdot \tan t\right)\right)}^{-0.3333333333333333}\right)}}^{3} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
    Proof

    [Start]99.8

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

    pow1/3 [=>]99.8

    \[ \left|\left(ew \cdot \cos t\right) \cdot {\color{blue}{\left({\left(\frac{1}{\mathsf{hypot}\left(1, \frac{eh}{ew} \cdot \tan t\right)}\right)}^{0.3333333333333333}\right)}}^{3} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]

    inv-pow [=>]99.8

    \[ \left|\left(ew \cdot \cos t\right) \cdot {\left({\color{blue}{\left({\left(\mathsf{hypot}\left(1, \frac{eh}{ew} \cdot \tan t\right)\right)}^{-1}\right)}}^{0.3333333333333333}\right)}^{3} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]

    pow-pow [=>]99.8

    \[ \left|\left(ew \cdot \cos t\right) \cdot {\color{blue}{\left({\left(\mathsf{hypot}\left(1, \frac{eh}{ew} \cdot \tan t\right)\right)}^{\left(-1 \cdot 0.3333333333333333\right)}\right)}}^{3} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]

    metadata-eval [=>]99.8

    \[ \left|\left(ew \cdot \cos t\right) \cdot {\left({\left(\mathsf{hypot}\left(1, \frac{eh}{ew} \cdot \tan t\right)\right)}^{\color{blue}{-0.3333333333333333}}\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 simplification99.8%

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

Alternatives

Alternative 1
Accuracy99.8%
Cost52672
\[\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-\tan t\right)}{ew}\right) + \left(ew \cdot \cos t\right) \cdot \frac{-1}{\mathsf{hypot}\left(1, \frac{eh}{ew} \cdot \tan t\right)}\right| \]
Alternative 2
Accuracy99.1%
Cost46272
\[\left|\frac{1}{\mathsf{hypot}\left(1, \frac{eh}{ew} \cdot \tan t\right)} \cdot \left(ew \cdot \cos t\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right| \]
Alternative 3
Accuracy98.6%
Cost39296
\[\left|ew \cdot \cos t - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-\tan t\right)}{ew}\right)\right| \]
Alternative 4
Accuracy98.3%
Cost32896
\[\left|ew \cdot \cos t - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right| \]
Alternative 5
Accuracy90.1%
Cost27145
\[\begin{array}{l} t_1 := t \cdot \frac{eh}{ew}\\ t_2 := eh \cdot \sin t\\ \mathbf{if}\;ew \leq -3.1 \cdot 10^{-71} \lor \neg \left(ew \leq 8.2 \cdot 10^{-165}\right):\\ \;\;\;\;\left|ew \cdot \cos t - t_1 \cdot \frac{t_2}{\mathsf{hypot}\left(1, t_1\right)}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew - t_2 \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\ \end{array} \]
Alternative 6
Accuracy80.4%
Cost26761
\[\begin{array}{l} t_1 := \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\\ \mathbf{if}\;eh \leq -1.95 \cdot 10^{+132} \lor \neg \left(eh \leq 8 \cdot 10^{-165}\right):\\ \;\;\;\;\left|ew - \left(eh \cdot \sin t\right) \cdot t_1\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \cos t - t_1 \cdot \left(t \cdot eh\right)\right|\\ \end{array} \]
Alternative 7
Accuracy78.6%
Cost26368
\[\left|ew - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right| \]

Error

Reproduce?

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