Example 2 from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 13.3s
Alternatives: 9
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 9 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)\\
\left|\mathsf{fma}\left(\sin t\_1 \cdot \left(-\sin t\right), -eh, \cos t\_1 \cdot \left(\cos t \cdot ew\right)\right)\right|
\end{array}
\end{array}
Derivation
  1. Initial program 99.8%

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

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

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

Alternative 2: 90.9% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{\tan t}{ew} \cdot eh\\
t_2 := \cos t \cdot ew\\
t_3 := \tan^{-1} t\_1\\
\mathbf{if}\;eh \leq -1.8 \cdot 10^{-45} \lor \neg \left(eh \leq 1.5 \cdot 10^{-158}\right):\\
\;\;\;\;\left|\mathsf{fma}\left(\sin t\_3 \cdot \left(-\sin t\right), -eh, \cos \tan^{-1} \left(\frac{t}{ew} \cdot eh\right) \cdot t\_2\right)\right|\\

\mathbf{else}:\\
\;\;\;\;\left|\frac{\left(\sin t \cdot eh\right) \cdot t\_1 + t\_2}{{\cos t\_3}^{-1}}\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if eh < -1.8e-45 or 1.5e-158 < 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. Applied rewrites99.9%

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

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

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

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

    if -1.8e-45 < eh < 1.5e-158

    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 rewrites96.6%

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

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

Alternative 3: 90.8% accurate, 1.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\left|\frac{\left(\sin t \cdot eh\right) \cdot t\_1 + t\_2}{{\cos t\_3}^{-1}}\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if eh < -1.8e-45 or 1.7e-158 < 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. Applied rewrites99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8e-45 < eh < 1.7e-158

    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 rewrites96.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -1.8 \cdot 10^{-45} \lor \neg \left(eh \leq 1.7 \cdot 10^{-158}\right):\\ \;\;\;\;\left|\mathsf{fma}\left(\sin \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right) \cdot \left(-\sin t\right), -eh, \frac{\cos t \cdot ew}{\sqrt{{\left(\frac{t}{ew} \cdot eh\right)}^{2} + 1}}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\left(\sin t \cdot eh\right) \cdot \left(\frac{\tan t}{ew} \cdot eh\right) + \cos t \cdot ew}{{\cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}^{-1}}\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 76.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := \left|\left(\left(-eh\right) \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\mathsf{fma}\left(-0.3333333333333333, \frac{\left(t \cdot t\right) \cdot eh}{ew}, \frac{-eh}{ew}\right) \cdot t\right)\right|\\
t_2 := \frac{\tan t}{ew} \cdot eh\\
\mathbf{if}\;eh \leq -3.4 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;eh \leq 8.5 \cdot 10^{+17}:\\
\;\;\;\;\left|\frac{\left(\sin t \cdot eh\right) \cdot t\_2 + \cos t \cdot ew}{{\cos \tan^{-1} t\_2}^{-1}}\right|\\

\mathbf{elif}\;eh \leq 2.6 \cdot 10^{+263}:\\
\;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{-t}{ew} \cdot eh\right) - \mathsf{fma}\left(-0.5 \cdot ew, t \cdot t, ew\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right)\right|\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if eh < -3.39999999999999998e53 or 2.6000000000000002e263 < eh

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -3.39999999999999998e53 < eh < 8.5e17

      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 rewrites86.4%

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

      if 8.5e17 < eh < 2.6000000000000002e263

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{\left(ew + \frac{-1}{2} \cdot \left(ew \cdot {t}^{2}\right)\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{-t}{ew} \cdot eh\right)\right| \]
      7. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \left|\left(ew + \color{blue}{\left(\frac{-1}{2} \cdot ew\right) \cdot {t}^{2}}\right) \cdot \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{-t}{ew} \cdot eh\right)\right| \]
        2. +-commutativeN/A

          \[\leadsto \left|\color{blue}{\left(\left(\frac{-1}{2} \cdot ew\right) \cdot {t}^{2} + ew\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{-t}{ew} \cdot eh\right)\right| \]
        3. lower-fma.f64N/A

          \[\leadsto \left|\color{blue}{\mathsf{fma}\left(\frac{-1}{2} \cdot ew, {t}^{2}, ew\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{-t}{ew} \cdot eh\right)\right| \]
        4. lower-*.f64N/A

          \[\leadsto \left|\mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot ew}, {t}^{2}, ew\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{-t}{ew} \cdot eh\right)\right| \]
        5. unpow2N/A

          \[\leadsto \left|\mathsf{fma}\left(\frac{-1}{2} \cdot ew, \color{blue}{t \cdot t}, ew\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{-t}{ew} \cdot eh\right)\right| \]
        6. lower-*.f6477.3

          \[\leadsto \left|\mathsf{fma}\left(-0.5 \cdot ew, \color{blue}{t \cdot t}, ew\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{-t}{ew} \cdot eh\right)\right| \]
      8. Applied rewrites77.3%

        \[\leadsto \left|\color{blue}{\mathsf{fma}\left(-0.5 \cdot ew, t \cdot t, ew\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{-t}{ew} \cdot eh\right)\right| \]
    8. Recombined 3 regimes into one program.
    9. Final simplification83.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -3.4 \cdot 10^{+53}:\\ \;\;\;\;\left|\left(\left(-eh\right) \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\mathsf{fma}\left(-0.3333333333333333, \frac{\left(t \cdot t\right) \cdot eh}{ew}, \frac{-eh}{ew}\right) \cdot t\right)\right|\\ \mathbf{elif}\;eh \leq 8.5 \cdot 10^{+17}:\\ \;\;\;\;\left|\frac{\left(\sin t \cdot eh\right) \cdot \left(\frac{\tan t}{ew} \cdot eh\right) + \cos t \cdot ew}{{\cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}^{-1}}\right|\\ \mathbf{elif}\;eh \leq 2.6 \cdot 10^{+263}:\\ \;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{-t}{ew} \cdot eh\right) - \mathsf{fma}\left(-0.5 \cdot ew, t \cdot t, ew\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(\left(-eh\right) \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\mathsf{fma}\left(-0.3333333333333333, \frac{\left(t \cdot t\right) \cdot eh}{ew}, \frac{-eh}{ew}\right) \cdot t\right)\right|\\ \end{array} \]
    10. Add Preprocessing

    Alternative 5: 99.0% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 6: 75.4% accurate, 1.2× speedup?

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

      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -3.39999999999999998e53 < eh < 8.5e17

        1. Initial program 99.8%

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

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

          \[\leadsto \left|\mathsf{fma}\left(\left(-\sin \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)\right) \cdot \sin t, -eh, \cos \tan^{-1} \left(\color{blue}{\frac{t}{ew}} \cdot eh\right) \cdot \left(\cos t \cdot ew\right)\right)\right| \]
        5. Step-by-step derivation
          1. lower-/.f6488.3

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left|\color{blue}{\cos t \cdot ew}\right| \]
          2. lower-*.f64N/A

            \[\leadsto \left|\color{blue}{\cos t \cdot ew}\right| \]
          3. lower-cos.f6485.1

            \[\leadsto \left|\color{blue}{\cos t} \cdot ew\right| \]
        11. Applied rewrites85.1%

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

        if 8.5e17 < eh < 2.6000000000000002e263

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left|\color{blue}{\left(ew + \frac{-1}{2} \cdot \left(ew \cdot {t}^{2}\right)\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{-t}{ew} \cdot eh\right)\right| \]
        7. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \left|\left(ew + \color{blue}{\left(\frac{-1}{2} \cdot ew\right) \cdot {t}^{2}}\right) \cdot \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{-t}{ew} \cdot eh\right)\right| \]
          2. +-commutativeN/A

            \[\leadsto \left|\color{blue}{\left(\left(\frac{-1}{2} \cdot ew\right) \cdot {t}^{2} + ew\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{-t}{ew} \cdot eh\right)\right| \]
          3. lower-fma.f64N/A

            \[\leadsto \left|\color{blue}{\mathsf{fma}\left(\frac{-1}{2} \cdot ew, {t}^{2}, ew\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{-t}{ew} \cdot eh\right)\right| \]
          4. lower-*.f64N/A

            \[\leadsto \left|\mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot ew}, {t}^{2}, ew\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{-t}{ew} \cdot eh\right)\right| \]
          5. unpow2N/A

            \[\leadsto \left|\mathsf{fma}\left(\frac{-1}{2} \cdot ew, \color{blue}{t \cdot t}, ew\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{-t}{ew} \cdot eh\right)\right| \]
          6. lower-*.f6477.3

            \[\leadsto \left|\mathsf{fma}\left(-0.5 \cdot ew, \color{blue}{t \cdot t}, ew\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{-t}{ew} \cdot eh\right)\right| \]
        8. Applied rewrites77.3%

          \[\leadsto \left|\color{blue}{\mathsf{fma}\left(-0.5 \cdot ew, t \cdot t, ew\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{-t}{ew} \cdot eh\right)\right| \]
      8. Recombined 3 regimes into one program.
      9. Final simplification82.6%

        \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -3.4 \cdot 10^{+53}:\\ \;\;\;\;\left|\left(\left(-eh\right) \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\mathsf{fma}\left(-0.3333333333333333, \frac{\left(t \cdot t\right) \cdot eh}{ew}, \frac{-eh}{ew}\right) \cdot t\right)\right|\\ \mathbf{elif}\;eh \leq 8.5 \cdot 10^{+17}:\\ \;\;\;\;\left|\cos t \cdot ew\right|\\ \mathbf{elif}\;eh \leq 2.6 \cdot 10^{+263}:\\ \;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{-t}{ew} \cdot eh\right) - \mathsf{fma}\left(-0.5 \cdot ew, t \cdot t, ew\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(\left(-eh\right) \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\mathsf{fma}\left(-0.3333333333333333, \frac{\left(t \cdot t\right) \cdot eh}{ew}, \frac{-eh}{ew}\right) \cdot t\right)\right|\\ \end{array} \]
      10. Add Preprocessing

      Alternative 7: 74.0% accurate, 2.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -3.4 \cdot 10^{+53} \lor \neg \left(eh \leq 1.15 \cdot 10^{+14}\right):\\ \;\;\;\;\left|\left(\left(-eh\right) \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\mathsf{fma}\left(-0.3333333333333333, \frac{\left(t \cdot t\right) \cdot eh}{ew}, \frac{-eh}{ew}\right) \cdot t\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\cos t \cdot ew\right|\\ \end{array} \end{array} \]
      (FPCore (eh ew t)
       :precision binary64
       (if (or (<= eh -3.4e+53) (not (<= eh 1.15e+14)))
         (fabs
          (*
           (* (- eh) (sin t))
           (sin
            (atan
             (* (fma -0.3333333333333333 (/ (* (* t t) eh) ew) (/ (- eh) ew)) t)))))
         (fabs (* (cos t) ew))))
      double code(double eh, double ew, double t) {
      	double tmp;
      	if ((eh <= -3.4e+53) || !(eh <= 1.15e+14)) {
      		tmp = fabs(((-eh * sin(t)) * sin(atan((fma(-0.3333333333333333, (((t * t) * eh) / ew), (-eh / ew)) * t)))));
      	} else {
      		tmp = fabs((cos(t) * ew));
      	}
      	return tmp;
      }
      
      function code(eh, ew, t)
      	tmp = 0.0
      	if ((eh <= -3.4e+53) || !(eh <= 1.15e+14))
      		tmp = abs(Float64(Float64(Float64(-eh) * sin(t)) * sin(atan(Float64(fma(-0.3333333333333333, Float64(Float64(Float64(t * t) * eh) / ew), Float64(Float64(-eh) / ew)) * t)))));
      	else
      		tmp = abs(Float64(cos(t) * ew));
      	end
      	return tmp
      end
      
      code[eh_, ew_, t_] := If[Or[LessEqual[eh, -3.4e+53], N[Not[LessEqual[eh, 1.15e+14]], $MachinePrecision]], N[Abs[N[(N[((-eh) * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(-0.3333333333333333 * N[(N[(N[(t * t), $MachinePrecision] * eh), $MachinePrecision] / ew), $MachinePrecision] + N[((-eh) / ew), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]], $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;eh \leq -3.4 \cdot 10^{+53} \lor \neg \left(eh \leq 1.15 \cdot 10^{+14}\right):\\
      \;\;\;\;\left|\left(\left(-eh\right) \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\mathsf{fma}\left(-0.3333333333333333, \frac{\left(t \cdot t\right) \cdot eh}{ew}, \frac{-eh}{ew}\right) \cdot t\right)\right|\\
      
      \mathbf{else}:\\
      \;\;\;\;\left|\cos t \cdot ew\right|\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if eh < -3.39999999999999998e53 or 1.15e14 < eh

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -3.39999999999999998e53 < eh < 1.15e14

          1. Initial program 99.8%

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

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

            \[\leadsto \left|\mathsf{fma}\left(\left(-\sin \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)\right) \cdot \sin t, -eh, \cos \tan^{-1} \left(\color{blue}{\frac{t}{ew}} \cdot eh\right) \cdot \left(\cos t \cdot ew\right)\right)\right| \]
          5. Step-by-step derivation
            1. lower-/.f6488.2

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left|\color{blue}{\cos t \cdot ew}\right| \]
            2. lower-*.f64N/A

              \[\leadsto \left|\color{blue}{\cos t \cdot ew}\right| \]
            3. lower-cos.f6485.6

              \[\leadsto \left|\color{blue}{\cos t} \cdot ew\right| \]
          11. Applied rewrites85.6%

            \[\leadsto \left|\color{blue}{\cos t \cdot ew}\right| \]
        8. Recombined 2 regimes into one program.
        9. Final simplification80.2%

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

        Alternative 8: 60.7% accurate, 8.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left|\color{blue}{\cos t \cdot ew}\right| \]
          2. lower-*.f64N/A

            \[\leadsto \left|\color{blue}{\cos t \cdot ew}\right| \]
          3. lower-cos.f6462.1

            \[\leadsto \left|\color{blue}{\cos t} \cdot ew\right| \]
        11. Applied rewrites62.1%

          \[\leadsto \left|\color{blue}{\cos t \cdot ew}\right| \]
        12. Add Preprocessing

        Alternative 9: 41.7% accurate, 107.8× speedup?

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

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

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

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

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

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

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

          \[\leadsto \left|1 \cdot ew\right| \]
        8. Step-by-step derivation
          1. Applied rewrites42.8%

            \[\leadsto \left|1 \cdot ew\right| \]
          2. Add Preprocessing

          Reproduce

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