Example 2 from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 17.7s
Alternatives: 10
Speedup: N/A×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 10 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{eh \cdot \tan t}{-ew}\\
\left|\mathsf{fma}\left(eh \cdot \sin t, -\sin \tan^{-1} t\_1, \frac{ew \cdot \cos t}{\sqrt{1 + {t\_1}^{2}}}\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. Step-by-step derivation
    1. sub-negN/A

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

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

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

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

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

Alternative 2: 98.3% accurate, 1.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|\color{blue}{\left(\mathsf{neg}\left(eh \cdot \sin t\right)\right) \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot \tan t}{ew}\right)} + ew \cdot \cos t\right| \]
    4. mul-1-negN/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 \tan t}{ew}\right) + ew \cdot \cos t\right| \]
    5. accelerator-lowering-fma.f64N/A

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

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

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

Alternative 3: 74.8% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
t_1 := eh \cdot \sin t\\
t_2 := \left|t\_1\right|\\
\mathbf{if}\;eh \leq -3.6 \cdot 10^{+62}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;eh \leq 8 \cdot 10^{+66}:\\
\;\;\;\;\left|\mathsf{fma}\left(\cos t, ew, \left(eh \cdot \frac{0.5}{ew}\right) \cdot \left(t\_1 \cdot \tan t\right)\right)\right|\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if eh < -3.6e62 or 6.00000000000000029e148 < eh

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
      2. sin-lowering-sin.f6477.7

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

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

    if -3.6e62 < eh < 7.99999999999999956e66

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|{eh}^{2} \cdot \color{blue}{\left(\left(\frac{-1}{2} + 1\right) \cdot \frac{{\sin t}^{2}}{ew \cdot \cos t}\right)} + ew \cdot \cos t\right| \]
      3. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\mathsf{fma}\left(eh \cdot eh, \frac{\frac{1}{2} \cdot {\sin t}^{2}}{ew \cdot \cos t}, \color{blue}{ew \cdot \cos t}\right)\right| \]
      15. cos-lowering-cos.f6486.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\mathsf{fma}\left(\cos t, ew, \frac{\frac{1}{2}}{ew} \cdot \left(\left(eh \cdot eh\right) \cdot \left(\color{blue}{\sin t} \cdot \tan t\right)\right)\right)\right| \]
      18. tan-lowering-tan.f6486.0

        \[\leadsto \left|\mathsf{fma}\left(\cos t, ew, \frac{0.5}{ew} \cdot \left(\left(eh \cdot eh\right) \cdot \left(\sin t \cdot \color{blue}{\tan t}\right)\right)\right)\right| \]
    9. Applied egg-rr86.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\mathsf{fma}\left(\cos t, ew, \left(\frac{\frac{1}{2}}{ew} \cdot eh\right) \cdot \left(\tan t \cdot \color{blue}{\left(eh \cdot \sin t\right)}\right)\right)\right| \]
      13. sin-lowering-sin.f6486.0

        \[\leadsto \left|\mathsf{fma}\left(\cos t, ew, \left(\frac{0.5}{ew} \cdot eh\right) \cdot \left(\tan t \cdot \left(eh \cdot \color{blue}{\sin t}\right)\right)\right)\right| \]
    11. Applied egg-rr86.0%

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

    if 7.99999999999999956e66 < eh < 6.00000000000000029e148

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -3.6 \cdot 10^{+62}:\\ \;\;\;\;\left|eh \cdot \sin t\right|\\ \mathbf{elif}\;eh \leq 8 \cdot 10^{+66}:\\ \;\;\;\;\left|\mathsf{fma}\left(\cos t, ew, \left(eh \cdot \frac{0.5}{ew}\right) \cdot \left(\left(eh \cdot \sin t\right) \cdot \tan t\right)\right)\right|\\ \mathbf{elif}\;eh \leq 6 \cdot 10^{+148}:\\ \;\;\;\;\left|\mathsf{fma}\left(eh \cdot \left(-t\right), \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right), ew\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|eh \cdot \sin t\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 74.7% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|eh \cdot \sin t\right|\\ \mathbf{if}\;eh \leq -1.6 \cdot 10^{+64}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;eh \leq 4.4 \cdot 10^{+148}:\\ \;\;\;\;\left|\mathsf{fma}\left(\left(eh \cdot 0.5\right) \cdot \left(\tan t \cdot \frac{\sin t}{ew}\right), eh, ew \cdot \cos t\right)\right|\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (fabs (* eh (sin t)))))
   (if (<= eh -1.6e+64)
     t_1
     (if (<= eh 4.4e+148)
       (fabs (fma (* (* eh 0.5) (* (tan t) (/ (sin t) ew))) eh (* ew (cos t))))
       t_1))))
double code(double eh, double ew, double t) {
	double t_1 = fabs((eh * sin(t)));
	double tmp;
	if (eh <= -1.6e+64) {
		tmp = t_1;
	} else if (eh <= 4.4e+148) {
		tmp = fabs(fma(((eh * 0.5) * (tan(t) * (sin(t) / ew))), eh, (ew * cos(t))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(eh, ew, t)
	t_1 = abs(Float64(eh * sin(t)))
	tmp = 0.0
	if (eh <= -1.6e+64)
		tmp = t_1;
	elseif (eh <= 4.4e+148)
		tmp = abs(fma(Float64(Float64(eh * 0.5) * Float64(tan(t) * Float64(sin(t) / ew))), eh, Float64(ew * cos(t))));
	else
		tmp = t_1;
	end
	return tmp
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eh, -1.6e+64], t$95$1, If[LessEqual[eh, 4.4e+148], N[Abs[N[(N[(N[(eh * 0.5), $MachinePrecision] * N[(N[Tan[t], $MachinePrecision] * N[(N[Sin[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * eh + N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left|eh \cdot \sin t\right|\\
\mathbf{if}\;eh \leq -1.6 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if eh < -1.60000000000000009e64 or 4.3999999999999998e148 < eh

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
      2. sin-lowering-sin.f6477.7

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

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

    if -1.60000000000000009e64 < eh < 4.3999999999999998e148

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|{eh}^{2} \cdot \color{blue}{\left(\left(\frac{-1}{2} + 1\right) \cdot \frac{{\sin t}^{2}}{ew \cdot \cos t}\right)} + ew \cdot \cos t\right| \]
      3. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|\color{blue}{\mathsf{fma}\left(eh \cdot eh, \frac{0.5 \cdot {\sin t}^{2}}{ew \cdot \cos t}, ew \cdot \cos t\right)}\right| \]
    8. Step-by-step derivation
      1. associate-*l*N/A

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

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

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

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

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

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

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

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

        \[\leadsto \left|\mathsf{fma}\left(\left(eh \cdot \frac{1}{2}\right) \cdot \frac{\sin t \cdot \sin t}{\color{blue}{\cos t \cdot ew}}, eh, ew \cdot \cos t\right)\right| \]
      10. times-fracN/A

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

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

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

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

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

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

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

        \[\leadsto \left|\mathsf{fma}\left(\left(eh \cdot 0.5\right) \cdot \left(\tan t \cdot \frac{\sin t}{ew}\right), eh, ew \cdot \color{blue}{\cos t}\right)\right| \]
    9. Applied egg-rr82.2%

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

Alternative 5: 74.6% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|eh \cdot \sin t\right|\\ \mathbf{if}\;eh \leq -1.8 \cdot 10^{+66}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;eh \leq 5 \cdot 10^{+148}:\\ \;\;\;\;\left|\mathsf{fma}\left(\cos t, ew, \frac{0.5}{ew} \cdot \left(\left(eh \cdot eh\right) \cdot \left(\sin t \cdot \tan t\right)\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (fabs (* eh (sin t)))))
   (if (<= eh -1.8e+66)
     t_1
     (if (<= eh 5e+148)
       (fabs (fma (cos t) ew (* (/ 0.5 ew) (* (* eh eh) (* (sin t) (tan t))))))
       t_1))))
double code(double eh, double ew, double t) {
	double t_1 = fabs((eh * sin(t)));
	double tmp;
	if (eh <= -1.8e+66) {
		tmp = t_1;
	} else if (eh <= 5e+148) {
		tmp = fabs(fma(cos(t), ew, ((0.5 / ew) * ((eh * eh) * (sin(t) * tan(t))))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(eh, ew, t)
	t_1 = abs(Float64(eh * sin(t)))
	tmp = 0.0
	if (eh <= -1.8e+66)
		tmp = t_1;
	elseif (eh <= 5e+148)
		tmp = abs(fma(cos(t), ew, Float64(Float64(0.5 / ew) * Float64(Float64(eh * eh) * Float64(sin(t) * tan(t))))));
	else
		tmp = t_1;
	end
	return tmp
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eh, -1.8e+66], t$95$1, If[LessEqual[eh, 5e+148], N[Abs[N[(N[Cos[t], $MachinePrecision] * ew + N[(N[(0.5 / ew), $MachinePrecision] * N[(N[(eh * eh), $MachinePrecision] * N[(N[Sin[t], $MachinePrecision] * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left|eh \cdot \sin t\right|\\
\mathbf{if}\;eh \leq -1.8 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if eh < -1.8e66 or 5.00000000000000024e148 < eh

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
      2. sin-lowering-sin.f6477.7

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

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

    if -1.8e66 < eh < 5.00000000000000024e148

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|{eh}^{2} \cdot \color{blue}{\left(\left(\frac{-1}{2} + 1\right) \cdot \frac{{\sin t}^{2}}{ew \cdot \cos t}\right)} + ew \cdot \cos t\right| \]
      3. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\mathsf{fma}\left(\cos t, ew, \frac{0.5}{ew} \cdot \left(\left(eh \cdot eh\right) \cdot \left(\sin t \cdot \color{blue}{\tan t}\right)\right)\right)\right| \]
    9. Applied egg-rr82.2%

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

Alternative 6: 74.6% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|eh \cdot \sin t\right|\\ \mathbf{if}\;eh \leq -3.3 \cdot 10^{+64}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;eh \leq 4.4 \cdot 10^{+148}:\\ \;\;\;\;\left|\mathsf{fma}\left(eh \cdot eh, \frac{0.5 \cdot {\sin t}^{2}}{ew}, ew \cdot \cos t\right)\right|\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (fabs (* eh (sin t)))))
   (if (<= eh -3.3e+64)
     t_1
     (if (<= eh 4.4e+148)
       (fabs (fma (* eh eh) (/ (* 0.5 (pow (sin t) 2.0)) ew) (* ew (cos t))))
       t_1))))
double code(double eh, double ew, double t) {
	double t_1 = fabs((eh * sin(t)));
	double tmp;
	if (eh <= -3.3e+64) {
		tmp = t_1;
	} else if (eh <= 4.4e+148) {
		tmp = fabs(fma((eh * eh), ((0.5 * pow(sin(t), 2.0)) / ew), (ew * cos(t))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(eh, ew, t)
	t_1 = abs(Float64(eh * sin(t)))
	tmp = 0.0
	if (eh <= -3.3e+64)
		tmp = t_1;
	elseif (eh <= 4.4e+148)
		tmp = abs(fma(Float64(eh * eh), Float64(Float64(0.5 * (sin(t) ^ 2.0)) / ew), Float64(ew * cos(t))));
	else
		tmp = t_1;
	end
	return tmp
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eh, -3.3e+64], t$95$1, If[LessEqual[eh, 4.4e+148], N[Abs[N[(N[(eh * eh), $MachinePrecision] * N[(N[(0.5 * N[Power[N[Sin[t], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision] + N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left|eh \cdot \sin t\right|\\
\mathbf{if}\;eh \leq -3.3 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;eh \leq 4.4 \cdot 10^{+148}:\\
\;\;\;\;\left|\mathsf{fma}\left(eh \cdot eh, \frac{0.5 \cdot {\sin t}^{2}}{ew}, ew \cdot \cos t\right)\right|\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if eh < -3.29999999999999988e64 or 4.3999999999999998e148 < eh

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
      2. sin-lowering-sin.f6477.7

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

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

    if -3.29999999999999988e64 < eh < 4.3999999999999998e148

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|{eh}^{2} \cdot \color{blue}{\left(\left(\frac{-1}{2} + 1\right) \cdot \frac{{\sin t}^{2}}{ew \cdot \cos t}\right)} + ew \cdot \cos t\right| \]
      3. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 7: 74.5% accurate, 7.2× speedup?

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

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

          \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
        2. sin-lowering-sin.f6477.7

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

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

      if -1.12e61 < eh < 4.3999999999999998e148

      1. Initial program 99.9%

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

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

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

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

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

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

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

          \[\leadsto \left|\color{blue}{ew \cdot \cos t}\right| \]
        2. cos-lowering-cos.f6482.1

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

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

    Alternative 8: 59.3% accurate, 7.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|eh \cdot \sin t\right|\\ \mathbf{if}\;eh \leq -7.6 \cdot 10^{+53}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;eh \leq 5.2 \cdot 10^{+60}:\\ \;\;\;\;\left|ew\right|\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (eh ew t)
     :precision binary64
     (let* ((t_1 (fabs (* eh (sin t)))))
       (if (<= eh -7.6e+53) t_1 (if (<= eh 5.2e+60) (fabs ew) t_1))))
    double code(double eh, double ew, double t) {
    	double t_1 = fabs((eh * sin(t)));
    	double tmp;
    	if (eh <= -7.6e+53) {
    		tmp = t_1;
    	} else if (eh <= 5.2e+60) {
    		tmp = fabs(ew);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    real(8) function code(eh, ew, t)
        real(8), intent (in) :: eh
        real(8), intent (in) :: ew
        real(8), intent (in) :: t
        real(8) :: t_1
        real(8) :: tmp
        t_1 = abs((eh * sin(t)))
        if (eh <= (-7.6d+53)) then
            tmp = t_1
        else if (eh <= 5.2d+60) then
            tmp = abs(ew)
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double eh, double ew, double t) {
    	double t_1 = Math.abs((eh * Math.sin(t)));
    	double tmp;
    	if (eh <= -7.6e+53) {
    		tmp = t_1;
    	} else if (eh <= 5.2e+60) {
    		tmp = Math.abs(ew);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(eh, ew, t):
    	t_1 = math.fabs((eh * math.sin(t)))
    	tmp = 0
    	if eh <= -7.6e+53:
    		tmp = t_1
    	elif eh <= 5.2e+60:
    		tmp = math.fabs(ew)
    	else:
    		tmp = t_1
    	return tmp
    
    function code(eh, ew, t)
    	t_1 = abs(Float64(eh * sin(t)))
    	tmp = 0.0
    	if (eh <= -7.6e+53)
    		tmp = t_1;
    	elseif (eh <= 5.2e+60)
    		tmp = abs(ew);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(eh, ew, t)
    	t_1 = abs((eh * sin(t)));
    	tmp = 0.0;
    	if (eh <= -7.6e+53)
    		tmp = t_1;
    	elseif (eh <= 5.2e+60)
    		tmp = abs(ew);
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eh, -7.6e+53], t$95$1, If[LessEqual[eh, 5.2e+60], N[Abs[ew], $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left|eh \cdot \sin t\right|\\
    \mathbf{if}\;eh \leq -7.6 \cdot 10^{+53}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;eh \leq 5.2 \cdot 10^{+60}:\\
    \;\;\;\;\left|ew\right|\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if eh < -7.59999999999999995e53 or 5.20000000000000016e60 < eh

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

      if -7.59999999999999995e53 < eh < 5.20000000000000016e60

      1. Initial program 99.9%

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{ew}\right| \]
      6. Step-by-step derivation
        1. Simplified59.0%

          \[\leadsto \left|\color{blue}{ew}\right| \]
      7. Recombined 2 regimes into one program.
      8. Add Preprocessing

      Alternative 9: 42.5% accurate, 287.3× speedup?

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{ew}\right| \]
      6. Step-by-step derivation
        1. Simplified41.2%

          \[\leadsto \left|\color{blue}{ew}\right| \]
        2. Add Preprocessing

        Alternative 10: 22.2% accurate, 862.0× speedup?

        \[\begin{array}{l} \\ ew \end{array} \]
        (FPCore (eh ew t) :precision binary64 ew)
        double code(double eh, double ew, double t) {
        	return ew;
        }
        
        real(8) function code(eh, ew, t)
            real(8), intent (in) :: eh
            real(8), intent (in) :: ew
            real(8), intent (in) :: t
            code = ew
        end function
        
        public static double code(double eh, double ew, double t) {
        	return ew;
        }
        
        def code(eh, ew, t):
        	return ew
        
        function code(eh, ew, t)
        	return ew
        end
        
        function tmp = code(eh, ew, t)
        	tmp = ew;
        end
        
        code[eh_, ew_, t_] := ew
        
        \begin{array}{l}
        
        \\
        ew
        \end{array}
        
        Derivation
        1. Initial program 99.8%

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

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

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

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

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

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

          \[\leadsto \left|\color{blue}{ew}\right| \]
        6. Step-by-step derivation
          1. Simplified41.2%

            \[\leadsto \left|\color{blue}{ew}\right| \]
          2. Step-by-step derivation
            1. neg-fabsN/A

              \[\leadsto \color{blue}{\left|\mathsf{neg}\left(ew\right)\right|} \]
            2. neg-sub0N/A

              \[\leadsto \left|\color{blue}{0 - ew}\right| \]
            3. flip--N/A

              \[\leadsto \left|\color{blue}{\frac{0 \cdot 0 - ew \cdot ew}{0 + ew}}\right| \]
            4. fabs-divN/A

              \[\leadsto \color{blue}{\frac{\left|0 \cdot 0 - ew \cdot ew\right|}{\left|0 + ew\right|}} \]
            5. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{\left|0 \cdot 0 - ew \cdot ew\right|}{\left|0 + ew\right|}} \]
            6. fabs-lowering-fabs.f64N/A

              \[\leadsto \frac{\color{blue}{\left|0 \cdot 0 - ew \cdot ew\right|}}{\left|0 + ew\right|} \]
            7. metadata-evalN/A

              \[\leadsto \frac{\left|\color{blue}{0} - ew \cdot ew\right|}{\left|0 + ew\right|} \]
            8. --lowering--.f64N/A

              \[\leadsto \frac{\left|\color{blue}{0 - ew \cdot ew}\right|}{\left|0 + ew\right|} \]
            9. *-lowering-*.f64N/A

              \[\leadsto \frac{\left|0 - \color{blue}{ew \cdot ew}\right|}{\left|0 + ew\right|} \]
            10. fabs-lowering-fabs.f64N/A

              \[\leadsto \frac{\left|0 - ew \cdot ew\right|}{\color{blue}{\left|0 + ew\right|}} \]
            11. +-lowering-+.f6425.2

              \[\leadsto \frac{\left|0 - ew \cdot ew\right|}{\left|\color{blue}{0 + ew}\right|} \]
          3. Applied egg-rr25.2%

            \[\leadsto \color{blue}{\frac{\left|0 - ew \cdot ew\right|}{\left|0 + ew\right|}} \]
          4. Step-by-step derivation
            1. div-fabsN/A

              \[\leadsto \color{blue}{\left|\frac{0 - ew \cdot ew}{0 + ew}\right|} \]
            2. metadata-evalN/A

              \[\leadsto \left|\frac{\color{blue}{0 \cdot 0} - ew \cdot ew}{0 + ew}\right| \]
            3. flip--N/A

              \[\leadsto \left|\color{blue}{0 - ew}\right| \]
            4. neg-sub0N/A

              \[\leadsto \left|\color{blue}{\mathsf{neg}\left(ew\right)}\right| \]
            5. neg-fabsN/A

              \[\leadsto \color{blue}{\left|ew\right|} \]
            6. +-lft-identityN/A

              \[\leadsto \left|\color{blue}{0 + ew}\right| \]
            7. flip3-+N/A

              \[\leadsto \left|\color{blue}{\frac{{0}^{3} + {ew}^{3}}{0 \cdot 0 + \left(ew \cdot ew - 0 \cdot ew\right)}}\right| \]
            8. fabs-divN/A

              \[\leadsto \color{blue}{\frac{\left|{0}^{3} + {ew}^{3}\right|}{\left|0 \cdot 0 + \left(ew \cdot ew - 0 \cdot ew\right)\right|}} \]
            9. metadata-evalN/A

              \[\leadsto \frac{\left|\color{blue}{0} + {ew}^{3}\right|}{\left|0 \cdot 0 + \left(ew \cdot ew - 0 \cdot ew\right)\right|} \]
            10. +-lft-identityN/A

              \[\leadsto \frac{\left|\color{blue}{{ew}^{3}}\right|}{\left|0 \cdot 0 + \left(ew \cdot ew - 0 \cdot ew\right)\right|} \]
            11. sqr-powN/A

              \[\leadsto \frac{\left|\color{blue}{{ew}^{\left(\frac{3}{2}\right)} \cdot {ew}^{\left(\frac{3}{2}\right)}}\right|}{\left|0 \cdot 0 + \left(ew \cdot ew - 0 \cdot ew\right)\right|} \]
            12. fabs-sqrN/A

              \[\leadsto \frac{\color{blue}{{ew}^{\left(\frac{3}{2}\right)} \cdot {ew}^{\left(\frac{3}{2}\right)}}}{\left|0 \cdot 0 + \left(ew \cdot ew - 0 \cdot ew\right)\right|} \]
            13. sqr-powN/A

              \[\leadsto \frac{\color{blue}{{ew}^{3}}}{\left|0 \cdot 0 + \left(ew \cdot ew - 0 \cdot ew\right)\right|} \]
            14. metadata-evalN/A

              \[\leadsto \frac{{ew}^{3}}{\left|\color{blue}{0} + \left(ew \cdot ew - 0 \cdot ew\right)\right|} \]
            15. +-lft-identityN/A

              \[\leadsto \frac{{ew}^{3}}{\left|\color{blue}{ew \cdot ew - 0 \cdot ew}\right|} \]
            16. mul0-lftN/A

              \[\leadsto \frac{{ew}^{3}}{\left|ew \cdot ew - \color{blue}{0}\right|} \]
            17. --rgt-identityN/A

              \[\leadsto \frac{{ew}^{3}}{\left|\color{blue}{ew \cdot ew}\right|} \]
            18. fabs-sqrN/A

              \[\leadsto \frac{{ew}^{3}}{\color{blue}{ew \cdot ew}} \]
            19. pow2N/A

              \[\leadsto \frac{{ew}^{3}}{\color{blue}{{ew}^{2}}} \]
            20. pow-divN/A

              \[\leadsto \color{blue}{{ew}^{\left(3 - 2\right)}} \]
            21. metadata-evalN/A

              \[\leadsto {ew}^{\color{blue}{1}} \]
            22. unpow120.6

              \[\leadsto \color{blue}{ew} \]
          5. Applied egg-rr20.6%

            \[\leadsto \color{blue}{ew} \]
          6. Add Preprocessing

          Reproduce

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