Example 2 from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 20.1s
Alternatives: 15
Speedup: N/A×

Specification

?
\[\begin{array}{l} \\ \begin{array}{l} t_1 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\ \left|\left(ew \cdot \cos t\right) \cdot \cos t_1 - \left(eh \cdot \sin t\right) \cdot \sin t_1\right| \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (atan (/ (* (- eh) (tan t)) ew))))
   (fabs (- (* (* ew (cos t)) (cos t_1)) (* (* eh (sin t)) (sin t_1))))))
double code(double eh, double ew, double t) {
	double t_1 = atan(((-eh * tan(t)) / ew));
	return fabs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))));
}
real(8) function code(eh, ew, t)
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    real(8) :: t_1
    t_1 = atan(((-eh * tan(t)) / ew))
    code = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))))
end function
public static double code(double eh, double ew, double t) {
	double t_1 = Math.atan(((-eh * Math.tan(t)) / ew));
	return Math.abs((((ew * Math.cos(t)) * Math.cos(t_1)) - ((eh * Math.sin(t)) * Math.sin(t_1))));
}
def code(eh, ew, t):
	t_1 = math.atan(((-eh * math.tan(t)) / ew))
	return math.fabs((((ew * math.cos(t)) * math.cos(t_1)) - ((eh * math.sin(t)) * math.sin(t_1))))
function code(eh, ew, t)
	t_1 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew))
	return abs(Float64(Float64(Float64(ew * cos(t)) * cos(t_1)) - Float64(Float64(eh * sin(t)) * sin(t_1))))
end
function tmp = code(eh, ew, t)
	t_1 = atan(((-eh * tan(t)) / ew));
	tmp = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))));
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
\left|\left(ew \cdot \cos t\right) \cdot \cos t_1 - \left(eh \cdot \sin t\right) \cdot \sin t_1\right|
\end{array}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 15 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\ \left|\left(ew \cdot \cos t\right) \cdot \cos t_1 - \left(eh \cdot \sin t\right) \cdot \sin t_1\right| \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (atan (/ (* (- eh) (tan t)) ew))))
   (fabs (- (* (* ew (cos t)) (cos t_1)) (* (* eh (sin t)) (sin t_1))))))
double code(double eh, double ew, double t) {
	double t_1 = atan(((-eh * tan(t)) / ew));
	return fabs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))));
}
real(8) function code(eh, ew, t)
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    real(8) :: t_1
    t_1 = atan(((-eh * tan(t)) / ew))
    code = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))))
end function
public static double code(double eh, double ew, double t) {
	double t_1 = Math.atan(((-eh * Math.tan(t)) / ew));
	return Math.abs((((ew * Math.cos(t)) * Math.cos(t_1)) - ((eh * Math.sin(t)) * Math.sin(t_1))));
}
def code(eh, ew, t):
	t_1 = math.atan(((-eh * math.tan(t)) / ew))
	return math.fabs((((ew * math.cos(t)) * math.cos(t_1)) - ((eh * math.sin(t)) * math.sin(t_1))))
function code(eh, ew, t)
	t_1 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew))
	return abs(Float64(Float64(Float64(ew * cos(t)) * cos(t_1)) - Float64(Float64(eh * sin(t)) * sin(t_1))))
end
function tmp = code(eh, ew, t)
	t_1 = atan(((-eh * tan(t)) / ew));
	tmp = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))));
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
\left|\left(ew \cdot \cos t\right) \cdot \cos t_1 - \left(eh \cdot \sin t\right) \cdot \sin t_1\right|
\end{array}
\end{array}

Alternative 1: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (fabs
  (-
   (* ew (* (cos t) (cos (atan (* (/ (tan t) ew) eh)))))
   (* eh (* (sin t) (sin (atan (/ (- eh) (/ ew (tan t))))))))))
double code(double eh, double ew, double t) {
	return fabs(((ew * (cos(t) * cos(atan(((tan(t) / ew) * eh))))) - (eh * (sin(t) * sin(atan((-eh / (ew / tan(t)))))))));
}
real(8) function code(eh, ew, t)
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    code = abs(((ew * (cos(t) * cos(atan(((tan(t) / ew) * eh))))) - (eh * (sin(t) * sin(atan((-eh / (ew / tan(t)))))))))
end function
public static double code(double eh, double ew, double t) {
	return Math.abs(((ew * (Math.cos(t) * Math.cos(Math.atan(((Math.tan(t) / ew) * eh))))) - (eh * (Math.sin(t) * Math.sin(Math.atan((-eh / (ew / Math.tan(t)))))))));
}
def code(eh, ew, t):
	return math.fabs(((ew * (math.cos(t) * math.cos(math.atan(((math.tan(t) / ew) * eh))))) - (eh * (math.sin(t) * math.sin(math.atan((-eh / (ew / math.tan(t)))))))))
function code(eh, ew, t)
	return abs(Float64(Float64(ew * Float64(cos(t) * cos(atan(Float64(Float64(tan(t) / ew) * eh))))) - Float64(eh * Float64(sin(t) * sin(atan(Float64(Float64(-eh) / Float64(ew / tan(t)))))))))
end
function tmp = code(eh, ew, t)
	tmp = abs(((ew * (cos(t) * cos(atan(((tan(t) / ew) * eh))))) - (eh * (sin(t) * sin(atan((-eh / (ew / tan(t)))))))));
end
code[eh_, ew_, t_] := N[Abs[N[(N[(ew * N[(N[Cos[t], $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[((-eh) / N[(ew / N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right|
\end{array}
Derivation
  1. Initial program 99.7%

    \[\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. Step-by-step derivation
    1. fabs-neg99.7%

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.7%

      \[\leadsto \left|\color{blue}{0 - \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)}\right| \]
    3. sub-neg99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right)}\right| \]
    4. +-commutative99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right) + \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
    5. associate--r+99.7%

      \[\leadsto \left|\color{blue}{\left(0 - \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right) - \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)}\right| \]
  3. Simplified99.7%

    \[\leadsto \color{blue}{\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right|} \]
  4. Step-by-step derivation
    1. clear-num99.7%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \color{blue}{\left(\frac{1}{\frac{\frac{ew}{\tan t}}{-eh}}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
    2. associate-/r/99.7%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \color{blue}{\left(\frac{1}{\frac{ew}{\tan t}} \cdot \left(-eh\right)\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
    3. clear-num99.7%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\color{blue}{\frac{\tan t}{ew}} \cdot \left(-eh\right)\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
    4. add-sqr-sqrt47.9%

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

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
    6. sqr-neg93.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot \sqrt{\color{blue}{eh \cdot eh}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
    7. sqrt-unprod51.8%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
    8. add-sqr-sqrt99.7%

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

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
  6. Final simplification99.7%

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

Alternative 2: 99.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (fabs
  (-
   (* ew (* (cos t) (/ 1.0 (hypot 1.0 (* (tan t) (/ eh ew))))))
   (* eh (* (sin t) (sin (atan (/ (- eh) (/ ew (tan t))))))))))
double code(double eh, double ew, double t) {
	return fabs(((ew * (cos(t) * (1.0 / hypot(1.0, (tan(t) * (eh / ew)))))) - (eh * (sin(t) * sin(atan((-eh / (ew / tan(t)))))))));
}
public static double code(double eh, double ew, double t) {
	return Math.abs(((ew * (Math.cos(t) * (1.0 / Math.hypot(1.0, (Math.tan(t) * (eh / ew)))))) - (eh * (Math.sin(t) * Math.sin(Math.atan((-eh / (ew / Math.tan(t)))))))));
}
def code(eh, ew, t):
	return math.fabs(((ew * (math.cos(t) * (1.0 / math.hypot(1.0, (math.tan(t) * (eh / ew)))))) - (eh * (math.sin(t) * math.sin(math.atan((-eh / (ew / math.tan(t)))))))))
function code(eh, ew, t)
	return abs(Float64(Float64(ew * Float64(cos(t) * Float64(1.0 / hypot(1.0, Float64(tan(t) * Float64(eh / ew)))))) - Float64(eh * Float64(sin(t) * sin(atan(Float64(Float64(-eh) / Float64(ew / tan(t)))))))))
end
function tmp = code(eh, ew, t)
	tmp = abs(((ew * (cos(t) * (1.0 / hypot(1.0, (tan(t) * (eh / ew)))))) - (eh * (sin(t) * sin(atan((-eh / (ew / tan(t)))))))));
end
code[eh_, ew_, t_] := N[Abs[N[(N[(ew * N[(N[Cos[t], $MachinePrecision] * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[((-eh) / N[(ew / N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right|
\end{array}
Derivation
  1. Initial program 99.7%

    \[\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. Step-by-step derivation
    1. fabs-neg99.7%

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.7%

      \[\leadsto \left|\color{blue}{0 - \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)}\right| \]
    3. sub-neg99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right)}\right| \]
    4. +-commutative99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right) + \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
    5. associate--r+99.7%

      \[\leadsto \left|\color{blue}{\left(0 - \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right) - \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)}\right| \]
  3. Simplified99.7%

    \[\leadsto \color{blue}{\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right|} \]
  4. Step-by-step derivation
    1. cos-atan64.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{-eh}{\frac{ew}{\tan t}} \cdot \frac{-eh}{\frac{ew}{\tan t}}}}}\right) - 0\right| \]
    2. hypot-1-def64.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \frac{-eh}{\frac{ew}{\tan t}}\right)}}\right) - 0\right| \]
    3. div-inv64.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{1}{\frac{ew}{\tan t}}}\right)}\right) - 0\right| \]
    4. add-sqr-sqrt30.8%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}\right) - 0\right| \]
    5. sqrt-unprod57.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}\right) - 0\right| \]
    6. sqr-neg57.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}\right) - 0\right| \]
    7. sqrt-unprod33.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}\right) - 0\right| \]
    8. add-sqr-sqrt64.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}\right) - 0\right| \]
    9. clear-num64.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, eh \cdot \color{blue}{\frac{\tan t}{ew}}\right)}\right) - 0\right| \]
  5. Applied egg-rr99.7%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
  6. Step-by-step derivation
    1. *-commutative99.7%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\frac{\tan t}{ew} \cdot eh}\right)}\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(eh \cdot \left(-\frac{\tan t}{ew}\right)\right)\right)\right| \]
    2. associate-*l/99.7%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\frac{\tan t \cdot eh}{ew}}\right)}\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(eh \cdot \left(-\frac{\tan t}{ew}\right)\right)\right)\right| \]
    3. associate-*r/99.7%

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

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

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

Alternative 3: 99.1% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(\left(-eh\right) \cdot \frac{t}{ew}\right)\right)\right| \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (fabs
  (-
   (* ew (* (cos t) (/ 1.0 (hypot 1.0 (* (tan t) (/ eh ew))))))
   (* (sin t) (* eh (sin (atan (* (- eh) (/ t ew)))))))))
double code(double eh, double ew, double t) {
	return fabs(((ew * (cos(t) * (1.0 / hypot(1.0, (tan(t) * (eh / ew)))))) - (sin(t) * (eh * sin(atan((-eh * (t / ew))))))));
}
public static double code(double eh, double ew, double t) {
	return Math.abs(((ew * (Math.cos(t) * (1.0 / Math.hypot(1.0, (Math.tan(t) * (eh / ew)))))) - (Math.sin(t) * (eh * Math.sin(Math.atan((-eh * (t / ew))))))));
}
def code(eh, ew, t):
	return math.fabs(((ew * (math.cos(t) * (1.0 / math.hypot(1.0, (math.tan(t) * (eh / ew)))))) - (math.sin(t) * (eh * math.sin(math.atan((-eh * (t / ew))))))))
function code(eh, ew, t)
	return abs(Float64(Float64(ew * Float64(cos(t) * Float64(1.0 / hypot(1.0, Float64(tan(t) * Float64(eh / ew)))))) - Float64(sin(t) * Float64(eh * sin(atan(Float64(Float64(-eh) * Float64(t / ew))))))))
end
function tmp = code(eh, ew, t)
	tmp = abs(((ew * (cos(t) * (1.0 / hypot(1.0, (tan(t) * (eh / ew)))))) - (sin(t) * (eh * sin(atan((-eh * (t / ew))))))));
end
code[eh_, ew_, t_] := N[Abs[N[(N[(ew * N[(N[Cos[t], $MachinePrecision] * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sin[t], $MachinePrecision] * N[(eh * N[Sin[N[ArcTan[N[((-eh) * N[(t / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(\left(-eh\right) \cdot \frac{t}{ew}\right)\right)\right|
\end{array}
Derivation
  1. Initial program 99.7%

    \[\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. Step-by-step derivation
    1. fabs-neg99.7%

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.7%

      \[\leadsto \left|\color{blue}{0 - \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)}\right| \]
    3. sub-neg99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right)}\right| \]
    4. +-commutative99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right) + \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
    5. associate--r+99.7%

      \[\leadsto \left|\color{blue}{\left(0 - \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right) - \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)}\right| \]
  3. Simplified99.7%

    \[\leadsto \color{blue}{\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right|} \]
  4. Taylor expanded in eh around 0 99.7%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\sin t \cdot \left(\sin \tan^{-1} \left(-1 \cdot \frac{\tan t \cdot eh}{ew}\right) \cdot eh\right)}\right| \]
  5. Step-by-step derivation
    1. *-commutative99.7%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \sin t \cdot \color{blue}{\left(eh \cdot \sin \tan^{-1} \left(-1 \cdot \frac{\tan t \cdot eh}{ew}\right)\right)}\right| \]
    2. mul-1-neg99.7%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \color{blue}{\left(-\frac{\tan t \cdot eh}{ew}\right)}\right)\right| \]
    3. associate-*l/99.7%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(-\color{blue}{\frac{\tan t}{ew} \cdot eh}\right)\right)\right| \]
    4. *-commutative99.7%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(-\color{blue}{eh \cdot \frac{\tan t}{ew}}\right)\right)\right| \]
    5. distribute-rgt-neg-in99.7%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \color{blue}{\left(eh \cdot \left(-\frac{\tan t}{ew}\right)\right)}\right)\right| \]
  6. Simplified99.7%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(eh \cdot \left(-\frac{\tan t}{ew}\right)\right)\right)}\right| \]
  7. Step-by-step derivation
    1. cos-atan64.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{-eh}{\frac{ew}{\tan t}} \cdot \frac{-eh}{\frac{ew}{\tan t}}}}}\right) - 0\right| \]
    2. hypot-1-def64.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \frac{-eh}{\frac{ew}{\tan t}}\right)}}\right) - 0\right| \]
    3. div-inv64.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{1}{\frac{ew}{\tan t}}}\right)}\right) - 0\right| \]
    4. add-sqr-sqrt30.8%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}\right) - 0\right| \]
    5. sqrt-unprod57.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}\right) - 0\right| \]
    6. sqr-neg57.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}\right) - 0\right| \]
    7. sqrt-unprod33.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}\right) - 0\right| \]
    8. add-sqr-sqrt64.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}\right) - 0\right| \]
    9. clear-num64.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, eh \cdot \color{blue}{\frac{\tan t}{ew}}\right)}\right) - 0\right| \]
  8. Applied egg-rr99.7%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}}\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(eh \cdot \left(-\frac{\tan t}{ew}\right)\right)\right)\right| \]
  9. Step-by-step derivation
    1. *-commutative99.7%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\frac{\tan t}{ew} \cdot eh}\right)}\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(eh \cdot \left(-\frac{\tan t}{ew}\right)\right)\right)\right| \]
    2. associate-*l/99.7%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\frac{\tan t \cdot eh}{ew}}\right)}\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(eh \cdot \left(-\frac{\tan t}{ew}\right)\right)\right)\right| \]
    3. associate-*r/99.7%

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

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}}\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(eh \cdot \left(-\frac{\tan t}{ew}\right)\right)\right)\right| \]
  11. Taylor expanded in t around 0 98.9%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(eh \cdot \left(-\color{blue}{\frac{t}{ew}}\right)\right)\right)\right| \]
  12. Final simplification98.9%

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

Alternative 4: 98.5% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \left|\sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right)\right) - ew \cdot \cos t\right| \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (fabs
  (-
   (* (sin t) (* eh (sin (atan (* (/ (tan t) ew) (- eh))))))
   (* ew (cos t)))))
double code(double eh, double ew, double t) {
	return fabs(((sin(t) * (eh * sin(atan(((tan(t) / ew) * -eh))))) - (ew * cos(t))));
}
real(8) function code(eh, ew, t)
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    code = abs(((sin(t) * (eh * sin(atan(((tan(t) / ew) * -eh))))) - (ew * cos(t))))
end function
public static double code(double eh, double ew, double t) {
	return Math.abs(((Math.sin(t) * (eh * Math.sin(Math.atan(((Math.tan(t) / ew) * -eh))))) - (ew * Math.cos(t))));
}
def code(eh, ew, t):
	return math.fabs(((math.sin(t) * (eh * math.sin(math.atan(((math.tan(t) / ew) * -eh))))) - (ew * math.cos(t))))
function code(eh, ew, t)
	return abs(Float64(Float64(sin(t) * Float64(eh * sin(atan(Float64(Float64(tan(t) / ew) * Float64(-eh)))))) - Float64(ew * cos(t))))
end
function tmp = code(eh, ew, t)
	tmp = abs(((sin(t) * (eh * sin(atan(((tan(t) / ew) * -eh))))) - (ew * cos(t))));
end
code[eh_, ew_, t_] := N[Abs[N[(N[(N[Sin[t], $MachinePrecision] * N[(eh * N[Sin[N[ArcTan[N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * (-eh)), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\left|\sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right)\right) - ew \cdot \cos t\right|
\end{array}
Derivation
  1. Initial program 99.7%

    \[\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. Step-by-step derivation
    1. fabs-neg99.7%

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.7%

      \[\leadsto \left|\color{blue}{0 - \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)}\right| \]
    3. sub-neg99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right)}\right| \]
    4. +-commutative99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right) + \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
    5. associate--r+99.7%

      \[\leadsto \left|\color{blue}{\left(0 - \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right) - \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)}\right| \]
  3. Simplified99.7%

    \[\leadsto \color{blue}{\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right|} \]
  4. Taylor expanded in eh around 0 99.7%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\sin t \cdot \left(\sin \tan^{-1} \left(-1 \cdot \frac{\tan t \cdot eh}{ew}\right) \cdot eh\right)}\right| \]
  5. Step-by-step derivation
    1. *-commutative99.7%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \sin t \cdot \color{blue}{\left(eh \cdot \sin \tan^{-1} \left(-1 \cdot \frac{\tan t \cdot eh}{ew}\right)\right)}\right| \]
    2. mul-1-neg99.7%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \color{blue}{\left(-\frac{\tan t \cdot eh}{ew}\right)}\right)\right| \]
    3. associate-*l/99.7%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(-\color{blue}{\frac{\tan t}{ew} \cdot eh}\right)\right)\right| \]
    4. *-commutative99.7%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(-\color{blue}{eh \cdot \frac{\tan t}{ew}}\right)\right)\right| \]
    5. distribute-rgt-neg-in99.7%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \color{blue}{\left(eh \cdot \left(-\frac{\tan t}{ew}\right)\right)}\right)\right| \]
  6. Simplified99.7%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(eh \cdot \left(-\frac{\tan t}{ew}\right)\right)\right)}\right| \]
  7. Step-by-step derivation
    1. cos-atan64.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{-eh}{\frac{ew}{\tan t}} \cdot \frac{-eh}{\frac{ew}{\tan t}}}}}\right) - 0\right| \]
    2. hypot-1-def64.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \frac{-eh}{\frac{ew}{\tan t}}\right)}}\right) - 0\right| \]
    3. div-inv64.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{1}{\frac{ew}{\tan t}}}\right)}\right) - 0\right| \]
    4. add-sqr-sqrt30.8%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}\right) - 0\right| \]
    5. sqrt-unprod57.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}\right) - 0\right| \]
    6. sqr-neg57.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}\right) - 0\right| \]
    7. sqrt-unprod33.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}\right) - 0\right| \]
    8. add-sqr-sqrt64.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}\right) - 0\right| \]
    9. clear-num64.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, eh \cdot \color{blue}{\frac{\tan t}{ew}}\right)}\right) - 0\right| \]
  8. Applied egg-rr99.7%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}}\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(eh \cdot \left(-\frac{\tan t}{ew}\right)\right)\right)\right| \]
  9. Step-by-step derivation
    1. *-commutative99.7%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\frac{\tan t}{ew} \cdot eh}\right)}\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(eh \cdot \left(-\frac{\tan t}{ew}\right)\right)\right)\right| \]
    2. associate-*l/99.7%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\frac{\tan t \cdot eh}{ew}}\right)}\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(eh \cdot \left(-\frac{\tan t}{ew}\right)\right)\right)\right| \]
    3. associate-*r/99.7%

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

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}}\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(eh \cdot \left(-\frac{\tan t}{ew}\right)\right)\right)\right| \]
  11. Taylor expanded in t around 0 97.9%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \color{blue}{1}\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(eh \cdot \left(-\frac{\tan t}{ew}\right)\right)\right)\right| \]
  12. Final simplification97.9%

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

Alternative 5: 90.0% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - eh \cdot \sin t\right| \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (fabs (- (* ew (* (cos t) (cos (atan (/ (- t) (/ ew eh)))))) (* eh (sin t)))))
double code(double eh, double ew, double t) {
	return fabs(((ew * (cos(t) * cos(atan((-t / (ew / eh)))))) - (eh * sin(t))));
}
real(8) function code(eh, ew, t)
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    code = abs(((ew * (cos(t) * cos(atan((-t / (ew / eh)))))) - (eh * sin(t))))
end function
public static double code(double eh, double ew, double t) {
	return Math.abs(((ew * (Math.cos(t) * Math.cos(Math.atan((-t / (ew / eh)))))) - (eh * Math.sin(t))));
}
def code(eh, ew, t):
	return math.fabs(((ew * (math.cos(t) * math.cos(math.atan((-t / (ew / eh)))))) - (eh * math.sin(t))))
function code(eh, ew, t)
	return abs(Float64(Float64(ew * Float64(cos(t) * cos(atan(Float64(Float64(-t) / Float64(ew / eh)))))) - Float64(eh * sin(t))))
end
function tmp = code(eh, ew, t)
	tmp = abs(((ew * (cos(t) * cos(atan((-t / (ew / eh)))))) - (eh * sin(t))));
end
code[eh_, ew_, t_] := N[Abs[N[(N[(ew * N[(N[Cos[t], $MachinePrecision] * N[Cos[N[ArcTan[N[((-t) / N[(ew / eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - eh \cdot \sin t\right|
\end{array}
Derivation
  1. Initial program 99.7%

    \[\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. Step-by-step derivation
    1. fabs-neg99.7%

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.7%

      \[\leadsto \left|\color{blue}{0 - \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)}\right| \]
    3. sub-neg99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right)}\right| \]
    4. +-commutative99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right) + \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
    5. associate--r+99.7%

      \[\leadsto \left|\color{blue}{\left(0 - \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right) - \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)}\right| \]
  3. Simplified99.7%

    \[\leadsto \color{blue}{\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right|} \]
  4. Taylor expanded in t around 0 88.8%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \color{blue}{\left(-1 \cdot \frac{t \cdot eh}{ew}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
  5. Step-by-step derivation
    1. mul-1-neg88.8%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \color{blue}{\left(-\frac{t \cdot eh}{ew}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
    2. associate-/l*88.8%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(-\color{blue}{\frac{t}{\frac{ew}{eh}}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
    3. distribute-neg-frac88.8%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \color{blue}{\left(\frac{-t}{\frac{ew}{eh}}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
  6. Simplified88.8%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \color{blue}{\left(\frac{-t}{\frac{ew}{eh}}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
  7. Step-by-step derivation
    1. associate-*r*88.8%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)}\right| \]
    2. sin-atan72.7%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \left(eh \cdot \sin t\right) \cdot \color{blue}{\frac{\frac{-eh}{\frac{ew}{\tan t}}}{\sqrt{1 + \frac{-eh}{\frac{ew}{\tan t}} \cdot \frac{-eh}{\frac{ew}{\tan t}}}}}\right| \]
    3. associate-*r/70.1%

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

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

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

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

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

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{\left(eh \cdot \sin t\right) \cdot \left(\color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}{\sqrt{1 + \frac{-eh}{\frac{ew}{\tan t}} \cdot \frac{-eh}{\frac{ew}{\tan t}}}}\right| \]
    9. add-sqr-sqrt69.6%

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

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

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{\left(eh \cdot \sin t\right) \cdot \left(eh \cdot \frac{\tan t}{ew}\right)}{\color{blue}{\mathsf{hypot}\left(1, \frac{-eh}{\frac{ew}{\tan t}}\right)}}\right| \]
    12. div-inv73.6%

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

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\frac{\left(eh \cdot \sin t\right) \cdot \left(eh \cdot \frac{\tan t}{ew}\right)}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}}\right| \]
  9. Step-by-step derivation
    1. associate-/l*80.5%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\frac{eh \cdot \sin t}{\frac{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}{eh \cdot \frac{\tan t}{ew}}}}\right| \]
    2. associate-/r/80.5%

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

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \color{blue}{\frac{\tan t}{ew} \cdot eh}\right)} \cdot \left(eh \cdot \frac{\tan t}{ew}\right)\right| \]
    4. associate-*l/80.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \color{blue}{\frac{\tan t \cdot eh}{ew}}\right)} \cdot \left(eh \cdot \frac{\tan t}{ew}\right)\right| \]
    5. associate-*r/77.1%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \color{blue}{\tan t \cdot \frac{eh}{ew}}\right)} \cdot \left(eh \cdot \frac{\tan t}{ew}\right)\right| \]
    6. *-commutative77.1%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} \cdot \color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)}\right| \]
    7. associate-*l/77.1%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} \cdot \color{blue}{\frac{\tan t \cdot eh}{ew}}\right| \]
    8. associate-*r/77.0%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} \cdot \color{blue}{\left(\tan t \cdot \frac{eh}{ew}\right)}\right| \]
  10. Simplified77.0%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} \cdot \left(\tan t \cdot \frac{eh}{ew}\right)}\right| \]
  11. Taylor expanded in eh around inf 88.2%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\sin t \cdot eh}\right| \]
  12. Final simplification88.2%

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

Alternative 6: 90.0% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) + eh \cdot \sin t\right| \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (fabs (+ (* ew (* (cos t) (cos (atan (/ (- t) (/ ew eh)))))) (* eh (sin t)))))
double code(double eh, double ew, double t) {
	return fabs(((ew * (cos(t) * cos(atan((-t / (ew / eh)))))) + (eh * sin(t))));
}
real(8) function code(eh, ew, t)
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    code = abs(((ew * (cos(t) * cos(atan((-t / (ew / eh)))))) + (eh * sin(t))))
end function
public static double code(double eh, double ew, double t) {
	return Math.abs(((ew * (Math.cos(t) * Math.cos(Math.atan((-t / (ew / eh)))))) + (eh * Math.sin(t))));
}
def code(eh, ew, t):
	return math.fabs(((ew * (math.cos(t) * math.cos(math.atan((-t / (ew / eh)))))) + (eh * math.sin(t))))
function code(eh, ew, t)
	return abs(Float64(Float64(ew * Float64(cos(t) * cos(atan(Float64(Float64(-t) / Float64(ew / eh)))))) + Float64(eh * sin(t))))
end
function tmp = code(eh, ew, t)
	tmp = abs(((ew * (cos(t) * cos(atan((-t / (ew / eh)))))) + (eh * sin(t))));
end
code[eh_, ew_, t_] := N[Abs[N[(N[(ew * N[(N[Cos[t], $MachinePrecision] * N[Cos[N[ArcTan[N[((-t) / N[(ew / eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) + eh \cdot \sin t\right|
\end{array}
Derivation
  1. Initial program 99.7%

    \[\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. Step-by-step derivation
    1. fabs-neg99.7%

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.7%

      \[\leadsto \left|\color{blue}{0 - \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)}\right| \]
    3. sub-neg99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right)}\right| \]
    4. +-commutative99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right) + \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
    5. associate--r+99.7%

      \[\leadsto \left|\color{blue}{\left(0 - \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right) - \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)}\right| \]
  3. Simplified99.7%

    \[\leadsto \color{blue}{\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right|} \]
  4. Taylor expanded in t around 0 88.8%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \color{blue}{\left(-1 \cdot \frac{t \cdot eh}{ew}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
  5. Step-by-step derivation
    1. mul-1-neg88.8%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \color{blue}{\left(-\frac{t \cdot eh}{ew}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
    2. associate-/l*88.8%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(-\color{blue}{\frac{t}{\frac{ew}{eh}}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
    3. distribute-neg-frac88.8%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \color{blue}{\left(\frac{-t}{\frac{ew}{eh}}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
  6. Simplified88.8%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \color{blue}{\left(\frac{-t}{\frac{ew}{eh}}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
  7. Step-by-step derivation
    1. associate-*r*88.8%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)}\right| \]
    2. sin-atan72.7%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \left(eh \cdot \sin t\right) \cdot \color{blue}{\frac{\frac{-eh}{\frac{ew}{\tan t}}}{\sqrt{1 + \frac{-eh}{\frac{ew}{\tan t}} \cdot \frac{-eh}{\frac{ew}{\tan t}}}}}\right| \]
    3. associate-*r/70.1%

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

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

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

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

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

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{\left(eh \cdot \sin t\right) \cdot \left(\color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}{\sqrt{1 + \frac{-eh}{\frac{ew}{\tan t}} \cdot \frac{-eh}{\frac{ew}{\tan t}}}}\right| \]
    9. add-sqr-sqrt69.6%

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

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

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{\left(eh \cdot \sin t\right) \cdot \left(eh \cdot \frac{\tan t}{ew}\right)}{\color{blue}{\mathsf{hypot}\left(1, \frac{-eh}{\frac{ew}{\tan t}}\right)}}\right| \]
    12. div-inv73.6%

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

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\frac{\left(eh \cdot \sin t\right) \cdot \left(eh \cdot \frac{\tan t}{ew}\right)}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}}\right| \]
  9. Step-by-step derivation
    1. associate-/l*80.5%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\frac{eh \cdot \sin t}{\frac{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}{eh \cdot \frac{\tan t}{ew}}}}\right| \]
    2. associate-/r/80.5%

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

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \color{blue}{\frac{\tan t}{ew} \cdot eh}\right)} \cdot \left(eh \cdot \frac{\tan t}{ew}\right)\right| \]
    4. associate-*l/80.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \color{blue}{\frac{\tan t \cdot eh}{ew}}\right)} \cdot \left(eh \cdot \frac{\tan t}{ew}\right)\right| \]
    5. associate-*r/77.1%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \color{blue}{\tan t \cdot \frac{eh}{ew}}\right)} \cdot \left(eh \cdot \frac{\tan t}{ew}\right)\right| \]
    6. *-commutative77.1%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} \cdot \color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)}\right| \]
    7. associate-*l/77.1%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} \cdot \color{blue}{\frac{\tan t \cdot eh}{ew}}\right| \]
    8. associate-*r/77.0%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} \cdot \color{blue}{\left(\tan t \cdot \frac{eh}{ew}\right)}\right| \]
  10. Simplified77.0%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} \cdot \left(\tan t \cdot \frac{eh}{ew}\right)}\right| \]
  11. Taylor expanded in eh around -inf 88.2%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{-1 \cdot \left(\sin t \cdot eh\right)}\right| \]
  12. Step-by-step derivation
    1. mul-1-neg88.2%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\left(-\sin t \cdot eh\right)}\right| \]
    2. *-commutative88.2%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \left(-\color{blue}{eh \cdot \sin t}\right)\right| \]
    3. distribute-lft-neg-in88.2%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\left(-eh\right) \cdot \sin t}\right| \]
  13. Simplified88.2%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\left(-eh\right) \cdot \sin t}\right| \]
  14. Final simplification88.2%

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

Alternative 7: 61.7% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{-0.3333333333333333 \cdot \left(ew \cdot t\right) + \frac{ew}{t}}\right)\right)\right| \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (fabs
  (*
   ew
   (*
    (cos t)
    (cos (atan (/ (- eh) (+ (* -0.3333333333333333 (* ew t)) (/ ew t)))))))))
double code(double eh, double ew, double t) {
	return fabs((ew * (cos(t) * cos(atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t))))))));
}
real(8) function code(eh, ew, t)
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    code = abs((ew * (cos(t) * cos(atan((-eh / (((-0.3333333333333333d0) * (ew * t)) + (ew / t))))))))
end function
public static double code(double eh, double ew, double t) {
	return Math.abs((ew * (Math.cos(t) * Math.cos(Math.atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t))))))));
}
def code(eh, ew, t):
	return math.fabs((ew * (math.cos(t) * math.cos(math.atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t))))))))
function code(eh, ew, t)
	return abs(Float64(ew * Float64(cos(t) * cos(atan(Float64(Float64(-eh) / Float64(Float64(-0.3333333333333333 * Float64(ew * t)) + Float64(ew / t))))))))
end
function tmp = code(eh, ew, t)
	tmp = abs((ew * (cos(t) * cos(atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t))))))));
end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[(N[Cos[t], $MachinePrecision] * N[Cos[N[ArcTan[N[((-eh) / N[(N[(-0.3333333333333333 * N[(ew * t), $MachinePrecision]), $MachinePrecision] + N[(ew / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{-0.3333333333333333 \cdot \left(ew \cdot t\right) + \frac{ew}{t}}\right)\right)\right|
\end{array}
Derivation
  1. Initial program 99.7%

    \[\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. Step-by-step derivation
    1. fabs-neg99.7%

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.7%

      \[\leadsto \left|\color{blue}{0 - \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)}\right| \]
    3. sub-neg99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right)}\right| \]
    4. +-commutative99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right) + \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
    5. associate--r+99.7%

      \[\leadsto \left|\color{blue}{\left(0 - \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right) - \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)}\right| \]
  3. Simplified99.7%

    \[\leadsto \color{blue}{\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right|} \]
  4. Step-by-step derivation
    1. sin-mult66.1%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \color{blue}{\frac{\cos \left(t - \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \cos \left(t + \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)}{2}}\right| \]
    2. associate-*r/66.1%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{eh \cdot \left(\cos \left(t - \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \cos \left(t + \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right)}{2}}\right| \]
  5. Applied egg-rr64.6%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{eh \cdot \left(\cos \left(t + \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right) - \cos \left(t + \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right)\right)}{2}}\right| \]
  6. Step-by-step derivation
    1. +-inverses64.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \frac{eh \cdot \color{blue}{0}}{2}\right| \]
    2. *-commutative64.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \frac{\color{blue}{0 \cdot eh}}{2}\right| \]
    3. associate-/l*64.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{0}{\frac{2}{eh}}}\right| \]
    4. div064.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{0}\right| \]
  7. Simplified64.6%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{0}\right| \]
  8. Taylor expanded in t around 0 64.7%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\color{blue}{-0.3333333333333333 \cdot \left(t \cdot ew\right) + \frac{ew}{t}}}\right)\right) - 0\right| \]
  9. Final simplification64.7%

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

Alternative 8: 46.4% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -2.7 \cdot 10^{-32} \lor \neg \left(eh \leq 4.5 \cdot 10^{+55}\right):\\ \;\;\;\;\left|ew\right| \cdot \left|\frac{1}{\mathsf{hypot}\left(1, \frac{\tan t}{ew} \cdot eh\right)}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{t \cdot t}{\frac{ew}{eh \cdot eh}} + ew \cdot \left(\cos t \cdot \frac{-1}{\mathsf{hypot}\left(1, \frac{-t}{\frac{ew}{eh}}\right)}\right)\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (if (or (<= eh -2.7e-32) (not (<= eh 4.5e+55)))
   (* (fabs ew) (fabs (/ 1.0 (hypot 1.0 (* (/ (tan t) ew) eh)))))
   (fabs
    (+
     (/ (* t t) (/ ew (* eh eh)))
     (* ew (* (cos t) (/ -1.0 (hypot 1.0 (/ (- t) (/ ew eh))))))))))
double code(double eh, double ew, double t) {
	double tmp;
	if ((eh <= -2.7e-32) || !(eh <= 4.5e+55)) {
		tmp = fabs(ew) * fabs((1.0 / hypot(1.0, ((tan(t) / ew) * eh))));
	} else {
		tmp = fabs((((t * t) / (ew / (eh * eh))) + (ew * (cos(t) * (-1.0 / hypot(1.0, (-t / (ew / eh))))))));
	}
	return tmp;
}
public static double code(double eh, double ew, double t) {
	double tmp;
	if ((eh <= -2.7e-32) || !(eh <= 4.5e+55)) {
		tmp = Math.abs(ew) * Math.abs((1.0 / Math.hypot(1.0, ((Math.tan(t) / ew) * eh))));
	} else {
		tmp = Math.abs((((t * t) / (ew / (eh * eh))) + (ew * (Math.cos(t) * (-1.0 / Math.hypot(1.0, (-t / (ew / eh))))))));
	}
	return tmp;
}
def code(eh, ew, t):
	tmp = 0
	if (eh <= -2.7e-32) or not (eh <= 4.5e+55):
		tmp = math.fabs(ew) * math.fabs((1.0 / math.hypot(1.0, ((math.tan(t) / ew) * eh))))
	else:
		tmp = math.fabs((((t * t) / (ew / (eh * eh))) + (ew * (math.cos(t) * (-1.0 / math.hypot(1.0, (-t / (ew / eh))))))))
	return tmp
function code(eh, ew, t)
	tmp = 0.0
	if ((eh <= -2.7e-32) || !(eh <= 4.5e+55))
		tmp = Float64(abs(ew) * abs(Float64(1.0 / hypot(1.0, Float64(Float64(tan(t) / ew) * eh)))));
	else
		tmp = abs(Float64(Float64(Float64(t * t) / Float64(ew / Float64(eh * eh))) + Float64(ew * Float64(cos(t) * Float64(-1.0 / hypot(1.0, Float64(Float64(-t) / Float64(ew / eh))))))));
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	tmp = 0.0;
	if ((eh <= -2.7e-32) || ~((eh <= 4.5e+55)))
		tmp = abs(ew) * abs((1.0 / hypot(1.0, ((tan(t) / ew) * eh))));
	else
		tmp = abs((((t * t) / (ew / (eh * eh))) + (ew * (cos(t) * (-1.0 / hypot(1.0, (-t / (ew / eh))))))));
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -2.7e-32], N[Not[LessEqual[eh, 4.5e+55]], $MachinePrecision]], N[(N[Abs[ew], $MachinePrecision] * N[Abs[N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Abs[N[(N[(N[(t * t), $MachinePrecision] / N[(ew / N[(eh * eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(ew * N[(N[Cos[t], $MachinePrecision] * N[(-1.0 / N[Sqrt[1.0 ^ 2 + N[((-t) / N[(ew / eh), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;eh \leq -2.7 \cdot 10^{-32} \lor \neg \left(eh \leq 4.5 \cdot 10^{+55}\right):\\
\;\;\;\;\left|ew\right| \cdot \left|\frac{1}{\mathsf{hypot}\left(1, \frac{\tan t}{ew} \cdot eh\right)}\right|\\

\mathbf{else}:\\
\;\;\;\;\left|\frac{t \cdot t}{\frac{ew}{eh \cdot eh}} + ew \cdot \left(\cos t \cdot \frac{-1}{\mathsf{hypot}\left(1, \frac{-t}{\frac{ew}{eh}}\right)}\right)\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if eh < -2.69999999999999981e-32 or 4.49999999999999998e55 < eh

    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. Step-by-step derivation
      1. fabs-neg99.8%

        \[\leadsto \color{blue}{\left|-\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)\right|} \]
      2. sub0-neg99.8%

        \[\leadsto \left|\color{blue}{0 - \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)}\right| \]
      3. sub-neg99.8%

        \[\leadsto \left|0 - \color{blue}{\left(\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right)}\right| \]
      4. +-commutative99.8%

        \[\leadsto \left|0 - \color{blue}{\left(\left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right) + \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
      5. associate--r+99.8%

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

      \[\leadsto \color{blue}{\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right|} \]
    4. Step-by-step derivation
      1. sin-mult45.4%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \color{blue}{\frac{\cos \left(t - \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \cos \left(t + \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)}{2}}\right| \]
      2. associate-*r/45.4%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{eh \cdot \left(\cos \left(t - \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \cos \left(t + \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right)}{2}}\right| \]
    5. Applied egg-rr42.3%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{eh \cdot \left(\cos \left(t + \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right) - \cos \left(t + \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right)\right)}{2}}\right| \]
    6. Step-by-step derivation
      1. +-inverses42.3%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \frac{eh \cdot \color{blue}{0}}{2}\right| \]
      2. *-commutative42.3%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \frac{\color{blue}{0 \cdot eh}}{2}\right| \]
      3. associate-/l*42.3%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{0}{\frac{2}{eh}}}\right| \]
      4. div042.3%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{0}\right| \]
    7. Simplified42.3%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{0}\right| \]
    8. Taylor expanded in t around 0 32.1%

      \[\leadsto \left|\color{blue}{\cos \tan^{-1} \left(-1 \cdot \frac{\tan t \cdot eh}{ew}\right) \cdot ew} - 0\right| \]
    9. Step-by-step derivation
      1. *-commutative32.1%

        \[\leadsto \left|\color{blue}{ew \cdot \cos \tan^{-1} \left(-1 \cdot \frac{\tan t \cdot eh}{ew}\right)} - 0\right| \]
      2. *-commutative32.1%

        \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(-1 \cdot \frac{\color{blue}{eh \cdot \tan t}}{ew}\right) - 0\right| \]
      3. associate-*r/32.1%

        \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(-1 \cdot \color{blue}{\left(eh \cdot \frac{\tan t}{ew}\right)}\right) - 0\right| \]
      4. associate-*l*32.1%

        \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(\left(-1 \cdot eh\right) \cdot \frac{\tan t}{ew}\right)} - 0\right| \]
      5. neg-mul-132.1%

        \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(\color{blue}{\left(-eh\right)} \cdot \frac{\tan t}{ew}\right) - 0\right| \]
      6. *-commutative32.1%

        \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right)} - 0\right| \]
      7. associate-*l/32.1%

        \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(\frac{\tan t \cdot \left(-eh\right)}{ew}\right)} - 0\right| \]
      8. distribute-rgt-neg-in32.1%

        \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(\frac{\color{blue}{-\tan t \cdot eh}}{ew}\right) - 0\right| \]
    10. Simplified32.1%

      \[\leadsto \left|\color{blue}{ew \cdot \cos \tan^{-1} \left(\frac{-\tan t \cdot eh}{ew}\right)} - 0\right| \]
    11. Step-by-step derivation
      1. distribute-frac-neg32.1%

        \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(-\frac{\tan t \cdot eh}{ew}\right)} - 0\right| \]
      2. *-commutative32.1%

        \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(-\frac{\color{blue}{eh \cdot \tan t}}{ew}\right) - 0\right| \]
      3. associate-*r/32.1%

        \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(-\color{blue}{eh \cdot \frac{\tan t}{ew}}\right) - 0\right| \]
      4. distribute-lft-neg-out32.1%

        \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right)} - 0\right| \]
      5. cos-atan31.5%

        \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\sqrt{1 + \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) \cdot \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right)}}} - 0\right| \]
      6. hypot-1-def31.6%

        \[\leadsto \left|ew \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \left(-eh\right) \cdot \frac{\tan t}{ew}\right)}} - 0\right| \]
      7. add-sqr-sqrt20.9%

        \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\tan t}{ew}\right)} - 0\right| \]
      8. sqrt-unprod20.3%

        \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\tan t}{ew}\right)} - 0\right| \]
      9. sqr-neg20.3%

        \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\tan t}{ew}\right)} - 0\right| \]
      10. sqrt-unprod10.7%

        \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\tan t}{ew}\right)} - 0\right| \]
      11. add-sqr-sqrt31.6%

        \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\tan t}{ew}\right)} - 0\right| \]
      12. associate-*r/31.6%

        \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\frac{eh \cdot \tan t}{ew}}\right)} - 0\right| \]
      13. *-commutative31.6%

        \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \frac{\color{blue}{\tan t \cdot eh}}{ew}\right)} - 0\right| \]
      14. associate-*r/31.6%

        \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\tan t \cdot \frac{eh}{ew}}\right)} - 0\right| \]
      15. frac-2neg31.6%

        \[\leadsto \left|ew \cdot \color{blue}{\frac{-1}{-\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} - 0\right| \]
      16. metadata-eval31.6%

        \[\leadsto \left|ew \cdot \frac{\color{blue}{-1}}{-\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} - 0\right| \]
    12. Applied egg-rr31.6%

      \[\leadsto \left|ew \cdot \color{blue}{\frac{-1}{-\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} - 0\right| \]
    13. Step-by-step derivation
      1. /-rgt-identity31.6%

        \[\leadsto \left|ew \cdot \frac{-1}{-\color{blue}{\frac{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}{1}}} - 0\right| \]
      2. /-rgt-identity31.6%

        \[\leadsto \left|ew \cdot \frac{-1}{-\color{blue}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} - 0\right| \]
      3. *-commutative31.6%

        \[\leadsto \left|ew \cdot \frac{-1}{-\mathsf{hypot}\left(1, \color{blue}{\frac{eh}{ew} \cdot \tan t}\right)} - 0\right| \]
      4. associate-*l/31.6%

        \[\leadsto \left|ew \cdot \frac{-1}{-\mathsf{hypot}\left(1, \color{blue}{\frac{eh \cdot \tan t}{ew}}\right)} - 0\right| \]
      5. associate-*r/31.6%

        \[\leadsto \left|ew \cdot \frac{-1}{-\mathsf{hypot}\left(1, \color{blue}{eh \cdot \frac{\tan t}{ew}}\right)} - 0\right| \]
    14. Simplified31.6%

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

    if -2.69999999999999981e-32 < eh < 4.49999999999999998e55

    1. Initial program 99.7%

      \[\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. Step-by-step derivation
      1. fabs-neg99.7%

        \[\leadsto \color{blue}{\left|-\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)\right|} \]
      2. sub0-neg99.7%

        \[\leadsto \left|\color{blue}{0 - \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)}\right| \]
      3. sub-neg99.7%

        \[\leadsto \left|0 - \color{blue}{\left(\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right)}\right| \]
      4. +-commutative99.7%

        \[\leadsto \left|0 - \color{blue}{\left(\left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right) + \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
      5. associate--r+99.7%

        \[\leadsto \left|\color{blue}{\left(0 - \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right) - \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)}\right| \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right|} \]
    4. Taylor expanded in t around 0 88.5%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \color{blue}{\left(-1 \cdot \frac{t \cdot eh}{ew}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
    5. Step-by-step derivation
      1. mul-1-neg88.5%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \color{blue}{\left(-\frac{t \cdot eh}{ew}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
      2. associate-/l*88.5%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(-\color{blue}{\frac{t}{\frac{ew}{eh}}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
      3. distribute-neg-frac88.5%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \color{blue}{\left(\frac{-t}{\frac{ew}{eh}}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
    6. Simplified88.5%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \color{blue}{\left(\frac{-t}{\frac{ew}{eh}}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
    7. Step-by-step derivation
      1. associate-*r*88.4%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)}\right| \]
      2. sin-atan85.6%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \left(eh \cdot \sin t\right) \cdot \color{blue}{\frac{\frac{-eh}{\frac{ew}{\tan t}}}{\sqrt{1 + \frac{-eh}{\frac{ew}{\tan t}} \cdot \frac{-eh}{\frac{ew}{\tan t}}}}}\right| \]
      3. associate-*r/85.6%

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

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

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

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{\left(eh \cdot \sin t\right) \cdot \left(\color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}{\sqrt{1 + \frac{-eh}{\frac{ew}{\tan t}} \cdot \frac{-eh}{\frac{ew}{\tan t}}}}\right| \]
      7. sqr-neg82.8%

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

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

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{\left(eh \cdot \sin t\right) \cdot \left(\color{blue}{eh} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}{\sqrt{1 + \frac{-eh}{\frac{ew}{\tan t}} \cdot \frac{-eh}{\frac{ew}{\tan t}}}}\right| \]
      10. clear-num85.0%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{\left(eh \cdot \sin t\right) \cdot \left(eh \cdot \color{blue}{\frac{\tan t}{ew}}\right)}{\sqrt{1 + \frac{-eh}{\frac{ew}{\tan t}} \cdot \frac{-eh}{\frac{ew}{\tan t}}}}\right| \]
      11. hypot-1-def87.8%

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

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

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\frac{\left(eh \cdot \sin t\right) \cdot \left(eh \cdot \frac{\tan t}{ew}\right)}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}}\right| \]
    9. Step-by-step derivation
      1. associate-/l*87.8%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\frac{eh \cdot \sin t}{\frac{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}{eh \cdot \frac{\tan t}{ew}}}}\right| \]
      2. associate-/r/87.8%

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

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \color{blue}{\frac{\tan t}{ew} \cdot eh}\right)} \cdot \left(eh \cdot \frac{\tan t}{ew}\right)\right| \]
      4. associate-*l/87.8%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \color{blue}{\frac{\tan t \cdot eh}{ew}}\right)} \cdot \left(eh \cdot \frac{\tan t}{ew}\right)\right| \]
      5. associate-*r/87.8%

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

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} \cdot \color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)}\right| \]
      7. associate-*l/87.8%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} \cdot \color{blue}{\frac{\tan t \cdot eh}{ew}}\right| \]
      8. associate-*r/87.8%

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

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} \cdot \left(\tan t \cdot \frac{eh}{ew}\right)}\right| \]
    11. Taylor expanded in t around 0 66.3%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\frac{{t}^{2} \cdot {eh}^{2}}{ew}}\right| \]
    12. Step-by-step derivation
      1. associate-/l*66.1%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\frac{{t}^{2}}{\frac{ew}{{eh}^{2}}}}\right| \]
      2. unpow266.1%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{\color{blue}{t \cdot t}}{\frac{ew}{{eh}^{2}}}\right| \]
      3. unpow266.1%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{t \cdot t}{\frac{ew}{\color{blue}{eh \cdot eh}}}\right| \]
    13. Simplified66.1%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\frac{t \cdot t}{\frac{ew}{eh \cdot eh}}}\right| \]
    14. Step-by-step derivation
      1. cos-atan66.0%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{-t}{\frac{ew}{eh}} \cdot \frac{-t}{\frac{ew}{eh}}}}}\right) - \frac{t \cdot t}{\frac{ew}{eh \cdot eh}}\right| \]
      2. hypot-1-def66.0%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \frac{-t}{\frac{ew}{eh}}\right)}}\right) - \frac{t \cdot t}{\frac{ew}{eh \cdot eh}}\right| \]
    15. Applied egg-rr66.0%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, \frac{-t}{\frac{ew}{eh}}\right)}}\right) - \frac{t \cdot t}{\frac{ew}{eh \cdot eh}}\right| \]
  3. Recombined 2 regimes into one program.
  4. Final simplification49.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -2.7 \cdot 10^{-32} \lor \neg \left(eh \leq 4.5 \cdot 10^{+55}\right):\\ \;\;\;\;\left|ew\right| \cdot \left|\frac{1}{\mathsf{hypot}\left(1, \frac{\tan t}{ew} \cdot eh\right)}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{t \cdot t}{\frac{ew}{eh \cdot eh}} + ew \cdot \left(\cos t \cdot \frac{-1}{\mathsf{hypot}\left(1, \frac{-t}{\frac{ew}{eh}}\right)}\right)\right|\\ \end{array} \]

Alternative 9: 61.3% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \frac{\tan t}{ew} \cdot eh\right)}\right)\right| \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (fabs (* ew (* (cos t) (/ 1.0 (hypot 1.0 (* (/ (tan t) ew) eh)))))))
double code(double eh, double ew, double t) {
	return fabs((ew * (cos(t) * (1.0 / hypot(1.0, ((tan(t) / ew) * eh))))));
}
public static double code(double eh, double ew, double t) {
	return Math.abs((ew * (Math.cos(t) * (1.0 / Math.hypot(1.0, ((Math.tan(t) / ew) * eh))))));
}
def code(eh, ew, t):
	return math.fabs((ew * (math.cos(t) * (1.0 / math.hypot(1.0, ((math.tan(t) / ew) * eh))))))
function code(eh, ew, t)
	return abs(Float64(ew * Float64(cos(t) * Float64(1.0 / hypot(1.0, Float64(Float64(tan(t) / ew) * eh))))))
end
function tmp = code(eh, ew, t)
	tmp = abs((ew * (cos(t) * (1.0 / hypot(1.0, ((tan(t) / ew) * eh))))));
end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[(N[Cos[t], $MachinePrecision] * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \frac{\tan t}{ew} \cdot eh\right)}\right)\right|
\end{array}
Derivation
  1. Initial program 99.7%

    \[\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. Step-by-step derivation
    1. fabs-neg99.7%

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.7%

      \[\leadsto \left|\color{blue}{0 - \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)}\right| \]
    3. sub-neg99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right)}\right| \]
    4. +-commutative99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right) + \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
    5. associate--r+99.7%

      \[\leadsto \left|\color{blue}{\left(0 - \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right) - \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)}\right| \]
  3. Simplified99.7%

    \[\leadsto \color{blue}{\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right|} \]
  4. Step-by-step derivation
    1. sin-mult66.1%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \color{blue}{\frac{\cos \left(t - \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \cos \left(t + \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)}{2}}\right| \]
    2. associate-*r/66.1%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{eh \cdot \left(\cos \left(t - \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \cos \left(t + \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right)}{2}}\right| \]
  5. Applied egg-rr64.6%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{eh \cdot \left(\cos \left(t + \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right) - \cos \left(t + \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right)\right)}{2}}\right| \]
  6. Step-by-step derivation
    1. +-inverses64.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \frac{eh \cdot \color{blue}{0}}{2}\right| \]
    2. *-commutative64.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \frac{\color{blue}{0 \cdot eh}}{2}\right| \]
    3. associate-/l*64.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{0}{\frac{2}{eh}}}\right| \]
    4. div064.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{0}\right| \]
  7. Simplified64.6%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{0}\right| \]
  8. Step-by-step derivation
    1. cos-atan64.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{-eh}{\frac{ew}{\tan t}} \cdot \frac{-eh}{\frac{ew}{\tan t}}}}}\right) - 0\right| \]
    2. hypot-1-def64.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \frac{-eh}{\frac{ew}{\tan t}}\right)}}\right) - 0\right| \]
    3. div-inv64.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{1}{\frac{ew}{\tan t}}}\right)}\right) - 0\right| \]
    4. add-sqr-sqrt30.8%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}\right) - 0\right| \]
    5. sqrt-unprod57.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}\right) - 0\right| \]
    6. sqr-neg57.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}\right) - 0\right| \]
    7. sqrt-unprod33.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}\right) - 0\right| \]
    8. add-sqr-sqrt64.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{1}{\frac{ew}{\tan t}}\right)}\right) - 0\right| \]
    9. clear-num64.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, eh \cdot \color{blue}{\frac{\tan t}{ew}}\right)}\right) - 0\right| \]
  9. Applied egg-rr64.4%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}}\right) - 0\right| \]
  10. Final simplification64.4%

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

Alternative 10: 46.6% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -3 \cdot 10^{-32} \lor \neg \left(eh \leq 2.65 \cdot 10^{+54}\right):\\ \;\;\;\;\left|ew \cdot \cos \tan^{-1} \left(\frac{\tan t \cdot eh}{ew}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{t \cdot t}{\frac{ew}{eh \cdot eh}} + ew \cdot \left(\cos t \cdot \frac{-1}{\mathsf{hypot}\left(1, \frac{-t}{\frac{ew}{eh}}\right)}\right)\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (if (or (<= eh -3e-32) (not (<= eh 2.65e+54)))
   (fabs (* ew (cos (atan (/ (* (tan t) eh) ew)))))
   (fabs
    (+
     (/ (* t t) (/ ew (* eh eh)))
     (* ew (* (cos t) (/ -1.0 (hypot 1.0 (/ (- t) (/ ew eh))))))))))
double code(double eh, double ew, double t) {
	double tmp;
	if ((eh <= -3e-32) || !(eh <= 2.65e+54)) {
		tmp = fabs((ew * cos(atan(((tan(t) * eh) / ew)))));
	} else {
		tmp = fabs((((t * t) / (ew / (eh * eh))) + (ew * (cos(t) * (-1.0 / hypot(1.0, (-t / (ew / eh))))))));
	}
	return tmp;
}
public static double code(double eh, double ew, double t) {
	double tmp;
	if ((eh <= -3e-32) || !(eh <= 2.65e+54)) {
		tmp = Math.abs((ew * Math.cos(Math.atan(((Math.tan(t) * eh) / ew)))));
	} else {
		tmp = Math.abs((((t * t) / (ew / (eh * eh))) + (ew * (Math.cos(t) * (-1.0 / Math.hypot(1.0, (-t / (ew / eh))))))));
	}
	return tmp;
}
def code(eh, ew, t):
	tmp = 0
	if (eh <= -3e-32) or not (eh <= 2.65e+54):
		tmp = math.fabs((ew * math.cos(math.atan(((math.tan(t) * eh) / ew)))))
	else:
		tmp = math.fabs((((t * t) / (ew / (eh * eh))) + (ew * (math.cos(t) * (-1.0 / math.hypot(1.0, (-t / (ew / eh))))))))
	return tmp
function code(eh, ew, t)
	tmp = 0.0
	if ((eh <= -3e-32) || !(eh <= 2.65e+54))
		tmp = abs(Float64(ew * cos(atan(Float64(Float64(tan(t) * eh) / ew)))));
	else
		tmp = abs(Float64(Float64(Float64(t * t) / Float64(ew / Float64(eh * eh))) + Float64(ew * Float64(cos(t) * Float64(-1.0 / hypot(1.0, Float64(Float64(-t) / Float64(ew / eh))))))));
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	tmp = 0.0;
	if ((eh <= -3e-32) || ~((eh <= 2.65e+54)))
		tmp = abs((ew * cos(atan(((tan(t) * eh) / ew)))));
	else
		tmp = abs((((t * t) / (ew / (eh * eh))) + (ew * (cos(t) * (-1.0 / hypot(1.0, (-t / (ew / eh))))))));
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -3e-32], N[Not[LessEqual[eh, 2.65e+54]], $MachinePrecision]], N[Abs[N[(ew * N[Cos[N[ArcTan[N[(N[(N[Tan[t], $MachinePrecision] * eh), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(t * t), $MachinePrecision] / N[(ew / N[(eh * eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(ew * N[(N[Cos[t], $MachinePrecision] * N[(-1.0 / N[Sqrt[1.0 ^ 2 + N[((-t) / N[(ew / eh), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;eh \leq -3 \cdot 10^{-32} \lor \neg \left(eh \leq 2.65 \cdot 10^{+54}\right):\\
\;\;\;\;\left|ew \cdot \cos \tan^{-1} \left(\frac{\tan t \cdot eh}{ew}\right)\right|\\

\mathbf{else}:\\
\;\;\;\;\left|\frac{t \cdot t}{\frac{ew}{eh \cdot eh}} + ew \cdot \left(\cos t \cdot \frac{-1}{\mathsf{hypot}\left(1, \frac{-t}{\frac{ew}{eh}}\right)}\right)\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if eh < -3e-32 or 2.65000000000000009e54 < eh

    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. Step-by-step derivation
      1. fabs-neg99.8%

        \[\leadsto \color{blue}{\left|-\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)\right|} \]
      2. sub0-neg99.8%

        \[\leadsto \left|\color{blue}{0 - \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)}\right| \]
      3. sub-neg99.8%

        \[\leadsto \left|0 - \color{blue}{\left(\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right)}\right| \]
      4. +-commutative99.8%

        \[\leadsto \left|0 - \color{blue}{\left(\left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right) + \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
      5. associate--r+99.8%

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

      \[\leadsto \color{blue}{\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right|} \]
    4. Step-by-step derivation
      1. sin-mult45.1%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \color{blue}{\frac{\cos \left(t - \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \cos \left(t + \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)}{2}}\right| \]
      2. associate-*r/45.1%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{eh \cdot \left(\cos \left(t - \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \cos \left(t + \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right)}{2}}\right| \]
    5. Applied egg-rr41.9%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{eh \cdot \left(\cos \left(t + \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right) - \cos \left(t + \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right)\right)}{2}}\right| \]
    6. Step-by-step derivation
      1. +-inverses41.9%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \frac{eh \cdot \color{blue}{0}}{2}\right| \]
      2. *-commutative41.9%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \frac{\color{blue}{0 \cdot eh}}{2}\right| \]
      3. associate-/l*41.9%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{0}{\frac{2}{eh}}}\right| \]
      4. div041.9%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{0}\right| \]
    7. Simplified41.9%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{0}\right| \]
    8. Step-by-step derivation
      1. expm1-log1p-u41.9%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right)}\right) - 0\right| \]
      2. add-sqr-sqrt27.2%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\cos \tan^{-1} \left(\frac{\color{blue}{\sqrt{-eh} \cdot \sqrt{-eh}}}{\frac{ew}{\tan t}}\right)\right)\right)\right) - 0\right| \]
      3. sqrt-unprod28.8%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\cos \tan^{-1} \left(\frac{\color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}}}{\frac{ew}{\tan t}}\right)\right)\right)\right) - 0\right| \]
      4. sqr-neg28.8%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\cos \tan^{-1} \left(\frac{\sqrt{\color{blue}{eh \cdot eh}}}{\frac{ew}{\tan t}}\right)\right)\right)\right) - 0\right| \]
      5. sqrt-unprod14.8%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\cos \tan^{-1} \left(\frac{\color{blue}{\sqrt{eh} \cdot \sqrt{eh}}}{\frac{ew}{\tan t}}\right)\right)\right)\right) - 0\right| \]
      6. add-sqr-sqrt41.9%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\cos \tan^{-1} \left(\frac{\color{blue}{eh}}{\frac{ew}{\tan t}}\right)\right)\right)\right) - 0\right| \]
      7. div-inv41.9%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\cos \tan^{-1} \color{blue}{\left(eh \cdot \frac{1}{\frac{ew}{\tan t}}\right)}\right)\right)\right) - 0\right| \]
      8. clear-num41.9%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\cos \tan^{-1} \left(eh \cdot \color{blue}{\frac{\tan t}{ew}}\right)\right)\right)\right) - 0\right| \]
    9. Applied egg-rr41.9%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right)\right)}\right) - 0\right| \]
    10. Taylor expanded in t around 0 31.8%

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

    if -3e-32 < eh < 2.65000000000000009e54

    1. Initial program 99.7%

      \[\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. Step-by-step derivation
      1. fabs-neg99.7%

        \[\leadsto \color{blue}{\left|-\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)\right|} \]
      2. sub0-neg99.7%

        \[\leadsto \left|\color{blue}{0 - \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)}\right| \]
      3. sub-neg99.7%

        \[\leadsto \left|0 - \color{blue}{\left(\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right)}\right| \]
      4. +-commutative99.7%

        \[\leadsto \left|0 - \color{blue}{\left(\left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right) + \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
      5. associate--r+99.7%

        \[\leadsto \left|\color{blue}{\left(0 - \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right) - \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)}\right| \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right|} \]
    4. Taylor expanded in t around 0 88.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \color{blue}{\left(-1 \cdot \frac{t \cdot eh}{ew}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
    5. Step-by-step derivation
      1. mul-1-neg88.4%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \color{blue}{\left(-\frac{t \cdot eh}{ew}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
      2. associate-/l*88.4%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(-\color{blue}{\frac{t}{\frac{ew}{eh}}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
      3. distribute-neg-frac88.4%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \color{blue}{\left(\frac{-t}{\frac{ew}{eh}}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
    6. Simplified88.4%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \color{blue}{\left(\frac{-t}{\frac{ew}{eh}}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
    7. Step-by-step derivation
      1. associate-*r*88.4%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)}\right| \]
      2. sin-atan86.2%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \left(eh \cdot \sin t\right) \cdot \color{blue}{\frac{\frac{-eh}{\frac{ew}{\tan t}}}{\sqrt{1 + \frac{-eh}{\frac{ew}{\tan t}} \cdot \frac{-eh}{\frac{ew}{\tan t}}}}}\right| \]
      3. associate-*r/86.2%

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

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

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

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

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

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

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

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{\left(eh \cdot \sin t\right) \cdot \left(eh \cdot \color{blue}{\frac{\tan t}{ew}}\right)}{\sqrt{1 + \frac{-eh}{\frac{ew}{\tan t}} \cdot \frac{-eh}{\frac{ew}{\tan t}}}}\right| \]
      11. hypot-1-def87.7%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{\left(eh \cdot \sin t\right) \cdot \left(eh \cdot \frac{\tan t}{ew}\right)}{\color{blue}{\mathsf{hypot}\left(1, \frac{-eh}{\frac{ew}{\tan t}}\right)}}\right| \]
      12. div-inv87.7%

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

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\frac{\left(eh \cdot \sin t\right) \cdot \left(eh \cdot \frac{\tan t}{ew}\right)}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}}\right| \]
    9. Step-by-step derivation
      1. associate-/l*87.7%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\frac{eh \cdot \sin t}{\frac{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}{eh \cdot \frac{\tan t}{ew}}}}\right| \]
      2. associate-/r/87.7%

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

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \color{blue}{\frac{\tan t}{ew} \cdot eh}\right)} \cdot \left(eh \cdot \frac{\tan t}{ew}\right)\right| \]
      4. associate-*l/87.7%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \color{blue}{\frac{\tan t \cdot eh}{ew}}\right)} \cdot \left(eh \cdot \frac{\tan t}{ew}\right)\right| \]
      5. associate-*r/87.7%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \color{blue}{\tan t \cdot \frac{eh}{ew}}\right)} \cdot \left(eh \cdot \frac{\tan t}{ew}\right)\right| \]
      6. *-commutative87.7%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} \cdot \color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)}\right| \]
      7. associate-*l/87.7%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} \cdot \color{blue}{\frac{\tan t \cdot eh}{ew}}\right| \]
      8. associate-*r/87.7%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} \cdot \color{blue}{\left(\tan t \cdot \frac{eh}{ew}\right)}\right| \]
    10. Simplified87.7%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} \cdot \left(\tan t \cdot \frac{eh}{ew}\right)}\right| \]
    11. Taylor expanded in t around 0 66.8%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\frac{{t}^{2} \cdot {eh}^{2}}{ew}}\right| \]
    12. Step-by-step derivation
      1. associate-/l*66.5%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\frac{{t}^{2}}{\frac{ew}{{eh}^{2}}}}\right| \]
      2. unpow266.5%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{\color{blue}{t \cdot t}}{\frac{ew}{{eh}^{2}}}\right| \]
      3. unpow266.5%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \frac{t \cdot t}{\frac{ew}{\color{blue}{eh \cdot eh}}}\right| \]
    13. Simplified66.5%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - \color{blue}{\frac{t \cdot t}{\frac{ew}{eh \cdot eh}}}\right| \]
    14. Step-by-step derivation
      1. cos-atan66.5%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{-t}{\frac{ew}{eh}} \cdot \frac{-t}{\frac{ew}{eh}}}}}\right) - \frac{t \cdot t}{\frac{ew}{eh \cdot eh}}\right| \]
      2. hypot-1-def66.5%

        \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \frac{-t}{\frac{ew}{eh}}\right)}}\right) - \frac{t \cdot t}{\frac{ew}{eh \cdot eh}}\right| \]
    15. Applied egg-rr66.5%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, \frac{-t}{\frac{ew}{eh}}\right)}}\right) - \frac{t \cdot t}{\frac{ew}{eh \cdot eh}}\right| \]
  3. Recombined 2 regimes into one program.
  4. Final simplification50.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -3 \cdot 10^{-32} \lor \neg \left(eh \leq 2.65 \cdot 10^{+54}\right):\\ \;\;\;\;\left|ew \cdot \cos \tan^{-1} \left(\frac{\tan t \cdot eh}{ew}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{t \cdot t}{\frac{ew}{eh \cdot eh}} + ew \cdot \left(\cos t \cdot \frac{-1}{\mathsf{hypot}\left(1, \frac{-t}{\frac{ew}{eh}}\right)}\right)\right|\\ \end{array} \]

Alternative 11: 42.1% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \left|ew\right| \cdot \left|\frac{1}{\mathsf{hypot}\left(1, \frac{\tan t}{ew} \cdot eh\right)}\right| \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (* (fabs ew) (fabs (/ 1.0 (hypot 1.0 (* (/ (tan t) ew) eh))))))
double code(double eh, double ew, double t) {
	return fabs(ew) * fabs((1.0 / hypot(1.0, ((tan(t) / ew) * eh))));
}
public static double code(double eh, double ew, double t) {
	return Math.abs(ew) * Math.abs((1.0 / Math.hypot(1.0, ((Math.tan(t) / ew) * eh))));
}
def code(eh, ew, t):
	return math.fabs(ew) * math.fabs((1.0 / math.hypot(1.0, ((math.tan(t) / ew) * eh))))
function code(eh, ew, t)
	return Float64(abs(ew) * abs(Float64(1.0 / hypot(1.0, Float64(Float64(tan(t) / ew) * eh)))))
end
function tmp = code(eh, ew, t)
	tmp = abs(ew) * abs((1.0 / hypot(1.0, ((tan(t) / ew) * eh))));
end
code[eh_, ew_, t_] := N[(N[Abs[ew], $MachinePrecision] * N[Abs[N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left|ew\right| \cdot \left|\frac{1}{\mathsf{hypot}\left(1, \frac{\tan t}{ew} \cdot eh\right)}\right|
\end{array}
Derivation
  1. Initial program 99.7%

    \[\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. Step-by-step derivation
    1. fabs-neg99.7%

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.7%

      \[\leadsto \left|\color{blue}{0 - \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)}\right| \]
    3. sub-neg99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right)}\right| \]
    4. +-commutative99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right) + \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
    5. associate--r+99.7%

      \[\leadsto \left|\color{blue}{\left(0 - \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right) - \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)}\right| \]
  3. Simplified99.7%

    \[\leadsto \color{blue}{\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right|} \]
  4. Step-by-step derivation
    1. sin-mult66.1%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \color{blue}{\frac{\cos \left(t - \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \cos \left(t + \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)}{2}}\right| \]
    2. associate-*r/66.1%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{eh \cdot \left(\cos \left(t - \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \cos \left(t + \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right)}{2}}\right| \]
  5. Applied egg-rr64.6%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{eh \cdot \left(\cos \left(t + \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right) - \cos \left(t + \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right)\right)}{2}}\right| \]
  6. Step-by-step derivation
    1. +-inverses64.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \frac{eh \cdot \color{blue}{0}}{2}\right| \]
    2. *-commutative64.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \frac{\color{blue}{0 \cdot eh}}{2}\right| \]
    3. associate-/l*64.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{0}{\frac{2}{eh}}}\right| \]
    4. div064.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{0}\right| \]
  7. Simplified64.6%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{0}\right| \]
  8. Taylor expanded in t around 0 45.0%

    \[\leadsto \left|\color{blue}{\cos \tan^{-1} \left(-1 \cdot \frac{\tan t \cdot eh}{ew}\right) \cdot ew} - 0\right| \]
  9. Step-by-step derivation
    1. *-commutative45.0%

      \[\leadsto \left|\color{blue}{ew \cdot \cos \tan^{-1} \left(-1 \cdot \frac{\tan t \cdot eh}{ew}\right)} - 0\right| \]
    2. *-commutative45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(-1 \cdot \frac{\color{blue}{eh \cdot \tan t}}{ew}\right) - 0\right| \]
    3. associate-*r/45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(-1 \cdot \color{blue}{\left(eh \cdot \frac{\tan t}{ew}\right)}\right) - 0\right| \]
    4. associate-*l*45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(\left(-1 \cdot eh\right) \cdot \frac{\tan t}{ew}\right)} - 0\right| \]
    5. neg-mul-145.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(\color{blue}{\left(-eh\right)} \cdot \frac{\tan t}{ew}\right) - 0\right| \]
    6. *-commutative45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right)} - 0\right| \]
    7. associate-*l/45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(\frac{\tan t \cdot \left(-eh\right)}{ew}\right)} - 0\right| \]
    8. distribute-rgt-neg-in45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(\frac{\color{blue}{-\tan t \cdot eh}}{ew}\right) - 0\right| \]
  10. Simplified45.0%

    \[\leadsto \left|\color{blue}{ew \cdot \cos \tan^{-1} \left(\frac{-\tan t \cdot eh}{ew}\right)} - 0\right| \]
  11. Step-by-step derivation
    1. distribute-frac-neg45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(-\frac{\tan t \cdot eh}{ew}\right)} - 0\right| \]
    2. *-commutative45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(-\frac{\color{blue}{eh \cdot \tan t}}{ew}\right) - 0\right| \]
    3. associate-*r/45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(-\color{blue}{eh \cdot \frac{\tan t}{ew}}\right) - 0\right| \]
    4. distribute-lft-neg-out45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right)} - 0\right| \]
    5. cos-atan44.8%

      \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\sqrt{1 + \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) \cdot \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right)}}} - 0\right| \]
    6. hypot-1-def44.8%

      \[\leadsto \left|ew \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \left(-eh\right) \cdot \frac{\tan t}{ew}\right)}} - 0\right| \]
    7. add-sqr-sqrt23.3%

      \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\tan t}{ew}\right)} - 0\right| \]
    8. sqrt-unprod39.5%

      \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\tan t}{ew}\right)} - 0\right| \]
    9. sqr-neg39.5%

      \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\tan t}{ew}\right)} - 0\right| \]
    10. sqrt-unprod21.5%

      \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\tan t}{ew}\right)} - 0\right| \]
    11. add-sqr-sqrt44.8%

      \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\tan t}{ew}\right)} - 0\right| \]
    12. associate-*r/44.8%

      \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\frac{eh \cdot \tan t}{ew}}\right)} - 0\right| \]
    13. *-commutative44.8%

      \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \frac{\color{blue}{\tan t \cdot eh}}{ew}\right)} - 0\right| \]
    14. associate-*r/44.8%

      \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\tan t \cdot \frac{eh}{ew}}\right)} - 0\right| \]
    15. frac-2neg44.8%

      \[\leadsto \left|ew \cdot \color{blue}{\frac{-1}{-\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} - 0\right| \]
    16. metadata-eval44.8%

      \[\leadsto \left|ew \cdot \frac{\color{blue}{-1}}{-\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} - 0\right| \]
  12. Applied egg-rr44.8%

    \[\leadsto \left|ew \cdot \color{blue}{\frac{-1}{-\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} - 0\right| \]
  13. Step-by-step derivation
    1. /-rgt-identity44.8%

      \[\leadsto \left|ew \cdot \frac{-1}{-\color{blue}{\frac{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}{1}}} - 0\right| \]
    2. /-rgt-identity44.8%

      \[\leadsto \left|ew \cdot \frac{-1}{-\color{blue}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} - 0\right| \]
    3. *-commutative44.8%

      \[\leadsto \left|ew \cdot \frac{-1}{-\mathsf{hypot}\left(1, \color{blue}{\frac{eh}{ew} \cdot \tan t}\right)} - 0\right| \]
    4. associate-*l/44.8%

      \[\leadsto \left|ew \cdot \frac{-1}{-\mathsf{hypot}\left(1, \color{blue}{\frac{eh \cdot \tan t}{ew}}\right)} - 0\right| \]
    5. associate-*r/44.8%

      \[\leadsto \left|ew \cdot \frac{-1}{-\mathsf{hypot}\left(1, \color{blue}{eh \cdot \frac{\tan t}{ew}}\right)} - 0\right| \]
  14. Simplified44.8%

    \[\leadsto \left|ew \cdot \color{blue}{\frac{-1}{-\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}} - 0\right| \]
  15. Final simplification44.8%

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

Alternative 12: 52.9% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right)\right| \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (fabs (* ew (* (cos t) (cos (atan (/ (- t) (/ ew eh))))))))
double code(double eh, double ew, double t) {
	return fabs((ew * (cos(t) * cos(atan((-t / (ew / eh)))))));
}
real(8) function code(eh, ew, t)
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    code = abs((ew * (cos(t) * cos(atan((-t / (ew / eh)))))))
end function
public static double code(double eh, double ew, double t) {
	return Math.abs((ew * (Math.cos(t) * Math.cos(Math.atan((-t / (ew / eh)))))));
}
def code(eh, ew, t):
	return math.fabs((ew * (math.cos(t) * math.cos(math.atan((-t / (ew / eh)))))))
function code(eh, ew, t)
	return abs(Float64(ew * Float64(cos(t) * cos(atan(Float64(Float64(-t) / Float64(ew / eh)))))))
end
function tmp = code(eh, ew, t)
	tmp = abs((ew * (cos(t) * cos(atan((-t / (ew / eh)))))));
end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[(N[Cos[t], $MachinePrecision] * N[Cos[N[ArcTan[N[((-t) / N[(ew / eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right)\right|
\end{array}
Derivation
  1. Initial program 99.7%

    \[\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. Step-by-step derivation
    1. fabs-neg99.7%

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.7%

      \[\leadsto \left|\color{blue}{0 - \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)}\right| \]
    3. sub-neg99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right)}\right| \]
    4. +-commutative99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right) + \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
    5. associate--r+99.7%

      \[\leadsto \left|\color{blue}{\left(0 - \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right) - \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)}\right| \]
  3. Simplified99.7%

    \[\leadsto \color{blue}{\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right|} \]
  4. Step-by-step derivation
    1. sin-mult66.1%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \color{blue}{\frac{\cos \left(t - \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \cos \left(t + \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)}{2}}\right| \]
    2. associate-*r/66.1%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{eh \cdot \left(\cos \left(t - \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \cos \left(t + \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right)}{2}}\right| \]
  5. Applied egg-rr64.6%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{eh \cdot \left(\cos \left(t + \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right) - \cos \left(t + \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right)\right)}{2}}\right| \]
  6. Step-by-step derivation
    1. +-inverses64.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \frac{eh \cdot \color{blue}{0}}{2}\right| \]
    2. *-commutative64.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \frac{\color{blue}{0 \cdot eh}}{2}\right| \]
    3. associate-/l*64.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{0}{\frac{2}{eh}}}\right| \]
    4. div064.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{0}\right| \]
  7. Simplified64.6%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{0}\right| \]
  8. Taylor expanded in t around 0 54.3%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \color{blue}{\left(-1 \cdot \frac{t \cdot eh}{ew}\right)}\right) - 0\right| \]
  9. Step-by-step derivation
    1. mul-1-neg88.8%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \color{blue}{\left(-\frac{t \cdot eh}{ew}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
    2. associate-/l*88.8%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(-\color{blue}{\frac{t}{\frac{ew}{eh}}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right| \]
    3. distribute-neg-frac88.8%

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

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \color{blue}{\left(\frac{-t}{\frac{ew}{eh}}\right)}\right) - 0\right| \]
  11. Final simplification54.3%

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

Alternative 13: 41.3% accurate, 3.0× speedup?

\[\begin{array}{l} \\ \left|ew \cdot \cos \tan^{-1} \left(\frac{t \cdot \left(-eh\right)}{ew}\right)\right| \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (fabs (* ew (cos (atan (/ (* t (- eh)) ew))))))
double code(double eh, double ew, double t) {
	return fabs((ew * cos(atan(((t * -eh) / ew)))));
}
real(8) function code(eh, ew, t)
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    code = abs((ew * cos(atan(((t * -eh) / ew)))))
end function
public static double code(double eh, double ew, double t) {
	return Math.abs((ew * Math.cos(Math.atan(((t * -eh) / ew)))));
}
def code(eh, ew, t):
	return math.fabs((ew * math.cos(math.atan(((t * -eh) / ew)))))
function code(eh, ew, t)
	return abs(Float64(ew * cos(atan(Float64(Float64(t * Float64(-eh)) / ew)))))
end
function tmp = code(eh, ew, t)
	tmp = abs((ew * cos(atan(((t * -eh) / ew)))));
end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[Cos[N[ArcTan[N[(N[(t * (-eh)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\left|ew \cdot \cos \tan^{-1} \left(\frac{t \cdot \left(-eh\right)}{ew}\right)\right|
\end{array}
Derivation
  1. Initial program 99.7%

    \[\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. Step-by-step derivation
    1. fabs-neg99.7%

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.7%

      \[\leadsto \left|\color{blue}{0 - \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)}\right| \]
    3. sub-neg99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right)}\right| \]
    4. +-commutative99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right) + \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
    5. associate--r+99.7%

      \[\leadsto \left|\color{blue}{\left(0 - \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right) - \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)}\right| \]
  3. Simplified99.7%

    \[\leadsto \color{blue}{\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right|} \]
  4. Step-by-step derivation
    1. sin-mult66.1%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \color{blue}{\frac{\cos \left(t - \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \cos \left(t + \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)}{2}}\right| \]
    2. associate-*r/66.1%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{eh \cdot \left(\cos \left(t - \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \cos \left(t + \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right)}{2}}\right| \]
  5. Applied egg-rr64.6%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{eh \cdot \left(\cos \left(t + \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right) - \cos \left(t + \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right)\right)}{2}}\right| \]
  6. Step-by-step derivation
    1. +-inverses64.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \frac{eh \cdot \color{blue}{0}}{2}\right| \]
    2. *-commutative64.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \frac{\color{blue}{0 \cdot eh}}{2}\right| \]
    3. associate-/l*64.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{0}{\frac{2}{eh}}}\right| \]
    4. div064.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{0}\right| \]
  7. Simplified64.6%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{0}\right| \]
  8. Taylor expanded in t around 0 45.0%

    \[\leadsto \left|\color{blue}{\cos \tan^{-1} \left(-1 \cdot \frac{\tan t \cdot eh}{ew}\right) \cdot ew} - 0\right| \]
  9. Step-by-step derivation
    1. *-commutative45.0%

      \[\leadsto \left|\color{blue}{ew \cdot \cos \tan^{-1} \left(-1 \cdot \frac{\tan t \cdot eh}{ew}\right)} - 0\right| \]
    2. *-commutative45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(-1 \cdot \frac{\color{blue}{eh \cdot \tan t}}{ew}\right) - 0\right| \]
    3. associate-*r/45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(-1 \cdot \color{blue}{\left(eh \cdot \frac{\tan t}{ew}\right)}\right) - 0\right| \]
    4. associate-*l*45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(\left(-1 \cdot eh\right) \cdot \frac{\tan t}{ew}\right)} - 0\right| \]
    5. neg-mul-145.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(\color{blue}{\left(-eh\right)} \cdot \frac{\tan t}{ew}\right) - 0\right| \]
    6. *-commutative45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right)} - 0\right| \]
    7. associate-*l/45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(\frac{\tan t \cdot \left(-eh\right)}{ew}\right)} - 0\right| \]
    8. distribute-rgt-neg-in45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(\frac{\color{blue}{-\tan t \cdot eh}}{ew}\right) - 0\right| \]
  10. Simplified45.0%

    \[\leadsto \left|\color{blue}{ew \cdot \cos \tan^{-1} \left(\frac{-\tan t \cdot eh}{ew}\right)} - 0\right| \]
  11. Taylor expanded in t around 0 43.7%

    \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(\frac{-\color{blue}{t \cdot eh}}{ew}\right) - 0\right| \]
  12. Final simplification43.7%

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

Alternative 14: 40.5% accurate, 4.4× speedup?

\[\begin{array}{l} \\ \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \frac{-eh}{\frac{ew}{t}}\right)}\right| \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (fabs (* ew (/ 1.0 (hypot 1.0 (/ (- eh) (/ ew t)))))))
double code(double eh, double ew, double t) {
	return fabs((ew * (1.0 / hypot(1.0, (-eh / (ew / t))))));
}
public static double code(double eh, double ew, double t) {
	return Math.abs((ew * (1.0 / Math.hypot(1.0, (-eh / (ew / t))))));
}
def code(eh, ew, t):
	return math.fabs((ew * (1.0 / math.hypot(1.0, (-eh / (ew / t))))))
function code(eh, ew, t)
	return abs(Float64(ew * Float64(1.0 / hypot(1.0, Float64(Float64(-eh) / Float64(ew / t))))))
end
function tmp = code(eh, ew, t)
	tmp = abs((ew * (1.0 / hypot(1.0, (-eh / (ew / t))))));
end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[((-eh) / N[(ew / t), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \frac{-eh}{\frac{ew}{t}}\right)}\right|
\end{array}
Derivation
  1. Initial program 99.7%

    \[\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. Step-by-step derivation
    1. fabs-neg99.7%

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.7%

      \[\leadsto \left|\color{blue}{0 - \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)}\right| \]
    3. sub-neg99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right)}\right| \]
    4. +-commutative99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right) + \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
    5. associate--r+99.7%

      \[\leadsto \left|\color{blue}{\left(0 - \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right) - \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)}\right| \]
  3. Simplified99.7%

    \[\leadsto \color{blue}{\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right|} \]
  4. Step-by-step derivation
    1. sin-mult66.1%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \color{blue}{\frac{\cos \left(t - \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \cos \left(t + \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)}{2}}\right| \]
    2. associate-*r/66.1%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{eh \cdot \left(\cos \left(t - \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \cos \left(t + \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right)}{2}}\right| \]
  5. Applied egg-rr64.6%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{eh \cdot \left(\cos \left(t + \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right) - \cos \left(t + \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right)\right)}{2}}\right| \]
  6. Step-by-step derivation
    1. +-inverses64.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \frac{eh \cdot \color{blue}{0}}{2}\right| \]
    2. *-commutative64.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \frac{\color{blue}{0 \cdot eh}}{2}\right| \]
    3. associate-/l*64.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{0}{\frac{2}{eh}}}\right| \]
    4. div064.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{0}\right| \]
  7. Simplified64.6%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{0}\right| \]
  8. Taylor expanded in t around 0 45.0%

    \[\leadsto \left|\color{blue}{\cos \tan^{-1} \left(-1 \cdot \frac{\tan t \cdot eh}{ew}\right) \cdot ew} - 0\right| \]
  9. Step-by-step derivation
    1. *-commutative45.0%

      \[\leadsto \left|\color{blue}{ew \cdot \cos \tan^{-1} \left(-1 \cdot \frac{\tan t \cdot eh}{ew}\right)} - 0\right| \]
    2. *-commutative45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(-1 \cdot \frac{\color{blue}{eh \cdot \tan t}}{ew}\right) - 0\right| \]
    3. associate-*r/45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(-1 \cdot \color{blue}{\left(eh \cdot \frac{\tan t}{ew}\right)}\right) - 0\right| \]
    4. associate-*l*45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(\left(-1 \cdot eh\right) \cdot \frac{\tan t}{ew}\right)} - 0\right| \]
    5. neg-mul-145.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(\color{blue}{\left(-eh\right)} \cdot \frac{\tan t}{ew}\right) - 0\right| \]
    6. *-commutative45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right)} - 0\right| \]
    7. associate-*l/45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(\frac{\tan t \cdot \left(-eh\right)}{ew}\right)} - 0\right| \]
    8. distribute-rgt-neg-in45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(\frac{\color{blue}{-\tan t \cdot eh}}{ew}\right) - 0\right| \]
  10. Simplified45.0%

    \[\leadsto \left|\color{blue}{ew \cdot \cos \tan^{-1} \left(\frac{-\tan t \cdot eh}{ew}\right)} - 0\right| \]
  11. Taylor expanded in t around 0 43.7%

    \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(\frac{-\color{blue}{t \cdot eh}}{ew}\right) - 0\right| \]
  12. Step-by-step derivation
    1. cos-atan42.4%

      \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{-t \cdot eh}{ew} \cdot \frac{-t \cdot eh}{ew}}}} - 0\right| \]
    2. *-commutative42.4%

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \frac{-\color{blue}{eh \cdot t}}{ew} \cdot \frac{-t \cdot eh}{ew}}} - 0\right| \]
    3. *-commutative42.4%

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \frac{-eh \cdot t}{ew} \cdot \frac{-\color{blue}{eh \cdot t}}{ew}}} - 0\right| \]
  13. Applied egg-rr42.4%

    \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{-eh \cdot t}{ew} \cdot \frac{-eh \cdot t}{ew}}}} - 0\right| \]
  14. Step-by-step derivation
    1. hypot-1-def42.5%

      \[\leadsto \left|ew \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \frac{-eh \cdot t}{ew}\right)}} - 0\right| \]
    2. distribute-lft-neg-in42.5%

      \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \frac{\color{blue}{\left(-eh\right) \cdot t}}{ew}\right)} - 0\right| \]
    3. associate-/l*42.6%

      \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\frac{-eh}{\frac{ew}{t}}}\right)} - 0\right| \]
  15. Simplified42.6%

    \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, \frac{-eh}{\frac{ew}{t}}\right)}} - 0\right| \]
  16. Final simplification42.6%

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

Alternative 15: 40.5% accurate, 4.4× speedup?

\[\begin{array}{l} \\ \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, t \cdot \frac{eh}{ew}\right)}\right| \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (fabs (* ew (/ 1.0 (hypot 1.0 (* t (/ eh ew)))))))
double code(double eh, double ew, double t) {
	return fabs((ew * (1.0 / hypot(1.0, (t * (eh / ew))))));
}
public static double code(double eh, double ew, double t) {
	return Math.abs((ew * (1.0 / Math.hypot(1.0, (t * (eh / ew))))));
}
def code(eh, ew, t):
	return math.fabs((ew * (1.0 / math.hypot(1.0, (t * (eh / ew))))))
function code(eh, ew, t)
	return abs(Float64(ew * Float64(1.0 / hypot(1.0, Float64(t * Float64(eh / ew))))))
end
function tmp = code(eh, ew, t)
	tmp = abs((ew * (1.0 / hypot(1.0, (t * (eh / ew))))));
end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(t * N[(eh / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, t \cdot \frac{eh}{ew}\right)}\right|
\end{array}
Derivation
  1. Initial program 99.7%

    \[\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. Step-by-step derivation
    1. fabs-neg99.7%

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.7%

      \[\leadsto \left|\color{blue}{0 - \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)}\right| \]
    3. sub-neg99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right)}\right| \]
    4. +-commutative99.7%

      \[\leadsto \left|0 - \color{blue}{\left(\left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right) + \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
    5. associate--r+99.7%

      \[\leadsto \left|\color{blue}{\left(0 - \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right) - \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)}\right| \]
  3. Simplified99.7%

    \[\leadsto \color{blue}{\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right|} \]
  4. Step-by-step derivation
    1. sin-mult66.1%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \color{blue}{\frac{\cos \left(t - \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \cos \left(t + \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)}{2}}\right| \]
    2. associate-*r/66.1%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{eh \cdot \left(\cos \left(t - \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \cos \left(t + \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)\right)}{2}}\right| \]
  5. Applied egg-rr64.6%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{eh \cdot \left(\cos \left(t + \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right) - \cos \left(t + \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right)\right)}{2}}\right| \]
  6. Step-by-step derivation
    1. +-inverses64.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \frac{eh \cdot \color{blue}{0}}{2}\right| \]
    2. *-commutative64.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \frac{\color{blue}{0 \cdot eh}}{2}\right| \]
    3. associate-/l*64.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{\frac{0}{\frac{2}{eh}}}\right| \]
    4. div064.6%

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{0}\right| \]
  7. Simplified64.6%

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{0}\right| \]
  8. Taylor expanded in t around 0 45.0%

    \[\leadsto \left|\color{blue}{\cos \tan^{-1} \left(-1 \cdot \frac{\tan t \cdot eh}{ew}\right) \cdot ew} - 0\right| \]
  9. Step-by-step derivation
    1. *-commutative45.0%

      \[\leadsto \left|\color{blue}{ew \cdot \cos \tan^{-1} \left(-1 \cdot \frac{\tan t \cdot eh}{ew}\right)} - 0\right| \]
    2. *-commutative45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(-1 \cdot \frac{\color{blue}{eh \cdot \tan t}}{ew}\right) - 0\right| \]
    3. associate-*r/45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(-1 \cdot \color{blue}{\left(eh \cdot \frac{\tan t}{ew}\right)}\right) - 0\right| \]
    4. associate-*l*45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(\left(-1 \cdot eh\right) \cdot \frac{\tan t}{ew}\right)} - 0\right| \]
    5. neg-mul-145.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(\color{blue}{\left(-eh\right)} \cdot \frac{\tan t}{ew}\right) - 0\right| \]
    6. *-commutative45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right)} - 0\right| \]
    7. associate-*l/45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(\frac{\tan t \cdot \left(-eh\right)}{ew}\right)} - 0\right| \]
    8. distribute-rgt-neg-in45.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(\frac{\color{blue}{-\tan t \cdot eh}}{ew}\right) - 0\right| \]
  10. Simplified45.0%

    \[\leadsto \left|\color{blue}{ew \cdot \cos \tan^{-1} \left(\frac{-\tan t \cdot eh}{ew}\right)} - 0\right| \]
  11. Taylor expanded in t around 0 43.7%

    \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(\frac{-\color{blue}{t \cdot eh}}{ew}\right) - 0\right| \]
  12. Step-by-step derivation
    1. cos-atan42.4%

      \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{-t \cdot eh}{ew} \cdot \frac{-t \cdot eh}{ew}}}} - 0\right| \]
    2. *-commutative42.4%

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \frac{-\color{blue}{eh \cdot t}}{ew} \cdot \frac{-t \cdot eh}{ew}}} - 0\right| \]
    3. *-commutative42.4%

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \frac{-eh \cdot t}{ew} \cdot \frac{-\color{blue}{eh \cdot t}}{ew}}} - 0\right| \]
  13. Applied egg-rr42.4%

    \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{-eh \cdot t}{ew} \cdot \frac{-eh \cdot t}{ew}}}} - 0\right| \]
  14. Step-by-step derivation
    1. distribute-frac-neg42.4%

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \color{blue}{\left(-\frac{eh \cdot t}{ew}\right)} \cdot \frac{-eh \cdot t}{ew}}} - 0\right| \]
    2. associate-*r/42.4%

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \left(-\color{blue}{eh \cdot \frac{t}{ew}}\right) \cdot \frac{-eh \cdot t}{ew}}} - 0\right| \]
    3. distribute-frac-neg42.4%

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \left(-eh \cdot \frac{t}{ew}\right) \cdot \color{blue}{\left(-\frac{eh \cdot t}{ew}\right)}}} - 0\right| \]
    4. associate-*r/42.6%

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \left(-eh \cdot \frac{t}{ew}\right) \cdot \left(-\color{blue}{eh \cdot \frac{t}{ew}}\right)}} - 0\right| \]
    5. sqr-neg42.6%

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \color{blue}{\left(eh \cdot \frac{t}{ew}\right) \cdot \left(eh \cdot \frac{t}{ew}\right)}}} - 0\right| \]
    6. hypot-1-def42.6%

      \[\leadsto \left|ew \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, eh \cdot \frac{t}{ew}\right)}} - 0\right| \]
    7. associate-*r/42.5%

      \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\frac{eh \cdot t}{ew}}\right)} - 0\right| \]
    8. *-commutative42.5%

      \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \frac{\color{blue}{t \cdot eh}}{ew}\right)} - 0\right| \]
    9. *-lft-identity42.5%

      \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \frac{t \cdot eh}{\color{blue}{1 \cdot ew}}\right)} - 0\right| \]
    10. times-frac42.6%

      \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\frac{t}{1} \cdot \frac{eh}{ew}}\right)} - 0\right| \]
    11. /-rgt-identity42.6%

      \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{t} \cdot \frac{eh}{ew}\right)} - 0\right| \]
  15. Simplified42.6%

    \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, t \cdot \frac{eh}{ew}\right)}} - 0\right| \]
  16. Final simplification42.6%

    \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, t \cdot \frac{eh}{ew}\right)}\right| \]

Reproduce

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