Example 2 from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 17.6s
Alternatives: 15
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 15 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(eh \cdot \sin t\right) \cdot \sin t\_1 - \left(ew \cdot \cos t\right) \cdot \cos t\_1\right| \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (atan (/ (* eh (tan t)) (- ew)))))
   (fabs (- (* (* eh (sin t)) (sin t_1)) (* (* ew (cos t)) (cos t_1))))))
double code(double eh, double ew, double t) {
	double t_1 = atan(((eh * tan(t)) / -ew));
	return fabs((((eh * sin(t)) * sin(t_1)) - ((ew * cos(t)) * cos(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((((eh * sin(t)) * sin(t_1)) - ((ew * cos(t)) * cos(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((((eh * Math.sin(t)) * Math.sin(t_1)) - ((ew * Math.cos(t)) * Math.cos(t_1))));
}
def code(eh, ew, t):
	t_1 = math.atan(((eh * math.tan(t)) / -ew))
	return math.fabs((((eh * math.sin(t)) * math.sin(t_1)) - ((ew * math.cos(t)) * math.cos(t_1))))
function code(eh, ew, t)
	t_1 = atan(Float64(Float64(eh * tan(t)) / Float64(-ew)))
	return abs(Float64(Float64(Float64(eh * sin(t)) * sin(t_1)) - Float64(Float64(ew * cos(t)) * cos(t_1))))
end
function tmp = code(eh, ew, t)
	t_1 = atan(((eh * tan(t)) / -ew));
	tmp = abs((((eh * sin(t)) * sin(t_1)) - ((ew * cos(t)) * cos(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[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] - N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[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(eh \cdot \sin t\right) \cdot \sin t\_1 - \left(ew \cdot \cos t\right) \cdot \cos 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(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right) - \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right)\right| \]
  4. Add Preprocessing

Alternative 2: 85.0% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\sin t\_2 \cdot \sin t, eh, \left(\cos t \cdot ew\right) \cdot \cos t\_2\right)\\


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

          if -2e-263 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))))

          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-fabs.f64N/A

              \[\leadsto \color{blue}{\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. rem-sqrt-square-revN/A

              \[\leadsto \color{blue}{\sqrt{\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) \cdot \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)}} \]
            3. sqrt-prodN/A

              \[\leadsto \color{blue}{\sqrt{\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)} \cdot \sqrt{\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)}} \]
            4. rem-square-sqrt99.7

              \[\leadsto \color{blue}{\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)} \]
            5. lift--.f64N/A

              \[\leadsto \color{blue}{\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)} \]
            6. lift-*.f64N/A

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;\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) \leq -2 \cdot 10^{-263}:\\ \;\;\;\;\left|\mathsf{fma}\left(\sin \tan^{-1} \left(\frac{\tan t \cdot eh}{-ew}\right), \frac{\sin t}{ew} \cdot \left(-eh\right), \cos \tan^{-1} \left(\mathsf{fma}\left(\frac{eh}{ew} \cdot 0.3333333333333333, t \cdot t, \frac{eh}{ew}\right) \cdot \left(-t\right)\right) \cdot \cos t\right) \cdot ew\right|\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\sin \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right) \cdot \sin t, eh, \left(\cos t \cdot ew\right) \cdot \cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)\right)\\ \end{array} \]
        6. Add Preprocessing

        Alternative 3: 50.8% accurate, 0.7× speedup?

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

          1. Initial program 99.8%

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

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

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

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

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

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

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

            if -2e-263 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))))

            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. Applied rewrites80.1%

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

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

                \[\leadsto \frac{\cos t \cdot ew - \left(\sin t \cdot eh\right) \cdot \left(\frac{-eh}{ew} \cdot \tan t\right)}{\color{blue}{1}} \]
            6. Recombined 2 regimes into one program.
            7. Final simplification51.2%

              \[\leadsto \begin{array}{l} \mathbf{if}\;\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) \leq -2 \cdot 10^{-263}:\\ \;\;\;\;\left|\cos \tan^{-1} \left(\frac{\sin t}{ew} \cdot \frac{-eh}{\mathsf{fma}\left(\left(t \cdot t\right) \cdot 0.041666666666666664 - 0.5, t \cdot t, 1\right)}\right) \cdot ew\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos t \cdot ew + \left(\sin t \cdot eh\right) \cdot \left(\frac{eh}{ew} \cdot \tan t\right)}{1}\\ \end{array} \]
            8. Add Preprocessing

            Alternative 4: 50.8% accurate, 0.7× speedup?

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

              1. Initial program 99.8%

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

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

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

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

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

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

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

                if -2e-263 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))))

                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. Applied rewrites80.1%

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

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

                    \[\leadsto \frac{\cos t \cdot ew - \left(\sin t \cdot eh\right) \cdot \left(\frac{-eh}{ew} \cdot \tan t\right)}{\color{blue}{1}} \]
                6. Recombined 2 regimes into one program.
                7. Final simplification51.2%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;\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) \leq -2 \cdot 10^{-263}:\\ \;\;\;\;\left|\cos \tan^{-1} \left(\frac{\sin t}{ew} \cdot \frac{-eh}{\mathsf{fma}\left(t \cdot t, -0.5, 1\right)}\right) \cdot ew\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos t \cdot ew + \left(\sin t \cdot eh\right) \cdot \left(\frac{eh}{ew} \cdot \tan t\right)}{1}\\ \end{array} \]
                8. Add Preprocessing

                Alternative 5: 50.6% accurate, 0.7× speedup?

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

                  1. Initial program 99.8%

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

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

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

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

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

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

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

                    if -2e-263 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))))

                    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. Applied rewrites80.1%

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot ew} - \left(-1 \cdot \frac{{eh}^{2}}{ew} + \frac{1}{2} \cdot \frac{{eh}^{2}}{ew}\right), {t}^{2}, ew\right) \]
                      6. distribute-rgt-outN/A

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot ew - \frac{eh \cdot eh}{ew} \cdot \frac{-1}{2}, \color{blue}{t \cdot t}, ew\right) \]
                      13. lower-*.f6426.8

                        \[\leadsto \mathsf{fma}\left(-0.5 \cdot ew - \frac{eh \cdot eh}{ew} \cdot -0.5, \color{blue}{t \cdot t}, ew\right) \]
                    6. Applied rewrites26.8%

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

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

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

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

                        \[\leadsto \color{blue}{\cos t} \cdot ew \]
                    9. Applied rewrites60.6%

                      \[\leadsto \color{blue}{\cos t \cdot ew} \]
                  8. Recombined 2 regimes into one program.
                  9. Final simplification51.1%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\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) \leq -2 \cdot 10^{-263}:\\ \;\;\;\;\left|\cos \tan^{-1} \left(\frac{\sin t}{ew} \cdot \frac{-eh}{\mathsf{fma}\left(t \cdot t, -0.5, 1\right)}\right) \cdot ew\right|\\ \mathbf{else}:\\ \;\;\;\;\cos t \cdot ew\\ \end{array} \]
                  10. Add Preprocessing

                  Alternative 6: 50.6% accurate, 0.7× speedup?

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

                    1. Initial program 99.8%

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

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

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

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

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

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

                      if -2e-263 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))))

                      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. Applied rewrites80.1%

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot ew} - \left(-1 \cdot \frac{{eh}^{2}}{ew} + \frac{1}{2} \cdot \frac{{eh}^{2}}{ew}\right), {t}^{2}, ew\right) \]
                        6. distribute-rgt-outN/A

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot ew - \frac{eh \cdot eh}{ew} \cdot \frac{-1}{2}, \color{blue}{t \cdot t}, ew\right) \]
                        13. lower-*.f6426.8

                          \[\leadsto \mathsf{fma}\left(-0.5 \cdot ew - \frac{eh \cdot eh}{ew} \cdot -0.5, \color{blue}{t \cdot t}, ew\right) \]
                      6. Applied rewrites26.8%

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

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

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

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

                          \[\leadsto \color{blue}{\cos t} \cdot ew \]
                      9. Applied rewrites60.6%

                        \[\leadsto \color{blue}{\cos t \cdot ew} \]
                    7. Recombined 2 regimes into one program.
                    8. Final simplification51.0%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;\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) \leq -2 \cdot 10^{-263}:\\ \;\;\;\;\left|\cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right) \cdot ew\right|\\ \mathbf{else}:\\ \;\;\;\;\cos t \cdot ew\\ \end{array} \]
                    9. Add Preprocessing

                    Alternative 7: 50.0% accurate, 0.8× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{\mathsf{PI}\left(\right)}\\ t_2 := \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right)\\ \mathbf{if}\;\left(ew \cdot \cos t\right) \cdot \cos t\_2 - \left(eh \cdot \sin t\right) \cdot \sin t\_2 \leq -2 \cdot 10^{-263}:\\ \;\;\;\;\left|\sin \left(\mathsf{fma}\left(t\_1, \frac{t\_1}{2}, -\tan^{-1} \left(\frac{eh \cdot t}{ew}\right)\right)\right) \cdot ew\right|\\ \mathbf{else}:\\ \;\;\;\;\cos t \cdot ew\\ \end{array} \end{array} \]
                    (FPCore (eh ew t)
                     :precision binary64
                     (let* ((t_1 (sqrt (PI))) (t_2 (atan (/ (* eh (tan t)) (- ew)))))
                       (if (<=
                            (- (* (* ew (cos t)) (cos t_2)) (* (* eh (sin t)) (sin t_2)))
                            -2e-263)
                         (fabs (* (sin (fma t_1 (/ t_1 2.0) (- (atan (/ (* eh t) ew))))) ew))
                         (* (cos t) ew))))
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := \sqrt{\mathsf{PI}\left(\right)}\\
                    t_2 := \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right)\\
                    \mathbf{if}\;\left(ew \cdot \cos t\right) \cdot \cos t\_2 - \left(eh \cdot \sin t\right) \cdot \sin t\_2 \leq -2 \cdot 10^{-263}:\\
                    \;\;\;\;\left|\sin \left(\mathsf{fma}\left(t\_1, \frac{t\_1}{2}, -\tan^{-1} \left(\frac{eh \cdot t}{ew}\right)\right)\right) \cdot ew\right|\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\cos t \cdot ew\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < -2e-263

                      1. Initial program 99.8%

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

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

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

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

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

                          \[\leadsto \left|\sin \left(\frac{\mathsf{PI}\left(\right)}{2} + \left(-\tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)\right)\right) \cdot ew\right| \]
                        2. Applied rewrites41.5%

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

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

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

                          if -2e-263 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))))

                          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. Applied rewrites80.1%

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot ew} - \left(-1 \cdot \frac{{eh}^{2}}{ew} + \frac{1}{2} \cdot \frac{{eh}^{2}}{ew}\right), {t}^{2}, ew\right) \]
                            6. distribute-rgt-outN/A

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot ew - \frac{eh \cdot eh}{ew} \cdot \frac{-1}{2}, \color{blue}{t \cdot t}, ew\right) \]
                            13. lower-*.f6426.8

                              \[\leadsto \mathsf{fma}\left(-0.5 \cdot ew - \frac{eh \cdot eh}{ew} \cdot -0.5, \color{blue}{t \cdot t}, ew\right) \]
                          6. Applied rewrites26.8%

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

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

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

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

                              \[\leadsto \color{blue}{\cos t} \cdot ew \]
                          9. Applied rewrites60.6%

                            \[\leadsto \color{blue}{\cos t \cdot ew} \]
                        5. Recombined 2 regimes into one program.
                        6. Final simplification50.6%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;\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) \leq -2 \cdot 10^{-263}:\\ \;\;\;\;\left|\sin \left(\mathsf{fma}\left(\sqrt{\mathsf{PI}\left(\right)}, \frac{\sqrt{\mathsf{PI}\left(\right)}}{2}, -\tan^{-1} \left(\frac{eh \cdot t}{ew}\right)\right)\right) \cdot ew\right|\\ \mathbf{else}:\\ \;\;\;\;\cos t \cdot ew\\ \end{array} \]
                        7. Add Preprocessing

                        Alternative 8: 50.0% accurate, 0.8× speedup?

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

                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

                              if -2e-263 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))))

                              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. Applied rewrites80.1%

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot ew} - \left(-1 \cdot \frac{{eh}^{2}}{ew} + \frac{1}{2} \cdot \frac{{eh}^{2}}{ew}\right), {t}^{2}, ew\right) \]
                                6. distribute-rgt-outN/A

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot ew - \frac{eh \cdot eh}{ew} \cdot \frac{-1}{2}, \color{blue}{t \cdot t}, ew\right) \]
                                13. lower-*.f6426.8

                                  \[\leadsto \mathsf{fma}\left(-0.5 \cdot ew - \frac{eh \cdot eh}{ew} \cdot -0.5, \color{blue}{t \cdot t}, ew\right) \]
                              6. Applied rewrites26.8%

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

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

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

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

                                  \[\leadsto \color{blue}{\cos t} \cdot ew \]
                              9. Applied rewrites60.6%

                                \[\leadsto \color{blue}{\cos t \cdot ew} \]
                            4. Recombined 2 regimes into one program.
                            5. Final simplification50.6%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\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) \leq -2 \cdot 10^{-263}:\\ \;\;\;\;\left|\cos \tan^{-1} \left(\frac{-eh}{ew} \cdot t\right) \cdot ew\right|\\ \mathbf{else}:\\ \;\;\;\;\cos t \cdot ew\\ \end{array} \]
                            6. Add Preprocessing

                            Alternative 9: 80.9% accurate, 1.0× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := -\sin t\\ t_2 := \left|\cos \tan^{-1} \left(\frac{t\_1}{ew} \cdot \frac{eh}{\cos t}\right) \cdot \left(\cos t \cdot ew\right)\right|\\ t_3 := \left|\mathsf{fma}\left(\sin \tan^{-1} \left(\frac{\tan t \cdot eh}{-ew}\right), \frac{\sin t}{ew} \cdot \left(-eh\right), \cos \tan^{-1} \left(\mathsf{fma}\left(\frac{eh}{ew} \cdot 0.3333333333333333, t \cdot t, \frac{eh}{ew}\right) \cdot \left(-t\right)\right) \cdot \cos t\right) \cdot ew\right|\\ \mathbf{if}\;ew \leq -2.8 \cdot 10^{+81}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;ew \leq -4 \cdot 10^{-193}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;ew \leq 2.15 \cdot 10^{-178}:\\ \;\;\;\;\left|\left(\tanh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right) \cdot t\_1\right) \cdot eh\right|\\ \mathbf{elif}\;ew \leq 3.1 \cdot 10^{+37}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                            (FPCore (eh ew t)
                             :precision binary64
                             (let* ((t_1 (- (sin t)))
                                    (t_2
                                     (fabs (* (cos (atan (* (/ t_1 ew) (/ eh (cos t))))) (* (cos t) ew))))
                                    (t_3
                                     (fabs
                                      (*
                                       (fma
                                        (sin (atan (/ (* (tan t) eh) (- ew))))
                                        (* (/ (sin t) ew) (- eh))
                                        (*
                                         (cos
                                          (atan
                                           (*
                                            (fma (* (/ eh ew) 0.3333333333333333) (* t t) (/ eh ew))
                                            (- t))))
                                         (cos t)))
                                       ew))))
                               (if (<= ew -2.8e+81)
                                 t_2
                                 (if (<= ew -4e-193)
                                   t_3
                                   (if (<= ew 2.15e-178)
                                     (fabs (* (* (tanh (asinh (* (/ (tan t) ew) (- eh)))) t_1) eh))
                                     (if (<= ew 3.1e+37) t_3 t_2))))))
                            double code(double eh, double ew, double t) {
                            	double t_1 = -sin(t);
                            	double t_2 = fabs((cos(atan(((t_1 / ew) * (eh / cos(t))))) * (cos(t) * ew)));
                            	double t_3 = fabs((fma(sin(atan(((tan(t) * eh) / -ew))), ((sin(t) / ew) * -eh), (cos(atan((fma(((eh / ew) * 0.3333333333333333), (t * t), (eh / ew)) * -t))) * cos(t))) * ew));
                            	double tmp;
                            	if (ew <= -2.8e+81) {
                            		tmp = t_2;
                            	} else if (ew <= -4e-193) {
                            		tmp = t_3;
                            	} else if (ew <= 2.15e-178) {
                            		tmp = fabs(((tanh(asinh(((tan(t) / ew) * -eh))) * t_1) * eh));
                            	} else if (ew <= 3.1e+37) {
                            		tmp = t_3;
                            	} else {
                            		tmp = t_2;
                            	}
                            	return tmp;
                            }
                            
                            function code(eh, ew, t)
                            	t_1 = Float64(-sin(t))
                            	t_2 = abs(Float64(cos(atan(Float64(Float64(t_1 / ew) * Float64(eh / cos(t))))) * Float64(cos(t) * ew)))
                            	t_3 = abs(Float64(fma(sin(atan(Float64(Float64(tan(t) * eh) / Float64(-ew)))), Float64(Float64(sin(t) / ew) * Float64(-eh)), Float64(cos(atan(Float64(fma(Float64(Float64(eh / ew) * 0.3333333333333333), Float64(t * t), Float64(eh / ew)) * Float64(-t)))) * cos(t))) * ew))
                            	tmp = 0.0
                            	if (ew <= -2.8e+81)
                            		tmp = t_2;
                            	elseif (ew <= -4e-193)
                            		tmp = t_3;
                            	elseif (ew <= 2.15e-178)
                            		tmp = abs(Float64(Float64(tanh(asinh(Float64(Float64(tan(t) / ew) * Float64(-eh)))) * t_1) * eh));
                            	elseif (ew <= 3.1e+37)
                            		tmp = t_3;
                            	else
                            		tmp = t_2;
                            	end
                            	return tmp
                            end
                            
                            code[eh_, ew_, t_] := Block[{t$95$1 = (-N[Sin[t], $MachinePrecision])}, Block[{t$95$2 = N[Abs[N[(N[Cos[N[ArcTan[N[(N[(t$95$1 / ew), $MachinePrecision] * N[(eh / N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Abs[N[(N[(N[Sin[N[ArcTan[N[(N[(N[Tan[t], $MachinePrecision] * eh), $MachinePrecision] / (-ew)), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[(N[Sin[t], $MachinePrecision] / ew), $MachinePrecision] * (-eh)), $MachinePrecision] + N[(N[Cos[N[ArcTan[N[(N[(N[(N[(eh / ew), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] * N[(t * t), $MachinePrecision] + N[(eh / ew), $MachinePrecision]), $MachinePrecision] * (-t)), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * ew), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -2.8e+81], t$95$2, If[LessEqual[ew, -4e-193], t$95$3, If[LessEqual[ew, 2.15e-178], N[Abs[N[(N[(N[Tanh[N[ArcSinh[N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * (-eh)), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 3.1e+37], t$95$3, t$95$2]]]]]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            t_1 := -\sin t\\
                            t_2 := \left|\cos \tan^{-1} \left(\frac{t\_1}{ew} \cdot \frac{eh}{\cos t}\right) \cdot \left(\cos t \cdot ew\right)\right|\\
                            t_3 := \left|\mathsf{fma}\left(\sin \tan^{-1} \left(\frac{\tan t \cdot eh}{-ew}\right), \frac{\sin t}{ew} \cdot \left(-eh\right), \cos \tan^{-1} \left(\mathsf{fma}\left(\frac{eh}{ew} \cdot 0.3333333333333333, t \cdot t, \frac{eh}{ew}\right) \cdot \left(-t\right)\right) \cdot \cos t\right) \cdot ew\right|\\
                            \mathbf{if}\;ew \leq -2.8 \cdot 10^{+81}:\\
                            \;\;\;\;t\_2\\
                            
                            \mathbf{elif}\;ew \leq -4 \cdot 10^{-193}:\\
                            \;\;\;\;t\_3\\
                            
                            \mathbf{elif}\;ew \leq 2.15 \cdot 10^{-178}:\\
                            \;\;\;\;\left|\left(\tanh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right) \cdot t\_1\right) \cdot eh\right|\\
                            
                            \mathbf{elif}\;ew \leq 3.1 \cdot 10^{+37}:\\
                            \;\;\;\;t\_3\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_2\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if ew < -2.79999999999999995e81 or 3.1000000000000002e37 < ew

                              1. Initial program 99.8%

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

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

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

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

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

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

                              if -2.79999999999999995e81 < ew < -4.0000000000000002e-193 or 2.15e-178 < ew < 3.1000000000000002e37

                              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

                                    if -4.0000000000000002e-193 < ew < 2.15e-178

                                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -2.8 \cdot 10^{+81}:\\ \;\;\;\;\left|\cos \tan^{-1} \left(\frac{-\sin t}{ew} \cdot \frac{eh}{\cos t}\right) \cdot \left(\cos t \cdot ew\right)\right|\\ \mathbf{elif}\;ew \leq -4 \cdot 10^{-193}:\\ \;\;\;\;\left|\mathsf{fma}\left(\sin \tan^{-1} \left(\frac{\tan t \cdot eh}{-ew}\right), \frac{\sin t}{ew} \cdot \left(-eh\right), \cos \tan^{-1} \left(\mathsf{fma}\left(\frac{eh}{ew} \cdot 0.3333333333333333, t \cdot t, \frac{eh}{ew}\right) \cdot \left(-t\right)\right) \cdot \cos t\right) \cdot ew\right|\\ \mathbf{elif}\;ew \leq 2.15 \cdot 10^{-178}:\\ \;\;\;\;\left|\left(\tanh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right) \cdot \left(-\sin t\right)\right) \cdot eh\right|\\ \mathbf{elif}\;ew \leq 3.1 \cdot 10^{+37}:\\ \;\;\;\;\left|\mathsf{fma}\left(\sin \tan^{-1} \left(\frac{\tan t \cdot eh}{-ew}\right), \frac{\sin t}{ew} \cdot \left(-eh\right), \cos \tan^{-1} \left(\mathsf{fma}\left(\frac{eh}{ew} \cdot 0.3333333333333333, t \cdot t, \frac{eh}{ew}\right) \cdot \left(-t\right)\right) \cdot \cos t\right) \cdot ew\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\cos \tan^{-1} \left(\frac{-\sin t}{ew} \cdot \frac{eh}{\cos t}\right) \cdot \left(\cos t \cdot ew\right)\right|\\ \end{array} \]
                                    9. Add Preprocessing

                                    Alternative 10: 74.1% accurate, 1.6× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := -\sin t\\ \mathbf{if}\;ew \leq -2.9 \cdot 10^{-93} \lor \neg \left(ew \leq 2.7 \cdot 10^{+16}\right):\\ \;\;\;\;\left|\cos \tan^{-1} \left(\frac{t\_1}{ew} \cdot \frac{eh}{\cos t}\right) \cdot \left(\cos t \cdot ew\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(\tanh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right) \cdot t\_1\right) \cdot eh\right|\\ \end{array} \end{array} \]
                                    (FPCore (eh ew t)
                                     :precision binary64
                                     (let* ((t_1 (- (sin t))))
                                       (if (or (<= ew -2.9e-93) (not (<= ew 2.7e+16)))
                                         (fabs (* (cos (atan (* (/ t_1 ew) (/ eh (cos t))))) (* (cos t) ew)))
                                         (fabs (* (* (tanh (asinh (* (/ (tan t) ew) (- eh)))) t_1) eh)))))
                                    double code(double eh, double ew, double t) {
                                    	double t_1 = -sin(t);
                                    	double tmp;
                                    	if ((ew <= -2.9e-93) || !(ew <= 2.7e+16)) {
                                    		tmp = fabs((cos(atan(((t_1 / ew) * (eh / cos(t))))) * (cos(t) * ew)));
                                    	} else {
                                    		tmp = fabs(((tanh(asinh(((tan(t) / ew) * -eh))) * t_1) * eh));
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(eh, ew, t):
                                    	t_1 = -math.sin(t)
                                    	tmp = 0
                                    	if (ew <= -2.9e-93) or not (ew <= 2.7e+16):
                                    		tmp = math.fabs((math.cos(math.atan(((t_1 / ew) * (eh / math.cos(t))))) * (math.cos(t) * ew)))
                                    	else:
                                    		tmp = math.fabs(((math.tanh(math.asinh(((math.tan(t) / ew) * -eh))) * t_1) * eh))
                                    	return tmp
                                    
                                    function code(eh, ew, t)
                                    	t_1 = Float64(-sin(t))
                                    	tmp = 0.0
                                    	if ((ew <= -2.9e-93) || !(ew <= 2.7e+16))
                                    		tmp = abs(Float64(cos(atan(Float64(Float64(t_1 / ew) * Float64(eh / cos(t))))) * Float64(cos(t) * ew)));
                                    	else
                                    		tmp = abs(Float64(Float64(tanh(asinh(Float64(Float64(tan(t) / ew) * Float64(-eh)))) * t_1) * eh));
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(eh, ew, t)
                                    	t_1 = -sin(t);
                                    	tmp = 0.0;
                                    	if ((ew <= -2.9e-93) || ~((ew <= 2.7e+16)))
                                    		tmp = abs((cos(atan(((t_1 / ew) * (eh / cos(t))))) * (cos(t) * ew)));
                                    	else
                                    		tmp = abs(((tanh(asinh(((tan(t) / ew) * -eh))) * t_1) * eh));
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[eh_, ew_, t_] := Block[{t$95$1 = (-N[Sin[t], $MachinePrecision])}, If[Or[LessEqual[ew, -2.9e-93], N[Not[LessEqual[ew, 2.7e+16]], $MachinePrecision]], N[Abs[N[(N[Cos[N[ArcTan[N[(N[(t$95$1 / ew), $MachinePrecision] * N[(eh / N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[Tanh[N[ArcSinh[N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * (-eh)), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    t_1 := -\sin t\\
                                    \mathbf{if}\;ew \leq -2.9 \cdot 10^{-93} \lor \neg \left(ew \leq 2.7 \cdot 10^{+16}\right):\\
                                    \;\;\;\;\left|\cos \tan^{-1} \left(\frac{t\_1}{ew} \cdot \frac{eh}{\cos t}\right) \cdot \left(\cos t \cdot ew\right)\right|\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\left|\left(\tanh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right) \cdot t\_1\right) \cdot eh\right|\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if ew < -2.8999999999999998e-93 or 2.7e16 < ew

                                      1. Initial program 99.8%

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

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

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

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

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

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

                                      if -2.8999999999999998e-93 < ew < 2.7e16

                                      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -2.9 \cdot 10^{-93} \lor \neg \left(ew \leq 2.7 \cdot 10^{+16}\right):\\ \;\;\;\;\left|\cos \tan^{-1} \left(\frac{-\sin t}{ew} \cdot \frac{eh}{\cos t}\right) \cdot \left(\cos t \cdot ew\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(\tanh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right) \cdot \left(-\sin t\right)\right) \cdot eh\right|\\ \end{array} \]
                                      9. Add Preprocessing

                                      Alternative 11: 61.8% accurate, 1.9× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -2.9 \cdot 10^{-18}:\\ \;\;\;\;\left|\cos \tan^{-1} \left(\frac{\sin t}{ew} \cdot \frac{-eh}{\mathsf{fma}\left(\left(t \cdot t\right) \cdot 0.041666666666666664 - 0.5, t \cdot t, 1\right)}\right) \cdot ew\right|\\ \mathbf{elif}\;ew \leq 2.75 \cdot 10^{+16}:\\ \;\;\;\;\left|\left(\tanh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right) \cdot \left(-\sin t\right)\right) \cdot eh\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos t \cdot ew + \left(\sin t \cdot eh\right) \cdot \left(\frac{eh}{ew} \cdot \tan t\right)}{1}\\ \end{array} \end{array} \]
                                      (FPCore (eh ew t)
                                       :precision binary64
                                       (if (<= ew -2.9e-18)
                                         (fabs
                                          (*
                                           (cos
                                            (atan
                                             (*
                                              (/ (sin t) ew)
                                              (/
                                               (- eh)
                                               (fma (- (* (* t t) 0.041666666666666664) 0.5) (* t t) 1.0)))))
                                           ew))
                                         (if (<= ew 2.75e+16)
                                           (fabs (* (* (tanh (asinh (* (/ (tan t) ew) (- eh)))) (- (sin t))) eh))
                                           (/ (+ (* (cos t) ew) (* (* (sin t) eh) (* (/ eh ew) (tan t)))) 1.0))))
                                      double code(double eh, double ew, double t) {
                                      	double tmp;
                                      	if (ew <= -2.9e-18) {
                                      		tmp = fabs((cos(atan(((sin(t) / ew) * (-eh / fma((((t * t) * 0.041666666666666664) - 0.5), (t * t), 1.0))))) * ew));
                                      	} else if (ew <= 2.75e+16) {
                                      		tmp = fabs(((tanh(asinh(((tan(t) / ew) * -eh))) * -sin(t)) * eh));
                                      	} else {
                                      		tmp = ((cos(t) * ew) + ((sin(t) * eh) * ((eh / ew) * tan(t)))) / 1.0;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      function code(eh, ew, t)
                                      	tmp = 0.0
                                      	if (ew <= -2.9e-18)
                                      		tmp = abs(Float64(cos(atan(Float64(Float64(sin(t) / ew) * Float64(Float64(-eh) / fma(Float64(Float64(Float64(t * t) * 0.041666666666666664) - 0.5), Float64(t * t), 1.0))))) * ew));
                                      	elseif (ew <= 2.75e+16)
                                      		tmp = abs(Float64(Float64(tanh(asinh(Float64(Float64(tan(t) / ew) * Float64(-eh)))) * Float64(-sin(t))) * eh));
                                      	else
                                      		tmp = Float64(Float64(Float64(cos(t) * ew) + Float64(Float64(sin(t) * eh) * Float64(Float64(eh / ew) * tan(t)))) / 1.0);
                                      	end
                                      	return tmp
                                      end
                                      
                                      code[eh_, ew_, t_] := If[LessEqual[ew, -2.9e-18], N[Abs[N[(N[Cos[N[ArcTan[N[(N[(N[Sin[t], $MachinePrecision] / ew), $MachinePrecision] * N[((-eh) / N[(N[(N[(N[(t * t), $MachinePrecision] * 0.041666666666666664), $MachinePrecision] - 0.5), $MachinePrecision] * N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * ew), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 2.75e+16], N[Abs[N[(N[(N[Tanh[N[ArcSinh[N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * (-eh)), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * (-N[Sin[t], $MachinePrecision])), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision], N[(N[(N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision] + N[(N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision] * N[(N[(eh / ew), $MachinePrecision] * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 1.0), $MachinePrecision]]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      \mathbf{if}\;ew \leq -2.9 \cdot 10^{-18}:\\
                                      \;\;\;\;\left|\cos \tan^{-1} \left(\frac{\sin t}{ew} \cdot \frac{-eh}{\mathsf{fma}\left(\left(t \cdot t\right) \cdot 0.041666666666666664 - 0.5, t \cdot t, 1\right)}\right) \cdot ew\right|\\
                                      
                                      \mathbf{elif}\;ew \leq 2.75 \cdot 10^{+16}:\\
                                      \;\;\;\;\left|\left(\tanh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right) \cdot \left(-\sin t\right)\right) \cdot eh\right|\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\frac{\cos t \cdot ew + \left(\sin t \cdot eh\right) \cdot \left(\frac{eh}{ew} \cdot \tan t\right)}{1}\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 3 regimes
                                      2. if ew < -2.9e-18

                                        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. Taylor expanded in t around 0

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

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

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

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

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

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

                                          if -2.9e-18 < ew < 2.75e16

                                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            if 2.75e16 < ew

                                            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 rewrites63.1%

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

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

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

                                              \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -2.9 \cdot 10^{-18}:\\ \;\;\;\;\left|\cos \tan^{-1} \left(\frac{\sin t}{ew} \cdot \frac{-eh}{\mathsf{fma}\left(\left(t \cdot t\right) \cdot 0.041666666666666664 - 0.5, t \cdot t, 1\right)}\right) \cdot ew\right|\\ \mathbf{elif}\;ew \leq 2.75 \cdot 10^{+16}:\\ \;\;\;\;\left|\left(\tanh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right) \cdot \left(-\sin t\right)\right) \cdot eh\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos t \cdot ew + \left(\sin t \cdot eh\right) \cdot \left(\frac{eh}{ew} \cdot \tan t\right)}{1}\\ \end{array} \]
                                            8. Add Preprocessing

                                            Alternative 12: 59.0% accurate, 2.3× speedup?

                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -2.9 \cdot 10^{-18}:\\ \;\;\;\;\left|\cos \tan^{-1} \left(\frac{\sin t}{ew} \cdot \frac{-eh}{\mathsf{fma}\left(\left(t \cdot t\right) \cdot 0.041666666666666664 - 0.5, t \cdot t, 1\right)}\right) \cdot ew\right|\\ \mathbf{elif}\;ew \leq 2.75 \cdot 10^{+16}:\\ \;\;\;\;\left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\mathsf{fma}\left(0.3333333333333333 \cdot \frac{eh}{ew}, t \cdot t, \frac{eh}{ew}\right) \cdot \left(-t\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos t \cdot ew + \left(\sin t \cdot eh\right) \cdot \left(\frac{eh}{ew} \cdot \tan t\right)}{1}\\ \end{array} \end{array} \]
                                            (FPCore (eh ew t)
                                             :precision binary64
                                             (if (<= ew -2.9e-18)
                                               (fabs
                                                (*
                                                 (cos
                                                  (atan
                                                   (*
                                                    (/ (sin t) ew)
                                                    (/
                                                     (- eh)
                                                     (fma (- (* (* t t) 0.041666666666666664) 0.5) (* t t) 1.0)))))
                                                 ew))
                                               (if (<= ew 2.75e+16)
                                                 (fabs
                                                  (*
                                                   (* (- (sin t)) eh)
                                                   (sin
                                                    (atan
                                                     (* (fma (* 0.3333333333333333 (/ eh ew)) (* t t) (/ eh ew)) (- t))))))
                                                 (/ (+ (* (cos t) ew) (* (* (sin t) eh) (* (/ eh ew) (tan t)))) 1.0))))
                                            double code(double eh, double ew, double t) {
                                            	double tmp;
                                            	if (ew <= -2.9e-18) {
                                            		tmp = fabs((cos(atan(((sin(t) / ew) * (-eh / fma((((t * t) * 0.041666666666666664) - 0.5), (t * t), 1.0))))) * ew));
                                            	} else if (ew <= 2.75e+16) {
                                            		tmp = fabs(((-sin(t) * eh) * sin(atan((fma((0.3333333333333333 * (eh / ew)), (t * t), (eh / ew)) * -t)))));
                                            	} else {
                                            		tmp = ((cos(t) * ew) + ((sin(t) * eh) * ((eh / ew) * tan(t)))) / 1.0;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            function code(eh, ew, t)
                                            	tmp = 0.0
                                            	if (ew <= -2.9e-18)
                                            		tmp = abs(Float64(cos(atan(Float64(Float64(sin(t) / ew) * Float64(Float64(-eh) / fma(Float64(Float64(Float64(t * t) * 0.041666666666666664) - 0.5), Float64(t * t), 1.0))))) * ew));
                                            	elseif (ew <= 2.75e+16)
                                            		tmp = abs(Float64(Float64(Float64(-sin(t)) * eh) * sin(atan(Float64(fma(Float64(0.3333333333333333 * Float64(eh / ew)), Float64(t * t), Float64(eh / ew)) * Float64(-t))))));
                                            	else
                                            		tmp = Float64(Float64(Float64(cos(t) * ew) + Float64(Float64(sin(t) * eh) * Float64(Float64(eh / ew) * tan(t)))) / 1.0);
                                            	end
                                            	return tmp
                                            end
                                            
                                            code[eh_, ew_, t_] := If[LessEqual[ew, -2.9e-18], N[Abs[N[(N[Cos[N[ArcTan[N[(N[(N[Sin[t], $MachinePrecision] / ew), $MachinePrecision] * N[((-eh) / N[(N[(N[(N[(t * t), $MachinePrecision] * 0.041666666666666664), $MachinePrecision] - 0.5), $MachinePrecision] * N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * ew), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 2.75e+16], N[Abs[N[(N[((-N[Sin[t], $MachinePrecision]) * eh), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(N[(0.3333333333333333 * N[(eh / ew), $MachinePrecision]), $MachinePrecision] * N[(t * t), $MachinePrecision] + N[(eh / ew), $MachinePrecision]), $MachinePrecision] * (-t)), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision] + N[(N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision] * N[(N[(eh / ew), $MachinePrecision] * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 1.0), $MachinePrecision]]]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \begin{array}{l}
                                            \mathbf{if}\;ew \leq -2.9 \cdot 10^{-18}:\\
                                            \;\;\;\;\left|\cos \tan^{-1} \left(\frac{\sin t}{ew} \cdot \frac{-eh}{\mathsf{fma}\left(\left(t \cdot t\right) \cdot 0.041666666666666664 - 0.5, t \cdot t, 1\right)}\right) \cdot ew\right|\\
                                            
                                            \mathbf{elif}\;ew \leq 2.75 \cdot 10^{+16}:\\
                                            \;\;\;\;\left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\mathsf{fma}\left(0.3333333333333333 \cdot \frac{eh}{ew}, t \cdot t, \frac{eh}{ew}\right) \cdot \left(-t\right)\right)\right|\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;\frac{\cos t \cdot ew + \left(\sin t \cdot eh\right) \cdot \left(\frac{eh}{ew} \cdot \tan t\right)}{1}\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 3 regimes
                                            2. if ew < -2.9e-18

                                              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. Taylor expanded in t around 0

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

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

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

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

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

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

                                                if -2.9e-18 < ew < 2.75e16

                                                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  if 2.75e16 < ew

                                                  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 rewrites63.1%

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

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

                                                      \[\leadsto \frac{\cos t \cdot ew - \left(\sin t \cdot eh\right) \cdot \left(\frac{-eh}{ew} \cdot \tan t\right)}{\color{blue}{1}} \]
                                                  6. Recombined 3 regimes into one program.
                                                  7. Final simplification62.3%

                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -2.9 \cdot 10^{-18}:\\ \;\;\;\;\left|\cos \tan^{-1} \left(\frac{\sin t}{ew} \cdot \frac{-eh}{\mathsf{fma}\left(\left(t \cdot t\right) \cdot 0.041666666666666664 - 0.5, t \cdot t, 1\right)}\right) \cdot ew\right|\\ \mathbf{elif}\;ew \leq 2.75 \cdot 10^{+16}:\\ \;\;\;\;\left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\mathsf{fma}\left(0.3333333333333333 \cdot \frac{eh}{ew}, t \cdot t, \frac{eh}{ew}\right) \cdot \left(-t\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos t \cdot ew + \left(\sin t \cdot eh\right) \cdot \left(\frac{eh}{ew} \cdot \tan t\right)}{1}\\ \end{array} \]
                                                  8. Add Preprocessing

                                                  Alternative 13: 30.7% accurate, 8.1× speedup?

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

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

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

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

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

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot ew} - \left(-1 \cdot \frac{{eh}^{2}}{ew} + \frac{1}{2} \cdot \frac{{eh}^{2}}{ew}\right), {t}^{2}, ew\right) \]
                                                    6. distribute-rgt-outN/A

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

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

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

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot ew - \frac{eh \cdot eh}{ew} \cdot \frac{-1}{2}, \color{blue}{t \cdot t}, ew\right) \]
                                                    13. lower-*.f6414.4

                                                      \[\leadsto \mathsf{fma}\left(-0.5 \cdot ew - \frac{eh \cdot eh}{ew} \cdot -0.5, \color{blue}{t \cdot t}, ew\right) \]
                                                  6. Applied rewrites14.4%

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

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

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

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

                                                      \[\leadsto \color{blue}{\cos t} \cdot ew \]
                                                  9. Applied rewrites31.1%

                                                    \[\leadsto \color{blue}{\cos t \cdot ew} \]
                                                  10. Add Preprocessing

                                                  Alternative 14: 19.5% accurate, 50.7× speedup?

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

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

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

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

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

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot ew} - \left(-1 \cdot \frac{{eh}^{2}}{ew} + \frac{1}{2} \cdot \frac{{eh}^{2}}{ew}\right), {t}^{2}, ew\right) \]
                                                    6. distribute-rgt-outN/A

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

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

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

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot ew - \frac{eh \cdot eh}{ew} \cdot \frac{-1}{2}, \color{blue}{t \cdot t}, ew\right) \]
                                                    13. lower-*.f6414.4

                                                      \[\leadsto \mathsf{fma}\left(-0.5 \cdot ew - \frac{eh \cdot eh}{ew} \cdot -0.5, \color{blue}{t \cdot t}, ew\right) \]
                                                  6. Applied rewrites14.4%

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

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

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

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

                                                      Alternative 15: 19.4% accurate, 50.7× speedup?

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

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

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

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

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

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

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

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

                                                          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot ew} - \left(-1 \cdot \frac{{eh}^{2}}{ew} + \frac{1}{2} \cdot \frac{{eh}^{2}}{ew}\right), {t}^{2}, ew\right) \]
                                                        6. distribute-rgt-outN/A

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

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

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

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

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

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

                                                          \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot ew - \frac{eh \cdot eh}{ew} \cdot \frac{-1}{2}, \color{blue}{t \cdot t}, ew\right) \]
                                                        13. lower-*.f6414.4

                                                          \[\leadsto \mathsf{fma}\left(-0.5 \cdot ew - \frac{eh \cdot eh}{ew} \cdot -0.5, \color{blue}{t \cdot t}, ew\right) \]
                                                      6. Applied rewrites14.4%

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

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

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

                                                        Reproduce

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