?

Average Accuracy: 99.8% → 99.8%
Time: 23.7s
Precision: binary64
Cost: 52608

?

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

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

    [Start]99.8

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

    cos-atan [=>]99.8

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

    associate-*r/ [=>]99.8

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

    *-commutative [<=]99.8

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

    associate-/l* [=>]99.7

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

    hypot-1-def [=>]99.7

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

    associate-/l/ [=>]99.7

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

    *-commutative [=>]99.7

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

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

    [Start]99.7

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

    associate-/r/ [=>]99.8

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

    *-commutative [=>]99.8

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

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

Alternatives

Alternative 1
Accuracy99.8%
Cost52480
\[\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \sin t \cdot \frac{ew}{\mathsf{hypot}\left(1, \frac{eh}{\tan t \cdot ew}\right)}\right| \]
Alternative 2
Accuracy99.0%
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
Accuracy99.0%
Cost46208
\[\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \frac{1}{\frac{\mathsf{hypot}\left(1, \frac{eh}{t \cdot ew}\right)}{ew \cdot \sin t}}\right| \]
Alternative 4
Accuracy98.9%
Cost46080
\[\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \frac{ew}{\frac{\mathsf{hypot}\left(1, \frac{eh}{t \cdot ew}\right)}{\sin t}}\right| \]
Alternative 5
Accuracy98.4%
Cost39232
\[\left|ew \cdot \sin t + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
Alternative 6
Accuracy96.5%
Cost33737
\[\begin{array}{l} t_1 := eh \cdot \cos t\\ t_2 := \frac{eh}{t \cdot ew}\\ t_3 := \frac{\sin t}{\frac{1}{ew}}\\ \mathbf{if}\;t \leq -2.45 \cdot 10^{+88} \lor \neg \left(t \leq 5.2 \cdot 10^{+89}\right):\\ \;\;\;\;\left|t_3 + t_1 \cdot \sin \tan^{-1} \left(t_2 + -0.3333333333333333 \cdot \frac{eh \cdot t}{ew}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|t_3 + t_1 \cdot \sin \tan^{-1} t_2\right|\\ \end{array} \]
Alternative 7
Accuracy89.8%
Cost33481
\[\begin{array}{l} t_1 := eh \cdot \cos t\\ \mathbf{if}\;ew \leq -1.25 \cdot 10^{-214} \lor \neg \left(ew \leq 1.75 \cdot 10^{-159}\right):\\ \;\;\;\;\left|\frac{\sin t}{\frac{1}{ew}} + t_1 \cdot \sin \tan^{-1} \left(\frac{eh}{t \cdot ew}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|t_1 \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \frac{t}{\frac{\frac{eh}{ew \cdot ew}}{t}}\right|\\ \end{array} \]
Alternative 8
Accuracy82.4%
Cost33097
\[\begin{array}{l} \mathbf{if}\;eh \leq -4 \cdot 10^{+43} \lor \neg \left(eh \leq 6 \cdot 10^{+93}\right):\\ \;\;\;\;\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + t \cdot ew\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\sin t}{\frac{1}{ew}} + eh \cdot \sin \tan^{-1} \left(\frac{eh}{\tan t \cdot ew}\right)\right|\\ \end{array} \]
Alternative 9
Accuracy65.9%
Cost32964
\[\begin{array}{l} t_1 := eh \cdot \cos t\\ \mathbf{if}\;t \leq -9.2 \cdot 10^{+86}:\\ \;\;\;\;\left|t_1 \cdot \sin \tan^{-1} \left(\frac{eh}{t \cdot ew} + -0.3333333333333333 \cdot \frac{eh \cdot t}{ew}\right) + \frac{t}{\frac{\frac{eh}{ew \cdot ew}}{t}}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|t_1 \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + t \cdot ew\right|\\ \end{array} \]
Alternative 10
Accuracy88.5%
Cost32960
\[\left|\frac{\sin t}{\frac{1}{ew}} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{t \cdot ew}\right)\right| \]
Alternative 11
Accuracy52.1%
Cost27593
\[\begin{array}{l} t_1 := \frac{eh}{t \cdot ew}\\ \mathbf{if}\;t \leq -0.000125 \lor \neg \left(t \leq 1.36 \cdot 10^{-6}\right):\\ \;\;\;\;\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(t_1 + -0.3333333333333333 \cdot \frac{eh \cdot t}{ew}\right) + \frac{t}{\frac{\frac{eh}{ew \cdot ew}}{t}}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{t \cdot ew}{t_1} + eh \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right|\\ \end{array} \]
Alternative 12
Accuracy45.2%
Cost27081
\[\begin{array}{l} t_1 := \frac{eh}{t \cdot ew}\\ \mathbf{if}\;ew \leq -2.2 \cdot 10^{+54} \lor \neg \left(ew \leq 6.2 \cdot 10^{+124}\right):\\ \;\;\;\;\left|\frac{t \cdot ew}{t_1} + eh \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} t_1 + \left(ew \cdot ew\right) \cdot \frac{t \cdot t}{eh}\right|\\ \end{array} \]
Alternative 13
Accuracy51.3%
Cost27081
\[\begin{array}{l} t_1 := \frac{eh}{t \cdot ew}\\ \mathbf{if}\;t \leq -2.4 \cdot 10^{-7} \lor \neg \left(t \leq 9.4 \cdot 10^{-7}\right):\\ \;\;\;\;\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} t_1 + \frac{t}{\frac{\frac{eh}{ew \cdot ew}}{t}}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{t \cdot ew}{t_1} + eh \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right|\\ \end{array} \]
Alternative 14
Accuracy39.2%
Cost26953
\[\begin{array}{l} t_1 := eh \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\\ \mathbf{if}\;ew \leq -3 \cdot 10^{+88} \lor \neg \left(ew \leq 1.25 \cdot 10^{+81}\right):\\ \;\;\;\;\left|t_1 + \frac{ew \cdot \left(ew \cdot \left(t \cdot t\right)\right)}{eh}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{t}{\frac{\frac{eh}{ew \cdot ew}}{t}} + t_1\right|\\ \end{array} \]
Alternative 15
Accuracy33.1%
Cost26688
\[\left|eh \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(ew \cdot ew\right) \cdot \frac{t \cdot t}{eh}\right| \]
Alternative 16
Accuracy35.0%
Cost26688
\[\left|eh \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \frac{t}{\frac{eh}{t \cdot \left(ew \cdot ew\right)}}\right| \]
Alternative 17
Accuracy39.4%
Cost26688
\[\left|\frac{t \cdot ew}{\frac{eh}{t \cdot ew}} + eh \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
Alternative 18
Accuracy33.1%
Cost20288
\[\left|\left(ew \cdot ew\right) \cdot \frac{t \cdot t}{eh} + eh \cdot \sin \tan^{-1} \left(\frac{eh}{t \cdot ew}\right)\right| \]

Error

Reproduce?

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