Example 2 from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 16.9s
Alternatives: 12
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 12 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 98.4% accurate, 1.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 98.1% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 78.5% accurate, 2.4× speedup?

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

      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -1.0500000000000001e117 < eh < 6.8000000000000002e35

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

            if 6.8000000000000002e35 < eh

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left|eh \cdot \mathsf{fma}\left(\frac{1}{2}, \frac{ew}{eh} \cdot \frac{ew \cdot 1}{eh \cdot \sin t}, \sin t\right)\right| \]
              3. Step-by-step derivation
                1. Applied rewrites85.4%

                  \[\leadsto \left|eh \cdot \mathsf{fma}\left(0.5, \frac{ew}{eh} \cdot \frac{ew \cdot 1}{eh \cdot \sin t}, \sin t\right)\right| \]
              4. Recombined 3 regimes into one program.
              5. Final simplification86.1%

                \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -1.05 \cdot 10^{+117}:\\ \;\;\;\;\left|eh \cdot \mathsf{fma}\left(0.5, \frac{ew}{eh} \cdot \frac{ew \cdot \mathsf{fma}\left(0.5, \cos \left(t + t\right), 0.5\right)}{eh \cdot \sin t}, \sin t\right)\right|\\ \mathbf{elif}\;eh \leq 6.8 \cdot 10^{+35}:\\ \;\;\;\;\left|\mathsf{fma}\left(\frac{t \cdot eh}{\left(-ew\right) \cdot \sqrt{\mathsf{fma}\left(\frac{t \cdot eh}{ew}, \frac{t \cdot eh}{ew}, 1\right)}}, -eh \cdot \sin t, ew \cdot \cos t\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|eh \cdot \mathsf{fma}\left(0.5, \frac{ew}{eh} \cdot \frac{ew \cdot 1}{eh \cdot \sin t}, \sin t\right)\right|\\ \end{array} \]
              6. Add Preprocessing

              Alternative 5: 78.5% accurate, 2.8× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := eh \cdot \sin t\\ t_2 := \left|eh \cdot \mathsf{fma}\left(0.5, \frac{ew}{eh} \cdot \frac{ew \cdot 1}{t\_1}, \sin t\right)\right|\\ t_3 := \frac{t \cdot eh}{ew}\\ \mathbf{if}\;eh \leq -1 \cdot 10^{+117}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;eh \leq 6.8 \cdot 10^{+35}:\\ \;\;\;\;\left|\mathsf{fma}\left(\frac{t \cdot eh}{\left(-ew\right) \cdot \sqrt{\mathsf{fma}\left(t\_3, t\_3, 1\right)}}, -t\_1, ew \cdot \cos t\right)\right|\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
              (FPCore (eh ew t)
               :precision binary64
               (let* ((t_1 (* eh (sin t)))
                      (t_2 (fabs (* eh (fma 0.5 (* (/ ew eh) (/ (* ew 1.0) t_1)) (sin t)))))
                      (t_3 (/ (* t eh) ew)))
                 (if (<= eh -1e+117)
                   t_2
                   (if (<= eh 6.8e+35)
                     (fabs
                      (fma
                       (/ (* t eh) (* (- ew) (sqrt (fma t_3 t_3 1.0))))
                       (- t_1)
                       (* ew (cos t))))
                     t_2))))
              double code(double eh, double ew, double t) {
              	double t_1 = eh * sin(t);
              	double t_2 = fabs((eh * fma(0.5, ((ew / eh) * ((ew * 1.0) / t_1)), sin(t))));
              	double t_3 = (t * eh) / ew;
              	double tmp;
              	if (eh <= -1e+117) {
              		tmp = t_2;
              	} else if (eh <= 6.8e+35) {
              		tmp = fabs(fma(((t * eh) / (-ew * sqrt(fma(t_3, t_3, 1.0)))), -t_1, (ew * cos(t))));
              	} else {
              		tmp = t_2;
              	}
              	return tmp;
              }
              
              function code(eh, ew, t)
              	t_1 = Float64(eh * sin(t))
              	t_2 = abs(Float64(eh * fma(0.5, Float64(Float64(ew / eh) * Float64(Float64(ew * 1.0) / t_1)), sin(t))))
              	t_3 = Float64(Float64(t * eh) / ew)
              	tmp = 0.0
              	if (eh <= -1e+117)
              		tmp = t_2;
              	elseif (eh <= 6.8e+35)
              		tmp = abs(fma(Float64(Float64(t * eh) / Float64(Float64(-ew) * sqrt(fma(t_3, t_3, 1.0)))), Float64(-t_1), Float64(ew * cos(t))));
              	else
              		tmp = t_2;
              	end
              	return tmp
              end
              
              code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Abs[N[(eh * N[(0.5 * N[(N[(ew / eh), $MachinePrecision] * N[(N[(ew * 1.0), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(t * eh), $MachinePrecision] / ew), $MachinePrecision]}, If[LessEqual[eh, -1e+117], t$95$2, If[LessEqual[eh, 6.8e+35], N[Abs[N[(N[(N[(t * eh), $MachinePrecision] / N[((-ew) * N[Sqrt[N[(t$95$3 * t$95$3 + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * (-t$95$1) + N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$2]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := eh \cdot \sin t\\
              t_2 := \left|eh \cdot \mathsf{fma}\left(0.5, \frac{ew}{eh} \cdot \frac{ew \cdot 1}{t\_1}, \sin t\right)\right|\\
              t_3 := \frac{t \cdot eh}{ew}\\
              \mathbf{if}\;eh \leq -1 \cdot 10^{+117}:\\
              \;\;\;\;t\_2\\
              
              \mathbf{elif}\;eh \leq 6.8 \cdot 10^{+35}:\\
              \;\;\;\;\left|\mathsf{fma}\left(\frac{t \cdot eh}{\left(-ew\right) \cdot \sqrt{\mathsf{fma}\left(t\_3, t\_3, 1\right)}}, -t\_1, ew \cdot \cos t\right)\right|\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_2\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if eh < -1.00000000000000005e117 or 6.8000000000000002e35 < eh

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left|eh \cdot \mathsf{fma}\left(\frac{1}{2}, \frac{ew}{eh} \cdot \frac{ew \cdot 1}{eh \cdot \sin t}, \sin t\right)\right| \]
                  3. Step-by-step derivation
                    1. Applied rewrites82.9%

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

                    if -1.00000000000000005e117 < eh < 6.8000000000000002e35

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -1 \cdot 10^{+117}:\\ \;\;\;\;\left|eh \cdot \mathsf{fma}\left(0.5, \frac{ew}{eh} \cdot \frac{ew \cdot 1}{eh \cdot \sin t}, \sin t\right)\right|\\ \mathbf{elif}\;eh \leq 6.8 \cdot 10^{+35}:\\ \;\;\;\;\left|\mathsf{fma}\left(\frac{t \cdot eh}{\left(-ew\right) \cdot \sqrt{\mathsf{fma}\left(\frac{t \cdot eh}{ew}, \frac{t \cdot eh}{ew}, 1\right)}}, -eh \cdot \sin t, ew \cdot \cos t\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|eh \cdot \mathsf{fma}\left(0.5, \frac{ew}{eh} \cdot \frac{ew \cdot 1}{eh \cdot \sin t}, \sin t\right)\right|\\ \end{array} \]
                      5. Add Preprocessing

                      Alternative 6: 74.6% accurate, 3.3× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|eh \cdot \mathsf{fma}\left(0.5, \frac{ew}{eh} \cdot \frac{ew \cdot 1}{eh \cdot \sin t}, \sin t\right)\right|\\ \mathbf{if}\;eh \leq -2.2 \cdot 10^{+91}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;eh \leq 6.8 \cdot 10^{+35}:\\ \;\;\;\;\left|ew \cdot \cos t\right|\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                      (FPCore (eh ew t)
                       :precision binary64
                       (let* ((t_1
                               (fabs
                                (*
                                 eh
                                 (fma 0.5 (* (/ ew eh) (/ (* ew 1.0) (* eh (sin t)))) (sin t))))))
                         (if (<= eh -2.2e+91) t_1 (if (<= eh 6.8e+35) (fabs (* ew (cos t))) t_1))))
                      double code(double eh, double ew, double t) {
                      	double t_1 = fabs((eh * fma(0.5, ((ew / eh) * ((ew * 1.0) / (eh * sin(t)))), sin(t))));
                      	double tmp;
                      	if (eh <= -2.2e+91) {
                      		tmp = t_1;
                      	} else if (eh <= 6.8e+35) {
                      		tmp = fabs((ew * cos(t)));
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      function code(eh, ew, t)
                      	t_1 = abs(Float64(eh * fma(0.5, Float64(Float64(ew / eh) * Float64(Float64(ew * 1.0) / Float64(eh * sin(t)))), sin(t))))
                      	tmp = 0.0
                      	if (eh <= -2.2e+91)
                      		tmp = t_1;
                      	elseif (eh <= 6.8e+35)
                      		tmp = abs(Float64(ew * cos(t)));
                      	else
                      		tmp = t_1;
                      	end
                      	return tmp
                      end
                      
                      code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(eh * N[(0.5 * N[(N[(ew / eh), $MachinePrecision] * N[(N[(ew * 1.0), $MachinePrecision] / N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eh, -2.2e+91], t$95$1, If[LessEqual[eh, 6.8e+35], N[Abs[N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := \left|eh \cdot \mathsf{fma}\left(0.5, \frac{ew}{eh} \cdot \frac{ew \cdot 1}{eh \cdot \sin t}, \sin t\right)\right|\\
                      \mathbf{if}\;eh \leq -2.2 \cdot 10^{+91}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;eh \leq 6.8 \cdot 10^{+35}:\\
                      \;\;\;\;\left|ew \cdot \cos t\right|\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if eh < -2.19999999999999999e91 or 6.8000000000000002e35 < eh

                        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left|eh \cdot \mathsf{fma}\left(\frac{1}{2}, \frac{ew}{eh} \cdot \frac{ew \cdot 1}{eh \cdot \sin t}, \sin t\right)\right| \]
                          3. Step-by-step derivation
                            1. Applied rewrites82.6%

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

                            if -2.19999999999999999e91 < eh < 6.8000000000000002e35

                            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 7: 74.6% accurate, 5.5× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|eh \cdot \mathsf{fma}\left(0.5, \frac{ew}{eh} \cdot \frac{ew}{t \cdot eh}, \sin t\right)\right|\\ \mathbf{if}\;eh \leq -2.2 \cdot 10^{+91}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;eh \leq 6.8 \cdot 10^{+35}:\\ \;\;\;\;\left|ew \cdot \cos t\right|\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                          (FPCore (eh ew t)
                           :precision binary64
                           (let* ((t_1 (fabs (* eh (fma 0.5 (* (/ ew eh) (/ ew (* t eh))) (sin t))))))
                             (if (<= eh -2.2e+91) t_1 (if (<= eh 6.8e+35) (fabs (* ew (cos t))) t_1))))
                          double code(double eh, double ew, double t) {
                          	double t_1 = fabs((eh * fma(0.5, ((ew / eh) * (ew / (t * eh))), sin(t))));
                          	double tmp;
                          	if (eh <= -2.2e+91) {
                          		tmp = t_1;
                          	} else if (eh <= 6.8e+35) {
                          		tmp = fabs((ew * cos(t)));
                          	} else {
                          		tmp = t_1;
                          	}
                          	return tmp;
                          }
                          
                          function code(eh, ew, t)
                          	t_1 = abs(Float64(eh * fma(0.5, Float64(Float64(ew / eh) * Float64(ew / Float64(t * eh))), sin(t))))
                          	tmp = 0.0
                          	if (eh <= -2.2e+91)
                          		tmp = t_1;
                          	elseif (eh <= 6.8e+35)
                          		tmp = abs(Float64(ew * cos(t)));
                          	else
                          		tmp = t_1;
                          	end
                          	return tmp
                          end
                          
                          code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(eh * N[(0.5 * N[(N[(ew / eh), $MachinePrecision] * N[(ew / N[(t * eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eh, -2.2e+91], t$95$1, If[LessEqual[eh, 6.8e+35], N[Abs[N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_1 := \left|eh \cdot \mathsf{fma}\left(0.5, \frac{ew}{eh} \cdot \frac{ew}{t \cdot eh}, \sin t\right)\right|\\
                          \mathbf{if}\;eh \leq -2.2 \cdot 10^{+91}:\\
                          \;\;\;\;t\_1\\
                          
                          \mathbf{elif}\;eh \leq 6.8 \cdot 10^{+35}:\\
                          \;\;\;\;\left|ew \cdot \cos t\right|\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;t\_1\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if eh < -2.19999999999999999e91 or 6.8000000000000002e35 < eh

                            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if -2.19999999999999999e91 < eh < 6.8000000000000002e35

                                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -2.2 \cdot 10^{+91}:\\ \;\;\;\;\left|eh \cdot \mathsf{fma}\left(0.5, \frac{ew}{eh} \cdot \frac{ew}{t \cdot eh}, \sin t\right)\right|\\ \mathbf{elif}\;eh \leq 6.8 \cdot 10^{+35}:\\ \;\;\;\;\left|ew \cdot \cos t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|eh \cdot \mathsf{fma}\left(0.5, \frac{ew}{eh} \cdot \frac{ew}{t \cdot eh}, \sin t\right)\right|\\ \end{array} \]
                              6. Add Preprocessing

                              Alternative 8: 74.3% accurate, 7.2× speedup?

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

                                1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if -2.19999999999999999e91 < eh < 6.8000000000000002e35

                                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 9: 59.3% accurate, 7.2× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|eh \cdot \sin t\right|\\ \mathbf{if}\;t \leq -4.2 \cdot 10^{-49}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.16 \cdot 10^{-160}:\\ \;\;\;\;\left|\mathsf{fma}\left(t \cdot t, ew \cdot -0.5, ew\right)\right|\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                              (FPCore (eh ew t)
                               :precision binary64
                               (let* ((t_1 (fabs (* eh (sin t)))))
                                 (if (<= t -4.2e-49)
                                   t_1
                                   (if (<= t 1.16e-160) (fabs (fma (* t t) (* ew -0.5) ew)) t_1))))
                              double code(double eh, double ew, double t) {
                              	double t_1 = fabs((eh * sin(t)));
                              	double tmp;
                              	if (t <= -4.2e-49) {
                              		tmp = t_1;
                              	} else if (t <= 1.16e-160) {
                              		tmp = fabs(fma((t * t), (ew * -0.5), ew));
                              	} else {
                              		tmp = t_1;
                              	}
                              	return tmp;
                              }
                              
                              function code(eh, ew, t)
                              	t_1 = abs(Float64(eh * sin(t)))
                              	tmp = 0.0
                              	if (t <= -4.2e-49)
                              		tmp = t_1;
                              	elseif (t <= 1.16e-160)
                              		tmp = abs(fma(Float64(t * t), Float64(ew * -0.5), ew));
                              	else
                              		tmp = t_1;
                              	end
                              	return tmp
                              end
                              
                              code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -4.2e-49], t$95$1, If[LessEqual[t, 1.16e-160], N[Abs[N[(N[(t * t), $MachinePrecision] * N[(ew * -0.5), $MachinePrecision] + ew), $MachinePrecision]], $MachinePrecision], t$95$1]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              t_1 := \left|eh \cdot \sin t\right|\\
                              \mathbf{if}\;t \leq -4.2 \cdot 10^{-49}:\\
                              \;\;\;\;t\_1\\
                              
                              \mathbf{elif}\;t \leq 1.16 \cdot 10^{-160}:\\
                              \;\;\;\;\left|\mathsf{fma}\left(t \cdot t, ew \cdot -0.5, ew\right)\right|\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;t\_1\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if t < -4.1999999999999998e-49 or 1.16e-160 < t

                                1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if -4.1999999999999998e-49 < t < 1.16e-160

                                1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \left|{t}^{2} \cdot \color{blue}{\left(\frac{-1}{2} \cdot ew + \left(\frac{-1}{2} \cdot \frac{{eh}^{2}}{ew} - -1 \cdot \frac{{eh}^{2}}{ew}\right)\right)} + ew\right| \]
                                  3. cancel-sign-sub-invN/A

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

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

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

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

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

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

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

                                Alternative 10: 36.3% accurate, 9.7× speedup?

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

                                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \left|{t}^{2} \cdot \color{blue}{\left(\frac{-1}{2} \cdot ew + \left(\frac{-1}{2} \cdot \frac{{eh}^{2}}{ew} - -1 \cdot \frac{{eh}^{2}}{ew}\right)\right)} + ew\right| \]
                                    3. cancel-sign-sub-invN/A

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

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

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

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

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

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

                                      \[\leadsto \left|\mathsf{fma}\left(t \cdot t, ew \cdot \color{blue}{-0.5}, ew\right)\right| \]
                                    2. Step-by-step derivation
                                      1. Applied rewrites41.3%

                                        \[\leadsto \left|\mathsf{fma}\left(t \cdot \left(ew \cdot -0.5\right), \color{blue}{t}, ew\right)\right| \]

                                      if 5.2e31 < eh

                                      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \left|\frac{\frac{1}{2} \cdot \frac{{ew}^{2}}{eh} + eh \cdot \left({t}^{2} \cdot \left(1 + \frac{1}{2} \cdot \left(-1 \cdot \frac{{ew}^{2}}{{eh}^{2}} - \frac{-1}{6} \cdot \frac{{ew}^{2}}{{eh}^{2}}\right)\right)\right)}{\color{blue}{t}}\right| \]
                                      9. Step-by-step derivation
                                        1. Applied rewrites27.9%

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

                                      Alternative 11: 38.8% accurate, 45.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \left|{t}^{2} \cdot \color{blue}{\left(\frac{-1}{2} \cdot ew + \left(\frac{-1}{2} \cdot \frac{{eh}^{2}}{ew} - -1 \cdot \frac{{eh}^{2}}{ew}\right)\right)} + ew\right| \]
                                        3. cancel-sign-sub-invN/A

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

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

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

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

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

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

                                          \[\leadsto \left|\mathsf{fma}\left(t \cdot t, ew \cdot \color{blue}{-0.5}, ew\right)\right| \]
                                        2. Step-by-step derivation
                                          1. Applied rewrites35.9%

                                            \[\leadsto \left|\mathsf{fma}\left(t \cdot \left(ew \cdot -0.5\right), \color{blue}{t}, ew\right)\right| \]
                                          2. Add Preprocessing

                                          Alternative 12: 38.7% accurate, 45.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \left|{t}^{2} \cdot \color{blue}{\left(\frac{-1}{2} \cdot ew + \left(\frac{-1}{2} \cdot \frac{{eh}^{2}}{ew} - -1 \cdot \frac{{eh}^{2}}{ew}\right)\right)} + ew\right| \]
                                            3. cancel-sign-sub-invN/A

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

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

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

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

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

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

                                              \[\leadsto \left|\mathsf{fma}\left(t \cdot t, ew \cdot \color{blue}{-0.5}, ew\right)\right| \]
                                            2. Add Preprocessing

                                            Reproduce

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