Example from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 13.4s
Alternatives: 19
Speedup: 1.0×

Specification

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

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{eh}{\color{blue}{\tan t \cdot ew}}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{\tan t \cdot ew}\right)\right| \]
    6. lift-/.f6499.8

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

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

Alternative 2: 42.2% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+185} \lor \neg \left(t\_2 \leq 5 \cdot 10^{+218}\right):\\
\;\;\;\;\tanh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right) \cdot eh\\

\mathbf{else}:\\
\;\;\;\;\sin t \cdot ew\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (+.f64 (*.f64 (*.f64 ew (sin.f64 t)) (cos.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))) (*.f64 (*.f64 eh (cos.f64 t)) (sin.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t)))))) < -4.99999999999999999e-79

    1. Initial program 99.8%

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

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

      \[\leadsto \color{blue}{ew \cdot \sin t} \]
    5. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\sin t \cdot ew} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\sin t \cdot ew} \]
      3. lower-sin.f641.2

        \[\leadsto \color{blue}{\sin t} \cdot ew \]
    6. Applied rewrites1.2%

      \[\leadsto \color{blue}{\sin t \cdot ew} \]
    7. Step-by-step derivation
      1. Applied rewrites41.7%

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

      if -4.99999999999999999e-79 < (+.f64 (*.f64 (*.f64 ew (sin.f64 t)) (cos.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))) (*.f64 (*.f64 eh (cos.f64 t)) (sin.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t)))))) < 5.00000000000000021e35

      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 5.00000000000000021e35 < (+.f64 (*.f64 (*.f64 ew (sin.f64 t)) (cos.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))) (*.f64 (*.f64 eh (cos.f64 t)) (sin.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t)))))) < 3.9999999999999999e185 or 4.99999999999999983e218 < (+.f64 (*.f64 (*.f64 ew (sin.f64 t)) (cos.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))) (*.f64 (*.f64 eh (cos.f64 t)) (sin.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))))

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\sqrt{\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh}{\sin t}\right) \cdot eh} \cdot \sqrt{\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh}{\sin t}\right) \cdot eh}} \]
          4. rem-square-sqrt51.2

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

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

        if 3.9999999999999999e185 < (+.f64 (*.f64 (*.f64 ew (sin.f64 t)) (cos.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))) (*.f64 (*.f64 eh (cos.f64 t)) (sin.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t)))))) < 4.99999999999999983e218

        1. Initial program 99.7%

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

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

          \[\leadsto \color{blue}{ew \cdot \sin t} \]
        5. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{\sin t \cdot ew} \]
          2. lower-*.f64N/A

            \[\leadsto \color{blue}{\sin t \cdot ew} \]
          3. lower-sin.f6484.1

            \[\leadsto \color{blue}{\sin t} \cdot ew \]
        6. Applied rewrites84.1%

          \[\leadsto \color{blue}{\sin t \cdot ew} \]
      8. Recombined 4 regimes into one program.
      9. Final simplification49.1%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \leq -5 \cdot 10^{-79}:\\ \;\;\;\;\sin \left({\left(-t\right)}^{1}\right) \cdot ew\\ \mathbf{elif}\;\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \leq 5 \cdot 10^{+35}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\mathsf{fma}\left(\frac{eh}{ew} \cdot -0.3333333333333333, t \cdot t, \frac{eh}{ew}\right)}{t}\right) \cdot eh\right|\\ \mathbf{elif}\;\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \leq 4 \cdot 10^{+185} \lor \neg \left(\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \leq 5 \cdot 10^{+218}\right):\\ \;\;\;\;\tanh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right) \cdot eh\\ \mathbf{else}:\\ \;\;\;\;\sin t \cdot ew\\ \end{array} \]
      10. Add Preprocessing

      Alternative 3: 41.4% accurate, 0.8× speedup?

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

        1. Initial program 99.8%

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

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

          \[\leadsto \color{blue}{ew \cdot \sin t} \]
        5. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{\sin t \cdot ew} \]
          2. lower-*.f64N/A

            \[\leadsto \color{blue}{\sin t \cdot ew} \]
          3. lower-sin.f641.6

            \[\leadsto \color{blue}{\sin t} \cdot ew \]
        6. Applied rewrites1.6%

          \[\leadsto \color{blue}{\sin t \cdot ew} \]
        7. Step-by-step derivation
          1. Applied rewrites40.3%

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

          if -9.99999999999999945e-228 < (+.f64 (*.f64 (*.f64 ew (sin.f64 t)) (cos.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))) (*.f64 (*.f64 eh (cos.f64 t)) (sin.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))))

          1. Initial program 99.8%

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

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

            \[\leadsto \color{blue}{ew \cdot \sin t} \]
          5. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\sin t \cdot ew} \]
            2. lower-*.f64N/A

              \[\leadsto \color{blue}{\sin t \cdot ew} \]
            3. lower-sin.f6435.8

              \[\leadsto \color{blue}{\sin t} \cdot ew \]
          6. Applied rewrites35.8%

            \[\leadsto \color{blue}{\sin t \cdot ew} \]
        8. Recombined 2 regimes into one program.
        9. Add Preprocessing

        Alternative 4: 31.9% accurate, 0.9× speedup?

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

          1. Initial program 99.8%

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

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

            \[\leadsto \color{blue}{ew \cdot \sin t} \]
          5. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\sin t \cdot ew} \]
            2. lower-*.f64N/A

              \[\leadsto \color{blue}{\sin t \cdot ew} \]
            3. lower-sin.f641.6

              \[\leadsto \color{blue}{\sin t} \cdot ew \]
          6. Applied rewrites1.6%

            \[\leadsto \color{blue}{\sin t \cdot ew} \]
          7. Step-by-step derivation
            1. Applied rewrites22.6%

              \[\leadsto \sin \left(\left|t\right|\right) \cdot ew \]

            if -9.99999999999999945e-228 < (+.f64 (*.f64 (*.f64 ew (sin.f64 t)) (cos.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))) (*.f64 (*.f64 eh (cos.f64 t)) (sin.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))))

            1. Initial program 99.8%

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

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

              \[\leadsto \color{blue}{ew \cdot \sin t} \]
            5. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \color{blue}{\sin t \cdot ew} \]
              2. lower-*.f64N/A

                \[\leadsto \color{blue}{\sin t \cdot ew} \]
              3. lower-sin.f6435.8

                \[\leadsto \color{blue}{\sin t} \cdot ew \]
            6. Applied rewrites35.8%

              \[\leadsto \color{blue}{\sin t \cdot ew} \]
          8. Recombined 2 regimes into one program.
          9. Add Preprocessing

          Alternative 5: 26.3% accurate, 0.9× speedup?

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

            1. Initial program 99.8%

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

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

              \[\leadsto \color{blue}{ew \cdot \sin t} \]
            5. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \color{blue}{\sin t \cdot ew} \]
              2. lower-*.f64N/A

                \[\leadsto \color{blue}{\sin t \cdot ew} \]
              3. lower-sin.f641.6

                \[\leadsto \color{blue}{\sin t} \cdot ew \]
            6. Applied rewrites1.6%

              \[\leadsto \color{blue}{\sin t \cdot ew} \]
            7. Taylor expanded in t around 0

              \[\leadsto \left(t \cdot \left(1 + \frac{-1}{6} \cdot {t}^{2}\right)\right) \cdot ew \]
            8. Step-by-step derivation
              1. Applied rewrites2.0%

                \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, t \cdot t, 1\right) \cdot t\right) \cdot ew \]
              2. Step-by-step derivation
                1. Applied rewrites7.8%

                  \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, t \cdot t, 1\right) \cdot \left|t\right|\right) \cdot ew \]

                if -9.99999999999999945e-228 < (+.f64 (*.f64 (*.f64 ew (sin.f64 t)) (cos.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))) (*.f64 (*.f64 eh (cos.f64 t)) (sin.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))))

                1. Initial program 99.8%

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

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

                  \[\leadsto \color{blue}{ew \cdot \sin t} \]
                5. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \color{blue}{\sin t \cdot ew} \]
                  2. lower-*.f64N/A

                    \[\leadsto \color{blue}{\sin t \cdot ew} \]
                  3. lower-sin.f6435.8

                    \[\leadsto \color{blue}{\sin t} \cdot ew \]
                6. Applied rewrites35.8%

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

              Alternative 6: 14.1% accurate, 1.0× speedup?

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

                1. Initial program 99.8%

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

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

                  \[\leadsto \color{blue}{ew \cdot \sin t} \]
                5. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \color{blue}{\sin t \cdot ew} \]
                  2. lower-*.f64N/A

                    \[\leadsto \color{blue}{\sin t \cdot ew} \]
                  3. lower-sin.f643.5

                    \[\leadsto \color{blue}{\sin t} \cdot ew \]
                6. Applied rewrites3.5%

                  \[\leadsto \color{blue}{\sin t \cdot ew} \]
                7. Taylor expanded in t around 0

                  \[\leadsto \left(t \cdot \left(1 + \frac{-1}{6} \cdot {t}^{2}\right)\right) \cdot ew \]
                8. Step-by-step derivation
                  1. Applied rewrites2.2%

                    \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, t \cdot t, 1\right) \cdot t\right) \cdot ew \]
                  2. Step-by-step derivation
                    1. Applied rewrites7.8%

                      \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, t \cdot t, 1\right) \cdot \left|t\right|\right) \cdot ew \]

                    if 5.0000000000000002e-237 < (+.f64 (*.f64 (*.f64 ew (sin.f64 t)) (cos.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))) (*.f64 (*.f64 eh (cos.f64 t)) (sin.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))))

                    1. Initial program 99.9%

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

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

                      \[\leadsto \color{blue}{ew \cdot \sin t} \]
                    5. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \color{blue}{\sin t \cdot ew} \]
                      2. lower-*.f64N/A

                        \[\leadsto \color{blue}{\sin t \cdot ew} \]
                      3. lower-sin.f6435.5

                        \[\leadsto \color{blue}{\sin t} \cdot ew \]
                    6. Applied rewrites35.5%

                      \[\leadsto \color{blue}{\sin t \cdot ew} \]
                    7. Taylor expanded in t around 0

                      \[\leadsto \left(t \cdot \left(1 + {t}^{2} \cdot \left(\frac{1}{120} \cdot {t}^{2} - \frac{1}{6}\right)\right)\right) \cdot ew \]
                    8. Step-by-step derivation
                      1. Applied rewrites14.8%

                        \[\leadsto \left(\mathsf{fma}\left(0.008333333333333333 \cdot \left(t \cdot t\right) - 0.16666666666666666, t \cdot t, 1\right) \cdot t\right) \cdot ew \]
                    9. Recombined 2 regimes into one program.
                    10. Add Preprocessing

                    Alternative 7: 14.2% accurate, 1.0× speedup?

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

                      1. Initial program 99.8%

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

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

                        \[\leadsto \color{blue}{ew \cdot \sin t} \]
                      5. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \color{blue}{\sin t \cdot ew} \]
                        2. lower-*.f64N/A

                          \[\leadsto \color{blue}{\sin t \cdot ew} \]
                        3. lower-sin.f641.6

                          \[\leadsto \color{blue}{\sin t} \cdot ew \]
                      6. Applied rewrites1.6%

                        \[\leadsto \color{blue}{\sin t \cdot ew} \]
                      7. Taylor expanded in t around 0

                        \[\leadsto \left(t \cdot \left(1 + \frac{-1}{6} \cdot {t}^{2}\right)\right) \cdot ew \]
                      8. Step-by-step derivation
                        1. Applied rewrites2.1%

                          \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, t \cdot t, 1\right) \cdot t\right) \cdot ew \]
                        2. Step-by-step derivation
                          1. Applied rewrites7.8%

                            \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, t \cdot t, 1\right) \cdot \left|t\right|\right) \cdot ew \]

                          if -1.0000000000000001e-290 < (+.f64 (*.f64 (*.f64 ew (sin.f64 t)) (cos.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))) (*.f64 (*.f64 eh (cos.f64 t)) (sin.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))))

                          1. Initial program 99.8%

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

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

                            \[\leadsto \color{blue}{ew \cdot \sin t} \]
                          5. Step-by-step derivation
                            1. *-commutativeN/A

                              \[\leadsto \color{blue}{\sin t \cdot ew} \]
                            2. lower-*.f64N/A

                              \[\leadsto \color{blue}{\sin t \cdot ew} \]
                            3. lower-sin.f6436.0

                              \[\leadsto \color{blue}{\sin t} \cdot ew \]
                          6. Applied rewrites36.0%

                            \[\leadsto \color{blue}{\sin t \cdot ew} \]
                          7. Taylor expanded in t around 0

                            \[\leadsto \left(t \cdot \left(1 + \frac{-1}{6} \cdot {t}^{2}\right)\right) \cdot ew \]
                          8. Step-by-step derivation
                            1. Applied rewrites14.2%

                              \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, t \cdot t, 1\right) \cdot t\right) \cdot ew \]
                          9. Recombined 2 regimes into one program.
                          10. Add Preprocessing

                          Alternative 8: 99.2% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 9: 99.1% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 10: 73.2% accurate, 1.3× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\frac{eh}{\tan t}}{ew}\\ \mathbf{if}\;t \leq -1.38 \cdot 10^{-8} \lor \neg \left(t \leq 1.2 \cdot 10^{-72}\right):\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(t\_1 \cdot eh, \cos t, \sin t \cdot ew\right)}{\cosh \sinh^{-1} t\_1}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh}{t}\right) \cdot eh\right|\\ \end{array} \end{array} \]
                          (FPCore (eh ew t)
                           :precision binary64
                           (let* ((t_1 (/ (/ eh (tan t)) ew)))
                             (if (or (<= t -1.38e-8) (not (<= t 1.2e-72)))
                               (fabs (/ (fma (* t_1 eh) (cos t) (* (sin t) ew)) (cosh (asinh t_1))))
                               (fabs (* (sin (atan (* (/ (cos t) ew) (/ eh t)))) eh)))))
                          double code(double eh, double ew, double t) {
                          	double t_1 = (eh / tan(t)) / ew;
                          	double tmp;
                          	if ((t <= -1.38e-8) || !(t <= 1.2e-72)) {
                          		tmp = fabs((fma((t_1 * eh), cos(t), (sin(t) * ew)) / cosh(asinh(t_1))));
                          	} else {
                          		tmp = fabs((sin(atan(((cos(t) / ew) * (eh / t)))) * eh));
                          	}
                          	return tmp;
                          }
                          
                          function code(eh, ew, t)
                          	t_1 = Float64(Float64(eh / tan(t)) / ew)
                          	tmp = 0.0
                          	if ((t <= -1.38e-8) || !(t <= 1.2e-72))
                          		tmp = abs(Float64(fma(Float64(t_1 * eh), cos(t), Float64(sin(t) * ew)) / cosh(asinh(t_1))));
                          	else
                          		tmp = abs(Float64(sin(atan(Float64(Float64(cos(t) / ew) * Float64(eh / t)))) * eh));
                          	end
                          	return tmp
                          end
                          
                          code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]}, If[Or[LessEqual[t, -1.38e-8], N[Not[LessEqual[t, 1.2e-72]], $MachinePrecision]], N[Abs[N[(N[(N[(t$95$1 * eh), $MachinePrecision] * N[Cos[t], $MachinePrecision] + N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / N[Cosh[N[ArcSinh[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[Sin[N[ArcTan[N[(N[(N[Cos[t], $MachinePrecision] / ew), $MachinePrecision] * N[(eh / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_1 := \frac{\frac{eh}{\tan t}}{ew}\\
                          \mathbf{if}\;t \leq -1.38 \cdot 10^{-8} \lor \neg \left(t \leq 1.2 \cdot 10^{-72}\right):\\
                          \;\;\;\;\left|\frac{\mathsf{fma}\left(t\_1 \cdot eh, \cos t, \sin t \cdot ew\right)}{\cosh \sinh^{-1} t\_1}\right|\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh}{t}\right) \cdot eh\right|\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if t < -1.37999999999999995e-8 or 1.2e-72 < t

                            1. Initial program 99.7%

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

                              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\cos t \cdot \frac{\frac{eh}{\tan t}}{ew}, eh, \sin t \cdot ew\right)}{\cosh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)}} \]
                            4. Step-by-step derivation
                              1. rem-square-sqrtN/A

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

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

                                \[\leadsto \color{blue}{\left|\frac{\mathsf{fma}\left(\cos t \cdot \frac{\frac{eh}{\tan t}}{ew}, eh, \sin t \cdot ew\right)}{\cosh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)}\right|} \]
                              4. lower-fabs.f6475.5

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

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

                            if -1.37999999999999995e-8 < t < 1.2e-72

                            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.38 \cdot 10^{-8} \lor \neg \left(t \leq 1.2 \cdot 10^{-72}\right):\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{\frac{eh}{\tan t}}{ew} \cdot eh, \cos t, \sin t \cdot ew\right)}{\cosh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh}{t}\right) \cdot eh\right|\\ \end{array} \]
                            10. Add Preprocessing

                            Alternative 11: 73.2% accurate, 1.3× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\frac{eh}{\tan t}}{ew}\\ \mathbf{if}\;t \leq -1.38 \cdot 10^{-8} \lor \neg \left(t \leq 1.2 \cdot 10^{-72}\right):\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t \cdot t\_1, eh, \sin t \cdot ew\right)}{\cosh \sinh^{-1} t\_1}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh}{t}\right) \cdot eh\right|\\ \end{array} \end{array} \]
                            (FPCore (eh ew t)
                             :precision binary64
                             (let* ((t_1 (/ (/ eh (tan t)) ew)))
                               (if (or (<= t -1.38e-8) (not (<= t 1.2e-72)))
                                 (fabs (/ (fma (* (cos t) t_1) eh (* (sin t) ew)) (cosh (asinh t_1))))
                                 (fabs (* (sin (atan (* (/ (cos t) ew) (/ eh t)))) eh)))))
                            double code(double eh, double ew, double t) {
                            	double t_1 = (eh / tan(t)) / ew;
                            	double tmp;
                            	if ((t <= -1.38e-8) || !(t <= 1.2e-72)) {
                            		tmp = fabs((fma((cos(t) * t_1), eh, (sin(t) * ew)) / cosh(asinh(t_1))));
                            	} else {
                            		tmp = fabs((sin(atan(((cos(t) / ew) * (eh / t)))) * eh));
                            	}
                            	return tmp;
                            }
                            
                            function code(eh, ew, t)
                            	t_1 = Float64(Float64(eh / tan(t)) / ew)
                            	tmp = 0.0
                            	if ((t <= -1.38e-8) || !(t <= 1.2e-72))
                            		tmp = abs(Float64(fma(Float64(cos(t) * t_1), eh, Float64(sin(t) * ew)) / cosh(asinh(t_1))));
                            	else
                            		tmp = abs(Float64(sin(atan(Float64(Float64(cos(t) / ew) * Float64(eh / t)))) * eh));
                            	end
                            	return tmp
                            end
                            
                            code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]}, If[Or[LessEqual[t, -1.38e-8], N[Not[LessEqual[t, 1.2e-72]], $MachinePrecision]], N[Abs[N[(N[(N[(N[Cos[t], $MachinePrecision] * t$95$1), $MachinePrecision] * eh + N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / N[Cosh[N[ArcSinh[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[Sin[N[ArcTan[N[(N[(N[Cos[t], $MachinePrecision] / ew), $MachinePrecision] * N[(eh / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            t_1 := \frac{\frac{eh}{\tan t}}{ew}\\
                            \mathbf{if}\;t \leq -1.38 \cdot 10^{-8} \lor \neg \left(t \leq 1.2 \cdot 10^{-72}\right):\\
                            \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t \cdot t\_1, eh, \sin t \cdot ew\right)}{\cosh \sinh^{-1} t\_1}\right|\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh}{t}\right) \cdot eh\right|\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if t < -1.37999999999999995e-8 or 1.2e-72 < t

                              1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

                              if -1.37999999999999995e-8 < t < 1.2e-72

                              1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.38 \cdot 10^{-8} \lor \neg \left(t \leq 1.2 \cdot 10^{-72}\right):\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t \cdot \frac{\frac{eh}{\tan t}}{ew}, eh, \sin t \cdot ew\right)}{\cosh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh}{t}\right) \cdot eh\right|\\ \end{array} \]
                              10. Add Preprocessing

                              Alternative 12: 70.2% accurate, 1.4× speedup?

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

                                1. Initial program 99.7%

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

                                  \[\leadsto \color{blue}{{\left(\sqrt{\frac{\mathsf{fma}\left(\cos t \cdot \frac{\frac{eh}{\tan t}}{ew}, eh, \sin t \cdot ew\right)}{\cosh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)}}\right)}^{2}} \]
                                4. Step-by-step derivation
                                  1. rem-square-sqrtN/A

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

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

                                    \[\leadsto {\left(\sqrt{\color{blue}{\left|\frac{\mathsf{fma}\left(\cos t \cdot \frac{\frac{eh}{\tan t}}{ew}, eh, \sin t \cdot ew\right)}{\cosh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)}\right|}}\right)}^{2} \]
                                  4. lower-fabs.f6475.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if -1.04e-7 < t < 1.00000000000000004e-10

                                1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 13: 60.7% accurate, 1.8× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\frac{eh}{\tan t}}{ew}\\ \mathbf{if}\;t \leq -5.8 \cdot 10^{+37} \lor \neg \left(t \leq 6 \cdot 10^{-25}\right):\\ \;\;\;\;{\left(\sqrt{\left|\frac{\mathsf{fma}\left(t\_1 \cdot eh, \cos t, \sin t \cdot ew\right)}{1}\right|}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\left|\tanh \sinh^{-1} t\_1 \cdot eh\right|\\ \end{array} \end{array} \]
                                (FPCore (eh ew t)
                                 :precision binary64
                                 (let* ((t_1 (/ (/ eh (tan t)) ew)))
                                   (if (or (<= t -5.8e+37) (not (<= t 6e-25)))
                                     (pow (sqrt (fabs (/ (fma (* t_1 eh) (cos t) (* (sin t) ew)) 1.0))) 2.0)
                                     (fabs (* (tanh (asinh t_1)) eh)))))
                                double code(double eh, double ew, double t) {
                                	double t_1 = (eh / tan(t)) / ew;
                                	double tmp;
                                	if ((t <= -5.8e+37) || !(t <= 6e-25)) {
                                		tmp = pow(sqrt(fabs((fma((t_1 * eh), cos(t), (sin(t) * ew)) / 1.0))), 2.0);
                                	} else {
                                		tmp = fabs((tanh(asinh(t_1)) * eh));
                                	}
                                	return tmp;
                                }
                                
                                function code(eh, ew, t)
                                	t_1 = Float64(Float64(eh / tan(t)) / ew)
                                	tmp = 0.0
                                	if ((t <= -5.8e+37) || !(t <= 6e-25))
                                		tmp = sqrt(abs(Float64(fma(Float64(t_1 * eh), cos(t), Float64(sin(t) * ew)) / 1.0))) ^ 2.0;
                                	else
                                		tmp = abs(Float64(tanh(asinh(t_1)) * eh));
                                	end
                                	return tmp
                                end
                                
                                code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]}, If[Or[LessEqual[t, -5.8e+37], N[Not[LessEqual[t, 6e-25]], $MachinePrecision]], N[Power[N[Sqrt[N[Abs[N[(N[(N[(t$95$1 * eh), $MachinePrecision] * N[Cos[t], $MachinePrecision] + N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / 1.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision], N[Abs[N[(N[Tanh[N[ArcSinh[t$95$1], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_1 := \frac{\frac{eh}{\tan t}}{ew}\\
                                \mathbf{if}\;t \leq -5.8 \cdot 10^{+37} \lor \neg \left(t \leq 6 \cdot 10^{-25}\right):\\
                                \;\;\;\;{\left(\sqrt{\left|\frac{\mathsf{fma}\left(t\_1 \cdot eh, \cos t, \sin t \cdot ew\right)}{1}\right|}\right)}^{2}\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\left|\tanh \sinh^{-1} t\_1 \cdot eh\right|\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if t < -5.79999999999999957e37 or 5.9999999999999995e-25 < t

                                  1. Initial program 99.7%

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

                                    \[\leadsto \color{blue}{{\left(\sqrt{\frac{\mathsf{fma}\left(\cos t \cdot \frac{\frac{eh}{\tan t}}{ew}, eh, \sin t \cdot ew\right)}{\cosh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)}}\right)}^{2}} \]
                                  4. Step-by-step derivation
                                    1. rem-square-sqrtN/A

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

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

                                      \[\leadsto {\left(\sqrt{\color{blue}{\left|\frac{\mathsf{fma}\left(\cos t \cdot \frac{\frac{eh}{\tan t}}{ew}, eh, \sin t \cdot ew\right)}{\cosh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)}\right|}}\right)}^{2} \]
                                    4. lower-fabs.f6476.0

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

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

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

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

                                    if -5.79999999999999957e37 < t < 5.9999999999999995e-25

                                    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \color{blue}{\left|\tanh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right) \cdot eh\right|} \]
                                    7. Recombined 2 regimes into one program.
                                    8. Final simplification66.5%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{+37} \lor \neg \left(t \leq 6 \cdot 10^{-25}\right):\\ \;\;\;\;{\left(\sqrt{\left|\frac{\mathsf{fma}\left(\frac{\frac{eh}{\tan t}}{ew} \cdot eh, \cos t, \sin t \cdot ew\right)}{1}\right|}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\left|\tanh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right) \cdot eh\right|\\ \end{array} \]
                                    9. Add Preprocessing

                                    Alternative 14: 48.6% accurate, 2.4× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\frac{eh}{\tan t}}{ew}\\ t_2 := \frac{\mathsf{fma}\left(\cos t \cdot t\_1, eh, \sin t \cdot ew\right)}{1}\\ \mathbf{if}\;t \leq -6 \cdot 10^{+147}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{+37}:\\ \;\;\;\;\sin \left(\left|t\right|\right) \cdot ew\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{-10}:\\ \;\;\;\;\left|\tanh \sinh^{-1} t\_1 \cdot eh\right|\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                                    (FPCore (eh ew t)
                                     :precision binary64
                                     (let* ((t_1 (/ (/ eh (tan t)) ew))
                                            (t_2 (/ (fma (* (cos t) t_1) eh (* (sin t) ew)) 1.0)))
                                       (if (<= t -6e+147)
                                         t_2
                                         (if (<= t -8.5e+37)
                                           (* (sin (fabs t)) ew)
                                           (if (<= t 1.1e-10) (fabs (* (tanh (asinh t_1)) eh)) t_2)))))
                                    double code(double eh, double ew, double t) {
                                    	double t_1 = (eh / tan(t)) / ew;
                                    	double t_2 = fma((cos(t) * t_1), eh, (sin(t) * ew)) / 1.0;
                                    	double tmp;
                                    	if (t <= -6e+147) {
                                    		tmp = t_2;
                                    	} else if (t <= -8.5e+37) {
                                    		tmp = sin(fabs(t)) * ew;
                                    	} else if (t <= 1.1e-10) {
                                    		tmp = fabs((tanh(asinh(t_1)) * eh));
                                    	} else {
                                    		tmp = t_2;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(eh, ew, t)
                                    	t_1 = Float64(Float64(eh / tan(t)) / ew)
                                    	t_2 = Float64(fma(Float64(cos(t) * t_1), eh, Float64(sin(t) * ew)) / 1.0)
                                    	tmp = 0.0
                                    	if (t <= -6e+147)
                                    		tmp = t_2;
                                    	elseif (t <= -8.5e+37)
                                    		tmp = Float64(sin(abs(t)) * ew);
                                    	elseif (t <= 1.1e-10)
                                    		tmp = abs(Float64(tanh(asinh(t_1)) * eh));
                                    	else
                                    		tmp = t_2;
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[Cos[t], $MachinePrecision] * t$95$1), $MachinePrecision] * eh + N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / 1.0), $MachinePrecision]}, If[LessEqual[t, -6e+147], t$95$2, If[LessEqual[t, -8.5e+37], N[(N[Sin[N[Abs[t], $MachinePrecision]], $MachinePrecision] * ew), $MachinePrecision], If[LessEqual[t, 1.1e-10], N[Abs[N[(N[Tanh[N[ArcSinh[t$95$1], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision], t$95$2]]]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    t_1 := \frac{\frac{eh}{\tan t}}{ew}\\
                                    t_2 := \frac{\mathsf{fma}\left(\cos t \cdot t\_1, eh, \sin t \cdot ew\right)}{1}\\
                                    \mathbf{if}\;t \leq -6 \cdot 10^{+147}:\\
                                    \;\;\;\;t\_2\\
                                    
                                    \mathbf{elif}\;t \leq -8.5 \cdot 10^{+37}:\\
                                    \;\;\;\;\sin \left(\left|t\right|\right) \cdot ew\\
                                    
                                    \mathbf{elif}\;t \leq 1.1 \cdot 10^{-10}:\\
                                    \;\;\;\;\left|\tanh \sinh^{-1} t\_1 \cdot eh\right|\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;t\_2\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 3 regimes
                                    2. if t < -5.99999999999999987e147 or 1.09999999999999995e-10 < t

                                      1. Initial program 99.7%

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

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

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

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

                                        if -5.99999999999999987e147 < t < -8.4999999999999999e37

                                        1. Initial program 99.7%

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

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

                                          \[\leadsto \color{blue}{ew \cdot \sin t} \]
                                        5. Step-by-step derivation
                                          1. *-commutativeN/A

                                            \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                          2. lower-*.f64N/A

                                            \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                          3. lower-sin.f6415.4

                                            \[\leadsto \color{blue}{\sin t} \cdot ew \]
                                        6. Applied rewrites15.4%

                                          \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites37.8%

                                            \[\leadsto \sin \left(\left|t\right|\right) \cdot ew \]

                                          if -8.4999999999999999e37 < t < 1.09999999999999995e-10

                                          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \color{blue}{\left|\tanh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right) \cdot eh\right|} \]
                                          7. Recombined 3 regimes into one program.
                                          8. Add Preprocessing

                                          Alternative 15: 48.5% accurate, 2.5× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \sin t \cdot ew\\ \mathbf{if}\;t \leq -6 \cdot 10^{+147}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{+37}:\\ \;\;\;\;\sin \left(\left|t\right|\right) \cdot ew\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{-10}:\\ \;\;\;\;\left|\tanh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right) \cdot eh\right|\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                          (FPCore (eh ew t)
                                           :precision binary64
                                           (let* ((t_1 (* (sin t) ew)))
                                             (if (<= t -6e+147)
                                               t_1
                                               (if (<= t -8.5e+37)
                                                 (* (sin (fabs t)) ew)
                                                 (if (<= t 1.1e-10)
                                                   (fabs (* (tanh (asinh (/ (/ eh (tan t)) ew))) eh))
                                                   t_1)))))
                                          double code(double eh, double ew, double t) {
                                          	double t_1 = sin(t) * ew;
                                          	double tmp;
                                          	if (t <= -6e+147) {
                                          		tmp = t_1;
                                          	} else if (t <= -8.5e+37) {
                                          		tmp = sin(fabs(t)) * ew;
                                          	} else if (t <= 1.1e-10) {
                                          		tmp = fabs((tanh(asinh(((eh / tan(t)) / ew))) * eh));
                                          	} else {
                                          		tmp = t_1;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          def code(eh, ew, t):
                                          	t_1 = math.sin(t) * ew
                                          	tmp = 0
                                          	if t <= -6e+147:
                                          		tmp = t_1
                                          	elif t <= -8.5e+37:
                                          		tmp = math.sin(math.fabs(t)) * ew
                                          	elif t <= 1.1e-10:
                                          		tmp = math.fabs((math.tanh(math.asinh(((eh / math.tan(t)) / ew))) * eh))
                                          	else:
                                          		tmp = t_1
                                          	return tmp
                                          
                                          function code(eh, ew, t)
                                          	t_1 = Float64(sin(t) * ew)
                                          	tmp = 0.0
                                          	if (t <= -6e+147)
                                          		tmp = t_1;
                                          	elseif (t <= -8.5e+37)
                                          		tmp = Float64(sin(abs(t)) * ew);
                                          	elseif (t <= 1.1e-10)
                                          		tmp = abs(Float64(tanh(asinh(Float64(Float64(eh / tan(t)) / ew))) * eh));
                                          	else
                                          		tmp = t_1;
                                          	end
                                          	return tmp
                                          end
                                          
                                          function tmp_2 = code(eh, ew, t)
                                          	t_1 = sin(t) * ew;
                                          	tmp = 0.0;
                                          	if (t <= -6e+147)
                                          		tmp = t_1;
                                          	elseif (t <= -8.5e+37)
                                          		tmp = sin(abs(t)) * ew;
                                          	elseif (t <= 1.1e-10)
                                          		tmp = abs((tanh(asinh(((eh / tan(t)) / ew))) * eh));
                                          	else
                                          		tmp = t_1;
                                          	end
                                          	tmp_2 = tmp;
                                          end
                                          
                                          code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]}, If[LessEqual[t, -6e+147], t$95$1, If[LessEqual[t, -8.5e+37], N[(N[Sin[N[Abs[t], $MachinePrecision]], $MachinePrecision] * ew), $MachinePrecision], If[LessEqual[t, 1.1e-10], N[Abs[N[(N[Tanh[N[ArcSinh[N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision], t$95$1]]]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          t_1 := \sin t \cdot ew\\
                                          \mathbf{if}\;t \leq -6 \cdot 10^{+147}:\\
                                          \;\;\;\;t\_1\\
                                          
                                          \mathbf{elif}\;t \leq -8.5 \cdot 10^{+37}:\\
                                          \;\;\;\;\sin \left(\left|t\right|\right) \cdot ew\\
                                          
                                          \mathbf{elif}\;t \leq 1.1 \cdot 10^{-10}:\\
                                          \;\;\;\;\left|\tanh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right) \cdot eh\right|\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;t\_1\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 3 regimes
                                          2. if t < -5.99999999999999987e147 or 1.09999999999999995e-10 < t

                                            1. Initial program 99.7%

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

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

                                              \[\leadsto \color{blue}{ew \cdot \sin t} \]
                                            5. Step-by-step derivation
                                              1. *-commutativeN/A

                                                \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                              2. lower-*.f64N/A

                                                \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                              3. lower-sin.f6433.1

                                                \[\leadsto \color{blue}{\sin t} \cdot ew \]
                                            6. Applied rewrites33.1%

                                              \[\leadsto \color{blue}{\sin t \cdot ew} \]

                                            if -5.99999999999999987e147 < t < -8.4999999999999999e37

                                            1. Initial program 99.7%

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

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

                                              \[\leadsto \color{blue}{ew \cdot \sin t} \]
                                            5. Step-by-step derivation
                                              1. *-commutativeN/A

                                                \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                              2. lower-*.f64N/A

                                                \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                              3. lower-sin.f6415.4

                                                \[\leadsto \color{blue}{\sin t} \cdot ew \]
                                            6. Applied rewrites15.4%

                                              \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                            7. Step-by-step derivation
                                              1. Applied rewrites37.8%

                                                \[\leadsto \sin \left(\left|t\right|\right) \cdot ew \]

                                              if -8.4999999999999999e37 < t < 1.09999999999999995e-10

                                              1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \color{blue}{\left|\tanh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right) \cdot eh\right|} \]
                                              7. Recombined 3 regimes into one program.
                                              8. Add Preprocessing

                                              Alternative 16: 42.2% accurate, 3.2× speedup?

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

                                                1. Initial program 99.7%

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

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

                                                  \[\leadsto \color{blue}{ew \cdot \sin t} \]
                                                5. Step-by-step derivation
                                                  1. *-commutativeN/A

                                                    \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                                  2. lower-*.f64N/A

                                                    \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                                  3. lower-sin.f6433.8

                                                    \[\leadsto \color{blue}{\sin t} \cdot ew \]
                                                6. Applied rewrites33.8%

                                                  \[\leadsto \color{blue}{\sin t \cdot ew} \]

                                                if -5.99999999999999987e147 < t < -7.5000000000000003e37

                                                1. Initial program 99.7%

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

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

                                                  \[\leadsto \color{blue}{ew \cdot \sin t} \]
                                                5. Step-by-step derivation
                                                  1. *-commutativeN/A

                                                    \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                                  2. lower-*.f64N/A

                                                    \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                                  3. lower-sin.f6415.4

                                                    \[\leadsto \color{blue}{\sin t} \cdot ew \]
                                                6. Applied rewrites15.4%

                                                  \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                                7. Step-by-step derivation
                                                  1. Applied rewrites37.8%

                                                    \[\leadsto \sin \left(\left|t\right|\right) \cdot ew \]

                                                  if -7.5000000000000003e37 < t < 4.00000000000000015e-25

                                                  1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto \left|\sin \tan^{-1} \left(\frac{\mathsf{fma}\left(\frac{eh}{ew} \cdot -0.3333333333333333, t \cdot t, \frac{eh}{ew}\right)}{t}\right) \cdot eh\right| \]
                                                  8. Recombined 3 regimes into one program.
                                                  9. Add Preprocessing

                                                  Alternative 17: 14.2% accurate, 29.0× speedup?

                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -4 \cdot 10^{-283}:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, \left|t\right| \cdot t, 1\right) \cdot t\right) \cdot ew\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, t \cdot t, 1\right) \cdot \left|t\right|\right) \cdot ew\\ \end{array} \end{array} \]
                                                  (FPCore (eh ew t)
                                                   :precision binary64
                                                   (if (<= ew -4e-283)
                                                     (* (* (fma -0.16666666666666666 (* (fabs t) t) 1.0) t) ew)
                                                     (* (* (fma -0.16666666666666666 (* t t) 1.0) (fabs t)) ew)))
                                                  double code(double eh, double ew, double t) {
                                                  	double tmp;
                                                  	if (ew <= -4e-283) {
                                                  		tmp = (fma(-0.16666666666666666, (fabs(t) * t), 1.0) * t) * ew;
                                                  	} else {
                                                  		tmp = (fma(-0.16666666666666666, (t * t), 1.0) * fabs(t)) * ew;
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  function code(eh, ew, t)
                                                  	tmp = 0.0
                                                  	if (ew <= -4e-283)
                                                  		tmp = Float64(Float64(fma(-0.16666666666666666, Float64(abs(t) * t), 1.0) * t) * ew);
                                                  	else
                                                  		tmp = Float64(Float64(fma(-0.16666666666666666, Float64(t * t), 1.0) * abs(t)) * ew);
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  code[eh_, ew_, t_] := If[LessEqual[ew, -4e-283], N[(N[(N[(-0.16666666666666666 * N[(N[Abs[t], $MachinePrecision] * t), $MachinePrecision] + 1.0), $MachinePrecision] * t), $MachinePrecision] * ew), $MachinePrecision], N[(N[(N[(-0.16666666666666666 * N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision] * ew), $MachinePrecision]]
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  \begin{array}{l}
                                                  \mathbf{if}\;ew \leq -4 \cdot 10^{-283}:\\
                                                  \;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, \left|t\right| \cdot t, 1\right) \cdot t\right) \cdot ew\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, t \cdot t, 1\right) \cdot \left|t\right|\right) \cdot ew\\
                                                  
                                                  
                                                  \end{array}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 2 regimes
                                                  2. if ew < -3.99999999999999979e-283

                                                    1. Initial program 99.8%

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

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

                                                      \[\leadsto \color{blue}{ew \cdot \sin t} \]
                                                    5. Step-by-step derivation
                                                      1. *-commutativeN/A

                                                        \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                                      2. lower-*.f64N/A

                                                        \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                                      3. lower-sin.f6422.4

                                                        \[\leadsto \color{blue}{\sin t} \cdot ew \]
                                                    6. Applied rewrites22.4%

                                                      \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                                    7. Taylor expanded in t around 0

                                                      \[\leadsto \left(t \cdot \left(1 + \frac{-1}{6} \cdot {t}^{2}\right)\right) \cdot ew \]
                                                    8. Step-by-step derivation
                                                      1. Applied rewrites6.5%

                                                        \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, t \cdot t, 1\right) \cdot t\right) \cdot ew \]
                                                      2. Step-by-step derivation
                                                        1. Applied rewrites8.2%

                                                          \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, \left|t\right| \cdot t, 1\right) \cdot t\right) \cdot ew \]

                                                        if -3.99999999999999979e-283 < ew

                                                        1. Initial program 99.9%

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

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

                                                          \[\leadsto \color{blue}{ew \cdot \sin t} \]
                                                        5. Step-by-step derivation
                                                          1. *-commutativeN/A

                                                            \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                                          2. lower-*.f64N/A

                                                            \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                                          3. lower-sin.f6421.3

                                                            \[\leadsto \color{blue}{\sin t} \cdot ew \]
                                                        6. Applied rewrites21.3%

                                                          \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                                        7. Taylor expanded in t around 0

                                                          \[\leadsto \left(t \cdot \left(1 + \frac{-1}{6} \cdot {t}^{2}\right)\right) \cdot ew \]
                                                        8. Step-by-step derivation
                                                          1. Applied rewrites11.5%

                                                            \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, t \cdot t, 1\right) \cdot t\right) \cdot ew \]
                                                          2. Step-by-step derivation
                                                            1. Applied rewrites14.4%

                                                              \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, t \cdot t, 1\right) \cdot \left|t\right|\right) \cdot ew \]
                                                          3. Recombined 2 regimes into one program.
                                                          4. Add Preprocessing

                                                          Alternative 18: 10.6% accurate, 39.5× speedup?

                                                          \[\begin{array}{l} \\ \left(\mathsf{fma}\left(-0.16666666666666666, t \cdot t, 1\right) \cdot t\right) \cdot ew \end{array} \]
                                                          (FPCore (eh ew t)
                                                           :precision binary64
                                                           (* (* (fma -0.16666666666666666 (* t t) 1.0) t) ew))
                                                          double code(double eh, double ew, double t) {
                                                          	return (fma(-0.16666666666666666, (t * t), 1.0) * t) * ew;
                                                          }
                                                          
                                                          function code(eh, ew, t)
                                                          	return Float64(Float64(fma(-0.16666666666666666, Float64(t * t), 1.0) * t) * ew)
                                                          end
                                                          
                                                          code[eh_, ew_, t_] := N[(N[(N[(-0.16666666666666666 * N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision] * t), $MachinePrecision] * ew), $MachinePrecision]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \left(\mathsf{fma}\left(-0.16666666666666666, t \cdot t, 1\right) \cdot t\right) \cdot ew
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Initial program 99.8%

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

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

                                                            \[\leadsto \color{blue}{ew \cdot \sin t} \]
                                                          5. Step-by-step derivation
                                                            1. *-commutativeN/A

                                                              \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                                            2. lower-*.f64N/A

                                                              \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                                            3. lower-sin.f6421.8

                                                              \[\leadsto \color{blue}{\sin t} \cdot ew \]
                                                          6. Applied rewrites21.8%

                                                            \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                                          7. Taylor expanded in t around 0

                                                            \[\leadsto \left(t \cdot \left(1 + \frac{-1}{6} \cdot {t}^{2}\right)\right) \cdot ew \]
                                                          8. Step-by-step derivation
                                                            1. Applied rewrites9.2%

                                                              \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, t \cdot t, 1\right) \cdot t\right) \cdot ew \]
                                                            2. Add Preprocessing

                                                            Alternative 19: 3.1% accurate, 41.4× speedup?

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

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

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

                                                              \[\leadsto \color{blue}{ew \cdot \sin t} \]
                                                            5. Step-by-step derivation
                                                              1. *-commutativeN/A

                                                                \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                                              2. lower-*.f64N/A

                                                                \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                                              3. lower-sin.f6421.8

                                                                \[\leadsto \color{blue}{\sin t} \cdot ew \]
                                                            6. Applied rewrites21.8%

                                                              \[\leadsto \color{blue}{\sin t \cdot ew} \]
                                                            7. Taylor expanded in t around 0

                                                              \[\leadsto \left(t \cdot \left(1 + \frac{-1}{6} \cdot {t}^{2}\right)\right) \cdot ew \]
                                                            8. Step-by-step derivation
                                                              1. Applied rewrites9.2%

                                                                \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, t \cdot t, 1\right) \cdot t\right) \cdot ew \]
                                                              2. Taylor expanded in t around inf

                                                                \[\leadsto \left(\left(\frac{-1}{6} \cdot {t}^{2}\right) \cdot t\right) \cdot ew \]
                                                              3. Step-by-step derivation
                                                                1. Applied rewrites2.7%

                                                                  \[\leadsto \left(\left(\left(t \cdot t\right) \cdot -0.16666666666666666\right) \cdot t\right) \cdot ew \]
                                                                2. Add Preprocessing

                                                                Reproduce

                                                                ?
                                                                herbie shell --seed 2024339 
                                                                (FPCore (eh ew t)
                                                                  :name "Example from Robby"
                                                                  :precision binary64
                                                                  (fabs (+ (* (* ew (sin t)) (cos (atan (/ (/ eh ew) (tan t))))) (* (* eh (cos t)) (sin (atan (/ (/ eh ew) (tan t))))))))