Example 2 from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 19.2s
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{eh \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(eh * tan(t)) / Float64(-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{eh \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}
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. Final simplification99.8%

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

Alternative 2: 52.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := ew \cdot \cos t\\ t_2 := \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right)\\ \mathbf{if}\;t\_1 \cdot \cos t\_2 - \left(eh \cdot \sin t\right) \cdot \sin t\_2 \leq -1 \cdot 10^{-281}:\\ \;\;\;\;\frac{1}{\left|\frac{1}{ew}\right|}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (* ew (cos t))) (t_2 (atan (/ (* eh (tan t)) (- ew)))))
   (if (<= (- (* t_1 (cos t_2)) (* (* eh (sin t)) (sin t_2))) -1e-281)
     (/ 1.0 (fabs (/ 1.0 ew)))
     t_1)))
double code(double eh, double ew, double t) {
	double t_1 = ew * cos(t);
	double t_2 = atan(((eh * tan(t)) / -ew));
	double tmp;
	if (((t_1 * cos(t_2)) - ((eh * sin(t)) * sin(t_2))) <= -1e-281) {
		tmp = 1.0 / fabs((1.0 / 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) :: t_2
    real(8) :: tmp
    t_1 = ew * cos(t)
    t_2 = atan(((eh * tan(t)) / -ew))
    if (((t_1 * cos(t_2)) - ((eh * sin(t)) * sin(t_2))) <= (-1d-281)) then
        tmp = 1.0d0 / abs((1.0d0 / ew))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double eh, double ew, double t) {
	double t_1 = ew * Math.cos(t);
	double t_2 = Math.atan(((eh * Math.tan(t)) / -ew));
	double tmp;
	if (((t_1 * Math.cos(t_2)) - ((eh * Math.sin(t)) * Math.sin(t_2))) <= -1e-281) {
		tmp = 1.0 / Math.abs((1.0 / ew));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(eh, ew, t):
	t_1 = ew * math.cos(t)
	t_2 = math.atan(((eh * math.tan(t)) / -ew))
	tmp = 0
	if ((t_1 * math.cos(t_2)) - ((eh * math.sin(t)) * math.sin(t_2))) <= -1e-281:
		tmp = 1.0 / math.fabs((1.0 / ew))
	else:
		tmp = t_1
	return tmp
function code(eh, ew, t)
	t_1 = Float64(ew * cos(t))
	t_2 = atan(Float64(Float64(eh * tan(t)) / Float64(-ew)))
	tmp = 0.0
	if (Float64(Float64(t_1 * cos(t_2)) - Float64(Float64(eh * sin(t)) * sin(t_2))) <= -1e-281)
		tmp = Float64(1.0 / abs(Float64(1.0 / ew)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	t_1 = ew * cos(t);
	t_2 = atan(((eh * tan(t)) / -ew));
	tmp = 0.0;
	if (((t_1 * cos(t_2)) - ((eh * sin(t)) * sin(t_2))) <= -1e-281)
		tmp = 1.0 / abs((1.0 / ew));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / (-ew)), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(t$95$1 * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e-281], N[(1.0 / N[Abs[N[(1.0 / ew), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 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))))) < -1e-281

    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 rewrites80.5%

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

      \[\leadsto \frac{1}{\left|\color{blue}{\frac{1}{ew}}\right|} \]
    5. Step-by-step derivation
      1. lower-/.f6443.9

        \[\leadsto \frac{1}{\left|\color{blue}{\frac{1}{ew}}\right|} \]
    6. Applied rewrites43.9%

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

    if -1e-281 < (-.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 rewrites75.3%

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

      \[\leadsto \frac{1}{\color{blue}{{\left({\left(\frac{\mathsf{fma}\left(\frac{\tan t}{ew}, \left(eh \cdot eh\right) \cdot \sin t, ew \cdot \cos t\right)}{\sqrt{1 + {\left(\tan t \cdot \frac{eh}{ew}\right)}^{2}}}\right)}^{-0.5}\right)}^{2}}} \]
    5. Taylor expanded in ew around inf

      \[\leadsto \color{blue}{ew \cdot \cos t} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{ew \cdot \cos t} \]
      2. lower-cos.f6458.0

        \[\leadsto ew \cdot \color{blue}{\cos t} \]
    7. Applied rewrites58.0%

      \[\leadsto \color{blue}{ew \cdot \cos t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification51.0%

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

Alternative 3: 98.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{eh \cdot \tan t}{ew}\\
t_2 := \sin t \cdot \sin \tan^{-1} t\_1\\
t_3 := \left|eh \cdot \mathsf{fma}\left(\frac{1}{eh \cdot \sqrt{1 + {t\_1}^{2}}}, ew \cdot \cos t, t\_2\right)\right|\\
\mathbf{if}\;eh \leq -3.7 \cdot 10^{+102}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;eh \leq 7.5 \cdot 10^{-43}:\\
\;\;\;\;\left|ew \cdot \mathsf{fma}\left(eh, \frac{t\_2}{ew}, \cos t\right)\right|\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if eh < -3.70000000000000023e102 or 7.50000000000000068e-43 < 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 t around 0

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(\frac{eh \cdot \tan t}{\color{blue}{\mathsf{neg}\left(ew\right)}}\right)\right| \]
      11. lower-neg.f6431.3

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

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

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

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

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

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

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

    if -3.70000000000000023e102 < eh < 7.50000000000000068e-43

    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 \tan t}{ew}\right)}\right| \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|ew \cdot \color{blue}{\mathsf{fma}\left(eh, \frac{\sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)}{ew}, \cos t\right)}\right| \]
    12. Recombined 2 regimes into one program.
    13. Final simplification99.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -3.7 \cdot 10^{+102}:\\ \;\;\;\;\left|eh \cdot \mathsf{fma}\left(\frac{1}{eh \cdot \sqrt{1 + {\left(\frac{eh \cdot \tan t}{ew}\right)}^{2}}}, ew \cdot \cos t, \sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right)\right|\\ \mathbf{elif}\;eh \leq 7.5 \cdot 10^{-43}:\\ \;\;\;\;\left|ew \cdot \mathsf{fma}\left(eh, \frac{\sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)}{ew}, \cos t\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|eh \cdot \mathsf{fma}\left(\frac{1}{eh \cdot \sqrt{1 + {\left(\frac{eh \cdot \tan t}{ew}\right)}^{2}}}, ew \cdot \cos t, \sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right)\right|\\ \end{array} \]
    14. Add Preprocessing

    Alternative 4: 98.0% accurate, 1.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -4.50000000000000021e102 < eh < 9.99999999999999977e37

        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 \tan t}{ew}\right)}\right| \]
        4. Step-by-step derivation
          1. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left|ew \cdot \color{blue}{\mathsf{fma}\left(eh, \frac{\sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)}{ew}, \cos t\right)}\right| \]
        12. Recombined 2 regimes into one program.
        13. Final simplification98.8%

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

        Alternative 5: 92.0% accurate, 1.5× speedup?

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

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
          6. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
            2. lower-sin.f6487.0

              \[\leadsto \left|eh \cdot \color{blue}{\sin t}\right| \]
          7. Applied rewrites87.0%

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

          if -5.7999999999999998e200 < eh < 1.3e178

          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 \tan t}{ew}\right)}\right| \]
          4. Step-by-step derivation
            1. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

              \[\leadsto \left|ew \cdot \cos \tan^{-1} \left(\frac{eh \cdot \tan t}{\color{blue}{\mathsf{neg}\left(ew\right)}}\right)\right| \]
            11. lower-neg.f6446.9

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

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

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

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

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

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

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

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

              \[\leadsto \left|ew \cdot \color{blue}{\mathsf{fma}\left(eh, \frac{\sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)}{ew}, \cos t\right)}\right| \]
          12. Recombined 2 regimes into one program.
          13. Add Preprocessing

          Alternative 6: 75.2% accurate, 7.2× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|eh \cdot \sin t\right|\\ \mathbf{if}\;eh \leq -7.5 \cdot 10^{+79}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;eh \leq 2.65 \cdot 10^{+39}:\\ \;\;\;\;\left|ew \cdot \cos t\right|\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (eh ew t)
           :precision binary64
           (let* ((t_1 (fabs (* eh (sin t)))))
             (if (<= eh -7.5e+79) t_1 (if (<= eh 2.65e+39) (fabs (* ew (cos t))) t_1))))
          double code(double eh, double ew, double t) {
          	double t_1 = fabs((eh * sin(t)));
          	double tmp;
          	if (eh <= -7.5e+79) {
          		tmp = t_1;
          	} else if (eh <= 2.65e+39) {
          		tmp = fabs((ew * cos(t)));
          	} 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((eh * sin(t)))
              if (eh <= (-7.5d+79)) then
                  tmp = t_1
              else if (eh <= 2.65d+39) then
                  tmp = abs((ew * cos(t)))
              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((eh * Math.sin(t)));
          	double tmp;
          	if (eh <= -7.5e+79) {
          		tmp = t_1;
          	} else if (eh <= 2.65e+39) {
          		tmp = Math.abs((ew * Math.cos(t)));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(eh, ew, t):
          	t_1 = math.fabs((eh * math.sin(t)))
          	tmp = 0
          	if eh <= -7.5e+79:
          		tmp = t_1
          	elif eh <= 2.65e+39:
          		tmp = math.fabs((ew * math.cos(t)))
          	else:
          		tmp = t_1
          	return tmp
          
          function code(eh, ew, t)
          	t_1 = abs(Float64(eh * sin(t)))
          	tmp = 0.0
          	if (eh <= -7.5e+79)
          		tmp = t_1;
          	elseif (eh <= 2.65e+39)
          		tmp = abs(Float64(ew * cos(t)));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(eh, ew, t)
          	t_1 = abs((eh * sin(t)));
          	tmp = 0.0;
          	if (eh <= -7.5e+79)
          		tmp = t_1;
          	elseif (eh <= 2.65e+39)
          		tmp = abs((ew * cos(t)));
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eh, -7.5e+79], t$95$1, If[LessEqual[eh, 2.65e+39], N[Abs[N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \left|eh \cdot \sin t\right|\\
          \mathbf{if}\;eh \leq -7.5 \cdot 10^{+79}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;eh \leq 2.65 \cdot 10^{+39}:\\
          \;\;\;\;\left|ew \cdot \cos t\right|\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if eh < -7.49999999999999967e79 or 2.64999999999999989e39 < eh

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
            6. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
              2. lower-sin.f6474.5

                \[\leadsto \left|eh \cdot \color{blue}{\sin t}\right| \]
            7. Applied rewrites74.5%

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

            if -7.49999999999999967e79 < eh < 2.64999999999999989e39

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left|\color{blue}{ew \cdot \cos t}\right| \]
            6. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto \left|\color{blue}{ew \cdot \cos t}\right| \]
              2. lower-cos.f6483.7

                \[\leadsto \left|ew \cdot \color{blue}{\cos t}\right| \]
            7. Applied rewrites83.7%

              \[\leadsto \left|\color{blue}{ew \cdot \cos t}\right| \]
          3. Recombined 2 regimes into one program.
          4. Add Preprocessing

          Alternative 7: 61.0% accurate, 7.2× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -1.8 \cdot 10^{-126}:\\ \;\;\;\;\frac{1}{\left|\frac{1}{ew}\right|}\\ \mathbf{elif}\;ew \leq 5.2 \cdot 10^{-27}:\\ \;\;\;\;\left|eh \cdot \sin t\right|\\ \mathbf{else}:\\ \;\;\;\;ew \cdot \cos t\\ \end{array} \end{array} \]
          (FPCore (eh ew t)
           :precision binary64
           (if (<= ew -1.8e-126)
             (/ 1.0 (fabs (/ 1.0 ew)))
             (if (<= ew 5.2e-27) (fabs (* eh (sin t))) (* ew (cos t)))))
          double code(double eh, double ew, double t) {
          	double tmp;
          	if (ew <= -1.8e-126) {
          		tmp = 1.0 / fabs((1.0 / ew));
          	} else if (ew <= 5.2e-27) {
          		tmp = fabs((eh * sin(t)));
          	} else {
          		tmp = ew * cos(t);
          	}
          	return tmp;
          }
          
          real(8) function code(eh, ew, t)
              real(8), intent (in) :: eh
              real(8), intent (in) :: ew
              real(8), intent (in) :: t
              real(8) :: tmp
              if (ew <= (-1.8d-126)) then
                  tmp = 1.0d0 / abs((1.0d0 / ew))
              else if (ew <= 5.2d-27) then
                  tmp = abs((eh * sin(t)))
              else
                  tmp = ew * cos(t)
              end if
              code = tmp
          end function
          
          public static double code(double eh, double ew, double t) {
          	double tmp;
          	if (ew <= -1.8e-126) {
          		tmp = 1.0 / Math.abs((1.0 / ew));
          	} else if (ew <= 5.2e-27) {
          		tmp = Math.abs((eh * Math.sin(t)));
          	} else {
          		tmp = ew * Math.cos(t);
          	}
          	return tmp;
          }
          
          def code(eh, ew, t):
          	tmp = 0
          	if ew <= -1.8e-126:
          		tmp = 1.0 / math.fabs((1.0 / ew))
          	elif ew <= 5.2e-27:
          		tmp = math.fabs((eh * math.sin(t)))
          	else:
          		tmp = ew * math.cos(t)
          	return tmp
          
          function code(eh, ew, t)
          	tmp = 0.0
          	if (ew <= -1.8e-126)
          		tmp = Float64(1.0 / abs(Float64(1.0 / ew)));
          	elseif (ew <= 5.2e-27)
          		tmp = abs(Float64(eh * sin(t)));
          	else
          		tmp = Float64(ew * cos(t));
          	end
          	return tmp
          end
          
          function tmp_2 = code(eh, ew, t)
          	tmp = 0.0;
          	if (ew <= -1.8e-126)
          		tmp = 1.0 / abs((1.0 / ew));
          	elseif (ew <= 5.2e-27)
          		tmp = abs((eh * sin(t)));
          	else
          		tmp = ew * cos(t);
          	end
          	tmp_2 = tmp;
          end
          
          code[eh_, ew_, t_] := If[LessEqual[ew, -1.8e-126], N[(1.0 / N[Abs[N[(1.0 / ew), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[ew, 5.2e-27], N[Abs[N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;ew \leq -1.8 \cdot 10^{-126}:\\
          \;\;\;\;\frac{1}{\left|\frac{1}{ew}\right|}\\
          
          \mathbf{elif}\;ew \leq 5.2 \cdot 10^{-27}:\\
          \;\;\;\;\left|eh \cdot \sin t\right|\\
          
          \mathbf{else}:\\
          \;\;\;\;ew \cdot \cos t\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if ew < -1.8e-126

            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. Applied rewrites91.7%

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

              \[\leadsto \frac{1}{\left|\color{blue}{\frac{1}{ew}}\right|} \]
            5. Step-by-step derivation
              1. lower-/.f6450.0

                \[\leadsto \frac{1}{\left|\color{blue}{\frac{1}{ew}}\right|} \]
            6. Applied rewrites50.0%

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

            if -1.8e-126 < ew < 5.20000000000000034e-27

            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
            6. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
              2. lower-sin.f6476.1

                \[\leadsto \left|eh \cdot \color{blue}{\sin t}\right| \]
            7. Applied rewrites76.1%

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

            if 5.20000000000000034e-27 < 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 rewrites92.5%

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

              \[\leadsto \frac{1}{\color{blue}{{\left({\left(\frac{\mathsf{fma}\left(\frac{\tan t}{ew}, \left(eh \cdot eh\right) \cdot \sin t, ew \cdot \cos t\right)}{\sqrt{1 + {\left(\tan t \cdot \frac{eh}{ew}\right)}^{2}}}\right)}^{-0.5}\right)}^{2}}} \]
            5. Taylor expanded in ew around inf

              \[\leadsto \color{blue}{ew \cdot \cos t} \]
            6. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto \color{blue}{ew \cdot \cos t} \]
              2. lower-cos.f6459.8

                \[\leadsto ew \cdot \color{blue}{\cos t} \]
            7. Applied rewrites59.8%

              \[\leadsto \color{blue}{ew \cdot \cos t} \]
          3. Recombined 3 regimes into one program.
          4. Add Preprocessing

          Alternative 8: 43.8% accurate, 24.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -1.6 \cdot 10^{-127}:\\ \;\;\;\;\frac{1}{\left|\frac{1}{ew}\right|}\\ \mathbf{elif}\;ew \leq 3.8 \cdot 10^{-34}:\\ \;\;\;\;\left|t \cdot eh\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{1}{ew}}\\ \end{array} \end{array} \]
          (FPCore (eh ew t)
           :precision binary64
           (if (<= ew -1.6e-127)
             (/ 1.0 (fabs (/ 1.0 ew)))
             (if (<= ew 3.8e-34) (fabs (* t eh)) (/ 1.0 (/ 1.0 ew)))))
          double code(double eh, double ew, double t) {
          	double tmp;
          	if (ew <= -1.6e-127) {
          		tmp = 1.0 / fabs((1.0 / ew));
          	} else if (ew <= 3.8e-34) {
          		tmp = fabs((t * eh));
          	} else {
          		tmp = 1.0 / (1.0 / ew);
          	}
          	return tmp;
          }
          
          real(8) function code(eh, ew, t)
              real(8), intent (in) :: eh
              real(8), intent (in) :: ew
              real(8), intent (in) :: t
              real(8) :: tmp
              if (ew <= (-1.6d-127)) then
                  tmp = 1.0d0 / abs((1.0d0 / ew))
              else if (ew <= 3.8d-34) then
                  tmp = abs((t * eh))
              else
                  tmp = 1.0d0 / (1.0d0 / ew)
              end if
              code = tmp
          end function
          
          public static double code(double eh, double ew, double t) {
          	double tmp;
          	if (ew <= -1.6e-127) {
          		tmp = 1.0 / Math.abs((1.0 / ew));
          	} else if (ew <= 3.8e-34) {
          		tmp = Math.abs((t * eh));
          	} else {
          		tmp = 1.0 / (1.0 / ew);
          	}
          	return tmp;
          }
          
          def code(eh, ew, t):
          	tmp = 0
          	if ew <= -1.6e-127:
          		tmp = 1.0 / math.fabs((1.0 / ew))
          	elif ew <= 3.8e-34:
          		tmp = math.fabs((t * eh))
          	else:
          		tmp = 1.0 / (1.0 / ew)
          	return tmp
          
          function code(eh, ew, t)
          	tmp = 0.0
          	if (ew <= -1.6e-127)
          		tmp = Float64(1.0 / abs(Float64(1.0 / ew)));
          	elseif (ew <= 3.8e-34)
          		tmp = abs(Float64(t * eh));
          	else
          		tmp = Float64(1.0 / Float64(1.0 / ew));
          	end
          	return tmp
          end
          
          function tmp_2 = code(eh, ew, t)
          	tmp = 0.0;
          	if (ew <= -1.6e-127)
          		tmp = 1.0 / abs((1.0 / ew));
          	elseif (ew <= 3.8e-34)
          		tmp = abs((t * eh));
          	else
          		tmp = 1.0 / (1.0 / ew);
          	end
          	tmp_2 = tmp;
          end
          
          code[eh_, ew_, t_] := If[LessEqual[ew, -1.6e-127], N[(1.0 / N[Abs[N[(1.0 / ew), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[ew, 3.8e-34], N[Abs[N[(t * eh), $MachinePrecision]], $MachinePrecision], N[(1.0 / N[(1.0 / ew), $MachinePrecision]), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;ew \leq -1.6 \cdot 10^{-127}:\\
          \;\;\;\;\frac{1}{\left|\frac{1}{ew}\right|}\\
          
          \mathbf{elif}\;ew \leq 3.8 \cdot 10^{-34}:\\
          \;\;\;\;\left|t \cdot eh\right|\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{1}{\frac{1}{ew}}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if ew < -1.60000000000000009e-127

            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. Applied rewrites91.7%

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

              \[\leadsto \frac{1}{\left|\color{blue}{\frac{1}{ew}}\right|} \]
            5. Step-by-step derivation
              1. lower-/.f6450.0

                \[\leadsto \frac{1}{\left|\color{blue}{\frac{1}{ew}}\right|} \]
            6. Applied rewrites50.0%

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

            if -1.60000000000000009e-127 < ew < 3.8000000000000001e-34

            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
            6. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
              2. lower-sin.f6475.9

                \[\leadsto \left|eh \cdot \color{blue}{\sin t}\right| \]
            7. Applied rewrites75.9%

              \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
            8. Taylor expanded in t around 0

              \[\leadsto \left|eh \cdot \color{blue}{t}\right| \]
            9. Step-by-step derivation
              1. Applied rewrites44.8%

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

              if 3.8000000000000001e-34 < 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 rewrites92.6%

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

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

                \[\leadsto \frac{1}{\color{blue}{\frac{1}{ew}}} \]
              6. Step-by-step derivation
                1. lower-/.f6448.6

                  \[\leadsto \frac{1}{\color{blue}{\frac{1}{ew}}} \]
              7. Applied rewrites48.6%

                \[\leadsto \frac{1}{\color{blue}{\frac{1}{ew}}} \]
            10. Recombined 3 regimes into one program.
            11. Add Preprocessing

            Alternative 9: 40.7% accurate, 24.6× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -1.65 \cdot 10^{-127}:\\ \;\;\;\;\left|eh \cdot \frac{ew}{eh}\right|\\ \mathbf{elif}\;ew \leq 3.8 \cdot 10^{-34}:\\ \;\;\;\;\left|t \cdot eh\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{1}{ew}}\\ \end{array} \end{array} \]
            (FPCore (eh ew t)
             :precision binary64
             (if (<= ew -1.65e-127)
               (fabs (* eh (/ ew eh)))
               (if (<= ew 3.8e-34) (fabs (* t eh)) (/ 1.0 (/ 1.0 ew)))))
            double code(double eh, double ew, double t) {
            	double tmp;
            	if (ew <= -1.65e-127) {
            		tmp = fabs((eh * (ew / eh)));
            	} else if (ew <= 3.8e-34) {
            		tmp = fabs((t * eh));
            	} else {
            		tmp = 1.0 / (1.0 / ew);
            	}
            	return tmp;
            }
            
            real(8) function code(eh, ew, t)
                real(8), intent (in) :: eh
                real(8), intent (in) :: ew
                real(8), intent (in) :: t
                real(8) :: tmp
                if (ew <= (-1.65d-127)) then
                    tmp = abs((eh * (ew / eh)))
                else if (ew <= 3.8d-34) then
                    tmp = abs((t * eh))
                else
                    tmp = 1.0d0 / (1.0d0 / ew)
                end if
                code = tmp
            end function
            
            public static double code(double eh, double ew, double t) {
            	double tmp;
            	if (ew <= -1.65e-127) {
            		tmp = Math.abs((eh * (ew / eh)));
            	} else if (ew <= 3.8e-34) {
            		tmp = Math.abs((t * eh));
            	} else {
            		tmp = 1.0 / (1.0 / ew);
            	}
            	return tmp;
            }
            
            def code(eh, ew, t):
            	tmp = 0
            	if ew <= -1.65e-127:
            		tmp = math.fabs((eh * (ew / eh)))
            	elif ew <= 3.8e-34:
            		tmp = math.fabs((t * eh))
            	else:
            		tmp = 1.0 / (1.0 / ew)
            	return tmp
            
            function code(eh, ew, t)
            	tmp = 0.0
            	if (ew <= -1.65e-127)
            		tmp = abs(Float64(eh * Float64(ew / eh)));
            	elseif (ew <= 3.8e-34)
            		tmp = abs(Float64(t * eh));
            	else
            		tmp = Float64(1.0 / Float64(1.0 / ew));
            	end
            	return tmp
            end
            
            function tmp_2 = code(eh, ew, t)
            	tmp = 0.0;
            	if (ew <= -1.65e-127)
            		tmp = abs((eh * (ew / eh)));
            	elseif (ew <= 3.8e-34)
            		tmp = abs((t * eh));
            	else
            		tmp = 1.0 / (1.0 / ew);
            	end
            	tmp_2 = tmp;
            end
            
            code[eh_, ew_, t_] := If[LessEqual[ew, -1.65e-127], N[Abs[N[(eh * N[(ew / eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 3.8e-34], N[Abs[N[(t * eh), $MachinePrecision]], $MachinePrecision], N[(1.0 / N[(1.0 / ew), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;ew \leq -1.65 \cdot 10^{-127}:\\
            \;\;\;\;\left|eh \cdot \frac{ew}{eh}\right|\\
            
            \mathbf{elif}\;ew \leq 3.8 \cdot 10^{-34}:\\
            \;\;\;\;\left|t \cdot eh\right|\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{1}{\frac{1}{ew}}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if ew < -1.6499999999999999e-127

              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 t around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left|eh \cdot \frac{ew}{\color{blue}{eh}}\right| \]
              11. Step-by-step derivation
                1. Applied rewrites43.7%

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

                if -1.6499999999999999e-127 < ew < 3.8000000000000001e-34

                1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
                6. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
                  2. lower-sin.f6475.9

                    \[\leadsto \left|eh \cdot \color{blue}{\sin t}\right| \]
                7. Applied rewrites75.9%

                  \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
                8. Taylor expanded in t around 0

                  \[\leadsto \left|eh \cdot \color{blue}{t}\right| \]
                9. Step-by-step derivation
                  1. Applied rewrites44.8%

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

                  if 3.8000000000000001e-34 < 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 rewrites92.6%

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

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

                    \[\leadsto \frac{1}{\color{blue}{\frac{1}{ew}}} \]
                  6. Step-by-step derivation
                    1. lower-/.f6448.6

                      \[\leadsto \frac{1}{\color{blue}{\frac{1}{ew}}} \]
                  7. Applied rewrites48.6%

                    \[\leadsto \frac{1}{\color{blue}{\frac{1}{ew}}} \]
                10. Recombined 3 regimes into one program.
                11. Add Preprocessing

                Alternative 10: 37.4% accurate, 27.8× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|eh \cdot \frac{ew}{eh}\right|\\ \mathbf{if}\;ew \leq -1.65 \cdot 10^{-127}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;ew \leq 3.8 \cdot 10^{-34}:\\ \;\;\;\;\left|t \cdot eh\right|\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                (FPCore (eh ew t)
                 :precision binary64
                 (let* ((t_1 (fabs (* eh (/ ew eh)))))
                   (if (<= ew -1.65e-127) t_1 (if (<= ew 3.8e-34) (fabs (* t eh)) t_1))))
                double code(double eh, double ew, double t) {
                	double t_1 = fabs((eh * (ew / eh)));
                	double tmp;
                	if (ew <= -1.65e-127) {
                		tmp = t_1;
                	} else if (ew <= 3.8e-34) {
                		tmp = fabs((t * 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((eh * (ew / eh)))
                    if (ew <= (-1.65d-127)) then
                        tmp = t_1
                    else if (ew <= 3.8d-34) then
                        tmp = abs((t * 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((eh * (ew / eh)));
                	double tmp;
                	if (ew <= -1.65e-127) {
                		tmp = t_1;
                	} else if (ew <= 3.8e-34) {
                		tmp = Math.abs((t * eh));
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                def code(eh, ew, t):
                	t_1 = math.fabs((eh * (ew / eh)))
                	tmp = 0
                	if ew <= -1.65e-127:
                		tmp = t_1
                	elif ew <= 3.8e-34:
                		tmp = math.fabs((t * eh))
                	else:
                		tmp = t_1
                	return tmp
                
                function code(eh, ew, t)
                	t_1 = abs(Float64(eh * Float64(ew / eh)))
                	tmp = 0.0
                	if (ew <= -1.65e-127)
                		tmp = t_1;
                	elseif (ew <= 3.8e-34)
                		tmp = abs(Float64(t * eh));
                	else
                		tmp = t_1;
                	end
                	return tmp
                end
                
                function tmp_2 = code(eh, ew, t)
                	t_1 = abs((eh * (ew / eh)));
                	tmp = 0.0;
                	if (ew <= -1.65e-127)
                		tmp = t_1;
                	elseif (ew <= 3.8e-34)
                		tmp = abs((t * eh));
                	else
                		tmp = t_1;
                	end
                	tmp_2 = tmp;
                end
                
                code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(eh * N[(ew / eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -1.65e-127], t$95$1, If[LessEqual[ew, 3.8e-34], N[Abs[N[(t * eh), $MachinePrecision]], $MachinePrecision], t$95$1]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \left|eh \cdot \frac{ew}{eh}\right|\\
                \mathbf{if}\;ew \leq -1.65 \cdot 10^{-127}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;ew \leq 3.8 \cdot 10^{-34}:\\
                \;\;\;\;\left|t \cdot eh\right|\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if ew < -1.6499999999999999e-127 or 3.8000000000000001e-34 < 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. Taylor expanded in t around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left|eh \cdot \frac{ew}{\color{blue}{eh}}\right| \]
                  11. Step-by-step derivation
                    1. Applied rewrites42.6%

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

                    if -1.6499999999999999e-127 < ew < 3.8000000000000001e-34

                    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
                    6. Step-by-step derivation
                      1. lower-*.f64N/A

                        \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
                      2. lower-sin.f6475.9

                        \[\leadsto \left|eh \cdot \color{blue}{\sin t}\right| \]
                    7. Applied rewrites75.9%

                      \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
                    8. Taylor expanded in t around 0

                      \[\leadsto \left|eh \cdot \color{blue}{t}\right| \]
                    9. Step-by-step derivation
                      1. Applied rewrites44.8%

                        \[\leadsto \left|t \cdot \color{blue}{eh}\right| \]
                    10. Recombined 2 regimes into one program.
                    11. Add Preprocessing

                    Alternative 11: 18.6% accurate, 107.8× speedup?

                    \[\begin{array}{l} \\ \left|t \cdot eh\right| \end{array} \]
                    (FPCore (eh ew t) :precision binary64 (fabs (* t eh)))
                    double code(double eh, double ew, double t) {
                    	return fabs((t * eh));
                    }
                    
                    real(8) function code(eh, ew, t)
                        real(8), intent (in) :: eh
                        real(8), intent (in) :: ew
                        real(8), intent (in) :: t
                        code = abs((t * eh))
                    end function
                    
                    public static double code(double eh, double ew, double t) {
                    	return Math.abs((t * eh));
                    }
                    
                    def code(eh, ew, t):
                    	return math.fabs((t * eh))
                    
                    function code(eh, ew, t)
                    	return abs(Float64(t * eh))
                    end
                    
                    function tmp = code(eh, ew, t)
                    	tmp = abs((t * eh));
                    end
                    
                    code[eh_, ew_, t_] := N[Abs[N[(t * eh), $MachinePrecision]], $MachinePrecision]
                    
                    \begin{array}{l}
                    
                    \\
                    \left|t \cdot eh\right|
                    \end{array}
                    
                    Derivation
                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
                    6. Step-by-step derivation
                      1. lower-*.f64N/A

                        \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
                      2. lower-sin.f6442.3

                        \[\leadsto \left|eh \cdot \color{blue}{\sin t}\right| \]
                    7. Applied rewrites42.3%

                      \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
                    8. Taylor expanded in t around 0

                      \[\leadsto \left|eh \cdot \color{blue}{t}\right| \]
                    9. Step-by-step derivation
                      1. Applied rewrites23.2%

                        \[\leadsto \left|t \cdot \color{blue}{eh}\right| \]
                      2. Add Preprocessing

                      Reproduce

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