Example 2 from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 30.0s
Alternatives: 17
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 17 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.1× speedup?

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

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

    \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. cos-atan99.8%

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
    3. associate-/l*99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
    4. add-sqr-sqrt55.0%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
    5. sqrt-unprod95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
    6. sqr-neg95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
    7. sqrt-unprod44.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
    8. add-sqr-sqrt99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
  4. Applied egg-rr99.8%

    \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\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| \]
  5. Step-by-step derivation
    1. *-commutative99.8%

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

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

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

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

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

Alternative 2: 99.0% accurate, 1.3× speedup?

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

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

    \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
  2. Add Preprocessing
  3. Taylor expanded in t around 0 99.2%

    \[\leadsto \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{\color{blue}{-1 \cdot \left(eh \cdot t\right)}}{ew}\right)\right| \]
  4. Step-by-step derivation
    1. associate-*r*99.2%

      \[\leadsto \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{\color{blue}{\left(-1 \cdot eh\right) \cdot t}}{ew}\right)\right| \]
    2. mul-1-neg99.2%

      \[\leadsto \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{\color{blue}{\left(-eh\right)} \cdot t}{ew}\right)\right| \]
  5. Simplified99.2%

    \[\leadsto \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{\color{blue}{\left(-eh\right) \cdot t}}{ew}\right)\right| \]
  6. Step-by-step derivation
    1. cos-atan99.8%

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
    3. associate-/l*99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
    4. add-sqr-sqrt55.0%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
    5. sqrt-unprod95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
    6. sqr-neg95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
    7. sqrt-unprod44.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
    8. add-sqr-sqrt99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
  7. Applied egg-rr99.2%

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

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

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

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

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

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

Alternative 3: 98.5% accurate, 1.5× speedup?

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

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

    \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. cos-atan99.8%

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
    3. associate-/l*99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
    4. add-sqr-sqrt55.0%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
    5. sqrt-unprod95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
    6. sqr-neg95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
    7. sqrt-unprod44.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
    8. add-sqr-sqrt99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
  4. Applied egg-rr99.8%

    \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\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| \]
  5. Step-by-step derivation
    1. *-commutative99.8%

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

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

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

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

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

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

Alternative 4: 98.4% accurate, 1.5× speedup?

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

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

    \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. cos-atan99.8%

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
    3. associate-/l*99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
    4. add-sqr-sqrt55.0%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
    5. sqrt-unprod95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
    6. sqr-neg95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
    7. sqrt-unprod44.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
    8. add-sqr-sqrt99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
  4. Applied egg-rr99.8%

    \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\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| \]
  5. Step-by-step derivation
    1. *-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 88.8% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t \cdot eh}{ew}\\ t_2 := eh \cdot \sin t\\ \mathbf{if}\;eh \leq -1.75 \cdot 10^{+122}:\\ \;\;\;\;\left|ew - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right)\right|\\ \mathbf{elif}\;eh \leq 5.2 \cdot 10^{-69}:\\ \;\;\;\;\left|ew \cdot \cos t - t\_1 \cdot \frac{t\_2}{\mathsf{hypot}\left(1, t\_1\right)}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew - t\_2 \cdot \sin \tan^{-1} \left(\frac{t \cdot \left(-eh\right)}{ew}\right)\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (/ (* t eh) ew)) (t_2 (* eh (sin t))))
   (if (<= eh -1.75e+122)
     (fabs (- ew (* eh (* (sin t) (sin (atan (* eh (/ (tan t) ew))))))))
     (if (<= eh 5.2e-69)
       (fabs (- (* ew (cos t)) (* t_1 (/ t_2 (hypot 1.0 t_1)))))
       (fabs (- ew (* t_2 (sin (atan (/ (* t (- eh)) ew))))))))))
double code(double eh, double ew, double t) {
	double t_1 = (t * eh) / ew;
	double t_2 = eh * sin(t);
	double tmp;
	if (eh <= -1.75e+122) {
		tmp = fabs((ew - (eh * (sin(t) * sin(atan((eh * (tan(t) / ew))))))));
	} else if (eh <= 5.2e-69) {
		tmp = fabs(((ew * cos(t)) - (t_1 * (t_2 / hypot(1.0, t_1)))));
	} else {
		tmp = fabs((ew - (t_2 * sin(atan(((t * -eh) / ew))))));
	}
	return tmp;
}
public static double code(double eh, double ew, double t) {
	double t_1 = (t * eh) / ew;
	double t_2 = eh * Math.sin(t);
	double tmp;
	if (eh <= -1.75e+122) {
		tmp = Math.abs((ew - (eh * (Math.sin(t) * Math.sin(Math.atan((eh * (Math.tan(t) / ew))))))));
	} else if (eh <= 5.2e-69) {
		tmp = Math.abs(((ew * Math.cos(t)) - (t_1 * (t_2 / Math.hypot(1.0, t_1)))));
	} else {
		tmp = Math.abs((ew - (t_2 * Math.sin(Math.atan(((t * -eh) / ew))))));
	}
	return tmp;
}
def code(eh, ew, t):
	t_1 = (t * eh) / ew
	t_2 = eh * math.sin(t)
	tmp = 0
	if eh <= -1.75e+122:
		tmp = math.fabs((ew - (eh * (math.sin(t) * math.sin(math.atan((eh * (math.tan(t) / ew))))))))
	elif eh <= 5.2e-69:
		tmp = math.fabs(((ew * math.cos(t)) - (t_1 * (t_2 / math.hypot(1.0, t_1)))))
	else:
		tmp = math.fabs((ew - (t_2 * math.sin(math.atan(((t * -eh) / ew))))))
	return tmp
function code(eh, ew, t)
	t_1 = Float64(Float64(t * eh) / ew)
	t_2 = Float64(eh * sin(t))
	tmp = 0.0
	if (eh <= -1.75e+122)
		tmp = abs(Float64(ew - Float64(eh * Float64(sin(t) * sin(atan(Float64(eh * Float64(tan(t) / ew))))))));
	elseif (eh <= 5.2e-69)
		tmp = abs(Float64(Float64(ew * cos(t)) - Float64(t_1 * Float64(t_2 / hypot(1.0, t_1)))));
	else
		tmp = abs(Float64(ew - Float64(t_2 * sin(atan(Float64(Float64(t * Float64(-eh)) / ew))))));
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	t_1 = (t * eh) / ew;
	t_2 = eh * sin(t);
	tmp = 0.0;
	if (eh <= -1.75e+122)
		tmp = abs((ew - (eh * (sin(t) * sin(atan((eh * (tan(t) / ew))))))));
	elseif (eh <= 5.2e-69)
		tmp = abs(((ew * cos(t)) - (t_1 * (t_2 / hypot(1.0, t_1)))));
	else
		tmp = abs((ew - (t_2 * sin(atan(((t * -eh) / ew))))));
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[(t * eh), $MachinePrecision] / ew), $MachinePrecision]}, Block[{t$95$2 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[eh, -1.75e+122], N[Abs[N[(ew - N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[eh, 5.2e-69], N[Abs[N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * N[(t$95$2 / N[Sqrt[1.0 ^ 2 + t$95$1 ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew - N[(t$95$2 * N[Sin[N[ArcTan[N[(N[(t * (-eh)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t \cdot eh}{ew}\\
t_2 := eh \cdot \sin t\\
\mathbf{if}\;eh \leq -1.75 \cdot 10^{+122}:\\
\;\;\;\;\left|ew - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right)\right|\\

\mathbf{elif}\;eh \leq 5.2 \cdot 10^{-69}:\\
\;\;\;\;\left|ew \cdot \cos t - t\_1 \cdot \frac{t\_2}{\mathsf{hypot}\left(1, t\_1\right)}\right|\\

\mathbf{else}:\\
\;\;\;\;\left|ew - t\_2 \cdot \sin \tan^{-1} \left(\frac{t \cdot \left(-eh\right)}{ew}\right)\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if eh < -1.75000000000000007e122

    1. Initial program 99.6%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. cos-atan99.6%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
      3. associate-/l*99.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
      4. add-sqr-sqrt99.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
      5. sqrt-unprod85.2%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
      6. sqr-neg85.2%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
      7. sqrt-unprod0.0%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
      8. add-sqr-sqrt99.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
    4. Applied egg-rr99.6%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\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| \]
    5. Step-by-step derivation
      1. *-commutative99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.75000000000000007e122 < eh < 5.2000000000000004e-69

    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. Add Preprocessing
    3. Step-by-step derivation
      1. cos-atan99.8%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
      3. associate-/l*99.8%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
      4. add-sqr-sqrt70.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
      5. sqrt-unprod99.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
      6. sqr-neg99.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
      7. sqrt-unprod29.3%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
      8. add-sqr-sqrt99.8%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
    4. Applied egg-rr99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\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| \]
    5. Step-by-step derivation
      1. *-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.2000000000000004e-69 < eh

    1. Initial program 99.9%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. cos-atan99.9%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
      3. associate-/l*99.9%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
      4. add-sqr-sqrt0.0%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
      5. sqrt-unprod93.2%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
      6. sqr-neg93.2%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
      7. sqrt-unprod99.9%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
      8. add-sqr-sqrt99.9%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
    4. Applied egg-rr99.9%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\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| \]
    5. Step-by-step derivation
      1. *-commutative99.9%

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

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

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

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

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

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

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

        \[\leadsto \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{\color{blue}{\left(-1 \cdot eh\right) \cdot t}}{ew}\right)\right| \]
      2. mul-1-neg99.9%

        \[\leadsto \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{\color{blue}{\left(-eh\right)} \cdot t}{ew}\right)\right| \]
    11. Simplified89.4%

      \[\leadsto \left|ew \cdot 1 - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\color{blue}{\left(-eh\right) \cdot t}}{ew}\right)\right| \]
  3. Recombined 3 regimes into one program.
  4. Final simplification90.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -1.75 \cdot 10^{+122}:\\ \;\;\;\;\left|ew - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right)\right|\\ \mathbf{elif}\;eh \leq 5.2 \cdot 10^{-69}:\\ \;\;\;\;\left|ew \cdot \cos t - \frac{t \cdot eh}{ew} \cdot \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \frac{t \cdot eh}{ew}\right)}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{t \cdot \left(-eh\right)}{ew}\right)\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 98.2% accurate, 1.8× speedup?

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

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

    \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
  2. Add Preprocessing
  3. Taylor expanded in t around 0 99.2%

    \[\leadsto \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{\color{blue}{-1 \cdot \left(eh \cdot t\right)}}{ew}\right)\right| \]
  4. Step-by-step derivation
    1. associate-*r*99.2%

      \[\leadsto \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{\color{blue}{\left(-1 \cdot eh\right) \cdot t}}{ew}\right)\right| \]
    2. mul-1-neg99.2%

      \[\leadsto \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{\color{blue}{\left(-eh\right)} \cdot t}{ew}\right)\right| \]
  5. Simplified99.2%

    \[\leadsto \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{\color{blue}{\left(-eh\right) \cdot t}}{ew}\right)\right| \]
  6. Step-by-step derivation
    1. cos-atan99.8%

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
    3. associate-/l*99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
    4. add-sqr-sqrt55.0%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
    5. sqrt-unprod95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
    6. sqr-neg95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
    7. sqrt-unprod44.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
    8. add-sqr-sqrt99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
  7. Applied egg-rr99.2%

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

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

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

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

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

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

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

Alternative 7: 98.2% accurate, 1.8× speedup?

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

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

    \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. cos-atan99.8%

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
    3. associate-/l*99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
    4. add-sqr-sqrt55.0%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
    5. sqrt-unprod95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
    6. sqr-neg95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
    7. sqrt-unprod44.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
    8. add-sqr-sqrt99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
  4. Applied egg-rr99.8%

    \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\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| \]
  5. Step-by-step derivation
    1. *-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 88.8% accurate, 2.1× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{t \cdot eh}{ew}\\
t_2 := eh \cdot \sin t\\
\mathbf{if}\;eh \leq -1.75 \cdot 10^{+122} \lor \neg \left(eh \leq 5.2 \cdot 10^{-69}\right):\\
\;\;\;\;\left|ew - t\_2 \cdot \sin \tan^{-1} \left(\frac{t \cdot \left(-eh\right)}{ew}\right)\right|\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if eh < -1.75000000000000007e122 or 5.2000000000000004e-69 < 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. Add Preprocessing
    3. Step-by-step derivation
      1. cos-atan99.8%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
      3. associate-/l*99.8%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
      4. add-sqr-sqrt32.9%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
      5. sqrt-unprod90.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
      6. sqr-neg90.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
      7. sqrt-unprod66.9%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
      8. add-sqr-sqrt99.8%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
    4. Applied egg-rr99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\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| \]
    5. Step-by-step derivation
      1. *-commutative99.8%

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

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

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

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

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

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

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

        \[\leadsto \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{\color{blue}{\left(-1 \cdot eh\right) \cdot t}}{ew}\right)\right| \]
      2. mul-1-neg99.7%

        \[\leadsto \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{\color{blue}{\left(-eh\right)} \cdot t}{ew}\right)\right| \]
    11. Simplified90.6%

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

    if -1.75000000000000007e122 < eh < 5.2000000000000004e-69

    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. Add Preprocessing
    3. Step-by-step derivation
      1. cos-atan99.8%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
      3. associate-/l*99.8%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
      4. add-sqr-sqrt70.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
      5. sqrt-unprod99.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
      6. sqr-neg99.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
      7. sqrt-unprod29.3%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
      8. add-sqr-sqrt99.8%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
    4. Applied egg-rr99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\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| \]
    5. Step-by-step derivation
      1. *-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -1.75 \cdot 10^{+122} \lor \neg \left(eh \leq 5.2 \cdot 10^{-69}\right):\\ \;\;\;\;\left|ew - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{t \cdot \left(-eh\right)}{ew}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \cos t - \frac{t \cdot eh}{ew} \cdot \frac{eh \cdot \sin t}{\mathsf{hypot}\left(1, \frac{t \cdot eh}{ew}\right)}\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 81.6% accurate, 2.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;ew \leq -1.06 \cdot 10^{+187}:\\
\;\;\;\;\left|ew \cdot \cos t - \left(t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{t \cdot eh}{ew}\right)\right|\\

\mathbf{else}:\\
\;\;\;\;\left|ew - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{t \cdot \left(-eh\right)}{ew}\right)\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if ew < -1.06e187

    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. Add Preprocessing
    3. Step-by-step derivation
      1. cos-atan99.7%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
      3. associate-/l*99.7%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
      4. add-sqr-sqrt45.7%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
      5. sqrt-unprod87.7%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
      6. sqr-neg87.7%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
      7. sqrt-unprod54.0%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
      8. add-sqr-sqrt99.7%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
    4. Applied egg-rr99.7%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\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| \]
    5. Step-by-step derivation
      1. *-commutative99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.06e187 < ew

    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. Add Preprocessing
    3. Step-by-step derivation
      1. cos-atan99.8%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
      3. associate-/l*99.8%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
      4. add-sqr-sqrt55.9%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
      5. sqrt-unprod96.7%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
      6. sqr-neg96.7%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
      7. sqrt-unprod43.9%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
      8. add-sqr-sqrt99.8%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
    4. Applied egg-rr99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\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| \]
    5. Step-by-step derivation
      1. *-commutative99.8%

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

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

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

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

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

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

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

        \[\leadsto \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{\color{blue}{\left(-1 \cdot eh\right) \cdot t}}{ew}\right)\right| \]
      2. mul-1-neg99.2%

        \[\leadsto \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{\color{blue}{\left(-eh\right)} \cdot t}{ew}\right)\right| \]
    11. Simplified77.5%

      \[\leadsto \left|ew \cdot 1 - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\color{blue}{\left(-eh\right) \cdot t}}{ew}\right)\right| \]
  3. Recombined 2 regimes into one program.
  4. Final simplification79.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -1.06 \cdot 10^{+187}:\\ \;\;\;\;\left|ew \cdot \cos t - \left(t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{t \cdot eh}{ew}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{t \cdot \left(-eh\right)}{ew}\right)\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 79.7% accurate, 2.2× speedup?

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

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

    \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. cos-atan99.8%

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
    3. associate-/l*99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
    4. add-sqr-sqrt55.0%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
    5. sqrt-unprod95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
    6. sqr-neg95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
    7. sqrt-unprod44.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
    8. add-sqr-sqrt99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
  4. Applied egg-rr99.8%

    \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\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| \]
  5. Step-by-step derivation
    1. *-commutative99.8%

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

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

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

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

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

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

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

      \[\leadsto \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{\color{blue}{\left(-1 \cdot eh\right) \cdot t}}{ew}\right)\right| \]
    2. mul-1-neg99.2%

      \[\leadsto \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{\color{blue}{\left(-eh\right)} \cdot t}{ew}\right)\right| \]
  11. Simplified75.6%

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

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

Alternative 11: 79.6% accurate, 2.2× speedup?

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

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

    \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. cos-atan99.8%

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
    3. associate-/l*99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
    4. add-sqr-sqrt55.0%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
    5. sqrt-unprod95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
    6. sqr-neg95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
    7. sqrt-unprod44.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
    8. add-sqr-sqrt99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
  4. Applied egg-rr99.8%

    \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\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| \]
  5. Step-by-step derivation
    1. *-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 55.1% accurate, 2.2× speedup?

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

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

    \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. cos-atan99.8%

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
    3. associate-/l*99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
    4. add-sqr-sqrt55.0%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
    5. sqrt-unprod95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
    6. sqr-neg95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
    7. sqrt-unprod44.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
    8. add-sqr-sqrt99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
  4. Applied egg-rr99.8%

    \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\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| \]
  5. Step-by-step derivation
    1. *-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left|ew \cdot 1 - \color{blue}{t \cdot \left(eh \cdot \sin \tan^{-1} \left(eh \cdot \left(-\frac{\tan t}{ew}\right)\right)\right)}\right| \]
  12. Step-by-step derivation
    1. add-sqr-sqrt31.9%

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

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

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

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

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

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

      \[\leadsto \left|ew \cdot 1 - t \cdot \left(eh \cdot \sin \tan^{-1} \color{blue}{\left(\frac{eh}{\frac{ew}{\tan t}}\right)}\right)\right| \]
  13. Applied egg-rr51.0%

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

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

    \[\leadsto \left|ew \cdot 1 - t \cdot \left(eh \cdot \sin \tan^{-1} \color{blue}{\left(\frac{eh}{ew} \cdot \tan t\right)}\right)\right| \]
  16. Final simplification51.0%

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

Alternative 13: 54.4% accurate, 3.0× speedup?

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

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

    \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. cos-atan99.8%

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
    3. associate-/l*99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
    4. add-sqr-sqrt55.0%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
    5. sqrt-unprod95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
    6. sqr-neg95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
    7. sqrt-unprod44.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
    8. add-sqr-sqrt99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
  4. Applied egg-rr99.8%

    \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\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| \]
  5. Step-by-step derivation
    1. *-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 51.6% accurate, 4.2× speedup?

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

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

    \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. cos-atan99.8%

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
    3. associate-/l*99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
    4. add-sqr-sqrt55.0%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
    5. sqrt-unprod95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
    6. sqr-neg95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
    7. sqrt-unprod44.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
    8. add-sqr-sqrt99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
  4. Applied egg-rr99.8%

    \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\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| \]
  5. Step-by-step derivation
    1. *-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|ew \cdot 1 - t \cdot \frac{eh \cdot \color{blue}{\frac{t \cdot eh}{-ew}}}{\sqrt{1 + \left(t \cdot \frac{eh}{-ew}\right) \cdot \left(t \cdot \frac{eh}{-ew}\right)}}\right| \]
    4. add-sqr-sqrt19.9%

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

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

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

      \[\leadsto \left|ew \cdot 1 - t \cdot \frac{eh \cdot \frac{t \cdot eh}{\color{blue}{\sqrt{ew} \cdot \sqrt{ew}}}}{\sqrt{1 + \left(t \cdot \frac{eh}{-ew}\right) \cdot \left(t \cdot \frac{eh}{-ew}\right)}}\right| \]
    8. add-sqr-sqrt40.9%

      \[\leadsto \left|ew \cdot 1 - t \cdot \frac{eh \cdot \frac{t \cdot eh}{\color{blue}{ew}}}{\sqrt{1 + \left(t \cdot \frac{eh}{-ew}\right) \cdot \left(t \cdot \frac{eh}{-ew}\right)}}\right| \]
    9. associate-/l*41.0%

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

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

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

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

      \[\leadsto \left|ew \cdot 1 - t \cdot \frac{eh \cdot \left(t \cdot \frac{eh}{ew}\right)}{\mathsf{hypot}\left(1, \frac{t \cdot eh}{\color{blue}{\sqrt{\left(-ew\right) \cdot \left(-ew\right)}}}\right)}\right| \]
    14. sqr-neg35.7%

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

      \[\leadsto \left|ew \cdot 1 - t \cdot \frac{eh \cdot \left(t \cdot \frac{eh}{ew}\right)}{\mathsf{hypot}\left(1, \frac{t \cdot eh}{\color{blue}{\sqrt{ew} \cdot \sqrt{ew}}}\right)}\right| \]
    16. add-sqr-sqrt42.2%

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

      \[\leadsto \left|ew \cdot 1 - t \cdot \frac{eh \cdot \left(t \cdot \frac{eh}{ew}\right)}{\mathsf{hypot}\left(1, \color{blue}{t \cdot \frac{eh}{ew}}\right)}\right| \]
  16. Applied egg-rr42.2%

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

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

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

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

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

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

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

      \[\leadsto \left|ew \cdot 1 - t \cdot \left(eh \cdot \left(\frac{t}{ew} \cdot \frac{eh}{\mathsf{hypot}\left(1, \color{blue}{eh \cdot \frac{t}{ew}}\right)}\right)\right)\right| \]
  18. Simplified47.3%

    \[\leadsto \left|ew \cdot 1 - t \cdot \color{blue}{\left(eh \cdot \left(\frac{t}{ew} \cdot \frac{eh}{\mathsf{hypot}\left(1, eh \cdot \frac{t}{ew}\right)}\right)\right)}\right| \]
  19. Final simplification47.3%

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

Alternative 15: 44.4% accurate, 7.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -8.8 \cdot 10^{+210} \lor \neg \left(eh \leq 2.5 \cdot 10^{+85} \lor \neg \left(eh \leq 7.8 \cdot 10^{+236}\right) \land eh \leq 5.2 \cdot 10^{+260}\right):\\ \;\;\;\;\left|t \cdot eh\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (if (or (<= eh -8.8e+210)
         (not
          (or (<= eh 2.5e+85) (and (not (<= eh 7.8e+236)) (<= eh 5.2e+260)))))
   (fabs (* t eh))
   (fabs ew)))
double code(double eh, double ew, double t) {
	double tmp;
	if ((eh <= -8.8e+210) || !((eh <= 2.5e+85) || (!(eh <= 7.8e+236) && (eh <= 5.2e+260)))) {
		tmp = fabs((t * eh));
	} else {
		tmp = fabs(ew);
	}
	return tmp;
}
real(8) function code(eh, ew, t)
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((eh <= (-8.8d+210)) .or. (.not. (eh <= 2.5d+85) .or. (.not. (eh <= 7.8d+236)) .and. (eh <= 5.2d+260))) then
        tmp = abs((t * eh))
    else
        tmp = abs(ew)
    end if
    code = tmp
end function
public static double code(double eh, double ew, double t) {
	double tmp;
	if ((eh <= -8.8e+210) || !((eh <= 2.5e+85) || (!(eh <= 7.8e+236) && (eh <= 5.2e+260)))) {
		tmp = Math.abs((t * eh));
	} else {
		tmp = Math.abs(ew);
	}
	return tmp;
}
def code(eh, ew, t):
	tmp = 0
	if (eh <= -8.8e+210) or not ((eh <= 2.5e+85) or (not (eh <= 7.8e+236) and (eh <= 5.2e+260))):
		tmp = math.fabs((t * eh))
	else:
		tmp = math.fabs(ew)
	return tmp
function code(eh, ew, t)
	tmp = 0.0
	if ((eh <= -8.8e+210) || !((eh <= 2.5e+85) || (!(eh <= 7.8e+236) && (eh <= 5.2e+260))))
		tmp = abs(Float64(t * eh));
	else
		tmp = abs(ew);
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	tmp = 0.0;
	if ((eh <= -8.8e+210) || ~(((eh <= 2.5e+85) || (~((eh <= 7.8e+236)) && (eh <= 5.2e+260)))))
		tmp = abs((t * eh));
	else
		tmp = abs(ew);
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -8.8e+210], N[Not[Or[LessEqual[eh, 2.5e+85], And[N[Not[LessEqual[eh, 7.8e+236]], $MachinePrecision], LessEqual[eh, 5.2e+260]]]], $MachinePrecision]], N[Abs[N[(t * eh), $MachinePrecision]], $MachinePrecision], N[Abs[ew], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;eh \leq -8.8 \cdot 10^{+210} \lor \neg \left(eh \leq 2.5 \cdot 10^{+85} \lor \neg \left(eh \leq 7.8 \cdot 10^{+236}\right) \land eh \leq 5.2 \cdot 10^{+260}\right):\\
\;\;\;\;\left|t \cdot eh\right|\\

\mathbf{else}:\\
\;\;\;\;\left|ew\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if eh < -8.79999999999999948e210 or 2.5e85 < eh < 7.8000000000000001e236 or 5.1999999999999996e260 < 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. Add Preprocessing
    3. Step-by-step derivation
      1. cos-atan99.8%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
      3. associate-/l*99.8%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
      4. add-sqr-sqrt34.5%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
      5. sqrt-unprod90.3%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
      6. sqr-neg90.3%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
      7. sqrt-unprod65.3%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
      8. add-sqr-sqrt99.8%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
    4. Applied egg-rr99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\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| \]
    5. Step-by-step derivation
      1. *-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|\color{blue}{t \cdot \left(\frac{ew}{t} - eh \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot t}{ew}\right)\right)}\right| \]
    16. Step-by-step derivation
      1. cancel-sign-sub-inv40.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} - \color{blue}{\frac{\left(-t\right) \cdot \frac{eh}{ew}}{\sqrt{1 + \left(\left(-t\right) \cdot \frac{eh}{ew}\right) \cdot \left(\left(-t\right) \cdot \frac{eh}{ew}\right)}}} \cdot eh\right)\right| \]
      3. associate-*l/10.7%

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

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

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

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

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} - \frac{\left(\color{blue}{\left(\sqrt{t} \cdot \sqrt{t}\right)} \cdot \frac{eh}{ew}\right) \cdot eh}{\sqrt{1 + \left(\left(-t\right) \cdot \frac{eh}{ew}\right) \cdot \left(\left(-t\right) \cdot \frac{eh}{ew}\right)}}\right)\right| \]
      8. add-sqr-sqrt10.7%

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

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} - \frac{\color{blue}{\frac{t \cdot eh}{ew}} \cdot eh}{\sqrt{1 + \left(\left(-t\right) \cdot \frac{eh}{ew}\right) \cdot \left(\left(-t\right) \cdot \frac{eh}{ew}\right)}}\right)\right| \]
      10. *-commutative10.7%

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} - \frac{\frac{\color{blue}{eh \cdot t}}{ew} \cdot eh}{\sqrt{1 + \left(\left(-t\right) \cdot \frac{eh}{ew}\right) \cdot \left(\left(-t\right) \cdot \frac{eh}{ew}\right)}}\right)\right| \]
      11. associate-/l*10.7%

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} - \frac{\color{blue}{\left(eh \cdot \frac{t}{ew}\right)} \cdot eh}{\sqrt{1 + \left(\left(-t\right) \cdot \frac{eh}{ew}\right) \cdot \left(\left(-t\right) \cdot \frac{eh}{ew}\right)}}\right)\right| \]
      12. distribute-lft-neg-out10.7%

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} - \frac{\left(eh \cdot \frac{t}{ew}\right) \cdot eh}{\sqrt{1 + \left(\left(-t\right) \cdot \frac{eh}{ew}\right) \cdot \color{blue}{\left(-t \cdot \frac{eh}{ew}\right)}}}\right)\right| \]
      13. distribute-lft-neg-out10.7%

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} - \frac{\left(eh \cdot \frac{t}{ew}\right) \cdot eh}{\sqrt{1 + \color{blue}{\left(-t \cdot \frac{eh}{ew}\right)} \cdot \left(-t \cdot \frac{eh}{ew}\right)}}\right)\right| \]
      14. sqr-neg10.7%

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} - \frac{\left(eh \cdot \frac{t}{ew}\right) \cdot eh}{\sqrt{1 + \color{blue}{\left(t \cdot \frac{eh}{ew}\right) \cdot \left(t \cdot \frac{eh}{ew}\right)}}}\right)\right| \]
    19. Applied egg-rr14.1%

      \[\leadsto \left|t \cdot \left(\frac{ew}{t} - \color{blue}{\frac{\left(eh \cdot \frac{t}{ew}\right) \cdot eh}{\mathsf{hypot}\left(1, eh \cdot \frac{t}{ew}\right)}}\right)\right| \]
    20. Step-by-step derivation
      1. *-commutative14.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} - eh \cdot \frac{\color{blue}{\frac{1 \cdot eh}{\frac{ew}{t}}}}{\mathsf{hypot}\left(1, eh \cdot \frac{t}{ew}\right)}\right)\right| \]
      12. *-lft-identity30.6%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|t \cdot \left(\frac{ew}{t} - \color{blue}{eh \cdot \frac{\frac{eh}{\frac{ew}{t}}}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{t}}\right)}}\right)\right| \]
    22. Taylor expanded in t around -inf 39.5%

      \[\leadsto \left|\color{blue}{eh \cdot t}\right| \]
    23. Step-by-step derivation
      1. *-commutative39.5%

        \[\leadsto \left|\color{blue}{t \cdot eh}\right| \]
    24. Simplified39.5%

      \[\leadsto \left|\color{blue}{t \cdot eh}\right| \]

    if -8.79999999999999948e210 < eh < 2.5e85 or 7.8000000000000001e236 < eh < 5.1999999999999996e260

    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. Add Preprocessing
    3. Step-by-step derivation
      1. cos-atan99.8%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
      3. associate-/l*99.8%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
      4. add-sqr-sqrt60.2%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
      5. sqrt-unprod97.3%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
      6. sqr-neg97.3%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
      7. sqrt-unprod39.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
      8. add-sqr-sqrt99.8%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
    4. Applied egg-rr99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\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| \]
    5. Step-by-step derivation
      1. *-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|\color{blue}{ew}\right| \]
  3. Recombined 2 regimes into one program.
  4. Final simplification46.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -8.8 \cdot 10^{+210} \lor \neg \left(eh \leq 2.5 \cdot 10^{+85} \lor \neg \left(eh \leq 7.8 \cdot 10^{+236}\right) \land eh \leq 5.2 \cdot 10^{+260}\right):\\ \;\;\;\;\left|t \cdot eh\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 51.3% accurate, 7.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -6.2 \cdot 10^{+104} \lor \neg \left(ew \leq 2.4 \cdot 10^{-155}\right):\\ \;\;\;\;\left|ew\right|\\ \mathbf{else}:\\ \;\;\;\;\left|t \cdot \left(\frac{ew}{t} - eh\right)\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (if (or (<= ew -6.2e+104) (not (<= ew 2.4e-155)))
   (fabs ew)
   (fabs (* t (- (/ ew t) eh)))))
double code(double eh, double ew, double t) {
	double tmp;
	if ((ew <= -6.2e+104) || !(ew <= 2.4e-155)) {
		tmp = fabs(ew);
	} else {
		tmp = fabs((t * ((ew / t) - eh)));
	}
	return tmp;
}
real(8) function code(eh, ew, t)
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((ew <= (-6.2d+104)) .or. (.not. (ew <= 2.4d-155))) then
        tmp = abs(ew)
    else
        tmp = abs((t * ((ew / t) - eh)))
    end if
    code = tmp
end function
public static double code(double eh, double ew, double t) {
	double tmp;
	if ((ew <= -6.2e+104) || !(ew <= 2.4e-155)) {
		tmp = Math.abs(ew);
	} else {
		tmp = Math.abs((t * ((ew / t) - eh)));
	}
	return tmp;
}
def code(eh, ew, t):
	tmp = 0
	if (ew <= -6.2e+104) or not (ew <= 2.4e-155):
		tmp = math.fabs(ew)
	else:
		tmp = math.fabs((t * ((ew / t) - eh)))
	return tmp
function code(eh, ew, t)
	tmp = 0.0
	if ((ew <= -6.2e+104) || !(ew <= 2.4e-155))
		tmp = abs(ew);
	else
		tmp = abs(Float64(t * Float64(Float64(ew / t) - eh)));
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	tmp = 0.0;
	if ((ew <= -6.2e+104) || ~((ew <= 2.4e-155)))
		tmp = abs(ew);
	else
		tmp = abs((t * ((ew / t) - eh)));
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := If[Or[LessEqual[ew, -6.2e+104], N[Not[LessEqual[ew, 2.4e-155]], $MachinePrecision]], N[Abs[ew], $MachinePrecision], N[Abs[N[(t * N[(N[(ew / t), $MachinePrecision] - eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;ew \leq -6.2 \cdot 10^{+104} \lor \neg \left(ew \leq 2.4 \cdot 10^{-155}\right):\\
\;\;\;\;\left|ew\right|\\

\mathbf{else}:\\
\;\;\;\;\left|t \cdot \left(\frac{ew}{t} - eh\right)\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if ew < -6.20000000000000033e104 or 2.4e-155 < ew

    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. Add Preprocessing
    3. Step-by-step derivation
      1. cos-atan99.8%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
      3. associate-/l*99.8%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
      4. add-sqr-sqrt54.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
      5. sqrt-unprod93.8%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
      6. sqr-neg93.8%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
      7. sqrt-unprod45.2%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
      8. add-sqr-sqrt99.8%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
    4. Applied egg-rr99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\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| \]
    5. Step-by-step derivation
      1. *-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|\color{blue}{ew}\right| \]

    if -6.20000000000000033e104 < ew < 2.4e-155

    1. Initial program 99.9%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. cos-atan99.9%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
      3. associate-/l*99.9%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
      4. add-sqr-sqrt55.5%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
      5. sqrt-unprod98.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
      6. sqr-neg98.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
      7. sqrt-unprod44.4%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
      8. add-sqr-sqrt99.9%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
    4. Applied egg-rr99.9%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\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| \]
    5. Step-by-step derivation
      1. *-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|\color{blue}{t \cdot \left(\frac{ew}{t} - eh \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot t}{ew}\right)\right)}\right| \]
    16. Step-by-step derivation
      1. cancel-sign-sub-inv51.0%

        \[\leadsto \left|t \cdot \color{blue}{\left(\frac{ew}{t} + \left(-eh\right) \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot t}{ew}\right)\right)}\right| \]
      2. cancel-sign-sub51.0%

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

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

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

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

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

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

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

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

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} - \color{blue}{\frac{\left(-t\right) \cdot \frac{eh}{ew}}{\sqrt{1 + \left(\left(-t\right) \cdot \frac{eh}{ew}\right) \cdot \left(\left(-t\right) \cdot \frac{eh}{ew}\right)}}} \cdot eh\right)\right| \]
      3. associate-*l/33.3%

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} - \color{blue}{\frac{\left(\left(-t\right) \cdot \frac{eh}{ew}\right) \cdot eh}{\sqrt{1 + \left(\left(-t\right) \cdot \frac{eh}{ew}\right) \cdot \left(\left(-t\right) \cdot \frac{eh}{ew}\right)}}}\right)\right| \]
      4. add-sqr-sqrt15.8%

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

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

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

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} - \frac{\left(\color{blue}{\left(\sqrt{t} \cdot \sqrt{t}\right)} \cdot \frac{eh}{ew}\right) \cdot eh}{\sqrt{1 + \left(\left(-t\right) \cdot \frac{eh}{ew}\right) \cdot \left(\left(-t\right) \cdot \frac{eh}{ew}\right)}}\right)\right| \]
      8. add-sqr-sqrt33.3%

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

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} - \frac{\color{blue}{\frac{t \cdot eh}{ew}} \cdot eh}{\sqrt{1 + \left(\left(-t\right) \cdot \frac{eh}{ew}\right) \cdot \left(\left(-t\right) \cdot \frac{eh}{ew}\right)}}\right)\right| \]
      10. *-commutative33.4%

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} - \frac{\frac{\color{blue}{eh \cdot t}}{ew} \cdot eh}{\sqrt{1 + \left(\left(-t\right) \cdot \frac{eh}{ew}\right) \cdot \left(\left(-t\right) \cdot \frac{eh}{ew}\right)}}\right)\right| \]
      11. associate-/l*33.0%

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} - \frac{\color{blue}{\left(eh \cdot \frac{t}{ew}\right)} \cdot eh}{\sqrt{1 + \left(\left(-t\right) \cdot \frac{eh}{ew}\right) \cdot \left(\left(-t\right) \cdot \frac{eh}{ew}\right)}}\right)\right| \]
      12. distribute-lft-neg-out33.0%

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} - \frac{\left(eh \cdot \frac{t}{ew}\right) \cdot eh}{\sqrt{1 + \left(\left(-t\right) \cdot \frac{eh}{ew}\right) \cdot \color{blue}{\left(-t \cdot \frac{eh}{ew}\right)}}}\right)\right| \]
      13. distribute-lft-neg-out33.0%

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

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} - \frac{\left(eh \cdot \frac{t}{ew}\right) \cdot eh}{\sqrt{1 + \color{blue}{\left(t \cdot \frac{eh}{ew}\right) \cdot \left(t \cdot \frac{eh}{ew}\right)}}}\right)\right| \]
    19. Applied egg-rr37.9%

      \[\leadsto \left|t \cdot \left(\frac{ew}{t} - \color{blue}{\frac{\left(eh \cdot \frac{t}{ew}\right) \cdot eh}{\mathsf{hypot}\left(1, eh \cdot \frac{t}{ew}\right)}}\right)\right| \]
    20. Step-by-step derivation
      1. *-commutative37.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} - eh \cdot \frac{\color{blue}{\frac{1 \cdot eh}{\frac{ew}{t}}}}{\mathsf{hypot}\left(1, eh \cdot \frac{t}{ew}\right)}\right)\right| \]
      12. *-lft-identity45.4%

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

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} - eh \cdot \frac{\frac{eh}{\frac{ew}{t}}}{\mathsf{hypot}\left(1, \color{blue}{\frac{t}{ew} \cdot eh}\right)}\right)\right| \]
      14. *-rgt-identity45.4%

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

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

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} - eh \cdot \frac{\frac{eh}{\frac{ew}{t}}}{\mathsf{hypot}\left(1, \color{blue}{\left(t \cdot \frac{1}{ew}\right)} \cdot eh\right)}\right)\right| \]
      17. *-commutative45.4%

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

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

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} - eh \cdot \frac{\frac{eh}{\frac{ew}{t}}}{\mathsf{hypot}\left(1, \color{blue}{\frac{1 \cdot eh}{\frac{ew}{t}}}\right)}\right)\right| \]
      20. *-lft-identity45.3%

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} - eh \cdot \frac{\frac{eh}{\frac{ew}{t}}}{\mathsf{hypot}\left(1, \frac{\color{blue}{eh}}{\frac{ew}{t}}\right)}\right)\right| \]
    21. Simplified45.3%

      \[\leadsto \left|t \cdot \left(\frac{ew}{t} - \color{blue}{eh \cdot \frac{\frac{eh}{\frac{ew}{t}}}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{t}}\right)}}\right)\right| \]
    22. Taylor expanded in t around inf 51.0%

      \[\leadsto \left|\color{blue}{t \cdot \left(-1 \cdot eh + \frac{ew}{t}\right)}\right| \]
    23. Step-by-step derivation
      1. +-commutative51.0%

        \[\leadsto \left|t \cdot \color{blue}{\left(\frac{ew}{t} + -1 \cdot eh\right)}\right| \]
      2. neg-mul-151.0%

        \[\leadsto \left|t \cdot \left(\frac{ew}{t} + \color{blue}{\left(-eh\right)}\right)\right| \]
      3. unsub-neg51.0%

        \[\leadsto \left|t \cdot \color{blue}{\left(\frac{ew}{t} - eh\right)}\right| \]
    24. Simplified51.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -6.2 \cdot 10^{+104} \lor \neg \left(ew \leq 2.4 \cdot 10^{-155}\right):\\ \;\;\;\;\left|ew\right|\\ \mathbf{else}:\\ \;\;\;\;\left|t \cdot \left(\frac{ew}{t} - eh\right)\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 42.4% accurate, 9.1× speedup?

\[\begin{array}{l} \\ \left|ew\right| \end{array} \]
(FPCore (eh ew t) :precision binary64 (fabs ew))
double code(double eh, double ew, double t) {
	return fabs(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)
end function
public static double code(double eh, double ew, double t) {
	return Math.abs(ew);
}
def code(eh, ew, t):
	return math.fabs(ew)
function code(eh, ew, t)
	return abs(ew)
end
function tmp = code(eh, ew, t)
	tmp = abs(ew);
end
code[eh_, ew_, t_] := N[Abs[ew], $MachinePrecision]
\begin{array}{l}

\\
\left|ew\right|
\end{array}
Derivation
  1. Initial program 99.8%

    \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. cos-atan99.8%

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \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| \]
    3. associate-/l*99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(-eh\right) \cdot \frac{\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| \]
    4. add-sqr-sqrt55.0%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\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| \]
    5. sqrt-unprod95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\left(-eh\right) \cdot \left(-eh\right)}} \cdot \frac{\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| \]
    6. sqr-neg95.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{eh \cdot eh}} \cdot \frac{\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| \]
    7. sqrt-unprod44.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{eh} \cdot \sqrt{eh}\right)} \cdot \frac{\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| \]
    8. add-sqr-sqrt99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh} \cdot \frac{\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| \]
  4. Applied egg-rr99.8%

    \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\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| \]
  5. Step-by-step derivation
    1. *-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left|\color{blue}{ew}\right| \]
  16. Add Preprocessing

Reproduce

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