?

Average Accuracy: 99.8% → 99.8%
Time: 29.9s
Precision: binary64
Cost: 71808

?

\[\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(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\tan t \cdot \left(-eh\right)}{ew}\right) - \left(e^{\mathsf{log1p}\left(\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right)} + -1\right) \cdot \left(ew \cdot \cos t\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
  (-
   (* (* eh (sin t)) (sin (atan (/ (* (tan t) (- eh)) ew))))
   (*
    (+ (exp (log1p (cos (atan (* eh (/ (tan t) ew)))))) -1.0)
    (* ew (cos 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((((eh * sin(t)) * sin(atan(((tan(t) * -eh) / ew)))) - ((exp(log1p(cos(atan((eh * (tan(t) / ew)))))) + -1.0) * (ew * cos(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((((eh * Math.sin(t)) * Math.sin(Math.atan(((Math.tan(t) * -eh) / ew)))) - ((Math.exp(Math.log1p(Math.cos(Math.atan((eh * (Math.tan(t) / ew)))))) + -1.0) * (ew * Math.cos(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((((eh * math.sin(t)) * math.sin(math.atan(((math.tan(t) * -eh) / ew)))) - ((math.exp(math.log1p(math.cos(math.atan((eh * (math.tan(t) / ew)))))) + -1.0) * (ew * math.cos(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(Float64(eh * sin(t)) * sin(atan(Float64(Float64(tan(t) * Float64(-eh)) / ew)))) - Float64(Float64(exp(log1p(cos(atan(Float64(eh * Float64(tan(t) / ew)))))) + -1.0) * Float64(ew * cos(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[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(N[Tan[t], $MachinePrecision] * (-eh)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[(N[Exp[N[Log[1 + N[Cos[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision] * N[(ew * N[Cos[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(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\tan t \cdot \left(-eh\right)}{ew}\right) - \left(e^{\mathsf{log1p}\left(\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right)} + -1\right) \cdot \left(ew \cdot \cos t\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(e^{\mathsf{log1p}\left(\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right)} - 1\right)} - \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| \]

    expm1-log1p-u [=>]99.8

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

    expm1-udef [=>]99.8

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

    div-inv [=>]99.8

    \[ \left|\left(ew \cdot \cos t\right) \cdot \left(e^{\mathsf{log1p}\left(\cos \tan^{-1} \color{blue}{\left(\left(\left(-eh\right) \cdot \tan t\right) \cdot \frac{1}{ew}\right)}\right)} - 1\right) - \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(e^{\mathsf{log1p}\left(\cos \tan^{-1} \color{blue}{\left(\left(-eh\right) \cdot \left(\tan t \cdot \frac{1}{ew}\right)\right)}\right)} - 1\right) - \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.2

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

    sqrt-unprod [=>]92.7

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

    sqr-neg [=>]92.7

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

    sqrt-unprod [<=]49.6

    \[ \left|\left(ew \cdot \cos t\right) \cdot \left(e^{\mathsf{log1p}\left(\cos \tan^{-1} \left(\color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \left(\tan t \cdot \frac{1}{ew}\right)\right)\right)} - 1\right) - \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(e^{\mathsf{log1p}\left(\cos \tan^{-1} \left(\color{blue}{eh} \cdot \left(\tan t \cdot \frac{1}{ew}\right)\right)\right)} - 1\right) - \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(e^{\mathsf{log1p}\left(\cos \tan^{-1} \left(eh \cdot \color{blue}{\frac{\tan t \cdot 1}{ew}}\right)\right)} - 1\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]

    *-commutative [<=]99.8

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

    *-un-lft-identity [<=]99.8

    \[ \left|\left(ew \cdot \cos t\right) \cdot \left(e^{\mathsf{log1p}\left(\cos \tan^{-1} \left(eh \cdot \frac{\color{blue}{\tan t}}{ew}\right)\right)} - 1\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
  3. Final simplification99.8%

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

Alternatives

Alternative 1
Accuracy99.8%
Cost52544
\[\left|\frac{ew}{\frac{\mathsf{hypot}\left(1, \frac{\tan t}{\frac{ew}{eh}}\right)}{\cos t}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\tan t \cdot \left(-eh\right)}{ew}\right)\right| \]
Alternative 2
Accuracy99.8%
Cost52544
\[\left|\frac{ew \cdot \cos t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\tan t \cdot \left(-eh\right)}{ew}\right)\right| \]
Alternative 3
Accuracy99.0%
Cost46144
\[\left|\frac{ew}{\frac{\mathsf{hypot}\left(1, \frac{\tan t}{\frac{ew}{eh}}\right)}{\cos t}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{t \cdot \left(-eh\right)}{ew}\right)\right| \]
Alternative 4
Accuracy98.5%
Cost39296
\[\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\tan t \cdot \left(-eh\right)}{ew}\right) - ew \cdot \cos t\right| \]
Alternative 5
Accuracy98.3%
Cost32896
\[\left|ew \cdot \cos t - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{t \cdot \left(-eh\right)}{ew}\right)\right| \]
Alternative 6
Accuracy79.8%
Cost32768
\[\left|ew - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\tan t \cdot \left(-eh\right)}{ew}\right)\right| \]
Alternative 7
Accuracy79.8%
Cost26368
\[\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{t \cdot \left(-eh\right)}{ew}\right) - ew\right| \]
Alternative 8
Accuracy79.5%
Cost13120
\[\left|eh \cdot \sin t - ew\right| \]
Alternative 9
Accuracy79.5%
Cost13120
\[\left|ew + eh \cdot \sin t\right| \]
Alternative 10
Accuracy43.2%
Cost6464
\[\left|ew\right| \]

Error

Reproduce?

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