Example from Robby

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

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

Initial Program: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \tan^{-1} \left(\frac{\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|\mathsf{fma}\left(ew \cdot \sin t, \cos t\_1, \left(\cos t \cdot eh\right) \cdot \sin t\_1\right)\right| \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (atan (/ eh (* (tan t) ew)))))
   (fabs (fma (* ew (sin t)) (cos t_1) (* (* (cos t) eh) (sin t_1))))))
double code(double eh, double ew, double t) {
	double t_1 = atan((eh / (tan(t) * ew)));
	return fabs(fma((ew * sin(t)), cos(t_1), ((cos(t) * eh) * sin(t_1))));
}
function code(eh, ew, t)
	t_1 = atan(Float64(eh / Float64(tan(t) * ew)))
	return abs(fma(Float64(ew * sin(t)), cos(t_1), Float64(Float64(cos(t) * eh) * 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[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision] + N[(N[(N[Cos[t], $MachinePrecision] * eh), $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|\mathsf{fma}\left(ew \cdot \sin t, \cos t\_1, \left(\cos t \cdot eh\right) \cdot \sin t\_1\right)\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|\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. 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| \]
    3. lower-fma.f6499.8

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

      \[\leadsto \left|\mathsf{fma}\left(\color{blue}{ew \cdot \sin t}, \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)\right| \]
    5. *-commutativeN/A

      \[\leadsto \left|\mathsf{fma}\left(\color{blue}{\sin t \cdot ew}, \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)\right| \]
    6. lower-*.f6499.8

      \[\leadsto \left|\mathsf{fma}\left(\color{blue}{\sin t \cdot ew}, \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)\right| \]
    7. lift-/.f64N/A

      \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
    8. lift-/.f64N/A

      \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
    9. associate-/l/N/A

      \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
    10. associate-/r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 55.4% accurate, 0.7× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\left|\sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right) \cdot t\_1\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (fabs.f64 (+.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))))))) < 6.00000000000000025e150

    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|\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. 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| \]
      3. lower-fma.f6499.8

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

        \[\leadsto \left|\mathsf{fma}\left(\color{blue}{ew \cdot \sin t}, \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)\right| \]
      5. *-commutativeN/A

        \[\leadsto \left|\mathsf{fma}\left(\color{blue}{\sin t \cdot ew}, \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)\right| \]
      6. lower-*.f6499.8

        \[\leadsto \left|\mathsf{fma}\left(\color{blue}{\sin t \cdot ew}, \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)\right| \]
      7. lift-/.f64N/A

        \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
      8. lift-/.f64N/A

        \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
      9. associate-/l/N/A

        \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
      10. associate-/r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|\color{blue}{\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh}{\sin t}\right) \cdot \left(\cos t \cdot eh\right)}\right| \]
    8. 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 \left(\cos t \cdot eh\right)\right| \]
    9. Step-by-step derivation
      1. Applied rewrites57.4%

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

      if 6.00000000000000025e150 < (fabs.f64 (+.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. 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. 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| \]
        3. lower-fma.f6499.8

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

          \[\leadsto \left|\mathsf{fma}\left(\color{blue}{ew \cdot \sin t}, \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)\right| \]
        5. *-commutativeN/A

          \[\leadsto \left|\mathsf{fma}\left(\color{blue}{\sin t \cdot ew}, \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)\right| \]
        6. lower-*.f6499.8

          \[\leadsto \left|\mathsf{fma}\left(\color{blue}{\sin t \cdot ew}, \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)\right| \]
        7. lift-/.f64N/A

          \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
        8. lift-/.f64N/A

          \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
        9. associate-/l/N/A

          \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
        10. associate-/r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 3: 99.8% accurate, 1.1× speedup?

      \[\begin{array}{l} \\ \left|\mathsf{fma}\left(ew \cdot \sin t, \frac{1}{\sqrt{{\left(\frac{\frac{eh}{\tan t}}{ew}\right)}^{2} + 1}}, \left(\cos t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{eh}{\tan t \cdot ew}\right)\right)\right| \end{array} \]
      (FPCore (eh ew t)
       :precision binary64
       (fabs
        (fma
         (* ew (sin t))
         (/ 1.0 (sqrt (+ (pow (/ (/ eh (tan t)) ew) 2.0) 1.0)))
         (* (* (cos t) eh) (sin (atan (/ eh (* (tan t) ew))))))))
      double code(double eh, double ew, double t) {
      	return fabs(fma((ew * sin(t)), (1.0 / sqrt((pow(((eh / tan(t)) / ew), 2.0) + 1.0))), ((cos(t) * eh) * sin(atan((eh / (tan(t) * ew)))))));
      }
      
      function code(eh, ew, t)
      	return abs(fma(Float64(ew * sin(t)), Float64(1.0 / sqrt(Float64((Float64(Float64(eh / tan(t)) / ew) ^ 2.0) + 1.0))), Float64(Float64(cos(t) * eh) * sin(atan(Float64(eh / Float64(tan(t) * ew)))))))
      end
      
      code[eh_, ew_, t_] := N[Abs[N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[Sqrt[N[(N[Power[N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision] * N[Sin[N[ArcTan[N[(eh / N[(N[Tan[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      \left|\mathsf{fma}\left(ew \cdot \sin t, \frac{1}{\sqrt{{\left(\frac{\frac{eh}{\tan t}}{ew}\right)}^{2} + 1}}, \left(\cos t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{eh}{\tan t \cdot ew}\right)\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|\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. 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| \]
        3. lower-fma.f6499.8

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

          \[\leadsto \left|\mathsf{fma}\left(\color{blue}{ew \cdot \sin t}, \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)\right| \]
        5. *-commutativeN/A

          \[\leadsto \left|\mathsf{fma}\left(\color{blue}{\sin t \cdot ew}, \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)\right| \]
        6. lower-*.f6499.8

          \[\leadsto \left|\mathsf{fma}\left(\color{blue}{\sin t \cdot ew}, \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)\right| \]
        7. lift-/.f64N/A

          \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
        8. lift-/.f64N/A

          \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
        9. associate-/l/N/A

          \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
        10. associate-/r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 4: 98.9% accurate, 1.3× speedup?

      \[\begin{array}{l} \\ \left|\mathsf{fma}\left(\frac{\sin t}{\sqrt{{\left(\frac{\frac{eh}{ew}}{t}\right)}^{2} + 1}}, ew, \sin \tan^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right) \cdot \left(\cos t \cdot eh\right)\right)\right| \end{array} \]
      (FPCore (eh ew t)
       :precision binary64
       (fabs
        (fma
         (/ (sin t) (sqrt (+ (pow (/ (/ eh ew) t) 2.0) 1.0)))
         ew
         (* (sin (atan (/ (/ eh (tan t)) ew))) (* (cos t) eh)))))
      double code(double eh, double ew, double t) {
      	return fabs(fma((sin(t) / sqrt((pow(((eh / ew) / t), 2.0) + 1.0))), ew, (sin(atan(((eh / tan(t)) / ew))) * (cos(t) * eh))));
      }
      
      function code(eh, ew, t)
      	return abs(fma(Float64(sin(t) / sqrt(Float64((Float64(Float64(eh / ew) / t) ^ 2.0) + 1.0))), ew, Float64(sin(atan(Float64(Float64(eh / tan(t)) / ew))) * Float64(cos(t) * eh))))
      end
      
      code[eh_, ew_, t_] := N[Abs[N[(N[(N[Sin[t], $MachinePrecision] / N[Sqrt[N[(N[Power[N[(N[(eh / ew), $MachinePrecision] / t), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * ew + N[(N[Sin[N[ArcTan[N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      \left|\mathsf{fma}\left(\frac{\sin t}{\sqrt{{\left(\frac{\frac{eh}{ew}}{t}\right)}^{2} + 1}}, ew, \sin \tan^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right) \cdot \left(\cos t \cdot eh\right)\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} \color{blue}{\left(\frac{eh}{ew \cdot t}\right)} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
      4. Step-by-step derivation
        1. lower-/.f64N/A

          \[\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{\frac{eh}{ew}}{\tan t}\right)\right| \]
        2. lower-*.f6499.2

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

        \[\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{\frac{eh}{ew}}{\tan t}\right)\right| \]
      6. Step-by-step derivation
        1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 5: 98.9% accurate, 1.3× speedup?

      \[\begin{array}{l} \\ \left|\sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot \left(\cos t \cdot eh\right) + \frac{ew \cdot \sin t}{\sqrt{{\left(\frac{eh}{ew \cdot t}\right)}^{2} + 1}}\right| \end{array} \]
      (FPCore (eh ew t)
       :precision binary64
       (fabs
        (+
         (* (sin (atan (/ (/ eh ew) (tan t)))) (* (cos t) eh))
         (/ (* ew (sin t)) (sqrt (+ (pow (/ eh (* ew t)) 2.0) 1.0))))))
      double code(double eh, double ew, double t) {
      	return fabs(((sin(atan(((eh / ew) / tan(t)))) * (cos(t) * eh)) + ((ew * sin(t)) / sqrt((pow((eh / (ew * t)), 2.0) + 1.0)))));
      }
      
      real(8) function code(eh, ew, t)
          real(8), intent (in) :: eh
          real(8), intent (in) :: ew
          real(8), intent (in) :: t
          code = abs(((sin(atan(((eh / ew) / tan(t)))) * (cos(t) * eh)) + ((ew * sin(t)) / sqrt((((eh / (ew * t)) ** 2.0d0) + 1.0d0)))))
      end function
      
      public static double code(double eh, double ew, double t) {
      	return Math.abs(((Math.sin(Math.atan(((eh / ew) / Math.tan(t)))) * (Math.cos(t) * eh)) + ((ew * Math.sin(t)) / Math.sqrt((Math.pow((eh / (ew * t)), 2.0) + 1.0)))));
      }
      
      def code(eh, ew, t):
      	return math.fabs(((math.sin(math.atan(((eh / ew) / math.tan(t)))) * (math.cos(t) * eh)) + ((ew * math.sin(t)) / math.sqrt((math.pow((eh / (ew * t)), 2.0) + 1.0)))))
      
      function code(eh, ew, t)
      	return abs(Float64(Float64(sin(atan(Float64(Float64(eh / ew) / tan(t)))) * Float64(cos(t) * eh)) + Float64(Float64(ew * sin(t)) / sqrt(Float64((Float64(eh / Float64(ew * t)) ^ 2.0) + 1.0)))))
      end
      
      function tmp = code(eh, ew, t)
      	tmp = abs(((sin(atan(((eh / ew) / tan(t)))) * (cos(t) * eh)) + ((ew * sin(t)) / sqrt((((eh / (ew * t)) ^ 2.0) + 1.0)))));
      end
      
      code[eh_, ew_, t_] := N[Abs[N[(N[(N[Sin[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision]), $MachinePrecision] + N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[Power[N[(eh / N[(ew * t), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      \left|\sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot \left(\cos t \cdot eh\right) + \frac{ew \cdot \sin t}{\sqrt{{\left(\frac{eh}{ew \cdot t}\right)}^{2} + 1}}\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} \color{blue}{\left(\frac{eh}{ew \cdot t}\right)} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
      4. Step-by-step derivation
        1. lower-/.f64N/A

          \[\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{\frac{eh}{ew}}{\tan t}\right)\right| \]
        2. lower-*.f6499.2

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

        \[\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{\frac{eh}{ew}}{\tan t}\right)\right| \]
      6. Step-by-step derivation
        1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 6: 89.3% accurate, 1.3× speedup?

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

        1. Initial program 99.5%

          \[\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. 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| \]
          3. lower-fma.f6499.5

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

            \[\leadsto \left|\mathsf{fma}\left(\color{blue}{ew \cdot \sin t}, \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)\right| \]
          5. *-commutativeN/A

            \[\leadsto \left|\mathsf{fma}\left(\color{blue}{\sin t \cdot ew}, \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)\right| \]
          6. lower-*.f6499.5

            \[\leadsto \left|\mathsf{fma}\left(\color{blue}{\sin t \cdot ew}, \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)\right| \]
          7. lift-/.f64N/A

            \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
          8. lift-/.f64N/A

            \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
          9. associate-/l/N/A

            \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
          10. associate-/r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\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{\frac{eh}{ew}}{\tan t}\right)\right| \]
            2. lower-*.f6499.2

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

            \[\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{\frac{eh}{ew}}{\tan t}\right)\right| \]
          6. Taylor expanded in t around 0

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{+259}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{eh}{\sin t} \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{ew}, -0.001388888888888889, \frac{0.041666666666666664}{ew}\right) \cdot t, t, \frac{-0.5}{ew}\right), t \cdot t, \frac{1}{ew}\right)\right) \cdot \left(\cos t \cdot eh\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right) \cdot \left(\cos t \cdot eh\right) + \cos \tan^{-1} \left(\frac{eh}{ew \cdot t}\right) \cdot \left(ew \cdot \sin t\right)\right|\\ \end{array} \]
        12. Add Preprocessing

        Alternative 7: 89.3% accurate, 1.3× speedup?

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

          1. Initial program 99.5%

            \[\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. 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| \]
            3. lower-fma.f6499.5

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

              \[\leadsto \left|\mathsf{fma}\left(\color{blue}{ew \cdot \sin t}, \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)\right| \]
            5. *-commutativeN/A

              \[\leadsto \left|\mathsf{fma}\left(\color{blue}{\sin t \cdot ew}, \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)\right| \]
            6. lower-*.f6499.5

              \[\leadsto \left|\mathsf{fma}\left(\color{blue}{\sin t \cdot ew}, \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)\right| \]
            7. lift-/.f64N/A

              \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
            8. lift-/.f64N/A

              \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
            9. associate-/l/N/A

              \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
            10. associate-/r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\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{\frac{eh}{ew}}{\tan t}\right)\right| \]
              2. lower-*.f6499.2

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

              \[\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{\frac{eh}{ew}}{\tan t}\right)\right| \]
            6. Step-by-step derivation
              1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{+259}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{eh}{\sin t} \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{ew}, -0.001388888888888889, \frac{0.041666666666666664}{ew}\right) \cdot t, t, \frac{-0.5}{ew}\right), t \cdot t, \frac{1}{ew}\right)\right) \cdot \left(\cos t \cdot eh\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\mathsf{fma}\left(\cos \tan^{-1} \left(\frac{eh}{ew \cdot t}\right) \cdot \sin t, ew, \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right) \cdot \left(\cos t \cdot eh\right)\right)\right|\\ \end{array} \]
          12. Add Preprocessing

          Alternative 8: 74.1% accurate, 1.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{eh}{\sin t}\\ t_2 := \left|\cos \tan^{-1} \left(\frac{t\_1}{ew} \cdot \cos t\right) \cdot \left(ew \cdot \sin t\right)\right|\\ t_3 := \left|\sin \tan^{-1} \left(t\_1 \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{ew}, -0.001388888888888889, \frac{0.041666666666666664}{ew}\right) \cdot t, t, \frac{-0.5}{ew}\right), t \cdot t, \frac{1}{ew}\right)\right) \cdot \left(\cos t \cdot eh\right)\right|\\ \mathbf{if}\;eh \leq -6.5 \cdot 10^{+75}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;eh \leq -2.05 \cdot 10^{+18}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;eh \leq -1.75 \cdot 10^{-65}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;eh \leq 1.16 \cdot 10^{-86}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
          (FPCore (eh ew t)
           :precision binary64
           (let* ((t_1 (/ eh (sin t)))
                  (t_2 (fabs (* (cos (atan (* (/ t_1 ew) (cos t)))) (* ew (sin t)))))
                  (t_3
                   (fabs
                    (*
                     (sin
                      (atan
                       (*
                        t_1
                        (fma
                         (fma
                          (*
                           (fma
                            (/ (* t t) ew)
                            -0.001388888888888889
                            (/ 0.041666666666666664 ew))
                           t)
                          t
                          (/ -0.5 ew))
                         (* t t)
                         (/ 1.0 ew)))))
                     (* (cos t) eh)))))
             (if (<= eh -6.5e+75)
               t_3
               (if (<= eh -2.05e+18)
                 t_2
                 (if (<= eh -1.75e-65) t_3 (if (<= eh 1.16e-86) t_2 t_3))))))
          double code(double eh, double ew, double t) {
          	double t_1 = eh / sin(t);
          	double t_2 = fabs((cos(atan(((t_1 / ew) * cos(t)))) * (ew * sin(t))));
          	double t_3 = fabs((sin(atan((t_1 * fma(fma((fma(((t * t) / ew), -0.001388888888888889, (0.041666666666666664 / ew)) * t), t, (-0.5 / ew)), (t * t), (1.0 / ew))))) * (cos(t) * eh)));
          	double tmp;
          	if (eh <= -6.5e+75) {
          		tmp = t_3;
          	} else if (eh <= -2.05e+18) {
          		tmp = t_2;
          	} else if (eh <= -1.75e-65) {
          		tmp = t_3;
          	} else if (eh <= 1.16e-86) {
          		tmp = t_2;
          	} else {
          		tmp = t_3;
          	}
          	return tmp;
          }
          
          function code(eh, ew, t)
          	t_1 = Float64(eh / sin(t))
          	t_2 = abs(Float64(cos(atan(Float64(Float64(t_1 / ew) * cos(t)))) * Float64(ew * sin(t))))
          	t_3 = abs(Float64(sin(atan(Float64(t_1 * fma(fma(Float64(fma(Float64(Float64(t * t) / ew), -0.001388888888888889, Float64(0.041666666666666664 / ew)) * t), t, Float64(-0.5 / ew)), Float64(t * t), Float64(1.0 / ew))))) * Float64(cos(t) * eh)))
          	tmp = 0.0
          	if (eh <= -6.5e+75)
          		tmp = t_3;
          	elseif (eh <= -2.05e+18)
          		tmp = t_2;
          	elseif (eh <= -1.75e-65)
          		tmp = t_3;
          	elseif (eh <= 1.16e-86)
          		tmp = t_2;
          	else
          		tmp = t_3;
          	end
          	return tmp
          end
          
          code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh / N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Abs[N[(N[Cos[N[ArcTan[N[(N[(t$95$1 / ew), $MachinePrecision] * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Abs[N[(N[Sin[N[ArcTan[N[(t$95$1 * N[(N[(N[(N[(N[(N[(t * t), $MachinePrecision] / ew), $MachinePrecision] * -0.001388888888888889 + N[(0.041666666666666664 / ew), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] * t + N[(-0.5 / ew), $MachinePrecision]), $MachinePrecision] * N[(t * t), $MachinePrecision] + N[(1.0 / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eh, -6.5e+75], t$95$3, If[LessEqual[eh, -2.05e+18], t$95$2, If[LessEqual[eh, -1.75e-65], t$95$3, If[LessEqual[eh, 1.16e-86], t$95$2, t$95$3]]]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \frac{eh}{\sin t}\\
          t_2 := \left|\cos \tan^{-1} \left(\frac{t\_1}{ew} \cdot \cos t\right) \cdot \left(ew \cdot \sin t\right)\right|\\
          t_3 := \left|\sin \tan^{-1} \left(t\_1 \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{ew}, -0.001388888888888889, \frac{0.041666666666666664}{ew}\right) \cdot t, t, \frac{-0.5}{ew}\right), t \cdot t, \frac{1}{ew}\right)\right) \cdot \left(\cos t \cdot eh\right)\right|\\
          \mathbf{if}\;eh \leq -6.5 \cdot 10^{+75}:\\
          \;\;\;\;t\_3\\
          
          \mathbf{elif}\;eh \leq -2.05 \cdot 10^{+18}:\\
          \;\;\;\;t\_2\\
          
          \mathbf{elif}\;eh \leq -1.75 \cdot 10^{-65}:\\
          \;\;\;\;t\_3\\
          
          \mathbf{elif}\;eh \leq 1.16 \cdot 10^{-86}:\\
          \;\;\;\;t\_2\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_3\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if eh < -6.4999999999999998e75 or -2.05e18 < eh < -1.75000000000000002e-65 or 1.16e-86 < eh

            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. 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. 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| \]
              3. lower-fma.f6499.9

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

                \[\leadsto \left|\mathsf{fma}\left(\color{blue}{ew \cdot \sin t}, \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)\right| \]
              5. *-commutativeN/A

                \[\leadsto \left|\mathsf{fma}\left(\color{blue}{\sin t \cdot ew}, \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)\right| \]
              6. lower-*.f6499.9

                \[\leadsto \left|\mathsf{fma}\left(\color{blue}{\sin t \cdot ew}, \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)\right| \]
              7. lift-/.f64N/A

                \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
              8. lift-/.f64N/A

                \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
              9. associate-/l/N/A

                \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
              10. associate-/r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -6.4999999999999998e75 < eh < -2.05e18 or -1.75000000000000002e-65 < eh < 1.16e-86

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

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

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

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

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -6.5 \cdot 10^{+75}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{eh}{\sin t} \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{ew}, -0.001388888888888889, \frac{0.041666666666666664}{ew}\right) \cdot t, t, \frac{-0.5}{ew}\right), t \cdot t, \frac{1}{ew}\right)\right) \cdot \left(\cos t \cdot eh\right)\right|\\ \mathbf{elif}\;eh \leq -2.05 \cdot 10^{+18}:\\ \;\;\;\;\left|\cos \tan^{-1} \left(\frac{\frac{eh}{\sin t}}{ew} \cdot \cos t\right) \cdot \left(ew \cdot \sin t\right)\right|\\ \mathbf{elif}\;eh \leq -1.75 \cdot 10^{-65}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{eh}{\sin t} \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{ew}, -0.001388888888888889, \frac{0.041666666666666664}{ew}\right) \cdot t, t, \frac{-0.5}{ew}\right), t \cdot t, \frac{1}{ew}\right)\right) \cdot \left(\cos t \cdot eh\right)\right|\\ \mathbf{elif}\;eh \leq 1.16 \cdot 10^{-86}:\\ \;\;\;\;\left|\cos \tan^{-1} \left(\frac{\frac{eh}{\sin t}}{ew} \cdot \cos t\right) \cdot \left(ew \cdot \sin t\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{eh}{\sin t} \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{ew}, -0.001388888888888889, \frac{0.041666666666666664}{ew}\right) \cdot t, t, \frac{-0.5}{ew}\right), t \cdot t, \frac{1}{ew}\right)\right) \cdot \left(\cos t \cdot eh\right)\right|\\ \end{array} \]
            12. Add Preprocessing

            Alternative 9: 61.8% accurate, 1.7× speedup?

            \[\begin{array}{l} \\ \left|\sin \tan^{-1} \left(\frac{eh}{\sin t} \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{ew}, -0.001388888888888889, \frac{0.041666666666666664}{ew}\right) \cdot t, t, \frac{-0.5}{ew}\right), t \cdot t, \frac{1}{ew}\right)\right) \cdot \left(\cos t \cdot eh\right)\right| \end{array} \]
            (FPCore (eh ew t)
             :precision binary64
             (fabs
              (*
               (sin
                (atan
                 (*
                  (/ eh (sin t))
                  (fma
                   (fma
                    (*
                     (fma (/ (* t t) ew) -0.001388888888888889 (/ 0.041666666666666664 ew))
                     t)
                    t
                    (/ -0.5 ew))
                   (* t t)
                   (/ 1.0 ew)))))
               (* (cos t) eh))))
            double code(double eh, double ew, double t) {
            	return fabs((sin(atan(((eh / sin(t)) * fma(fma((fma(((t * t) / ew), -0.001388888888888889, (0.041666666666666664 / ew)) * t), t, (-0.5 / ew)), (t * t), (1.0 / ew))))) * (cos(t) * eh)));
            }
            
            function code(eh, ew, t)
            	return abs(Float64(sin(atan(Float64(Float64(eh / sin(t)) * fma(fma(Float64(fma(Float64(Float64(t * t) / ew), -0.001388888888888889, Float64(0.041666666666666664 / ew)) * t), t, Float64(-0.5 / ew)), Float64(t * t), Float64(1.0 / ew))))) * Float64(cos(t) * eh)))
            end
            
            code[eh_, ew_, t_] := N[Abs[N[(N[Sin[N[ArcTan[N[(N[(eh / N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(N[(t * t), $MachinePrecision] / ew), $MachinePrecision] * -0.001388888888888889 + N[(0.041666666666666664 / ew), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] * t + N[(-0.5 / ew), $MachinePrecision]), $MachinePrecision] * N[(t * t), $MachinePrecision] + N[(1.0 / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
            
            \begin{array}{l}
            
            \\
            \left|\sin \tan^{-1} \left(\frac{eh}{\sin t} \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{ew}, -0.001388888888888889, \frac{0.041666666666666664}{ew}\right) \cdot t, t, \frac{-0.5}{ew}\right), t \cdot t, \frac{1}{ew}\right)\right) \cdot \left(\cos t \cdot eh\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|\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. 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| \]
              3. lower-fma.f6499.8

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

                \[\leadsto \left|\mathsf{fma}\left(\color{blue}{ew \cdot \sin t}, \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)\right| \]
              5. *-commutativeN/A

                \[\leadsto \left|\mathsf{fma}\left(\color{blue}{\sin t \cdot ew}, \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)\right| \]
              6. lower-*.f6499.8

                \[\leadsto \left|\mathsf{fma}\left(\color{blue}{\sin t \cdot ew}, \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)\right| \]
              7. lift-/.f64N/A

                \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
              8. lift-/.f64N/A

                \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
              9. associate-/l/N/A

                \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
              10. associate-/r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left|\sin \tan^{-1} \left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{ew}, -0.001388888888888889, \frac{0.041666666666666664}{ew}\right) \cdot t, t, \frac{-0.5}{ew}\right), t \cdot t, \frac{1}{ew}\right) \cdot \frac{eh}{\sin t}\right) \cdot \left(\cos t \cdot eh\right)\right| \]
              2. Final simplification62.8%

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

              Alternative 10: 51.6% accurate, 2.6× speedup?

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

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

                  \[\leadsto \left|\mathsf{fma}\left(\color{blue}{ew \cdot \sin t}, \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)\right| \]
                5. *-commutativeN/A

                  \[\leadsto \left|\mathsf{fma}\left(\color{blue}{\sin t \cdot ew}, \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)\right| \]
                6. lower-*.f6499.8

                  \[\leadsto \left|\mathsf{fma}\left(\color{blue}{\sin t \cdot ew}, \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)\right| \]
                7. lift-/.f64N/A

                  \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
                8. lift-/.f64N/A

                  \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
                9. associate-/l/N/A

                  \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot ew, \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{\frac{eh}{ew}}{\tan t}\right)\right)\right| \]
                10. associate-/r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 11: 42.9% accurate, 174.0× speedup?

                \[\begin{array}{l} \\ \left|-eh\right| \end{array} \]
                (FPCore (eh ew t) :precision binary64 (fabs (- eh)))
                double code(double eh, double ew, double t) {
                	return fabs(-eh);
                }
                
                real(8) function code(eh, ew, t)
                    real(8), intent (in) :: eh
                    real(8), intent (in) :: ew
                    real(8), intent (in) :: t
                    code = abs(-eh)
                end function
                
                public static double code(double eh, double ew, double t) {
                	return Math.abs(-eh);
                }
                
                def code(eh, ew, t):
                	return math.fabs(-eh)
                
                function code(eh, ew, t)
                	return abs(Float64(-eh))
                end
                
                function tmp = code(eh, ew, t)
                	tmp = abs(-eh);
                end
                
                code[eh_, ew_, t_] := N[Abs[(-eh)], $MachinePrecision]
                
                \begin{array}{l}
                
                \\
                \left|-eh\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|\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. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left|-eh\right| \]
                      2. Add Preprocessing

                      Reproduce

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