Example 2 from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 13.8s
Alternatives: 8
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 8 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}{\sqrt{{\left(\frac{\tan t}{ew} \cdot eh\right)}^{2} + 1}} \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 (sqrt (+ (pow (* (/ (tan t) ew) eh) 2.0) 1.0))) (* ew (cos t)))
   (* (* eh (sin t)) (sin (atan (/ (* (tan t) (- eh)) ew)))))))
double code(double eh, double ew, double t) {
	return fabs((((1.0 / sqrt((pow(((tan(t) / ew) * eh), 2.0) + 1.0))) * (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((((1.0d0 / sqrt(((((tan(t) / ew) * eh) ** 2.0d0) + 1.0d0))) * (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((((1.0 / Math.sqrt((Math.pow(((Math.tan(t) / ew) * eh), 2.0) + 1.0))) * (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.sqrt((math.pow(((math.tan(t) / ew) * eh), 2.0) + 1.0))) * (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 / sqrt(Float64((Float64(Float64(tan(t) / ew) * eh) ^ 2.0) + 1.0))) * 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 / sqrt(((((tan(t) / ew) * eh) ^ 2.0) + 1.0))) * (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[N[(N[Power[N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]], $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}{\sqrt{{\left(\frac{\tan t}{ew} \cdot eh\right)}^{2} + 1}} \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. lift-tan.f64N/A

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\mathsf{neg}\left(eh \cdot \tan t\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    3. distribute-rgt-neg-inN/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{eh \cdot \left(\mathsf{neg}\left(\tan t\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    4. +-lft-identityN/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(0 + eh\right)} \cdot \left(\mathsf{neg}\left(\tan t\right)\right)}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    5. +-lft-identityN/A

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\mathsf{neg}\left(eh \cdot \tan t\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    7. *-commutativeN/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\mathsf{neg}\left(\color{blue}{\tan t \cdot eh}\right)}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    8. distribute-rgt-neg-outN/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\tan t \cdot \left(\mathsf{neg}\left(eh\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    9. lift-neg.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\tan t \cdot \color{blue}{\left(\mathsf{neg}\left(eh\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    10. *-commutativeN/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    11. lift-*.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    12. lift-/.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \color{blue}{\left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    13. cos-atanN/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    14. lower-/.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\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}{\sqrt{1 + {\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
  5. Final simplification99.8%

    \[\leadsto \left|\frac{1}{\sqrt{{\left(\frac{\tan t}{ew} \cdot eh\right)}^{2} + 1}} \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| \]
  6. Add Preprocessing

Alternative 2: 99.0% accurate, 1.1× speedup?

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

\\
\left|\cos \tan^{-1} \left(\frac{\tan t \cdot \left(-eh\right)}{ew}\right) \cdot \left(ew \cdot \cos t\right) - \left(eh \cdot \sin t\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. Taylor expanded in t around 0

    \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \color{blue}{\left(-1 \cdot \frac{eh \cdot t}{ew}\right)}\right| \]
  4. Step-by-step derivation
    1. mul-1-negN/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \color{blue}{\left(\mathsf{neg}\left(\frac{eh \cdot t}{ew}\right)\right)}\right| \]
    2. lower-neg.f64N/A

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\mathsf{neg}\left(\color{blue}{eh \cdot \frac{t}{ew}}\right)\right)\right| \]
    4. lower-*.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\mathsf{neg}\left(\color{blue}{eh \cdot \frac{t}{ew}}\right)\right)\right| \]
    5. lower-/.f6499.5

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

    \[\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} \color{blue}{\left(-eh \cdot \frac{t}{ew}\right)}\right| \]
  6. Final simplification99.5%

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

Alternative 3: 98.4% accurate, 1.6× 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. lift-tan.f64N/A

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\mathsf{neg}\left(eh \cdot \tan t\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    3. distribute-rgt-neg-inN/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{eh \cdot \left(\mathsf{neg}\left(\tan t\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    4. +-lft-identityN/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(0 + eh\right)} \cdot \left(\mathsf{neg}\left(\tan t\right)\right)}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    5. +-lft-identityN/A

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\mathsf{neg}\left(eh \cdot \tan t\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    7. *-commutativeN/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\mathsf{neg}\left(\color{blue}{\tan t \cdot eh}\right)}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    8. distribute-rgt-neg-outN/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\tan t \cdot \left(\mathsf{neg}\left(eh\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    9. lift-neg.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\tan t \cdot \color{blue}{\left(\mathsf{neg}\left(eh\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    10. *-commutativeN/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    11. lift-*.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    12. lift-/.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \color{blue}{\left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    13. cos-atanN/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    14. lower-/.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\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}{\sqrt{1 + {\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
  5. Taylor expanded in t around 0

    \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{1 + \frac{1}{2} \cdot \frac{{eh}^{2} \cdot {t}^{2}}{{ew}^{2}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
  6. Step-by-step derivation
    1. +-commutativeN/A

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\frac{\frac{1}{2} \cdot \left({eh}^{2} \cdot {t}^{2}\right)}{{ew}^{2}}} + 1} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    3. associate-*r*N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\frac{\color{blue}{\left(\frac{1}{2} \cdot {eh}^{2}\right) \cdot {t}^{2}}}{{ew}^{2}} + 1} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    4. associate-*l/N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\frac{\frac{1}{2} \cdot {eh}^{2}}{{ew}^{2}} \cdot {t}^{2}} + 1} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    5. associate-*r/N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\left(\frac{1}{2} \cdot \frac{{eh}^{2}}{{ew}^{2}}\right)} \cdot {t}^{2} + 1} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    6. *-commutativeN/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{{t}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{eh}^{2}}{{ew}^{2}}\right)} + 1} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    7. lower-fma.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{fma}\left({t}^{2}, \frac{1}{2} \cdot \frac{{eh}^{2}}{{ew}^{2}}, 1\right)}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    8. unpow2N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{fma}\left(\color{blue}{t \cdot t}, \frac{1}{2} \cdot \frac{{eh}^{2}}{{ew}^{2}}, 1\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    9. lower-*.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{fma}\left(\color{blue}{t \cdot t}, \frac{1}{2} \cdot \frac{{eh}^{2}}{{ew}^{2}}, 1\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    10. associate-*r/N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{fma}\left(t \cdot t, \color{blue}{\frac{\frac{1}{2} \cdot {eh}^{2}}{{ew}^{2}}}, 1\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    11. lower-/.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{fma}\left(t \cdot t, \color{blue}{\frac{\frac{1}{2} \cdot {eh}^{2}}{{ew}^{2}}}, 1\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    12. lower-*.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{fma}\left(t \cdot t, \frac{\color{blue}{\frac{1}{2} \cdot {eh}^{2}}}{{ew}^{2}}, 1\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    13. unpow2N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{fma}\left(t \cdot t, \frac{\frac{1}{2} \cdot \color{blue}{\left(eh \cdot eh\right)}}{{ew}^{2}}, 1\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    14. lower-*.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{fma}\left(t \cdot t, \frac{\frac{1}{2} \cdot \color{blue}{\left(eh \cdot eh\right)}}{{ew}^{2}}, 1\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    15. unpow2N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{fma}\left(t \cdot t, \frac{\frac{1}{2} \cdot \left(eh \cdot eh\right)}{\color{blue}{ew \cdot ew}}, 1\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    16. lower-*.f6465.7

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

    \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{fma}\left(t \cdot t, \frac{0.5 \cdot \left(eh \cdot eh\right)}{ew \cdot ew}, 1\right)}} - \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 ew around inf

    \[\leadsto \left|\color{blue}{ew \cdot \cos t} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
  9. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto \left|\color{blue}{ew \cdot \cos t} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    2. lower-cos.f6499.0

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

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

    \[\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| \]
  12. Add Preprocessing

Alternative 4: 98.1% accurate, 2.0× 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. Step-by-step derivation
    1. lift-tan.f64N/A

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\mathsf{neg}\left(eh \cdot \tan t\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    3. distribute-rgt-neg-inN/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{eh \cdot \left(\mathsf{neg}\left(\tan t\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    4. +-lft-identityN/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(0 + eh\right)} \cdot \left(\mathsf{neg}\left(\tan t\right)\right)}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    5. +-lft-identityN/A

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\mathsf{neg}\left(eh \cdot \tan t\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    7. *-commutativeN/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\mathsf{neg}\left(\color{blue}{\tan t \cdot eh}\right)}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    8. distribute-rgt-neg-outN/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\tan t \cdot \left(\mathsf{neg}\left(eh\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    9. lift-neg.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\tan t \cdot \color{blue}{\left(\mathsf{neg}\left(eh\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    10. *-commutativeN/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    11. lift-*.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    12. lift-/.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \color{blue}{\left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    13. cos-atanN/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    14. lower-/.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\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}{\sqrt{1 + {\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
  5. Taylor expanded in t around 0

    \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{1 + \frac{1}{2} \cdot \frac{{eh}^{2} \cdot {t}^{2}}{{ew}^{2}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
  6. Step-by-step derivation
    1. +-commutativeN/A

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\frac{\frac{1}{2} \cdot \left({eh}^{2} \cdot {t}^{2}\right)}{{ew}^{2}}} + 1} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    3. associate-*r*N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\frac{\color{blue}{\left(\frac{1}{2} \cdot {eh}^{2}\right) \cdot {t}^{2}}}{{ew}^{2}} + 1} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    4. associate-*l/N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\frac{\frac{1}{2} \cdot {eh}^{2}}{{ew}^{2}} \cdot {t}^{2}} + 1} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    5. associate-*r/N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\left(\frac{1}{2} \cdot \frac{{eh}^{2}}{{ew}^{2}}\right)} \cdot {t}^{2} + 1} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    6. *-commutativeN/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{{t}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{eh}^{2}}{{ew}^{2}}\right)} + 1} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    7. lower-fma.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{fma}\left({t}^{2}, \frac{1}{2} \cdot \frac{{eh}^{2}}{{ew}^{2}}, 1\right)}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    8. unpow2N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{fma}\left(\color{blue}{t \cdot t}, \frac{1}{2} \cdot \frac{{eh}^{2}}{{ew}^{2}}, 1\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    9. lower-*.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{fma}\left(\color{blue}{t \cdot t}, \frac{1}{2} \cdot \frac{{eh}^{2}}{{ew}^{2}}, 1\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    10. associate-*r/N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{fma}\left(t \cdot t, \color{blue}{\frac{\frac{1}{2} \cdot {eh}^{2}}{{ew}^{2}}}, 1\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    11. lower-/.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{fma}\left(t \cdot t, \color{blue}{\frac{\frac{1}{2} \cdot {eh}^{2}}{{ew}^{2}}}, 1\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    12. lower-*.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{fma}\left(t \cdot t, \frac{\color{blue}{\frac{1}{2} \cdot {eh}^{2}}}{{ew}^{2}}, 1\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    13. unpow2N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{fma}\left(t \cdot t, \frac{\frac{1}{2} \cdot \color{blue}{\left(eh \cdot eh\right)}}{{ew}^{2}}, 1\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    14. lower-*.f64N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{fma}\left(t \cdot t, \frac{\frac{1}{2} \cdot \color{blue}{\left(eh \cdot eh\right)}}{{ew}^{2}}, 1\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    15. unpow2N/A

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{fma}\left(t \cdot t, \frac{\frac{1}{2} \cdot \left(eh \cdot eh\right)}{\color{blue}{ew \cdot ew}}, 1\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    16. lower-*.f6465.7

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

    \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{fma}\left(t \cdot t, \frac{0.5 \cdot \left(eh \cdot eh\right)}{ew \cdot ew}, 1\right)}} - \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 ew around inf

    \[\leadsto \left|\color{blue}{ew \cdot \cos t} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
  9. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto \left|\color{blue}{ew \cdot \cos t} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    2. lower-cos.f6499.0

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

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

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

      \[\leadsto \left|ew \cdot \cos t - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\color{blue}{\mathsf{neg}\left(eh \cdot t\right)}}{ew}\right)\right| \]
    2. distribute-rgt-neg-inN/A

      \[\leadsto \left|ew \cdot \cos t - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\color{blue}{eh \cdot \left(\mathsf{neg}\left(t\right)\right)}}{ew}\right)\right| \]
    3. mul-1-negN/A

      \[\leadsto \left|ew \cdot \cos t - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \color{blue}{\left(-1 \cdot t\right)}}{ew}\right)\right| \]
    4. lower-*.f64N/A

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

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

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

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

    \[\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| \]
  15. Add Preprocessing

Alternative 5: 69.3% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := ew \cdot \cos t\\ t_2 := eh \cdot \sin t\\ t_3 := \sin \tan^{-1} \left(\frac{t \cdot \left(-eh\right)}{ew}\right)\\ t_4 := \left|t\_1 - t\_3 \cdot \left(t \cdot eh\right)\right|\\ \mathbf{if}\;ew \leq -3.9 \cdot 10^{+105}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;ew \leq -1.35 \cdot 10^{-160}:\\ \;\;\;\;\left|t\_1 + t\_2 \cdot \frac{t \cdot eh}{ew \cdot \sqrt{\mathsf{fma}\left(eh, \frac{eh \cdot \left(t \cdot t\right)}{ew \cdot ew}, 1\right)}}\right|\\ \mathbf{elif}\;ew \leq 6.2 \cdot 10^{-188}:\\ \;\;\;\;\left|\mathsf{fma}\left(ew, \left(t \cdot t\right) \cdot -0.5, ew\right) - t\_2 \cdot t\_3\right|\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (* ew (cos t)))
        (t_2 (* eh (sin t)))
        (t_3 (sin (atan (/ (* t (- eh)) ew))))
        (t_4 (fabs (- t_1 (* t_3 (* t eh))))))
   (if (<= ew -3.9e+105)
     t_4
     (if (<= ew -1.35e-160)
       (fabs
        (+
         t_1
         (*
          t_2
          (/
           (* t eh)
           (* ew (sqrt (fma eh (/ (* eh (* t t)) (* ew ew)) 1.0)))))))
       (if (<= ew 6.2e-188)
         (fabs (- (fma ew (* (* t t) -0.5) ew) (* t_2 t_3)))
         t_4)))))
double code(double eh, double ew, double t) {
	double t_1 = ew * cos(t);
	double t_2 = eh * sin(t);
	double t_3 = sin(atan(((t * -eh) / ew)));
	double t_4 = fabs((t_1 - (t_3 * (t * eh))));
	double tmp;
	if (ew <= -3.9e+105) {
		tmp = t_4;
	} else if (ew <= -1.35e-160) {
		tmp = fabs((t_1 + (t_2 * ((t * eh) / (ew * sqrt(fma(eh, ((eh * (t * t)) / (ew * ew)), 1.0)))))));
	} else if (ew <= 6.2e-188) {
		tmp = fabs((fma(ew, ((t * t) * -0.5), ew) - (t_2 * t_3)));
	} else {
		tmp = t_4;
	}
	return tmp;
}
function code(eh, ew, t)
	t_1 = Float64(ew * cos(t))
	t_2 = Float64(eh * sin(t))
	t_3 = sin(atan(Float64(Float64(t * Float64(-eh)) / ew)))
	t_4 = abs(Float64(t_1 - Float64(t_3 * Float64(t * eh))))
	tmp = 0.0
	if (ew <= -3.9e+105)
		tmp = t_4;
	elseif (ew <= -1.35e-160)
		tmp = abs(Float64(t_1 + Float64(t_2 * Float64(Float64(t * eh) / Float64(ew * sqrt(fma(eh, Float64(Float64(eh * Float64(t * t)) / Float64(ew * ew)), 1.0)))))));
	elseif (ew <= 6.2e-188)
		tmp = abs(Float64(fma(ew, Float64(Float64(t * t) * -0.5), ew) - Float64(t_2 * t_3)));
	else
		tmp = t_4;
	end
	return tmp
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[ArcTan[N[(N[(t * (-eh)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Abs[N[(t$95$1 - N[(t$95$3 * N[(t * eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -3.9e+105], t$95$4, If[LessEqual[ew, -1.35e-160], N[Abs[N[(t$95$1 + N[(t$95$2 * N[(N[(t * eh), $MachinePrecision] / N[(ew * N[Sqrt[N[(eh * N[(N[(eh * N[(t * t), $MachinePrecision]), $MachinePrecision] / N[(ew * ew), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 6.2e-188], N[Abs[N[(N[(ew * N[(N[(t * t), $MachinePrecision] * -0.5), $MachinePrecision] + ew), $MachinePrecision] - N[(t$95$2 * t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$4]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := ew \cdot \cos t\\
t_2 := eh \cdot \sin t\\
t_3 := \sin \tan^{-1} \left(\frac{t \cdot \left(-eh\right)}{ew}\right)\\
t_4 := \left|t\_1 - t\_3 \cdot \left(t \cdot eh\right)\right|\\
\mathbf{if}\;ew \leq -3.9 \cdot 10^{+105}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;ew \leq -1.35 \cdot 10^{-160}:\\
\;\;\;\;\left|t\_1 + t\_2 \cdot \frac{t \cdot eh}{ew \cdot \sqrt{\mathsf{fma}\left(eh, \frac{eh \cdot \left(t \cdot t\right)}{ew \cdot ew}, 1\right)}}\right|\\

\mathbf{elif}\;ew \leq 6.2 \cdot 10^{-188}:\\
\;\;\;\;\left|\mathsf{fma}\left(ew, \left(t \cdot t\right) \cdot -0.5, ew\right) - t\_2 \cdot t\_3\right|\\

\mathbf{else}:\\
\;\;\;\;t\_4\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if ew < -3.89999999999999978e105 or 6.2000000000000004e-188 < 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. lift-tan.f64N/A

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\mathsf{neg}\left(eh \cdot \tan t\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{eh \cdot \left(\mathsf{neg}\left(\tan t\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
      4. +-lft-identityN/A

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(0 + eh\right)} \cdot \left(\mathsf{neg}\left(\tan t\right)\right)}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
      5. +-lft-identityN/A

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\mathsf{neg}\left(eh \cdot \tan t\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
      7. *-commutativeN/A

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\mathsf{neg}\left(\color{blue}{\tan t \cdot eh}\right)}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
      8. distribute-rgt-neg-outN/A

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\tan t \cdot \left(\mathsf{neg}\left(eh\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
      9. lift-neg.f64N/A

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\tan t \cdot \color{blue}{\left(\mathsf{neg}\left(eh\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
      10. *-commutativeN/A

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
      11. lift-*.f64N/A

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
      12. lift-/.f64N/A

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \color{blue}{\left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
      13. cos-atanN/A

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
      14. lower-/.f64N/A

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\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}{\sqrt{1 + {\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
    5. Taylor expanded in t around 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(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
    6. Step-by-step derivation
      1. Simplified99.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| \]
      2. Taylor expanded in t around 0

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

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

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

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

          \[\leadsto \left|\left(ew \cdot \cos t\right) \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| \]
        5. mul-1-negN/A

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

          \[\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 \left(\mathsf{neg}\left(t\right)\right)}}{ew}\right)\right| \]
        7. lower-*.f64N/A

          \[\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 \left(\mathsf{neg}\left(t\right)\right)}}{ew}\right)\right| \]
        8. lower-neg.f6499.3

          \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot 1 - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \color{blue}{\left(-t\right)}}{ew}\right)\right| \]
      4. Simplified99.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 \left(-t\right)}{ew}\right)}\right| \]
      5. Taylor expanded in t around 0

        \[\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 \left(\mathsf{neg}\left(t\right)\right)}{ew}\right)\right| \]
      6. Step-by-step derivation
        1. lower-*.f6483.3

          \[\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 \left(-t\right)}{ew}\right)\right| \]
      7. Simplified83.3%

        \[\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 \left(-t\right)}{ew}\right)\right| \]

      if -3.89999999999999978e105 < ew < -1.35000000000000005e-160

      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. lift-tan.f64N/A

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

          \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\mathsf{neg}\left(eh \cdot \tan t\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
        3. distribute-rgt-neg-inN/A

          \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{eh \cdot \left(\mathsf{neg}\left(\tan t\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
        4. +-lft-identityN/A

          \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(0 + eh\right)} \cdot \left(\mathsf{neg}\left(\tan t\right)\right)}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
        5. +-lft-identityN/A

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

          \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\mathsf{neg}\left(eh \cdot \tan t\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
        7. *-commutativeN/A

          \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\mathsf{neg}\left(\color{blue}{\tan t \cdot eh}\right)}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
        8. distribute-rgt-neg-outN/A

          \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\tan t \cdot \left(\mathsf{neg}\left(eh\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
        9. lift-neg.f64N/A

          \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\tan t \cdot \color{blue}{\left(\mathsf{neg}\left(eh\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
        10. *-commutativeN/A

          \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
        11. lift-*.f64N/A

          \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
        12. lift-/.f64N/A

          \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \color{blue}{\left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
        13. cos-atanN/A

          \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
        14. lower-/.f64N/A

          \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\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}{\sqrt{1 + {\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
      5. Taylor expanded in t around 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(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
      6. Step-by-step derivation
        1. Simplified98.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| \]
        2. Taylor expanded in t around 0

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

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

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

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

            \[\leadsto \left|\left(ew \cdot \cos t\right) \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| \]
          5. mul-1-negN/A

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

            \[\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 \left(\mathsf{neg}\left(t\right)\right)}}{ew}\right)\right| \]
          7. lower-*.f64N/A

            \[\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 \left(\mathsf{neg}\left(t\right)\right)}}{ew}\right)\right| \]
          8. lower-neg.f6498.9

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

          \[\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 \left(-t\right)}{ew}\right)}\right| \]
        5. Applied egg-rr70.8%

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

        if -1.35000000000000005e-160 < ew < 6.2000000000000004e-188

        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. lift-tan.f64N/A

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

            \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\mathsf{neg}\left(eh \cdot \tan t\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
          3. distribute-rgt-neg-inN/A

            \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{eh \cdot \left(\mathsf{neg}\left(\tan t\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
          4. +-lft-identityN/A

            \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(0 + eh\right)} \cdot \left(\mathsf{neg}\left(\tan t\right)\right)}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
          5. +-lft-identityN/A

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

            \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\mathsf{neg}\left(eh \cdot \tan t\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
          7. *-commutativeN/A

            \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\mathsf{neg}\left(\color{blue}{\tan t \cdot eh}\right)}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
          8. distribute-rgt-neg-outN/A

            \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\tan t \cdot \left(\mathsf{neg}\left(eh\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
          9. lift-neg.f64N/A

            \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\tan t \cdot \color{blue}{\left(\mathsf{neg}\left(eh\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
          10. *-commutativeN/A

            \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
          11. lift-*.f64N/A

            \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
          12. lift-/.f64N/A

            \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \color{blue}{\left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
          13. cos-atanN/A

            \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
          14. lower-/.f64N/A

            \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\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}{\sqrt{1 + {\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
        5. Taylor expanded in t around 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(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
        6. Step-by-step derivation
          1. Simplified97.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| \]
          2. Taylor expanded in t around 0

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

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

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

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

              \[\leadsto \left|\left(ew \cdot \cos t\right) \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| \]
            5. mul-1-negN/A

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

              \[\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 \left(\mathsf{neg}\left(t\right)\right)}}{ew}\right)\right| \]
            7. lower-*.f64N/A

              \[\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 \left(\mathsf{neg}\left(t\right)\right)}}{ew}\right)\right| \]
            8. lower-neg.f6497.4

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

            \[\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 \left(-t\right)}{ew}\right)}\right| \]
          5. Taylor expanded in t around 0

            \[\leadsto \left|\color{blue}{\left(ew + \frac{-1}{2} \cdot \left(ew \cdot {t}^{2}\right)\right)} \cdot 1 - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(\mathsf{neg}\left(t\right)\right)}{ew}\right)\right| \]
          6. Step-by-step derivation
            1. associate-*r*N/A

              \[\leadsto \left|\left(ew + \color{blue}{\left(\frac{-1}{2} \cdot ew\right) \cdot {t}^{2}}\right) \cdot 1 - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(\mathsf{neg}\left(t\right)\right)}{ew}\right)\right| \]
            2. +-commutativeN/A

              \[\leadsto \left|\color{blue}{\left(\left(\frac{-1}{2} \cdot ew\right) \cdot {t}^{2} + ew\right)} \cdot 1 - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(\mathsf{neg}\left(t\right)\right)}{ew}\right)\right| \]
            3. associate-*r*N/A

              \[\leadsto \left|\left(\color{blue}{\frac{-1}{2} \cdot \left(ew \cdot {t}^{2}\right)} + ew\right) \cdot 1 - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(\mathsf{neg}\left(t\right)\right)}{ew}\right)\right| \]
            4. *-commutativeN/A

              \[\leadsto \left|\left(\color{blue}{\left(ew \cdot {t}^{2}\right) \cdot \frac{-1}{2}} + ew\right) \cdot 1 - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(\mathsf{neg}\left(t\right)\right)}{ew}\right)\right| \]
            5. associate-*l*N/A

              \[\leadsto \left|\left(\color{blue}{ew \cdot \left({t}^{2} \cdot \frac{-1}{2}\right)} + ew\right) \cdot 1 - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(\mathsf{neg}\left(t\right)\right)}{ew}\right)\right| \]
            6. lower-fma.f64N/A

              \[\leadsto \left|\color{blue}{\mathsf{fma}\left(ew, {t}^{2} \cdot \frac{-1}{2}, ew\right)} \cdot 1 - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(\mathsf{neg}\left(t\right)\right)}{ew}\right)\right| \]
            7. lower-*.f64N/A

              \[\leadsto \left|\mathsf{fma}\left(ew, \color{blue}{{t}^{2} \cdot \frac{-1}{2}}, ew\right) \cdot 1 - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(\mathsf{neg}\left(t\right)\right)}{ew}\right)\right| \]
            8. unpow2N/A

              \[\leadsto \left|\mathsf{fma}\left(ew, \color{blue}{\left(t \cdot t\right)} \cdot \frac{-1}{2}, ew\right) \cdot 1 - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(\mathsf{neg}\left(t\right)\right)}{ew}\right)\right| \]
            9. lower-*.f6466.1

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

            \[\leadsto \left|\color{blue}{\mathsf{fma}\left(ew, \left(t \cdot t\right) \cdot -0.5, ew\right)} \cdot 1 - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right| \]
        7. Recombined 3 regimes into one program.
        8. Final simplification76.5%

          \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -3.9 \cdot 10^{+105}:\\ \;\;\;\;\left|ew \cdot \cos t - \sin \tan^{-1} \left(\frac{t \cdot \left(-eh\right)}{ew}\right) \cdot \left(t \cdot eh\right)\right|\\ \mathbf{elif}\;ew \leq -1.35 \cdot 10^{-160}:\\ \;\;\;\;\left|ew \cdot \cos t + \left(eh \cdot \sin t\right) \cdot \frac{t \cdot eh}{ew \cdot \sqrt{\mathsf{fma}\left(eh, \frac{eh \cdot \left(t \cdot t\right)}{ew \cdot ew}, 1\right)}}\right|\\ \mathbf{elif}\;ew \leq 6.2 \cdot 10^{-188}:\\ \;\;\;\;\left|\mathsf{fma}\left(ew, \left(t \cdot t\right) \cdot -0.5, ew\right) - \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 - \sin \tan^{-1} \left(\frac{t \cdot \left(-eh\right)}{ew}\right) \cdot \left(t \cdot eh\right)\right|\\ \end{array} \]
        9. Add Preprocessing

        Alternative 6: 66.4% accurate, 2.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := ew \cdot \cos t\\ t_2 := \left|t\_1 - \sin \tan^{-1} \left(\frac{t \cdot \left(-eh\right)}{ew}\right) \cdot \left(t \cdot eh\right)\right|\\ \mathbf{if}\;ew \leq -3.9 \cdot 10^{+105}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;ew \leq -5.8 \cdot 10^{-142}:\\ \;\;\;\;\left|t\_1 + \left(eh \cdot \sin t\right) \cdot \frac{t \cdot eh}{ew \cdot \sqrt{\mathsf{fma}\left(eh, \frac{eh \cdot \left(t \cdot t\right)}{ew \cdot ew}, 1\right)}}\right|\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
        (FPCore (eh ew t)
         :precision binary64
         (let* ((t_1 (* ew (cos t)))
                (t_2 (fabs (- t_1 (* (sin (atan (/ (* t (- eh)) ew))) (* t eh))))))
           (if (<= ew -3.9e+105)
             t_2
             (if (<= ew -5.8e-142)
               (fabs
                (+
                 t_1
                 (*
                  (* eh (sin t))
                  (/
                   (* t eh)
                   (* ew (sqrt (fma eh (/ (* eh (* t t)) (* ew ew)) 1.0)))))))
               t_2))))
        double code(double eh, double ew, double t) {
        	double t_1 = ew * cos(t);
        	double t_2 = fabs((t_1 - (sin(atan(((t * -eh) / ew))) * (t * eh))));
        	double tmp;
        	if (ew <= -3.9e+105) {
        		tmp = t_2;
        	} else if (ew <= -5.8e-142) {
        		tmp = fabs((t_1 + ((eh * sin(t)) * ((t * eh) / (ew * sqrt(fma(eh, ((eh * (t * t)) / (ew * ew)), 1.0)))))));
        	} else {
        		tmp = t_2;
        	}
        	return tmp;
        }
        
        function code(eh, ew, t)
        	t_1 = Float64(ew * cos(t))
        	t_2 = abs(Float64(t_1 - Float64(sin(atan(Float64(Float64(t * Float64(-eh)) / ew))) * Float64(t * eh))))
        	tmp = 0.0
        	if (ew <= -3.9e+105)
        		tmp = t_2;
        	elseif (ew <= -5.8e-142)
        		tmp = abs(Float64(t_1 + Float64(Float64(eh * sin(t)) * Float64(Float64(t * eh) / Float64(ew * sqrt(fma(eh, Float64(Float64(eh * Float64(t * t)) / Float64(ew * ew)), 1.0)))))));
        	else
        		tmp = t_2;
        	end
        	return tmp
        end
        
        code[eh_, ew_, t_] := Block[{t$95$1 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Abs[N[(t$95$1 - N[(N[Sin[N[ArcTan[N[(N[(t * (-eh)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(t * eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -3.9e+105], t$95$2, If[LessEqual[ew, -5.8e-142], N[Abs[N[(t$95$1 + N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[(N[(t * eh), $MachinePrecision] / N[(ew * N[Sqrt[N[(eh * N[(N[(eh * N[(t * t), $MachinePrecision]), $MachinePrecision] / N[(ew * ew), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$2]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := ew \cdot \cos t\\
        t_2 := \left|t\_1 - \sin \tan^{-1} \left(\frac{t \cdot \left(-eh\right)}{ew}\right) \cdot \left(t \cdot eh\right)\right|\\
        \mathbf{if}\;ew \leq -3.9 \cdot 10^{+105}:\\
        \;\;\;\;t\_2\\
        
        \mathbf{elif}\;ew \leq -5.8 \cdot 10^{-142}:\\
        \;\;\;\;\left|t\_1 + \left(eh \cdot \sin t\right) \cdot \frac{t \cdot eh}{ew \cdot \sqrt{\mathsf{fma}\left(eh, \frac{eh \cdot \left(t \cdot t\right)}{ew \cdot ew}, 1\right)}}\right|\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_2\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if ew < -3.89999999999999978e105 or -5.7999999999999998e-142 < 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. lift-tan.f64N/A

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

              \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\mathsf{neg}\left(eh \cdot \tan t\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
            3. distribute-rgt-neg-inN/A

              \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{eh \cdot \left(\mathsf{neg}\left(\tan t\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
            4. +-lft-identityN/A

              \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(0 + eh\right)} \cdot \left(\mathsf{neg}\left(\tan t\right)\right)}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
            5. +-lft-identityN/A

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

              \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\mathsf{neg}\left(eh \cdot \tan t\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
            7. *-commutativeN/A

              \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\mathsf{neg}\left(\color{blue}{\tan t \cdot eh}\right)}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
            8. distribute-rgt-neg-outN/A

              \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\tan t \cdot \left(\mathsf{neg}\left(eh\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
            9. lift-neg.f64N/A

              \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\tan t \cdot \color{blue}{\left(\mathsf{neg}\left(eh\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
            10. *-commutativeN/A

              \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
            11. lift-*.f64N/A

              \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
            12. lift-/.f64N/A

              \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \color{blue}{\left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
            13. cos-atanN/A

              \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
            14. lower-/.f64N/A

              \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\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}{\sqrt{1 + {\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
          5. Taylor expanded in t around 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(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
          6. Step-by-step derivation
            1. Simplified99.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| \]
            2. Taylor expanded in t around 0

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

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

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

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

                \[\leadsto \left|\left(ew \cdot \cos t\right) \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| \]
              5. mul-1-negN/A

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

                \[\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 \left(\mathsf{neg}\left(t\right)\right)}}{ew}\right)\right| \]
              7. lower-*.f64N/A

                \[\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 \left(\mathsf{neg}\left(t\right)\right)}}{ew}\right)\right| \]
              8. lower-neg.f6498.8

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

              \[\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 \left(-t\right)}{ew}\right)}\right| \]
            5. Taylor expanded in t around 0

              \[\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 \left(\mathsf{neg}\left(t\right)\right)}{ew}\right)\right| \]
            6. Step-by-step derivation
              1. lower-*.f6475.3

                \[\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 \left(-t\right)}{ew}\right)\right| \]
            7. Simplified75.3%

              \[\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 \left(-t\right)}{ew}\right)\right| \]

            if -3.89999999999999978e105 < ew < -5.7999999999999998e-142

            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. lift-tan.f64N/A

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

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\mathsf{neg}\left(eh \cdot \tan t\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              3. distribute-rgt-neg-inN/A

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{eh \cdot \left(\mathsf{neg}\left(\tan t\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              4. +-lft-identityN/A

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(0 + eh\right)} \cdot \left(\mathsf{neg}\left(\tan t\right)\right)}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              5. +-lft-identityN/A

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

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\mathsf{neg}\left(eh \cdot \tan t\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              7. *-commutativeN/A

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\mathsf{neg}\left(\color{blue}{\tan t \cdot eh}\right)}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              8. distribute-rgt-neg-outN/A

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\tan t \cdot \left(\mathsf{neg}\left(eh\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              9. lift-neg.f64N/A

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\tan t \cdot \color{blue}{\left(\mathsf{neg}\left(eh\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              10. *-commutativeN/A

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              11. lift-*.f64N/A

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              12. lift-/.f64N/A

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \color{blue}{\left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              13. cos-atanN/A

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              14. lower-/.f64N/A

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\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}{\sqrt{1 + {\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
            5. Taylor expanded in t around 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(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
            6. Step-by-step derivation
              1. Simplified98.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| \]
              2. Taylor expanded in t around 0

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

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

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

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

                  \[\leadsto \left|\left(ew \cdot \cos t\right) \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| \]
                5. mul-1-negN/A

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

                  \[\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 \left(\mathsf{neg}\left(t\right)\right)}}{ew}\right)\right| \]
                7. lower-*.f64N/A

                  \[\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 \left(\mathsf{neg}\left(t\right)\right)}}{ew}\right)\right| \]
                8. lower-neg.f6498.8

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

                \[\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 \left(-t\right)}{ew}\right)}\right| \]
              5. Applied egg-rr71.0%

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot 1 - \color{blue}{\frac{eh \cdot t}{\sqrt{\mathsf{fma}\left(eh, \frac{eh \cdot \left(t \cdot t\right)}{ew \cdot ew}, 1\right)} \cdot \left(-ew\right)} \cdot \left(eh \cdot \sin t\right)}\right| \]
            7. Recombined 2 regimes into one program.
            8. Final simplification74.5%

              \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -3.9 \cdot 10^{+105}:\\ \;\;\;\;\left|ew \cdot \cos t - \sin \tan^{-1} \left(\frac{t \cdot \left(-eh\right)}{ew}\right) \cdot \left(t \cdot eh\right)\right|\\ \mathbf{elif}\;ew \leq -5.8 \cdot 10^{-142}:\\ \;\;\;\;\left|ew \cdot \cos t + \left(eh \cdot \sin t\right) \cdot \frac{t \cdot eh}{ew \cdot \sqrt{\mathsf{fma}\left(eh, \frac{eh \cdot \left(t \cdot t\right)}{ew \cdot ew}, 1\right)}}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \cos t - \sin \tan^{-1} \left(\frac{t \cdot \left(-eh\right)}{ew}\right) \cdot \left(t \cdot eh\right)\right|\\ \end{array} \]
            9. Add Preprocessing

            Alternative 7: 53.6% accurate, 3.0× speedup?

            \[\begin{array}{l} \\ \left|ew \cdot \cos t + \left(eh \cdot \sin t\right) \cdot \frac{t \cdot eh}{ew \cdot \sqrt{\mathsf{fma}\left(eh, \frac{eh \cdot \left(t \cdot t\right)}{ew \cdot ew}, 1\right)}}\right| \end{array} \]
            (FPCore (eh ew t)
             :precision binary64
             (fabs
              (+
               (* ew (cos t))
               (*
                (* eh (sin t))
                (/ (* t eh) (* ew (sqrt (fma eh (/ (* eh (* t t)) (* ew ew)) 1.0))))))))
            double code(double eh, double ew, double t) {
            	return fabs(((ew * cos(t)) + ((eh * sin(t)) * ((t * eh) / (ew * sqrt(fma(eh, ((eh * (t * t)) / (ew * ew)), 1.0)))))));
            }
            
            function code(eh, ew, t)
            	return abs(Float64(Float64(ew * cos(t)) + Float64(Float64(eh * sin(t)) * Float64(Float64(t * eh) / Float64(ew * sqrt(fma(eh, Float64(Float64(eh * Float64(t * t)) / Float64(ew * ew)), 1.0)))))))
            end
            
            code[eh_, ew_, t_] := N[Abs[N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] + N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[(N[(t * eh), $MachinePrecision] / N[(ew * N[Sqrt[N[(eh * N[(N[(eh * N[(t * t), $MachinePrecision]), $MachinePrecision] / N[(ew * ew), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
            
            \begin{array}{l}
            
            \\
            \left|ew \cdot \cos t + \left(eh \cdot \sin t\right) \cdot \frac{t \cdot eh}{ew \cdot \sqrt{\mathsf{fma}\left(eh, \frac{eh \cdot \left(t \cdot t\right)}{ew \cdot ew}, 1\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. lift-tan.f64N/A

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

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\mathsf{neg}\left(eh \cdot \tan t\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              3. distribute-rgt-neg-inN/A

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{eh \cdot \left(\mathsf{neg}\left(\tan t\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              4. +-lft-identityN/A

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(0 + eh\right)} \cdot \left(\mathsf{neg}\left(\tan t\right)\right)}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              5. +-lft-identityN/A

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

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\mathsf{neg}\left(eh \cdot \tan t\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              7. *-commutativeN/A

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\mathsf{neg}\left(\color{blue}{\tan t \cdot eh}\right)}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              8. distribute-rgt-neg-outN/A

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\tan t \cdot \left(\mathsf{neg}\left(eh\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              9. lift-neg.f64N/A

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\tan t \cdot \color{blue}{\left(\mathsf{neg}\left(eh\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              10. *-commutativeN/A

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              11. lift-*.f64N/A

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              12. lift-/.f64N/A

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \color{blue}{\left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              13. cos-atanN/A

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              14. lower-/.f64N/A

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\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}{\sqrt{1 + {\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
            5. Taylor expanded in t around 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(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
            6. Step-by-step derivation
              1. Simplified99.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| \]
              2. Taylor expanded in t around 0

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

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

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

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

                  \[\leadsto \left|\left(ew \cdot \cos t\right) \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| \]
                5. mul-1-negN/A

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

                  \[\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 \left(\mathsf{neg}\left(t\right)\right)}}{ew}\right)\right| \]
                7. lower-*.f64N/A

                  \[\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 \left(\mathsf{neg}\left(t\right)\right)}}{ew}\right)\right| \]
                8. lower-neg.f6498.8

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

                \[\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 \left(-t\right)}{ew}\right)}\right| \]
              5. Applied egg-rr56.8%

                \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot 1 - \color{blue}{\frac{eh \cdot t}{\sqrt{\mathsf{fma}\left(eh, \frac{eh \cdot \left(t \cdot t\right)}{ew \cdot ew}, 1\right)} \cdot \left(-ew\right)} \cdot \left(eh \cdot \sin t\right)}\right| \]
              6. Final simplification56.8%

                \[\leadsto \left|ew \cdot \cos t + \left(eh \cdot \sin t\right) \cdot \frac{t \cdot eh}{ew \cdot \sqrt{\mathsf{fma}\left(eh, \frac{eh \cdot \left(t \cdot t\right)}{ew \cdot ew}, 1\right)}}\right| \]
              7. Add Preprocessing

              Alternative 8: 50.5% accurate, 3.0× speedup?

              \[\begin{array}{l} \\ \left|ew \cdot \cos t + \sin t \cdot \frac{eh \cdot \left(t \cdot eh\right)}{ew \cdot \sqrt{\mathsf{fma}\left(eh, \frac{eh \cdot \left(t \cdot t\right)}{ew \cdot ew}, 1\right)}}\right| \end{array} \]
              (FPCore (eh ew t)
               :precision binary64
               (fabs
                (+
                 (* ew (cos t))
                 (*
                  (sin t)
                  (/
                   (* eh (* t eh))
                   (* ew (sqrt (fma eh (/ (* eh (* t t)) (* ew ew)) 1.0))))))))
              double code(double eh, double ew, double t) {
              	return fabs(((ew * cos(t)) + (sin(t) * ((eh * (t * eh)) / (ew * sqrt(fma(eh, ((eh * (t * t)) / (ew * ew)), 1.0)))))));
              }
              
              function code(eh, ew, t)
              	return abs(Float64(Float64(ew * cos(t)) + Float64(sin(t) * Float64(Float64(eh * Float64(t * eh)) / Float64(ew * sqrt(fma(eh, Float64(Float64(eh * Float64(t * t)) / Float64(ew * ew)), 1.0)))))))
              end
              
              code[eh_, ew_, t_] := N[Abs[N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] + N[(N[Sin[t], $MachinePrecision] * N[(N[(eh * N[(t * eh), $MachinePrecision]), $MachinePrecision] / N[(ew * N[Sqrt[N[(eh * N[(N[(eh * N[(t * t), $MachinePrecision]), $MachinePrecision] / N[(ew * ew), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
              
              \begin{array}{l}
              
              \\
              \left|ew \cdot \cos t + \sin t \cdot \frac{eh \cdot \left(t \cdot eh\right)}{ew \cdot \sqrt{\mathsf{fma}\left(eh, \frac{eh \cdot \left(t \cdot t\right)}{ew \cdot ew}, 1\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. lift-tan.f64N/A

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

                  \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\mathsf{neg}\left(eh \cdot \tan t\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
                3. distribute-rgt-neg-inN/A

                  \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{eh \cdot \left(\mathsf{neg}\left(\tan t\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
                4. +-lft-identityN/A

                  \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(0 + eh\right)} \cdot \left(\mathsf{neg}\left(\tan t\right)\right)}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
                5. +-lft-identityN/A

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

                  \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\mathsf{neg}\left(eh \cdot \tan t\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
                7. *-commutativeN/A

                  \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\mathsf{neg}\left(\color{blue}{\tan t \cdot eh}\right)}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
                8. distribute-rgt-neg-outN/A

                  \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\tan t \cdot \left(\mathsf{neg}\left(eh\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
                9. lift-neg.f64N/A

                  \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\tan t \cdot \color{blue}{\left(\mathsf{neg}\left(eh\right)\right)}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
                10. *-commutativeN/A

                  \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
                11. lift-*.f64N/A

                  \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
                12. lift-/.f64N/A

                  \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \color{blue}{\left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
                13. cos-atanN/A

                  \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
                14. lower-/.f64N/A

                  \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\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}{\sqrt{1 + {\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
              5. Taylor expanded in t around 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(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew}\right)\right| \]
              6. Step-by-step derivation
                1. Simplified99.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| \]
                2. Taylor expanded in t around 0

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

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

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

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

                    \[\leadsto \left|\left(ew \cdot \cos t\right) \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| \]
                  5. mul-1-negN/A

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

                    \[\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 \left(\mathsf{neg}\left(t\right)\right)}}{ew}\right)\right| \]
                  7. lower-*.f64N/A

                    \[\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 \left(\mathsf{neg}\left(t\right)\right)}}{ew}\right)\right| \]
                  8. lower-neg.f6498.8

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

                  \[\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 \left(-t\right)}{ew}\right)}\right| \]
                5. Applied egg-rr54.8%

                  \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot 1 - \color{blue}{\sin t \cdot \frac{eh \cdot \left(eh \cdot t\right)}{\sqrt{\mathsf{fma}\left(eh, \frac{eh \cdot \left(t \cdot t\right)}{ew \cdot ew}, 1\right)} \cdot \left(-ew\right)}}\right| \]
                6. Final simplification54.8%

                  \[\leadsto \left|ew \cdot \cos t + \sin t \cdot \frac{eh \cdot \left(t \cdot eh\right)}{ew \cdot \sqrt{\mathsf{fma}\left(eh, \frac{eh \cdot \left(t \cdot t\right)}{ew \cdot ew}, 1\right)}}\right| \]
                7. Add Preprocessing

                Reproduce

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