Example 2 from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 15.5s
Alternatives: 11
Speedup: 1.0×

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 11 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)\\ \left|\mathsf{fma}\left(\left(-\sin t\right) \cdot eh, -\sin t\_1, \left(\cos t \cdot ew\right) \cdot \cos t\_1\right)\right| \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (atan (* (/ (tan t) ew) eh))))
   (fabs (fma (* (- (sin t)) eh) (- (sin t_1)) (* (* (cos t) ew) (cos t_1))))))
double code(double eh, double ew, double t) {
	double t_1 = atan(((tan(t) / ew) * eh));
	return fabs(fma((-sin(t) * eh), -sin(t_1), ((cos(t) * ew) * cos(t_1))));
}
function code(eh, ew, t)
	t_1 = atan(Float64(Float64(tan(t) / ew) * eh))
	return abs(fma(Float64(Float64(-sin(t)) * eh), Float64(-sin(t_1)), Float64(Float64(cos(t) * ew) * cos(t_1))))
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[((-N[Sin[t], $MachinePrecision]) * eh), $MachinePrecision] * (-N[Sin[t$95$1], $MachinePrecision]) + N[(N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)\\
\left|\mathsf{fma}\left(\left(-\sin t\right) \cdot eh, -\sin t\_1, \left(\cos t \cdot ew\right) \cdot \cos t\_1\right)\right|
\end{array}
\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. Applied rewrites99.8%

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

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

Alternative 2: 79.1% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_4 \leq -4 \cdot 10^{+221}:\\
\;\;\;\;\left|\sin \tan^{-1} \left(\frac{\mathsf{fma}\left(-0.3333333333333333, \left(eh \cdot t\right) \cdot t, -eh\right)}{ew} \cdot t\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\

\mathbf{elif}\;t\_4 \leq -2 \cdot 10^{-277}:\\
\;\;\;\;t\_6\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\sin \tan^{-1} \left(\frac{-eh}{ew} \cdot \tan t\right) \cdot \sin t, -eh, \frac{1}{\sqrt{1 + {t\_5}^{2}}} \cdot t\_1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < -2.0000000000000001e280 or -4.0000000000000002e221 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < -1.99999999999999994e-277

    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. Applied rewrites67.2%

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

    if -2.0000000000000001e280 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < -4.0000000000000002e221

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(t \cdot \left(-1 \cdot \left({t}^{2} \cdot \left(\frac{-1}{6} \cdot \frac{eh}{ew} - \frac{-1}{2} \cdot \frac{eh}{ew}\right)\right) + -1 \cdot \frac{eh}{ew}\right)\right)\right| \]
    7. Step-by-step derivation
      1. Applied rewrites78.0%

        \[\leadsto \left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-\mathsf{fma}\left(\frac{\left(t \cdot t\right) \cdot eh}{ew}, 0.3333333333333333, \frac{eh}{ew}\right)\right) \cdot t\right)\right| \]
      2. Taylor expanded in t around 0

        \[\leadsto \left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(t \cdot \left(-1 \cdot \left({t}^{2} \cdot \left(\frac{-1}{6} \cdot \frac{eh}{ew} - \frac{-1}{2} \cdot \frac{eh}{ew}\right)\right) + -1 \cdot \frac{eh}{ew}\right)\right)\right| \]
      3. Step-by-step derivation
        1. Applied rewrites78.0%

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

        if -1.99999999999999994e-277 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) 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. Applied rewrites99.8%

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

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

          \[\leadsto \mathsf{fma}\left(\sin \tan^{-1} \left(\frac{-eh}{ew} \cdot \tan t\right) \cdot \sin t, -eh, \left(\cos t \cdot ew\right) \cdot \color{blue}{\frac{1}{\sqrt{{\left(\frac{\tan t}{ew} \cdot eh\right)}^{2} + 1}}}\right) \]
      4. Recombined 3 regimes into one program.
      5. Final simplification85.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\cos \tan^{-1} \left(\frac{\tan t \cdot eh}{-ew}\right) \cdot \left(\cos t \cdot ew\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\tan t \cdot eh}{-ew}\right) \leq -2 \cdot 10^{+280}:\\ \;\;\;\;\left|\frac{\left(eh \cdot \sin t\right) \cdot \left(\frac{\tan t}{ew} \cdot eh\right) + \cos t \cdot ew}{\frac{-1}{\cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}}\right|\\ \mathbf{elif}\;\cos \tan^{-1} \left(\frac{\tan t \cdot eh}{-ew}\right) \cdot \left(\cos t \cdot ew\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\tan t \cdot eh}{-ew}\right) \leq -4 \cdot 10^{+221}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\mathsf{fma}\left(-0.3333333333333333, \left(eh \cdot t\right) \cdot t, -eh\right)}{ew} \cdot t\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\ \mathbf{elif}\;\cos \tan^{-1} \left(\frac{\tan t \cdot eh}{-ew}\right) \cdot \left(\cos t \cdot ew\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\tan t \cdot eh}{-ew}\right) \leq -2 \cdot 10^{-277}:\\ \;\;\;\;\left|\frac{\left(eh \cdot \sin t\right) \cdot \left(\frac{\tan t}{ew} \cdot eh\right) + \cos t \cdot ew}{\frac{-1}{\cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}}\right|\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\sin \tan^{-1} \left(\frac{-eh}{ew} \cdot \tan t\right) \cdot \sin t, -eh, \frac{1}{\sqrt{1 + {\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}} \cdot \left(\cos t \cdot ew\right)\right)\\ \end{array} \]
      6. Add Preprocessing

      Alternative 3: 75.3% accurate, 1.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\tan t}{ew} \cdot eh\\ t_2 := \left(eh \cdot \sin t\right) \cdot t\_1 + \cos t \cdot ew\\ t_3 := \left|\frac{t\_2}{\frac{-1}{\cos \tan^{-1} t\_1}}\right|\\ \mathbf{if}\;ew \leq -3.8 \cdot 10^{-64}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;ew \leq 3.55 \cdot 10^{-171}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{eh}{\cos t} \cdot \frac{-t}{ew}\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\ \mathbf{elif}\;ew \leq 2.6 \cdot 10^{-90}:\\ \;\;\;\;\frac{t\_2}{\sqrt{1 + {t\_1}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
      (FPCore (eh ew t)
       :precision binary64
       (let* ((t_1 (* (/ (tan t) ew) eh))
              (t_2 (+ (* (* eh (sin t)) t_1) (* (cos t) ew)))
              (t_3 (fabs (/ t_2 (/ -1.0 (cos (atan t_1)))))))
         (if (<= ew -3.8e-64)
           t_3
           (if (<= ew 3.55e-171)
             (fabs
              (* (sin (atan (* (/ eh (cos t)) (/ (- t) ew)))) (* (- (sin t)) eh)))
             (if (<= ew 2.6e-90) (/ t_2 (sqrt (+ 1.0 (pow t_1 2.0)))) t_3)))))
      double code(double eh, double ew, double t) {
      	double t_1 = (tan(t) / ew) * eh;
      	double t_2 = ((eh * sin(t)) * t_1) + (cos(t) * ew);
      	double t_3 = fabs((t_2 / (-1.0 / cos(atan(t_1)))));
      	double tmp;
      	if (ew <= -3.8e-64) {
      		tmp = t_3;
      	} else if (ew <= 3.55e-171) {
      		tmp = fabs((sin(atan(((eh / cos(t)) * (-t / ew)))) * (-sin(t) * eh)));
      	} else if (ew <= 2.6e-90) {
      		tmp = t_2 / sqrt((1.0 + pow(t_1, 2.0)));
      	} else {
      		tmp = t_3;
      	}
      	return tmp;
      }
      
      real(8) function code(eh, ew, t)
          real(8), intent (in) :: eh
          real(8), intent (in) :: ew
          real(8), intent (in) :: t
          real(8) :: t_1
          real(8) :: t_2
          real(8) :: t_3
          real(8) :: tmp
          t_1 = (tan(t) / ew) * eh
          t_2 = ((eh * sin(t)) * t_1) + (cos(t) * ew)
          t_3 = abs((t_2 / ((-1.0d0) / cos(atan(t_1)))))
          if (ew <= (-3.8d-64)) then
              tmp = t_3
          else if (ew <= 3.55d-171) then
              tmp = abs((sin(atan(((eh / cos(t)) * (-t / ew)))) * (-sin(t) * eh)))
          else if (ew <= 2.6d-90) then
              tmp = t_2 / sqrt((1.0d0 + (t_1 ** 2.0d0)))
          else
              tmp = t_3
          end if
          code = tmp
      end function
      
      public static double code(double eh, double ew, double t) {
      	double t_1 = (Math.tan(t) / ew) * eh;
      	double t_2 = ((eh * Math.sin(t)) * t_1) + (Math.cos(t) * ew);
      	double t_3 = Math.abs((t_2 / (-1.0 / Math.cos(Math.atan(t_1)))));
      	double tmp;
      	if (ew <= -3.8e-64) {
      		tmp = t_3;
      	} else if (ew <= 3.55e-171) {
      		tmp = Math.abs((Math.sin(Math.atan(((eh / Math.cos(t)) * (-t / ew)))) * (-Math.sin(t) * eh)));
      	} else if (ew <= 2.6e-90) {
      		tmp = t_2 / Math.sqrt((1.0 + Math.pow(t_1, 2.0)));
      	} else {
      		tmp = t_3;
      	}
      	return tmp;
      }
      
      def code(eh, ew, t):
      	t_1 = (math.tan(t) / ew) * eh
      	t_2 = ((eh * math.sin(t)) * t_1) + (math.cos(t) * ew)
      	t_3 = math.fabs((t_2 / (-1.0 / math.cos(math.atan(t_1)))))
      	tmp = 0
      	if ew <= -3.8e-64:
      		tmp = t_3
      	elif ew <= 3.55e-171:
      		tmp = math.fabs((math.sin(math.atan(((eh / math.cos(t)) * (-t / ew)))) * (-math.sin(t) * eh)))
      	elif ew <= 2.6e-90:
      		tmp = t_2 / math.sqrt((1.0 + math.pow(t_1, 2.0)))
      	else:
      		tmp = t_3
      	return tmp
      
      function code(eh, ew, t)
      	t_1 = Float64(Float64(tan(t) / ew) * eh)
      	t_2 = Float64(Float64(Float64(eh * sin(t)) * t_1) + Float64(cos(t) * ew))
      	t_3 = abs(Float64(t_2 / Float64(-1.0 / cos(atan(t_1)))))
      	tmp = 0.0
      	if (ew <= -3.8e-64)
      		tmp = t_3;
      	elseif (ew <= 3.55e-171)
      		tmp = abs(Float64(sin(atan(Float64(Float64(eh / cos(t)) * Float64(Float64(-t) / ew)))) * Float64(Float64(-sin(t)) * eh)));
      	elseif (ew <= 2.6e-90)
      		tmp = Float64(t_2 / sqrt(Float64(1.0 + (t_1 ^ 2.0))));
      	else
      		tmp = t_3;
      	end
      	return tmp
      end
      
      function tmp_2 = code(eh, ew, t)
      	t_1 = (tan(t) / ew) * eh;
      	t_2 = ((eh * sin(t)) * t_1) + (cos(t) * ew);
      	t_3 = abs((t_2 / (-1.0 / cos(atan(t_1)))));
      	tmp = 0.0;
      	if (ew <= -3.8e-64)
      		tmp = t_3;
      	elseif (ew <= 3.55e-171)
      		tmp = abs((sin(atan(((eh / cos(t)) * (-t / ew)))) * (-sin(t) * eh)));
      	elseif (ew <= 2.6e-90)
      		tmp = t_2 / sqrt((1.0 + (t_1 ^ 2.0)));
      	else
      		tmp = t_3;
      	end
      	tmp_2 = tmp;
      end
      
      code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Abs[N[(t$95$2 / N[(-1.0 / N[Cos[N[ArcTan[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -3.8e-64], t$95$3, If[LessEqual[ew, 3.55e-171], N[Abs[N[(N[Sin[N[ArcTan[N[(N[(eh / N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[((-t) / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[((-N[Sin[t], $MachinePrecision]) * eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 2.6e-90], N[(t$95$2 / N[Sqrt[N[(1.0 + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \frac{\tan t}{ew} \cdot eh\\
      t_2 := \left(eh \cdot \sin t\right) \cdot t\_1 + \cos t \cdot ew\\
      t_3 := \left|\frac{t\_2}{\frac{-1}{\cos \tan^{-1} t\_1}}\right|\\
      \mathbf{if}\;ew \leq -3.8 \cdot 10^{-64}:\\
      \;\;\;\;t\_3\\
      
      \mathbf{elif}\;ew \leq 3.55 \cdot 10^{-171}:\\
      \;\;\;\;\left|\sin \tan^{-1} \left(\frac{eh}{\cos t} \cdot \frac{-t}{ew}\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\
      
      \mathbf{elif}\;ew \leq 2.6 \cdot 10^{-90}:\\
      \;\;\;\;\frac{t\_2}{\sqrt{1 + {t\_1}^{2}}}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_3\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if ew < -3.8000000000000002e-64 or 2.6e-90 < 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. Applied rewrites83.6%

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

        if -3.8000000000000002e-64 < ew < 3.54999999999999999e-171

        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 eh around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 3.54999999999999999e-171 < ew < 2.6e-90

          1. Initial program 100.0%

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

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(\sin \tan^{-1} \left(\frac{-eh}{ew} \cdot \tan t\right) \cdot \sin t, -eh, \left(\cos t \cdot ew\right) \cdot \cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)\right)} \]
          5. Applied rewrites86.4%

            \[\leadsto \color{blue}{\frac{ew \cdot \cos t - \left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right) \cdot \left(\sin t \cdot eh\right)}{\sqrt{{\left(\frac{\tan t}{ew} \cdot eh\right)}^{2} + 1}}} \]
        8. Recombined 3 regimes into one program.
        9. Final simplification81.8%

          \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -3.8 \cdot 10^{-64}:\\ \;\;\;\;\left|\frac{\left(eh \cdot \sin t\right) \cdot \left(\frac{\tan t}{ew} \cdot eh\right) + \cos t \cdot ew}{\frac{-1}{\cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}}\right|\\ \mathbf{elif}\;ew \leq 3.55 \cdot 10^{-171}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{eh}{\cos t} \cdot \frac{-t}{ew}\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\ \mathbf{elif}\;ew \leq 2.6 \cdot 10^{-90}:\\ \;\;\;\;\frac{\left(eh \cdot \sin t\right) \cdot \left(\frac{\tan t}{ew} \cdot eh\right) + \cos t \cdot ew}{\sqrt{1 + {\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\left(eh \cdot \sin t\right) \cdot \left(\frac{\tan t}{ew} \cdot eh\right) + \cos t \cdot ew}{\frac{-1}{\cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}}\right|\\ \end{array} \]
        10. Add Preprocessing

        Alternative 4: 74.0% accurate, 1.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \cos t \cdot ew\\ t_2 := \frac{\tan t}{ew} \cdot eh\\ t_3 := \left|t\_1 \cdot \cos \tan^{-1} t\_2\right|\\ \mathbf{if}\;ew \leq -2.9 \cdot 10^{-58}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;ew \leq 3.55 \cdot 10^{-171}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{eh}{\cos t} \cdot \frac{-t}{ew}\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\ \mathbf{elif}\;ew \leq 2.6 \cdot 10^{-90}:\\ \;\;\;\;\frac{\left(eh \cdot \sin t\right) \cdot t\_2 + t\_1}{\sqrt{1 + {t\_2}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
        (FPCore (eh ew t)
         :precision binary64
         (let* ((t_1 (* (cos t) ew))
                (t_2 (* (/ (tan t) ew) eh))
                (t_3 (fabs (* t_1 (cos (atan t_2))))))
           (if (<= ew -2.9e-58)
             t_3
             (if (<= ew 3.55e-171)
               (fabs
                (* (sin (atan (* (/ eh (cos t)) (/ (- t) ew)))) (* (- (sin t)) eh)))
               (if (<= ew 2.6e-90)
                 (/ (+ (* (* eh (sin t)) t_2) t_1) (sqrt (+ 1.0 (pow t_2 2.0))))
                 t_3)))))
        double code(double eh, double ew, double t) {
        	double t_1 = cos(t) * ew;
        	double t_2 = (tan(t) / ew) * eh;
        	double t_3 = fabs((t_1 * cos(atan(t_2))));
        	double tmp;
        	if (ew <= -2.9e-58) {
        		tmp = t_3;
        	} else if (ew <= 3.55e-171) {
        		tmp = fabs((sin(atan(((eh / cos(t)) * (-t / ew)))) * (-sin(t) * eh)));
        	} else if (ew <= 2.6e-90) {
        		tmp = (((eh * sin(t)) * t_2) + t_1) / sqrt((1.0 + pow(t_2, 2.0)));
        	} else {
        		tmp = t_3;
        	}
        	return tmp;
        }
        
        real(8) function code(eh, ew, t)
            real(8), intent (in) :: eh
            real(8), intent (in) :: ew
            real(8), intent (in) :: t
            real(8) :: t_1
            real(8) :: t_2
            real(8) :: t_3
            real(8) :: tmp
            t_1 = cos(t) * ew
            t_2 = (tan(t) / ew) * eh
            t_3 = abs((t_1 * cos(atan(t_2))))
            if (ew <= (-2.9d-58)) then
                tmp = t_3
            else if (ew <= 3.55d-171) then
                tmp = abs((sin(atan(((eh / cos(t)) * (-t / ew)))) * (-sin(t) * eh)))
            else if (ew <= 2.6d-90) then
                tmp = (((eh * sin(t)) * t_2) + t_1) / sqrt((1.0d0 + (t_2 ** 2.0d0)))
            else
                tmp = t_3
            end if
            code = tmp
        end function
        
        public static double code(double eh, double ew, double t) {
        	double t_1 = Math.cos(t) * ew;
        	double t_2 = (Math.tan(t) / ew) * eh;
        	double t_3 = Math.abs((t_1 * Math.cos(Math.atan(t_2))));
        	double tmp;
        	if (ew <= -2.9e-58) {
        		tmp = t_3;
        	} else if (ew <= 3.55e-171) {
        		tmp = Math.abs((Math.sin(Math.atan(((eh / Math.cos(t)) * (-t / ew)))) * (-Math.sin(t) * eh)));
        	} else if (ew <= 2.6e-90) {
        		tmp = (((eh * Math.sin(t)) * t_2) + t_1) / Math.sqrt((1.0 + Math.pow(t_2, 2.0)));
        	} else {
        		tmp = t_3;
        	}
        	return tmp;
        }
        
        def code(eh, ew, t):
        	t_1 = math.cos(t) * ew
        	t_2 = (math.tan(t) / ew) * eh
        	t_3 = math.fabs((t_1 * math.cos(math.atan(t_2))))
        	tmp = 0
        	if ew <= -2.9e-58:
        		tmp = t_3
        	elif ew <= 3.55e-171:
        		tmp = math.fabs((math.sin(math.atan(((eh / math.cos(t)) * (-t / ew)))) * (-math.sin(t) * eh)))
        	elif ew <= 2.6e-90:
        		tmp = (((eh * math.sin(t)) * t_2) + t_1) / math.sqrt((1.0 + math.pow(t_2, 2.0)))
        	else:
        		tmp = t_3
        	return tmp
        
        function code(eh, ew, t)
        	t_1 = Float64(cos(t) * ew)
        	t_2 = Float64(Float64(tan(t) / ew) * eh)
        	t_3 = abs(Float64(t_1 * cos(atan(t_2))))
        	tmp = 0.0
        	if (ew <= -2.9e-58)
        		tmp = t_3;
        	elseif (ew <= 3.55e-171)
        		tmp = abs(Float64(sin(atan(Float64(Float64(eh / cos(t)) * Float64(Float64(-t) / ew)))) * Float64(Float64(-sin(t)) * eh)));
        	elseif (ew <= 2.6e-90)
        		tmp = Float64(Float64(Float64(Float64(eh * sin(t)) * t_2) + t_1) / sqrt(Float64(1.0 + (t_2 ^ 2.0))));
        	else
        		tmp = t_3;
        	end
        	return tmp
        end
        
        function tmp_2 = code(eh, ew, t)
        	t_1 = cos(t) * ew;
        	t_2 = (tan(t) / ew) * eh;
        	t_3 = abs((t_1 * cos(atan(t_2))));
        	tmp = 0.0;
        	if (ew <= -2.9e-58)
        		tmp = t_3;
        	elseif (ew <= 3.55e-171)
        		tmp = abs((sin(atan(((eh / cos(t)) * (-t / ew)))) * (-sin(t) * eh)));
        	elseif (ew <= 2.6e-90)
        		tmp = (((eh * sin(t)) * t_2) + t_1) / sqrt((1.0 + (t_2 ^ 2.0)));
        	else
        		tmp = t_3;
        	end
        	tmp_2 = tmp;
        end
        
        code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision]}, Block[{t$95$3 = N[Abs[N[(t$95$1 * N[Cos[N[ArcTan[t$95$2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -2.9e-58], t$95$3, If[LessEqual[ew, 3.55e-171], N[Abs[N[(N[Sin[N[ArcTan[N[(N[(eh / N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[((-t) / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[((-N[Sin[t], $MachinePrecision]) * eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 2.6e-90], N[(N[(N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] + t$95$1), $MachinePrecision] / N[Sqrt[N[(1.0 + N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \cos t \cdot ew\\
        t_2 := \frac{\tan t}{ew} \cdot eh\\
        t_3 := \left|t\_1 \cdot \cos \tan^{-1} t\_2\right|\\
        \mathbf{if}\;ew \leq -2.9 \cdot 10^{-58}:\\
        \;\;\;\;t\_3\\
        
        \mathbf{elif}\;ew \leq 3.55 \cdot 10^{-171}:\\
        \;\;\;\;\left|\sin \tan^{-1} \left(\frac{eh}{\cos t} \cdot \frac{-t}{ew}\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\
        
        \mathbf{elif}\;ew \leq 2.6 \cdot 10^{-90}:\\
        \;\;\;\;\frac{\left(eh \cdot \sin t\right) \cdot t\_2 + t\_1}{\sqrt{1 + {t\_2}^{2}}}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_3\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if ew < -2.8999999999999999e-58 or 2.6e-90 < 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. Applied rewrites99.6%

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

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

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

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

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

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

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

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

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

          if -2.8999999999999999e-58 < ew < 3.54999999999999999e-171

          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 eh around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 3.54999999999999999e-171 < ew < 2.6e-90

            1. Initial program 100.0%

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

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

              \[\leadsto \color{blue}{\mathsf{fma}\left(\sin \tan^{-1} \left(\frac{-eh}{ew} \cdot \tan t\right) \cdot \sin t, -eh, \left(\cos t \cdot ew\right) \cdot \cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)\right)} \]
            5. Applied rewrites86.4%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -2.9 \cdot 10^{-58}:\\ \;\;\;\;\left|\left(\cos t \cdot ew\right) \cdot \cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)\right|\\ \mathbf{elif}\;ew \leq 3.55 \cdot 10^{-171}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{eh}{\cos t} \cdot \frac{-t}{ew}\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\ \mathbf{elif}\;ew \leq 2.6 \cdot 10^{-90}:\\ \;\;\;\;\frac{\left(eh \cdot \sin t\right) \cdot \left(\frac{\tan t}{ew} \cdot eh\right) + \cos t \cdot ew}{\sqrt{1 + {\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\left|\left(\cos t \cdot ew\right) \cdot \cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)\right|\\ \end{array} \]
          10. Add Preprocessing

          Alternative 5: 75.6% accurate, 2.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|\sin \tan^{-1} \left(\frac{-eh}{ew} \cdot t\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\ \mathbf{if}\;eh \leq -2.6 \cdot 10^{+67}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;eh \leq 5.5 \cdot 10^{+131}:\\ \;\;\;\;\left|\left(\cos t \cdot ew\right) \cdot \cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)\right|\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (eh ew t)
           :precision binary64
           (let* ((t_1 (fabs (* (sin (atan (* (/ (- eh) ew) t))) (* (- (sin t)) eh)))))
             (if (<= eh -2.6e+67)
               t_1
               (if (<= eh 5.5e+131)
                 (fabs (* (* (cos t) ew) (cos (atan (* (/ (tan t) ew) eh)))))
                 t_1))))
          double code(double eh, double ew, double t) {
          	double t_1 = fabs((sin(atan(((-eh / ew) * t))) * (-sin(t) * eh)));
          	double tmp;
          	if (eh <= -2.6e+67) {
          		tmp = t_1;
          	} else if (eh <= 5.5e+131) {
          		tmp = fabs(((cos(t) * ew) * cos(atan(((tan(t) / ew) * eh)))));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          real(8) function code(eh, ew, t)
              real(8), intent (in) :: eh
              real(8), intent (in) :: ew
              real(8), intent (in) :: t
              real(8) :: t_1
              real(8) :: tmp
              t_1 = abs((sin(atan(((-eh / ew) * t))) * (-sin(t) * eh)))
              if (eh <= (-2.6d+67)) then
                  tmp = t_1
              else if (eh <= 5.5d+131) then
                  tmp = abs(((cos(t) * ew) * cos(atan(((tan(t) / ew) * eh)))))
              else
                  tmp = t_1
              end if
              code = tmp
          end function
          
          public static double code(double eh, double ew, double t) {
          	double t_1 = Math.abs((Math.sin(Math.atan(((-eh / ew) * t))) * (-Math.sin(t) * eh)));
          	double tmp;
          	if (eh <= -2.6e+67) {
          		tmp = t_1;
          	} else if (eh <= 5.5e+131) {
          		tmp = Math.abs(((Math.cos(t) * ew) * Math.cos(Math.atan(((Math.tan(t) / ew) * eh)))));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(eh, ew, t):
          	t_1 = math.fabs((math.sin(math.atan(((-eh / ew) * t))) * (-math.sin(t) * eh)))
          	tmp = 0
          	if eh <= -2.6e+67:
          		tmp = t_1
          	elif eh <= 5.5e+131:
          		tmp = math.fabs(((math.cos(t) * ew) * math.cos(math.atan(((math.tan(t) / ew) * eh)))))
          	else:
          		tmp = t_1
          	return tmp
          
          function code(eh, ew, t)
          	t_1 = abs(Float64(sin(atan(Float64(Float64(Float64(-eh) / ew) * t))) * Float64(Float64(-sin(t)) * eh)))
          	tmp = 0.0
          	if (eh <= -2.6e+67)
          		tmp = t_1;
          	elseif (eh <= 5.5e+131)
          		tmp = abs(Float64(Float64(cos(t) * ew) * cos(atan(Float64(Float64(tan(t) / ew) * eh)))));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(eh, ew, t)
          	t_1 = abs((sin(atan(((-eh / ew) * t))) * (-sin(t) * eh)));
          	tmp = 0.0;
          	if (eh <= -2.6e+67)
          		tmp = t_1;
          	elseif (eh <= 5.5e+131)
          		tmp = abs(((cos(t) * ew) * cos(atan(((tan(t) / ew) * eh)))));
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(N[Sin[N[ArcTan[N[(N[((-eh) / ew), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[((-N[Sin[t], $MachinePrecision]) * eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eh, -2.6e+67], t$95$1, If[LessEqual[eh, 5.5e+131], N[Abs[N[(N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \left|\sin \tan^{-1} \left(\frac{-eh}{ew} \cdot t\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\
          \mathbf{if}\;eh \leq -2.6 \cdot 10^{+67}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;eh \leq 5.5 \cdot 10^{+131}:\\
          \;\;\;\;\left|\left(\cos t \cdot ew\right) \cdot \cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)\right|\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if eh < -2.6e67 or 5.49999999999999971e131 < eh

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -2.6e67 < eh < 5.49999999999999971e131

              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. Applied rewrites99.6%

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

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

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

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

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

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

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

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

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

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

            Alternative 6: 75.4% accurate, 2.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|\sin \tan^{-1} \left(\frac{-eh}{ew} \cdot t\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\ \mathbf{if}\;eh \leq -8.2 \cdot 10^{+64}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;eh \leq 5.5 \cdot 10^{+131}:\\ \;\;\;\;\frac{1}{\left|\frac{1}{\frac{1}{\sqrt{1 + {\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}} \cdot \left(\cos t \cdot ew\right)}\right|}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (eh ew t)
             :precision binary64
             (let* ((t_1 (fabs (* (sin (atan (* (/ (- eh) ew) t))) (* (- (sin t)) eh)))))
               (if (<= eh -8.2e+64)
                 t_1
                 (if (<= eh 5.5e+131)
                   (/
                    1.0
                    (fabs
                     (/
                      1.0
                      (*
                       (/ 1.0 (sqrt (+ 1.0 (pow (* (/ (tan t) ew) eh) 2.0))))
                       (* (cos t) ew)))))
                   t_1))))
            double code(double eh, double ew, double t) {
            	double t_1 = fabs((sin(atan(((-eh / ew) * t))) * (-sin(t) * eh)));
            	double tmp;
            	if (eh <= -8.2e+64) {
            		tmp = t_1;
            	} else if (eh <= 5.5e+131) {
            		tmp = 1.0 / fabs((1.0 / ((1.0 / sqrt((1.0 + pow(((tan(t) / ew) * eh), 2.0)))) * (cos(t) * ew))));
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            real(8) function code(eh, ew, t)
                real(8), intent (in) :: eh
                real(8), intent (in) :: ew
                real(8), intent (in) :: t
                real(8) :: t_1
                real(8) :: tmp
                t_1 = abs((sin(atan(((-eh / ew) * t))) * (-sin(t) * eh)))
                if (eh <= (-8.2d+64)) then
                    tmp = t_1
                else if (eh <= 5.5d+131) then
                    tmp = 1.0d0 / abs((1.0d0 / ((1.0d0 / sqrt((1.0d0 + (((tan(t) / ew) * eh) ** 2.0d0)))) * (cos(t) * ew))))
                else
                    tmp = t_1
                end if
                code = tmp
            end function
            
            public static double code(double eh, double ew, double t) {
            	double t_1 = Math.abs((Math.sin(Math.atan(((-eh / ew) * t))) * (-Math.sin(t) * eh)));
            	double tmp;
            	if (eh <= -8.2e+64) {
            		tmp = t_1;
            	} else if (eh <= 5.5e+131) {
            		tmp = 1.0 / Math.abs((1.0 / ((1.0 / Math.sqrt((1.0 + Math.pow(((Math.tan(t) / ew) * eh), 2.0)))) * (Math.cos(t) * ew))));
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            def code(eh, ew, t):
            	t_1 = math.fabs((math.sin(math.atan(((-eh / ew) * t))) * (-math.sin(t) * eh)))
            	tmp = 0
            	if eh <= -8.2e+64:
            		tmp = t_1
            	elif eh <= 5.5e+131:
            		tmp = 1.0 / math.fabs((1.0 / ((1.0 / math.sqrt((1.0 + math.pow(((math.tan(t) / ew) * eh), 2.0)))) * (math.cos(t) * ew))))
            	else:
            		tmp = t_1
            	return tmp
            
            function code(eh, ew, t)
            	t_1 = abs(Float64(sin(atan(Float64(Float64(Float64(-eh) / ew) * t))) * Float64(Float64(-sin(t)) * eh)))
            	tmp = 0.0
            	if (eh <= -8.2e+64)
            		tmp = t_1;
            	elseif (eh <= 5.5e+131)
            		tmp = Float64(1.0 / abs(Float64(1.0 / Float64(Float64(1.0 / sqrt(Float64(1.0 + (Float64(Float64(tan(t) / ew) * eh) ^ 2.0)))) * Float64(cos(t) * ew)))));
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            function tmp_2 = code(eh, ew, t)
            	t_1 = abs((sin(atan(((-eh / ew) * t))) * (-sin(t) * eh)));
            	tmp = 0.0;
            	if (eh <= -8.2e+64)
            		tmp = t_1;
            	elseif (eh <= 5.5e+131)
            		tmp = 1.0 / abs((1.0 / ((1.0 / sqrt((1.0 + (((tan(t) / ew) * eh) ^ 2.0)))) * (cos(t) * ew))));
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(N[Sin[N[ArcTan[N[(N[((-eh) / ew), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[((-N[Sin[t], $MachinePrecision]) * eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eh, -8.2e+64], t$95$1, If[LessEqual[eh, 5.5e+131], N[(1.0 / N[Abs[N[(1.0 / N[(N[(1.0 / N[Sqrt[N[(1.0 + N[Power[N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \left|\sin \tan^{-1} \left(\frac{-eh}{ew} \cdot t\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\
            \mathbf{if}\;eh \leq -8.2 \cdot 10^{+64}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;eh \leq 5.5 \cdot 10^{+131}:\\
            \;\;\;\;\frac{1}{\left|\frac{1}{\frac{1}{\sqrt{1 + {\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}} \cdot \left(\cos t \cdot ew\right)}\right|}\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if eh < -8.19999999999999956e64 or 5.49999999999999971e131 < eh

              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -8.19999999999999956e64 < eh < 5.49999999999999971e131

                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. Applied rewrites99.6%

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{1}{\left|\frac{1}{\frac{1}{\sqrt{{\left(\frac{\tan t}{ew} \cdot eh\right)}^{2} + 1}} \cdot \left(\color{blue}{\cos t} \cdot ew\right)}\right|} \]
              8. Recombined 2 regimes into one program.
              9. Final simplification79.1%

                \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -8.2 \cdot 10^{+64}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{-eh}{ew} \cdot t\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\ \mathbf{elif}\;eh \leq 5.5 \cdot 10^{+131}:\\ \;\;\;\;\frac{1}{\left|\frac{1}{\frac{1}{\sqrt{1 + {\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}} \cdot \left(\cos t \cdot ew\right)}\right|}\\ \mathbf{else}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{-eh}{ew} \cdot t\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\ \end{array} \]
              10. Add Preprocessing

              Alternative 7: 68.8% accurate, 2.4× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-\sin t\right) \cdot eh\\ \mathbf{if}\;eh \leq -5.4 \cdot 10^{+64}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{-eh}{ew} \cdot t\right) \cdot t\_1\right|\\ \mathbf{elif}\;eh \leq 1.42 \cdot 10^{+97}:\\ \;\;\;\;\frac{1}{\left|\frac{1}{\cos \tan^{-1} \left(\frac{t}{ew} \cdot eh\right) \cdot \left(\cos t \cdot ew\right)}\right|}\\ \mathbf{else}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\mathsf{fma}\left(-0.3333333333333333, \left(eh \cdot t\right) \cdot t, -eh\right)}{ew} \cdot t\right) \cdot t\_1\right|\\ \end{array} \end{array} \]
              (FPCore (eh ew t)
               :precision binary64
               (let* ((t_1 (* (- (sin t)) eh)))
                 (if (<= eh -5.4e+64)
                   (fabs (* (sin (atan (* (/ (- eh) ew) t))) t_1))
                   (if (<= eh 1.42e+97)
                     (/ 1.0 (fabs (/ 1.0 (* (cos (atan (* (/ t ew) eh))) (* (cos t) ew)))))
                     (fabs
                      (*
                       (sin
                        (atan (* (/ (fma -0.3333333333333333 (* (* eh t) t) (- eh)) ew) t)))
                       t_1))))))
              double code(double eh, double ew, double t) {
              	double t_1 = -sin(t) * eh;
              	double tmp;
              	if (eh <= -5.4e+64) {
              		tmp = fabs((sin(atan(((-eh / ew) * t))) * t_1));
              	} else if (eh <= 1.42e+97) {
              		tmp = 1.0 / fabs((1.0 / (cos(atan(((t / ew) * eh))) * (cos(t) * ew))));
              	} else {
              		tmp = fabs((sin(atan(((fma(-0.3333333333333333, ((eh * t) * t), -eh) / ew) * t))) * t_1));
              	}
              	return tmp;
              }
              
              function code(eh, ew, t)
              	t_1 = Float64(Float64(-sin(t)) * eh)
              	tmp = 0.0
              	if (eh <= -5.4e+64)
              		tmp = abs(Float64(sin(atan(Float64(Float64(Float64(-eh) / ew) * t))) * t_1));
              	elseif (eh <= 1.42e+97)
              		tmp = Float64(1.0 / abs(Float64(1.0 / Float64(cos(atan(Float64(Float64(t / ew) * eh))) * Float64(cos(t) * ew)))));
              	else
              		tmp = abs(Float64(sin(atan(Float64(Float64(fma(-0.3333333333333333, Float64(Float64(eh * t) * t), Float64(-eh)) / ew) * t))) * t_1));
              	end
              	return tmp
              end
              
              code[eh_, ew_, t_] := Block[{t$95$1 = N[((-N[Sin[t], $MachinePrecision]) * eh), $MachinePrecision]}, If[LessEqual[eh, -5.4e+64], N[Abs[N[(N[Sin[N[ArcTan[N[(N[((-eh) / ew), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], If[LessEqual[eh, 1.42e+97], N[(1.0 / N[Abs[N[(1.0 / N[(N[Cos[N[ArcTan[N[(N[(t / ew), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Abs[N[(N[Sin[N[ArcTan[N[(N[(N[(-0.3333333333333333 * N[(N[(eh * t), $MachinePrecision] * t), $MachinePrecision] + (-eh)), $MachinePrecision] / ew), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \left(-\sin t\right) \cdot eh\\
              \mathbf{if}\;eh \leq -5.4 \cdot 10^{+64}:\\
              \;\;\;\;\left|\sin \tan^{-1} \left(\frac{-eh}{ew} \cdot t\right) \cdot t\_1\right|\\
              
              \mathbf{elif}\;eh \leq 1.42 \cdot 10^{+97}:\\
              \;\;\;\;\frac{1}{\left|\frac{1}{\cos \tan^{-1} \left(\frac{t}{ew} \cdot eh\right) \cdot \left(\cos t \cdot ew\right)}\right|}\\
              
              \mathbf{else}:\\
              \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\mathsf{fma}\left(-0.3333333333333333, \left(eh \cdot t\right) \cdot t, -eh\right)}{ew} \cdot t\right) \cdot t\_1\right|\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if eh < -5.3999999999999999e64

                1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -5.3999999999999999e64 < eh < 1.41999999999999991e97

                  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. Applied rewrites99.6%

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{1}{\left|\frac{1}{\cos \tan^{-1} \left(\frac{eh \cdot t}{ew}\right) \cdot \left(\cos t \cdot ew\right)}\right|} \]
                  8. Step-by-step derivation
                    1. Applied rewrites72.7%

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

                    if 1.41999999999999991e97 < eh

                    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(t \cdot \left(-1 \cdot \left({t}^{2} \cdot \left(\frac{-1}{6} \cdot \frac{eh}{ew} - \frac{-1}{2} \cdot \frac{eh}{ew}\right)\right) + -1 \cdot \frac{eh}{ew}\right)\right)\right| \]
                    7. Step-by-step derivation
                      1. Applied rewrites75.0%

                        \[\leadsto \left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-\mathsf{fma}\left(\frac{\left(t \cdot t\right) \cdot eh}{ew}, 0.3333333333333333, \frac{eh}{ew}\right)\right) \cdot t\right)\right| \]
                      2. Taylor expanded in t around 0

                        \[\leadsto \left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(t \cdot \left(-1 \cdot \left({t}^{2} \cdot \left(\frac{-1}{6} \cdot \frac{eh}{ew} - \frac{-1}{2} \cdot \frac{eh}{ew}\right)\right) + -1 \cdot \frac{eh}{ew}\right)\right)\right| \]
                      3. Step-by-step derivation
                        1. Applied rewrites75.0%

                          \[\leadsto \left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\mathsf{fma}\left(-0.3333333333333333, \left(t \cdot eh\right) \cdot t, -eh\right)}{ew} \cdot t\right)\right| \]
                      4. Recombined 3 regimes into one program.
                      5. Final simplification73.2%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -5.4 \cdot 10^{+64}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{-eh}{ew} \cdot t\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\ \mathbf{elif}\;eh \leq 1.42 \cdot 10^{+97}:\\ \;\;\;\;\frac{1}{\left|\frac{1}{\cos \tan^{-1} \left(\frac{t}{ew} \cdot eh\right) \cdot \left(\cos t \cdot ew\right)}\right|}\\ \mathbf{else}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\mathsf{fma}\left(-0.3333333333333333, \left(eh \cdot t\right) \cdot t, -eh\right)}{ew} \cdot t\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\ \end{array} \]
                      6. Add Preprocessing

                      Alternative 8: 60.2% accurate, 2.4× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|\sin \tan^{-1} \left(\frac{\mathsf{fma}\left(-0.3333333333333333, \left(eh \cdot t\right) \cdot t, -eh\right)}{ew} \cdot t\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\ \mathbf{if}\;t \leq -7.8 \cdot 10^{-22}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-83}:\\ \;\;\;\;\left|\frac{ew}{1}\right|\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                      (FPCore (eh ew t)
                       :precision binary64
                       (let* ((t_1
                               (fabs
                                (*
                                 (sin
                                  (atan
                                   (* (/ (fma -0.3333333333333333 (* (* eh t) t) (- eh)) ew) t)))
                                 (* (- (sin t)) eh)))))
                         (if (<= t -7.8e-22) t_1 (if (<= t 4.8e-83) (fabs (/ ew 1.0)) t_1))))
                      double code(double eh, double ew, double t) {
                      	double t_1 = fabs((sin(atan(((fma(-0.3333333333333333, ((eh * t) * t), -eh) / ew) * t))) * (-sin(t) * eh)));
                      	double tmp;
                      	if (t <= -7.8e-22) {
                      		tmp = t_1;
                      	} else if (t <= 4.8e-83) {
                      		tmp = fabs((ew / 1.0));
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      function code(eh, ew, t)
                      	t_1 = abs(Float64(sin(atan(Float64(Float64(fma(-0.3333333333333333, Float64(Float64(eh * t) * t), Float64(-eh)) / ew) * t))) * Float64(Float64(-sin(t)) * eh)))
                      	tmp = 0.0
                      	if (t <= -7.8e-22)
                      		tmp = t_1;
                      	elseif (t <= 4.8e-83)
                      		tmp = abs(Float64(ew / 1.0));
                      	else
                      		tmp = t_1;
                      	end
                      	return tmp
                      end
                      
                      code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(N[Sin[N[ArcTan[N[(N[(N[(-0.3333333333333333 * N[(N[(eh * t), $MachinePrecision] * t), $MachinePrecision] + (-eh)), $MachinePrecision] / ew), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[((-N[Sin[t], $MachinePrecision]) * eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -7.8e-22], t$95$1, If[LessEqual[t, 4.8e-83], N[Abs[N[(ew / 1.0), $MachinePrecision]], $MachinePrecision], t$95$1]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := \left|\sin \tan^{-1} \left(\frac{\mathsf{fma}\left(-0.3333333333333333, \left(eh \cdot t\right) \cdot t, -eh\right)}{ew} \cdot t\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\
                      \mathbf{if}\;t \leq -7.8 \cdot 10^{-22}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;t \leq 4.8 \cdot 10^{-83}:\\
                      \;\;\;\;\left|\frac{ew}{1}\right|\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if t < -7.79999999999999996e-22 or 4.8000000000000002e-83 < t

                        1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(t \cdot \left(-1 \cdot \left({t}^{2} \cdot \left(\frac{-1}{6} \cdot \frac{eh}{ew} - \frac{-1}{2} \cdot \frac{eh}{ew}\right)\right) + -1 \cdot \frac{eh}{ew}\right)\right)\right| \]
                        7. Step-by-step derivation
                          1. Applied rewrites53.6%

                            \[\leadsto \left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-\mathsf{fma}\left(\frac{\left(t \cdot t\right) \cdot eh}{ew}, 0.3333333333333333, \frac{eh}{ew}\right)\right) \cdot t\right)\right| \]
                          2. Taylor expanded in t around 0

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

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

                            if -7.79999999999999996e-22 < t < 4.8000000000000002e-83

                            1. Initial program 100.0%

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

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

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

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

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

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

                                \[\leadsto \left|\cos \tan^{-1} \left(\frac{-eh}{ew} \cdot t\right) \cdot ew\right| \]
                              2. Step-by-step derivation
                                1. Applied rewrites78.8%

                                  \[\leadsto \left|\frac{ew}{\color{blue}{\sqrt{{\left(\frac{-eh}{ew} \cdot t\right)}^{2} + 1}}}\right| \]
                                2. Taylor expanded in eh around 0

                                  \[\leadsto \left|\frac{ew}{1}\right| \]
                                3. Step-by-step derivation
                                  1. Applied rewrites79.1%

                                    \[\leadsto \left|\frac{ew}{1}\right| \]
                                4. Recombined 2 regimes into one program.
                                5. Final simplification64.9%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.8 \cdot 10^{-22}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\mathsf{fma}\left(-0.3333333333333333, \left(eh \cdot t\right) \cdot t, -eh\right)}{ew} \cdot t\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-83}:\\ \;\;\;\;\left|\frac{ew}{1}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\mathsf{fma}\left(-0.3333333333333333, \left(eh \cdot t\right) \cdot t, -eh\right)}{ew} \cdot t\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\ \end{array} \]
                                6. Add Preprocessing

                                Alternative 9: 60.2% accurate, 2.5× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|\sin \tan^{-1} \left(\frac{-eh}{ew} \cdot t\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\ \mathbf{if}\;t \leq -7.8 \cdot 10^{-22}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-83}:\\ \;\;\;\;\left|\frac{ew}{1}\right|\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                (FPCore (eh ew t)
                                 :precision binary64
                                 (let* ((t_1 (fabs (* (sin (atan (* (/ (- eh) ew) t))) (* (- (sin t)) eh)))))
                                   (if (<= t -7.8e-22) t_1 (if (<= t 4.8e-83) (fabs (/ ew 1.0)) t_1))))
                                double code(double eh, double ew, double t) {
                                	double t_1 = fabs((sin(atan(((-eh / ew) * t))) * (-sin(t) * eh)));
                                	double tmp;
                                	if (t <= -7.8e-22) {
                                		tmp = t_1;
                                	} else if (t <= 4.8e-83) {
                                		tmp = fabs((ew / 1.0));
                                	} else {
                                		tmp = t_1;
                                	}
                                	return tmp;
                                }
                                
                                real(8) function code(eh, ew, t)
                                    real(8), intent (in) :: eh
                                    real(8), intent (in) :: ew
                                    real(8), intent (in) :: t
                                    real(8) :: t_1
                                    real(8) :: tmp
                                    t_1 = abs((sin(atan(((-eh / ew) * t))) * (-sin(t) * eh)))
                                    if (t <= (-7.8d-22)) then
                                        tmp = t_1
                                    else if (t <= 4.8d-83) then
                                        tmp = abs((ew / 1.0d0))
                                    else
                                        tmp = t_1
                                    end if
                                    code = tmp
                                end function
                                
                                public static double code(double eh, double ew, double t) {
                                	double t_1 = Math.abs((Math.sin(Math.atan(((-eh / ew) * t))) * (-Math.sin(t) * eh)));
                                	double tmp;
                                	if (t <= -7.8e-22) {
                                		tmp = t_1;
                                	} else if (t <= 4.8e-83) {
                                		tmp = Math.abs((ew / 1.0));
                                	} else {
                                		tmp = t_1;
                                	}
                                	return tmp;
                                }
                                
                                def code(eh, ew, t):
                                	t_1 = math.fabs((math.sin(math.atan(((-eh / ew) * t))) * (-math.sin(t) * eh)))
                                	tmp = 0
                                	if t <= -7.8e-22:
                                		tmp = t_1
                                	elif t <= 4.8e-83:
                                		tmp = math.fabs((ew / 1.0))
                                	else:
                                		tmp = t_1
                                	return tmp
                                
                                function code(eh, ew, t)
                                	t_1 = abs(Float64(sin(atan(Float64(Float64(Float64(-eh) / ew) * t))) * Float64(Float64(-sin(t)) * eh)))
                                	tmp = 0.0
                                	if (t <= -7.8e-22)
                                		tmp = t_1;
                                	elseif (t <= 4.8e-83)
                                		tmp = abs(Float64(ew / 1.0));
                                	else
                                		tmp = t_1;
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(eh, ew, t)
                                	t_1 = abs((sin(atan(((-eh / ew) * t))) * (-sin(t) * eh)));
                                	tmp = 0.0;
                                	if (t <= -7.8e-22)
                                		tmp = t_1;
                                	elseif (t <= 4.8e-83)
                                		tmp = abs((ew / 1.0));
                                	else
                                		tmp = t_1;
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(N[Sin[N[ArcTan[N[(N[((-eh) / ew), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[((-N[Sin[t], $MachinePrecision]) * eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -7.8e-22], t$95$1, If[LessEqual[t, 4.8e-83], N[Abs[N[(ew / 1.0), $MachinePrecision]], $MachinePrecision], t$95$1]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_1 := \left|\sin \tan^{-1} \left(\frac{-eh}{ew} \cdot t\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\
                                \mathbf{if}\;t \leq -7.8 \cdot 10^{-22}:\\
                                \;\;\;\;t\_1\\
                                
                                \mathbf{elif}\;t \leq 4.8 \cdot 10^{-83}:\\
                                \;\;\;\;\left|\frac{ew}{1}\right|\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;t\_1\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if t < -7.79999999999999996e-22 or 4.8000000000000002e-83 < t

                                  1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if -7.79999999999999996e-22 < t < 4.8000000000000002e-83

                                    1. Initial program 100.0%

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

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

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

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

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

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

                                        \[\leadsto \left|\cos \tan^{-1} \left(\frac{-eh}{ew} \cdot t\right) \cdot ew\right| \]
                                      2. Step-by-step derivation
                                        1. Applied rewrites78.8%

                                          \[\leadsto \left|\frac{ew}{\color{blue}{\sqrt{{\left(\frac{-eh}{ew} \cdot t\right)}^{2} + 1}}}\right| \]
                                        2. Taylor expanded in eh around 0

                                          \[\leadsto \left|\frac{ew}{1}\right| \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites79.1%

                                            \[\leadsto \left|\frac{ew}{1}\right| \]
                                        4. Recombined 2 regimes into one program.
                                        5. Final simplification64.9%

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.8 \cdot 10^{-22}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{-eh}{ew} \cdot t\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-83}:\\ \;\;\;\;\left|\frac{ew}{1}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{-eh}{ew} \cdot t\right) \cdot \left(\left(-\sin t\right) \cdot eh\right)\right|\\ \end{array} \]
                                        6. Add Preprocessing

                                        Alternative 10: 45.8% accurate, 3.3× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|\left(\left(-t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\mathsf{fma}\left(-0.3333333333333333, \left(eh \cdot t\right) \cdot t, -eh\right)}{ew} \cdot t\right)\right|\\ \mathbf{if}\;eh \leq -3.4 \cdot 10^{+137}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;eh \leq 3.5 \cdot 10^{+98}:\\ \;\;\;\;\left|\frac{ew}{1}\right|\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                        (FPCore (eh ew t)
                                         :precision binary64
                                         (let* ((t_1
                                                 (fabs
                                                  (*
                                                   (* (- t) eh)
                                                   (sin
                                                    (atan
                                                     (* (/ (fma -0.3333333333333333 (* (* eh t) t) (- eh)) ew) t)))))))
                                           (if (<= eh -3.4e+137) t_1 (if (<= eh 3.5e+98) (fabs (/ ew 1.0)) t_1))))
                                        double code(double eh, double ew, double t) {
                                        	double t_1 = fabs(((-t * eh) * sin(atan(((fma(-0.3333333333333333, ((eh * t) * t), -eh) / ew) * t)))));
                                        	double tmp;
                                        	if (eh <= -3.4e+137) {
                                        		tmp = t_1;
                                        	} else if (eh <= 3.5e+98) {
                                        		tmp = fabs((ew / 1.0));
                                        	} else {
                                        		tmp = t_1;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        function code(eh, ew, t)
                                        	t_1 = abs(Float64(Float64(Float64(-t) * eh) * sin(atan(Float64(Float64(fma(-0.3333333333333333, Float64(Float64(eh * t) * t), Float64(-eh)) / ew) * t)))))
                                        	tmp = 0.0
                                        	if (eh <= -3.4e+137)
                                        		tmp = t_1;
                                        	elseif (eh <= 3.5e+98)
                                        		tmp = abs(Float64(ew / 1.0));
                                        	else
                                        		tmp = t_1;
                                        	end
                                        	return tmp
                                        end
                                        
                                        code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(N[((-t) * eh), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(N[(-0.3333333333333333 * N[(N[(eh * t), $MachinePrecision] * t), $MachinePrecision] + (-eh)), $MachinePrecision] / ew), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eh, -3.4e+137], t$95$1, If[LessEqual[eh, 3.5e+98], N[Abs[N[(ew / 1.0), $MachinePrecision]], $MachinePrecision], t$95$1]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        t_1 := \left|\left(\left(-t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\mathsf{fma}\left(-0.3333333333333333, \left(eh \cdot t\right) \cdot t, -eh\right)}{ew} \cdot t\right)\right|\\
                                        \mathbf{if}\;eh \leq -3.4 \cdot 10^{+137}:\\
                                        \;\;\;\;t\_1\\
                                        
                                        \mathbf{elif}\;eh \leq 3.5 \cdot 10^{+98}:\\
                                        \;\;\;\;\left|\frac{ew}{1}\right|\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;t\_1\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 2 regimes
                                        2. if eh < -3.39999999999999986e137 or 3.5e98 < eh

                                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(t \cdot \left(-1 \cdot \left({t}^{2} \cdot \left(\frac{-1}{6} \cdot \frac{eh}{ew} - \frac{-1}{2} \cdot \frac{eh}{ew}\right)\right) + -1 \cdot \frac{eh}{ew}\right)\right)\right| \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites77.4%

                                              \[\leadsto \left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-\mathsf{fma}\left(\frac{\left(t \cdot t\right) \cdot eh}{ew}, 0.3333333333333333, \frac{eh}{ew}\right)\right) \cdot t\right)\right| \]
                                            2. Taylor expanded in t around 0

                                              \[\leadsto \left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(t \cdot \left(-1 \cdot \left({t}^{2} \cdot \left(\frac{-1}{6} \cdot \frac{eh}{ew} - \frac{-1}{2} \cdot \frac{eh}{ew}\right)\right) + -1 \cdot \frac{eh}{ew}\right)\right)\right| \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites77.4%

                                                \[\leadsto \left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\mathsf{fma}\left(-0.3333333333333333, \left(t \cdot eh\right) \cdot t, -eh\right)}{ew} \cdot t\right)\right| \]
                                              2. Taylor expanded in t around 0

                                                \[\leadsto \left|\left(-1 \cdot \left(eh \cdot t\right)\right) \cdot \sin \color{blue}{\tan^{-1} \left(\frac{\mathsf{fma}\left(\frac{-1}{3}, \left(t \cdot eh\right) \cdot t, -eh\right)}{ew} \cdot t\right)}\right| \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites38.2%

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

                                                if -3.39999999999999986e137 < eh < 3.5e98

                                                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|\color{blue}{ew \cdot \cos \tan^{-1} \left(-1 \cdot \frac{eh \cdot \sin t}{ew \cdot \cos t}\right)}\right| \]
                                                4. Step-by-step derivation
                                                  1. *-commutativeN/A

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

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

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

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

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

                                                      \[\leadsto \left|\frac{ew}{\color{blue}{\sqrt{{\left(\frac{-eh}{ew} \cdot t\right)}^{2} + 1}}}\right| \]
                                                    2. Taylor expanded in eh around 0

                                                      \[\leadsto \left|\frac{ew}{1}\right| \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites54.0%

                                                        \[\leadsto \left|\frac{ew}{1}\right| \]
                                                    4. Recombined 2 regimes into one program.
                                                    5. Final simplification49.1%

                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -3.4 \cdot 10^{+137}:\\ \;\;\;\;\left|\left(\left(-t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\mathsf{fma}\left(-0.3333333333333333, \left(eh \cdot t\right) \cdot t, -eh\right)}{ew} \cdot t\right)\right|\\ \mathbf{elif}\;eh \leq 3.5 \cdot 10^{+98}:\\ \;\;\;\;\left|\frac{ew}{1}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(\left(-t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\mathsf{fma}\left(-0.3333333333333333, \left(eh \cdot t\right) \cdot t, -eh\right)}{ew} \cdot t\right)\right|\\ \end{array} \]
                                                    6. Add Preprocessing

                                                    Alternative 11: 41.9% accurate, 61.6× speedup?

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

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

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

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

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

                                                        \[\leadsto \left|\cos \tan^{-1} \left(\frac{-eh}{ew} \cdot t\right) \cdot ew\right| \]
                                                      2. Step-by-step derivation
                                                        1. Applied rewrites41.7%

                                                          \[\leadsto \left|\frac{ew}{\color{blue}{\sqrt{{\left(\frac{-eh}{ew} \cdot t\right)}^{2} + 1}}}\right| \]
                                                        2. Taylor expanded in eh around 0

                                                          \[\leadsto \left|\frac{ew}{1}\right| \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites43.6%

                                                            \[\leadsto \left|\frac{ew}{1}\right| \]
                                                          2. Add Preprocessing

                                                          Reproduce

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