Example 2 from Robby

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

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 51.8% accurate, 0.9× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t\_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))))) < -1e-281

    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.2%

      \[\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(-1 \cdot \frac{eh \cdot t}{ew}\right) \cdot ew\right| \]
    7. Step-by-step derivation
      1. Applied rewrites40.3%

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

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

          \[\leadsto \left|\frac{ew}{1}\right| \]
        3. Step-by-step derivation
          1. Applied rewrites41.4%

            \[\leadsto \left|\frac{ew}{1}\right| \]

          if -1e-281 < (-.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.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 rewrites99.6%

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

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

            \[\leadsto \color{blue}{ew \cdot \cos t} \]
          6. 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.f6466.5

              \[\leadsto \color{blue}{\cos t} \cdot ew \]
          7. Applied rewrites66.5%

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

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

        Alternative 3: 99.0% accurate, 1.1× speedup?

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

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

          \[\leadsto \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{\color{blue}{-1 \cdot \left(eh \cdot t\right)}}{ew}\right)\right| \]
        4. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \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{\color{blue}{\left(-1 \cdot eh\right) \cdot t}}{ew}\right)\right| \]
          2. lower-*.f64N/A

            \[\leadsto \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{\color{blue}{\left(-1 \cdot eh\right) \cdot t}}{ew}\right)\right| \]
          3. mul-1-negN/A

            \[\leadsto \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{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right)} \cdot t}{ew}\right)\right| \]
          4. lower-neg.f6499.2

            \[\leadsto \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{\color{blue}{\left(-eh\right)} \cdot t}{ew}\right)\right| \]
        5. Applied rewrites99.2%

          \[\leadsto \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{\color{blue}{\left(-eh\right) \cdot t}}{ew}\right)\right| \]
        6. Final simplification99.2%

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

        Alternative 4: 94.2% accurate, 1.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \sin t \cdot eh\\ t_2 := \cos t \cdot ew\\ t_3 := \left|\sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot t}{ew}\right) \cdot t\_1 - \cos \tan^{-1} \left(\left(-t\right) \cdot \frac{eh}{ew}\right) \cdot t\_2\right|\\ \mathbf{if}\;eh \leq -60000:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;eh \leq 1.04 \cdot 10^{-22}:\\ \;\;\;\;\frac{1}{\left|\frac{-1}{\frac{\left(\frac{eh}{ew} \cdot \tan t\right) \cdot t\_1 + t\_2}{\sqrt{1 + {\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}}\right|}\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
        (FPCore (eh ew t)
         :precision binary64
         (let* ((t_1 (* (sin t) eh))
                (t_2 (* (cos t) ew))
                (t_3
                 (fabs
                  (-
                   (* (sin (atan (/ (* (- eh) t) ew))) t_1)
                   (* (cos (atan (* (- t) (/ eh ew)))) t_2)))))
           (if (<= eh -60000.0)
             t_3
             (if (<= eh 1.04e-22)
               (/
                1.0
                (fabs
                 (/
                  -1.0
                  (/
                   (+ (* (* (/ eh ew) (tan t)) t_1) t_2)
                   (sqrt (+ 1.0 (pow (* (/ (tan t) ew) eh) 2.0)))))))
               t_3))))
        double code(double eh, double ew, double t) {
        	double t_1 = sin(t) * eh;
        	double t_2 = cos(t) * ew;
        	double t_3 = fabs(((sin(atan(((-eh * t) / ew))) * t_1) - (cos(atan((-t * (eh / ew)))) * t_2)));
        	double tmp;
        	if (eh <= -60000.0) {
        		tmp = t_3;
        	} else if (eh <= 1.04e-22) {
        		tmp = 1.0 / fabs((-1.0 / (((((eh / ew) * tan(t)) * t_1) + t_2) / sqrt((1.0 + pow(((tan(t) / ew) * eh), 2.0))))));
        	} else {
        		tmp = t_3;
        	}
        	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) :: t_2
            real(8) :: t_3
            real(8) :: tmp
            t_1 = sin(t) * eh
            t_2 = cos(t) * ew
            t_3 = abs(((sin(atan(((-eh * t) / ew))) * t_1) - (cos(atan((-t * (eh / ew)))) * t_2)))
            if (eh <= (-60000.0d0)) then
                tmp = t_3
            else if (eh <= 1.04d-22) then
                tmp = 1.0d0 / abs(((-1.0d0) / (((((eh / ew) * tan(t)) * t_1) + t_2) / sqrt((1.0d0 + (((tan(t) / ew) * eh) ** 2.0d0))))))
            else
                tmp = t_3
            end if
            code = tmp
        end function
        
        public static double code(double eh, double ew, double t) {
        	double t_1 = Math.sin(t) * eh;
        	double t_2 = Math.cos(t) * ew;
        	double t_3 = Math.abs(((Math.sin(Math.atan(((-eh * t) / ew))) * t_1) - (Math.cos(Math.atan((-t * (eh / ew)))) * t_2)));
        	double tmp;
        	if (eh <= -60000.0) {
        		tmp = t_3;
        	} else if (eh <= 1.04e-22) {
        		tmp = 1.0 / Math.abs((-1.0 / (((((eh / ew) * Math.tan(t)) * t_1) + t_2) / Math.sqrt((1.0 + Math.pow(((Math.tan(t) / ew) * eh), 2.0))))));
        	} else {
        		tmp = t_3;
        	}
        	return tmp;
        }
        
        def code(eh, ew, t):
        	t_1 = math.sin(t) * eh
        	t_2 = math.cos(t) * ew
        	t_3 = math.fabs(((math.sin(math.atan(((-eh * t) / ew))) * t_1) - (math.cos(math.atan((-t * (eh / ew)))) * t_2)))
        	tmp = 0
        	if eh <= -60000.0:
        		tmp = t_3
        	elif eh <= 1.04e-22:
        		tmp = 1.0 / math.fabs((-1.0 / (((((eh / ew) * math.tan(t)) * t_1) + t_2) / math.sqrt((1.0 + math.pow(((math.tan(t) / ew) * eh), 2.0))))))
        	else:
        		tmp = t_3
        	return tmp
        
        function code(eh, ew, t)
        	t_1 = Float64(sin(t) * eh)
        	t_2 = Float64(cos(t) * ew)
        	t_3 = abs(Float64(Float64(sin(atan(Float64(Float64(Float64(-eh) * t) / ew))) * t_1) - Float64(cos(atan(Float64(Float64(-t) * Float64(eh / ew)))) * t_2)))
        	tmp = 0.0
        	if (eh <= -60000.0)
        		tmp = t_3;
        	elseif (eh <= 1.04e-22)
        		tmp = Float64(1.0 / abs(Float64(-1.0 / Float64(Float64(Float64(Float64(Float64(eh / ew) * tan(t)) * t_1) + t_2) / sqrt(Float64(1.0 + (Float64(Float64(tan(t) / ew) * eh) ^ 2.0)))))));
        	else
        		tmp = t_3;
        	end
        	return tmp
        end
        
        function tmp_2 = code(eh, ew, t)
        	t_1 = sin(t) * eh;
        	t_2 = cos(t) * ew;
        	t_3 = abs(((sin(atan(((-eh * t) / ew))) * t_1) - (cos(atan((-t * (eh / ew)))) * t_2)));
        	tmp = 0.0;
        	if (eh <= -60000.0)
        		tmp = t_3;
        	elseif (eh <= 1.04e-22)
        		tmp = 1.0 / abs((-1.0 / (((((eh / ew) * tan(t)) * t_1) + t_2) / sqrt((1.0 + (((tan(t) / ew) * eh) ^ 2.0))))));
        	else
        		tmp = t_3;
        	end
        	tmp_2 = tmp;
        end
        
        code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision]}, Block[{t$95$2 = N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]}, Block[{t$95$3 = N[Abs[N[(N[(N[Sin[N[ArcTan[N[(N[((-eh) * t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision] - N[(N[Cos[N[ArcTan[N[((-t) * N[(eh / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eh, -60000.0], t$95$3, If[LessEqual[eh, 1.04e-22], N[(1.0 / N[Abs[N[(-1.0 / N[(N[(N[(N[(N[(eh / ew), $MachinePrecision] * N[Tan[t], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + t$95$2), $MachinePrecision] / N[Sqrt[N[(1.0 + N[Power[N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$3]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \sin t \cdot eh\\
        t_2 := \cos t \cdot ew\\
        t_3 := \left|\sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot t}{ew}\right) \cdot t\_1 - \cos \tan^{-1} \left(\left(-t\right) \cdot \frac{eh}{ew}\right) \cdot t\_2\right|\\
        \mathbf{if}\;eh \leq -60000:\\
        \;\;\;\;t\_3\\
        
        \mathbf{elif}\;eh \leq 1.04 \cdot 10^{-22}:\\
        \;\;\;\;\frac{1}{\left|\frac{-1}{\frac{\left(\frac{eh}{ew} \cdot \tan t\right) \cdot t\_1 + t\_2}{\sqrt{1 + {\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}}\right|}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_3\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if eh < -6e4 or 1.04e-22 < eh

          1. Initial program 99.8%

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

            \[\leadsto \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{\color{blue}{-1 \cdot \left(eh \cdot t\right)}}{ew}\right)\right| \]
          4. Step-by-step derivation
            1. associate-*r*N/A

              \[\leadsto \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{\color{blue}{\left(-1 \cdot eh\right) \cdot t}}{ew}\right)\right| \]
            2. lower-*.f64N/A

              \[\leadsto \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{\color{blue}{\left(-1 \cdot eh\right) \cdot t}}{ew}\right)\right| \]
            3. mul-1-negN/A

              \[\leadsto \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{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right)} \cdot t}{ew}\right)\right| \]
            4. lower-neg.f6499.3

              \[\leadsto \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{\color{blue}{\left(-eh\right)} \cdot t}{ew}\right)\right| \]
          5. Applied rewrites99.3%

            \[\leadsto \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{\color{blue}{\left(-eh\right) \cdot t}}{ew}\right)\right| \]
          6. Taylor expanded in t around 0

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

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

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

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

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

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

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

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

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

          if -6e4 < eh < 1.04e-22

          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 rewrites99.6%

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

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

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

        Alternative 5: 82.7% accurate, 1.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -6.2 \cdot 10^{+50}:\\ \;\;\;\;\left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-t\right) \cdot \frac{eh}{ew}\right)\right|\\ \mathbf{elif}\;eh \leq 6.5 \cdot 10^{+42}:\\ \;\;\;\;\frac{1}{\left|\frac{-1}{\frac{\left(\frac{eh}{ew} \cdot \tan t\right) \cdot \left(\sin t \cdot eh\right) + \cos t \cdot ew}{\sqrt{1 + {\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}}\right|}\\ \mathbf{else}:\\ \;\;\;\;\left|\left(\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right) \cdot eh\right) \cdot \sin t\right|\\ \end{array} \end{array} \]
        (FPCore (eh ew t)
         :precision binary64
         (if (<= eh -6.2e+50)
           (fabs (* (* (- (sin t)) eh) (sin (atan (* (- t) (/ eh ew))))))
           (if (<= eh 6.5e+42)
             (/
              1.0
              (fabs
               (/
                -1.0
                (/
                 (+ (* (* (/ eh ew) (tan t)) (* (sin t) eh)) (* (cos t) ew))
                 (sqrt (+ 1.0 (pow (* (/ (tan t) ew) eh) 2.0)))))))
             (fabs (* (* (sin (atan (/ (* eh t) ew))) eh) (sin t))))))
        double code(double eh, double ew, double t) {
        	double tmp;
        	if (eh <= -6.2e+50) {
        		tmp = fabs(((-sin(t) * eh) * sin(atan((-t * (eh / ew))))));
        	} else if (eh <= 6.5e+42) {
        		tmp = 1.0 / fabs((-1.0 / (((((eh / ew) * tan(t)) * (sin(t) * eh)) + (cos(t) * ew)) / sqrt((1.0 + pow(((tan(t) / ew) * eh), 2.0))))));
        	} else {
        		tmp = fabs(((sin(atan(((eh * t) / ew))) * eh) * sin(t)));
        	}
        	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) :: tmp
            if (eh <= (-6.2d+50)) then
                tmp = abs(((-sin(t) * eh) * sin(atan((-t * (eh / ew))))))
            else if (eh <= 6.5d+42) then
                tmp = 1.0d0 / abs(((-1.0d0) / (((((eh / ew) * tan(t)) * (sin(t) * eh)) + (cos(t) * ew)) / sqrt((1.0d0 + (((tan(t) / ew) * eh) ** 2.0d0))))))
            else
                tmp = abs(((sin(atan(((eh * t) / ew))) * eh) * sin(t)))
            end if
            code = tmp
        end function
        
        public static double code(double eh, double ew, double t) {
        	double tmp;
        	if (eh <= -6.2e+50) {
        		tmp = Math.abs(((-Math.sin(t) * eh) * Math.sin(Math.atan((-t * (eh / ew))))));
        	} else if (eh <= 6.5e+42) {
        		tmp = 1.0 / Math.abs((-1.0 / (((((eh / ew) * Math.tan(t)) * (Math.sin(t) * eh)) + (Math.cos(t) * ew)) / Math.sqrt((1.0 + Math.pow(((Math.tan(t) / ew) * eh), 2.0))))));
        	} else {
        		tmp = Math.abs(((Math.sin(Math.atan(((eh * t) / ew))) * eh) * Math.sin(t)));
        	}
        	return tmp;
        }
        
        def code(eh, ew, t):
        	tmp = 0
        	if eh <= -6.2e+50:
        		tmp = math.fabs(((-math.sin(t) * eh) * math.sin(math.atan((-t * (eh / ew))))))
        	elif eh <= 6.5e+42:
        		tmp = 1.0 / math.fabs((-1.0 / (((((eh / ew) * math.tan(t)) * (math.sin(t) * eh)) + (math.cos(t) * ew)) / math.sqrt((1.0 + math.pow(((math.tan(t) / ew) * eh), 2.0))))))
        	else:
        		tmp = math.fabs(((math.sin(math.atan(((eh * t) / ew))) * eh) * math.sin(t)))
        	return tmp
        
        function code(eh, ew, t)
        	tmp = 0.0
        	if (eh <= -6.2e+50)
        		tmp = abs(Float64(Float64(Float64(-sin(t)) * eh) * sin(atan(Float64(Float64(-t) * Float64(eh / ew))))));
        	elseif (eh <= 6.5e+42)
        		tmp = Float64(1.0 / abs(Float64(-1.0 / Float64(Float64(Float64(Float64(Float64(eh / ew) * tan(t)) * Float64(sin(t) * eh)) + Float64(cos(t) * ew)) / sqrt(Float64(1.0 + (Float64(Float64(tan(t) / ew) * eh) ^ 2.0)))))));
        	else
        		tmp = abs(Float64(Float64(sin(atan(Float64(Float64(eh * t) / ew))) * eh) * sin(t)));
        	end
        	return tmp
        end
        
        function tmp_2 = code(eh, ew, t)
        	tmp = 0.0;
        	if (eh <= -6.2e+50)
        		tmp = abs(((-sin(t) * eh) * sin(atan((-t * (eh / ew))))));
        	elseif (eh <= 6.5e+42)
        		tmp = 1.0 / abs((-1.0 / (((((eh / ew) * tan(t)) * (sin(t) * eh)) + (cos(t) * ew)) / sqrt((1.0 + (((tan(t) / ew) * eh) ^ 2.0))))));
        	else
        		tmp = abs(((sin(atan(((eh * t) / ew))) * eh) * sin(t)));
        	end
        	tmp_2 = tmp;
        end
        
        code[eh_, ew_, t_] := If[LessEqual[eh, -6.2e+50], N[Abs[N[(N[((-N[Sin[t], $MachinePrecision]) * eh), $MachinePrecision] * N[Sin[N[ArcTan[N[((-t) * N[(eh / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[eh, 6.5e+42], N[(1.0 / N[Abs[N[(-1.0 / N[(N[(N[(N[(N[(eh / ew), $MachinePrecision] * N[Tan[t], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision]), $MachinePrecision] + N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(1.0 + N[Power[N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Abs[N[(N[(N[Sin[N[ArcTan[N[(N[(eh * t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;eh \leq -6.2 \cdot 10^{+50}:\\
        \;\;\;\;\left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-t\right) \cdot \frac{eh}{ew}\right)\right|\\
        
        \mathbf{elif}\;eh \leq 6.5 \cdot 10^{+42}:\\
        \;\;\;\;\frac{1}{\left|\frac{-1}{\frac{\left(\frac{eh}{ew} \cdot \tan t\right) \cdot \left(\sin t \cdot eh\right) + \cos t \cdot ew}{\sqrt{1 + {\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}}\right|}\\
        
        \mathbf{else}:\\
        \;\;\;\;\left|\left(\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right) \cdot eh\right) \cdot \sin t\right|\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if eh < -6.20000000000000006e50

          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 0

            \[\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. associate-*r*N/A

              \[\leadsto \left|-1 \cdot \color{blue}{\left(\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| \]
            2. associate-*r*N/A

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

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

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

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

              \[\leadsto \left|\left(\color{blue}{\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. distribute-neg-frac2N/A

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

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

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

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

            if -6.20000000000000006e50 < eh < 6.50000000000000052e42

            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 rewrites99.6%

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

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

            if 6.50000000000000052e42 < eh

            1. Initial program 99.8%

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

              \[\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. associate-*r*N/A

                \[\leadsto \left|-1 \cdot \color{blue}{\left(\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| \]
              2. associate-*r*N/A

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

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

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

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

                \[\leadsto \left|\left(\color{blue}{\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. distribute-neg-frac2N/A

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

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

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

              \[\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. Applied rewrites68.7%

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -6.2 \cdot 10^{+50}:\\ \;\;\;\;\left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-t\right) \cdot \frac{eh}{ew}\right)\right|\\ \mathbf{elif}\;eh \leq 6.5 \cdot 10^{+42}:\\ \;\;\;\;\frac{1}{\left|\frac{-1}{\frac{\left(\frac{eh}{ew} \cdot \tan t\right) \cdot \left(\sin t \cdot eh\right) + \cos t \cdot ew}{\sqrt{1 + {\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}}\right|}\\ \mathbf{else}:\\ \;\;\;\;\left|\left(\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right) \cdot eh\right) \cdot \sin t\right|\\ \end{array} \]
            11. Add Preprocessing

            Alternative 6: 75.0% accurate, 1.6× speedup?

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

              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 0

                \[\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. associate-*r*N/A

                  \[\leadsto \left|-1 \cdot \color{blue}{\left(\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| \]
                2. associate-*r*N/A

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

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

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

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

                  \[\leadsto \left|\left(\color{blue}{\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. distribute-neg-frac2N/A

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

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

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

                \[\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(-1 \cdot \frac{eh \cdot t}{ew}\right)\right| \]
              7. Step-by-step derivation
                1. Applied rewrites69.7%

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

                if -1.55e58 < eh < 1.6499999999999999e36

                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(\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 rewrites85.1%

                  \[\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 1.6499999999999999e36 < eh

                1. Initial program 99.8%

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

                  \[\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. associate-*r*N/A

                    \[\leadsto \left|-1 \cdot \color{blue}{\left(\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| \]
                  2. associate-*r*N/A

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

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

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

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

                    \[\leadsto \left|\left(\color{blue}{\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. distribute-neg-frac2N/A

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

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

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

                  \[\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. Applied rewrites68.7%

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

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -1.55 \cdot 10^{+58}:\\ \;\;\;\;\left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-t\right) \cdot \frac{eh}{ew}\right)\right|\\ \mathbf{elif}\;eh \leq 1.65 \cdot 10^{+36}:\\ \;\;\;\;\left|\cos \tan^{-1} \left(\frac{eh}{\cos t} \cdot \frac{-\sin t}{ew}\right) \cdot \left(\cos t \cdot ew\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right) \cdot eh\right) \cdot \sin t\right|\\ \end{array} \]
                11. Add Preprocessing

                Alternative 7: 75.0% accurate, 1.9× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -1.55 \cdot 10^{+58}:\\ \;\;\;\;\left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-t\right) \cdot \frac{eh}{ew}\right)\right|\\ \mathbf{elif}\;eh \leq 1.65 \cdot 10^{+36}:\\ \;\;\;\;\left|\frac{\left(-ew\right) \cdot \cos t}{\frac{1}{\cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right) \cdot eh\right) \cdot \sin t\right|\\ \end{array} \end{array} \]
                (FPCore (eh ew t)
                 :precision binary64
                 (if (<= eh -1.55e+58)
                   (fabs (* (* (- (sin t)) eh) (sin (atan (* (- t) (/ eh ew))))))
                   (if (<= eh 1.65e+36)
                     (fabs (/ (* (- ew) (cos t)) (/ 1.0 (cos (atan (* (/ (tan t) ew) eh))))))
                     (fabs (* (* (sin (atan (/ (* eh t) ew))) eh) (sin t))))))
                double code(double eh, double ew, double t) {
                	double tmp;
                	if (eh <= -1.55e+58) {
                		tmp = fabs(((-sin(t) * eh) * sin(atan((-t * (eh / ew))))));
                	} else if (eh <= 1.65e+36) {
                		tmp = fabs(((-ew * cos(t)) / (1.0 / cos(atan(((tan(t) / ew) * eh))))));
                	} else {
                		tmp = fabs(((sin(atan(((eh * t) / ew))) * eh) * sin(t)));
                	}
                	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) :: tmp
                    if (eh <= (-1.55d+58)) then
                        tmp = abs(((-sin(t) * eh) * sin(atan((-t * (eh / ew))))))
                    else if (eh <= 1.65d+36) then
                        tmp = abs(((-ew * cos(t)) / (1.0d0 / cos(atan(((tan(t) / ew) * eh))))))
                    else
                        tmp = abs(((sin(atan(((eh * t) / ew))) * eh) * sin(t)))
                    end if
                    code = tmp
                end function
                
                public static double code(double eh, double ew, double t) {
                	double tmp;
                	if (eh <= -1.55e+58) {
                		tmp = Math.abs(((-Math.sin(t) * eh) * Math.sin(Math.atan((-t * (eh / ew))))));
                	} else if (eh <= 1.65e+36) {
                		tmp = Math.abs(((-ew * Math.cos(t)) / (1.0 / Math.cos(Math.atan(((Math.tan(t) / ew) * eh))))));
                	} else {
                		tmp = Math.abs(((Math.sin(Math.atan(((eh * t) / ew))) * eh) * Math.sin(t)));
                	}
                	return tmp;
                }
                
                def code(eh, ew, t):
                	tmp = 0
                	if eh <= -1.55e+58:
                		tmp = math.fabs(((-math.sin(t) * eh) * math.sin(math.atan((-t * (eh / ew))))))
                	elif eh <= 1.65e+36:
                		tmp = math.fabs(((-ew * math.cos(t)) / (1.0 / math.cos(math.atan(((math.tan(t) / ew) * eh))))))
                	else:
                		tmp = math.fabs(((math.sin(math.atan(((eh * t) / ew))) * eh) * math.sin(t)))
                	return tmp
                
                function code(eh, ew, t)
                	tmp = 0.0
                	if (eh <= -1.55e+58)
                		tmp = abs(Float64(Float64(Float64(-sin(t)) * eh) * sin(atan(Float64(Float64(-t) * Float64(eh / ew))))));
                	elseif (eh <= 1.65e+36)
                		tmp = abs(Float64(Float64(Float64(-ew) * cos(t)) / Float64(1.0 / cos(atan(Float64(Float64(tan(t) / ew) * eh))))));
                	else
                		tmp = abs(Float64(Float64(sin(atan(Float64(Float64(eh * t) / ew))) * eh) * sin(t)));
                	end
                	return tmp
                end
                
                function tmp_2 = code(eh, ew, t)
                	tmp = 0.0;
                	if (eh <= -1.55e+58)
                		tmp = abs(((-sin(t) * eh) * sin(atan((-t * (eh / ew))))));
                	elseif (eh <= 1.65e+36)
                		tmp = abs(((-ew * cos(t)) / (1.0 / cos(atan(((tan(t) / ew) * eh))))));
                	else
                		tmp = abs(((sin(atan(((eh * t) / ew))) * eh) * sin(t)));
                	end
                	tmp_2 = tmp;
                end
                
                code[eh_, ew_, t_] := If[LessEqual[eh, -1.55e+58], N[Abs[N[(N[((-N[Sin[t], $MachinePrecision]) * eh), $MachinePrecision] * N[Sin[N[ArcTan[N[((-t) * N[(eh / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[eh, 1.65e+36], N[Abs[N[(N[((-ew) * N[Cos[t], $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[Cos[N[ArcTan[N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[Sin[N[ArcTan[N[(N[(eh * t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;eh \leq -1.55 \cdot 10^{+58}:\\
                \;\;\;\;\left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-t\right) \cdot \frac{eh}{ew}\right)\right|\\
                
                \mathbf{elif}\;eh \leq 1.65 \cdot 10^{+36}:\\
                \;\;\;\;\left|\frac{\left(-ew\right) \cdot \cos t}{\frac{1}{\cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}}\right|\\
                
                \mathbf{else}:\\
                \;\;\;\;\left|\left(\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right) \cdot eh\right) \cdot \sin t\right|\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if eh < -1.55e58

                  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 0

                    \[\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. associate-*r*N/A

                      \[\leadsto \left|-1 \cdot \color{blue}{\left(\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| \]
                    2. associate-*r*N/A

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

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

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

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

                      \[\leadsto \left|\left(\color{blue}{\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. distribute-neg-frac2N/A

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

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

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

                    \[\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(-1 \cdot \frac{eh \cdot t}{ew}\right)\right| \]
                  7. Step-by-step derivation
                    1. Applied rewrites69.7%

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

                    if -1.55e58 < eh < 1.6499999999999999e36

                    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 rewrites86.4%

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

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

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

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

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

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

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

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

                    if 1.6499999999999999e36 < eh

                    1. Initial program 99.8%

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

                      \[\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. associate-*r*N/A

                        \[\leadsto \left|-1 \cdot \color{blue}{\left(\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| \]
                      2. associate-*r*N/A

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

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

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

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

                        \[\leadsto \left|\left(\color{blue}{\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. distribute-neg-frac2N/A

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

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

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

                      \[\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. Applied rewrites68.7%

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

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

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -1.55 \cdot 10^{+58}:\\ \;\;\;\;\left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-t\right) \cdot \frac{eh}{ew}\right)\right|\\ \mathbf{elif}\;eh \leq 1.65 \cdot 10^{+36}:\\ \;\;\;\;\left|\frac{\left(-ew\right) \cdot \cos t}{\frac{1}{\cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right) \cdot eh\right) \cdot \sin t\right|\\ \end{array} \]
                    11. Add Preprocessing

                    Alternative 8: 62.5% accurate, 2.5× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -8 \cdot 10^{-23}:\\ \;\;\;\;\left|\frac{ew}{1}\right|\\ \mathbf{elif}\;ew \leq 1.36 \cdot 10^{-30}:\\ \;\;\;\;\left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-t\right) \cdot \frac{eh}{ew}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\cos t \cdot ew\\ \end{array} \end{array} \]
                    (FPCore (eh ew t)
                     :precision binary64
                     (if (<= ew -8e-23)
                       (fabs (/ ew 1.0))
                       (if (<= ew 1.36e-30)
                         (fabs (* (* (- (sin t)) eh) (sin (atan (* (- t) (/ eh ew))))))
                         (* (cos t) ew))))
                    double code(double eh, double ew, double t) {
                    	double tmp;
                    	if (ew <= -8e-23) {
                    		tmp = fabs((ew / 1.0));
                    	} else if (ew <= 1.36e-30) {
                    		tmp = fabs(((-sin(t) * eh) * sin(atan((-t * (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) :: tmp
                        if (ew <= (-8d-23)) then
                            tmp = abs((ew / 1.0d0))
                        else if (ew <= 1.36d-30) then
                            tmp = abs(((-sin(t) * eh) * sin(atan((-t * (eh / ew))))))
                        else
                            tmp = cos(t) * ew
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double eh, double ew, double t) {
                    	double tmp;
                    	if (ew <= -8e-23) {
                    		tmp = Math.abs((ew / 1.0));
                    	} else if (ew <= 1.36e-30) {
                    		tmp = Math.abs(((-Math.sin(t) * eh) * Math.sin(Math.atan((-t * (eh / ew))))));
                    	} else {
                    		tmp = Math.cos(t) * ew;
                    	}
                    	return tmp;
                    }
                    
                    def code(eh, ew, t):
                    	tmp = 0
                    	if ew <= -8e-23:
                    		tmp = math.fabs((ew / 1.0))
                    	elif ew <= 1.36e-30:
                    		tmp = math.fabs(((-math.sin(t) * eh) * math.sin(math.atan((-t * (eh / ew))))))
                    	else:
                    		tmp = math.cos(t) * ew
                    	return tmp
                    
                    function code(eh, ew, t)
                    	tmp = 0.0
                    	if (ew <= -8e-23)
                    		tmp = abs(Float64(ew / 1.0));
                    	elseif (ew <= 1.36e-30)
                    		tmp = abs(Float64(Float64(Float64(-sin(t)) * eh) * sin(atan(Float64(Float64(-t) * Float64(eh / ew))))));
                    	else
                    		tmp = Float64(cos(t) * ew);
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(eh, ew, t)
                    	tmp = 0.0;
                    	if (ew <= -8e-23)
                    		tmp = abs((ew / 1.0));
                    	elseif (ew <= 1.36e-30)
                    		tmp = abs(((-sin(t) * eh) * sin(atan((-t * (eh / ew))))));
                    	else
                    		tmp = cos(t) * ew;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[eh_, ew_, t_] := If[LessEqual[ew, -8e-23], N[Abs[N[(ew / 1.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 1.36e-30], N[Abs[N[(N[((-N[Sin[t], $MachinePrecision]) * eh), $MachinePrecision] * N[Sin[N[ArcTan[N[((-t) * N[(eh / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;ew \leq -8 \cdot 10^{-23}:\\
                    \;\;\;\;\left|\frac{ew}{1}\right|\\
                    
                    \mathbf{elif}\;ew \leq 1.36 \cdot 10^{-30}:\\
                    \;\;\;\;\left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-t\right) \cdot \frac{eh}{ew}\right)\right|\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\cos t \cdot ew\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if ew < -7.99999999999999968e-23

                      1. Initial program 99.9%

                        \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
                      2. Add Preprocessing
                      3. 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 rewrites51.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(-1 \cdot \frac{eh \cdot t}{ew}\right) \cdot ew\right| \]
                      7. Step-by-step derivation
                        1. Applied rewrites49.2%

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

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

                            \[\leadsto \left|\frac{ew}{1}\right| \]
                          3. Step-by-step derivation
                            1. Applied rewrites51.6%

                              \[\leadsto \left|\frac{ew}{1}\right| \]

                            if -7.99999999999999968e-23 < ew < 1.36e-30

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

                              \[\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. associate-*r*N/A

                                \[\leadsto \left|-1 \cdot \color{blue}{\left(\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| \]
                              2. associate-*r*N/A

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

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

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

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

                                \[\leadsto \left|\left(\color{blue}{\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. distribute-neg-frac2N/A

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

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

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

                              \[\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(-1 \cdot \frac{eh \cdot t}{ew}\right)\right| \]
                            7. Step-by-step derivation
                              1. Applied rewrites67.8%

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

                              if 1.36e-30 < 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 rewrites99.6%

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

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

                                \[\leadsto \color{blue}{ew \cdot \cos t} \]
                              6. 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.f6473.8

                                  \[\leadsto \color{blue}{\cos t} \cdot ew \]
                              7. Applied rewrites73.8%

                                \[\leadsto \color{blue}{\cos t \cdot ew} \]
                            8. Recombined 3 regimes into one program.
                            9. Final simplification65.5%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -8 \cdot 10^{-23}:\\ \;\;\;\;\left|\frac{ew}{1}\right|\\ \mathbf{elif}\;ew \leq 1.36 \cdot 10^{-30}:\\ \;\;\;\;\left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-t\right) \cdot \frac{eh}{ew}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\cos t \cdot ew\\ \end{array} \]
                            10. Add Preprocessing

                            Alternative 9: 62.5% accurate, 2.5× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -8 \cdot 10^{-23}:\\ \;\;\;\;\left|\frac{ew}{1}\right|\\ \mathbf{elif}\;ew \leq 1.36 \cdot 10^{-30}:\\ \;\;\;\;\left|\left(\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right) \cdot eh\right) \cdot \sin t\right|\\ \mathbf{else}:\\ \;\;\;\;\cos t \cdot ew\\ \end{array} \end{array} \]
                            (FPCore (eh ew t)
                             :precision binary64
                             (if (<= ew -8e-23)
                               (fabs (/ ew 1.0))
                               (if (<= ew 1.36e-30)
                                 (fabs (* (* (sin (atan (/ (* eh t) ew))) eh) (sin t)))
                                 (* (cos t) ew))))
                            double code(double eh, double ew, double t) {
                            	double tmp;
                            	if (ew <= -8e-23) {
                            		tmp = fabs((ew / 1.0));
                            	} else if (ew <= 1.36e-30) {
                            		tmp = fabs(((sin(atan(((eh * t) / ew))) * eh) * sin(t)));
                            	} 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) :: tmp
                                if (ew <= (-8d-23)) then
                                    tmp = abs((ew / 1.0d0))
                                else if (ew <= 1.36d-30) then
                                    tmp = abs(((sin(atan(((eh * t) / ew))) * eh) * sin(t)))
                                else
                                    tmp = cos(t) * ew
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double eh, double ew, double t) {
                            	double tmp;
                            	if (ew <= -8e-23) {
                            		tmp = Math.abs((ew / 1.0));
                            	} else if (ew <= 1.36e-30) {
                            		tmp = Math.abs(((Math.sin(Math.atan(((eh * t) / ew))) * eh) * Math.sin(t)));
                            	} else {
                            		tmp = Math.cos(t) * ew;
                            	}
                            	return tmp;
                            }
                            
                            def code(eh, ew, t):
                            	tmp = 0
                            	if ew <= -8e-23:
                            		tmp = math.fabs((ew / 1.0))
                            	elif ew <= 1.36e-30:
                            		tmp = math.fabs(((math.sin(math.atan(((eh * t) / ew))) * eh) * math.sin(t)))
                            	else:
                            		tmp = math.cos(t) * ew
                            	return tmp
                            
                            function code(eh, ew, t)
                            	tmp = 0.0
                            	if (ew <= -8e-23)
                            		tmp = abs(Float64(ew / 1.0));
                            	elseif (ew <= 1.36e-30)
                            		tmp = abs(Float64(Float64(sin(atan(Float64(Float64(eh * t) / ew))) * eh) * sin(t)));
                            	else
                            		tmp = Float64(cos(t) * ew);
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(eh, ew, t)
                            	tmp = 0.0;
                            	if (ew <= -8e-23)
                            		tmp = abs((ew / 1.0));
                            	elseif (ew <= 1.36e-30)
                            		tmp = abs(((sin(atan(((eh * t) / ew))) * eh) * sin(t)));
                            	else
                            		tmp = cos(t) * ew;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[eh_, ew_, t_] := If[LessEqual[ew, -8e-23], N[Abs[N[(ew / 1.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 1.36e-30], N[Abs[N[(N[(N[Sin[N[ArcTan[N[(N[(eh * t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;ew \leq -8 \cdot 10^{-23}:\\
                            \;\;\;\;\left|\frac{ew}{1}\right|\\
                            
                            \mathbf{elif}\;ew \leq 1.36 \cdot 10^{-30}:\\
                            \;\;\;\;\left|\left(\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right) \cdot eh\right) \cdot \sin t\right|\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\cos t \cdot ew\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if ew < -7.99999999999999968e-23

                              1. Initial program 99.9%

                                \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
                              2. Add Preprocessing
                              3. 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 rewrites51.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(-1 \cdot \frac{eh \cdot t}{ew}\right) \cdot ew\right| \]
                              7. Step-by-step derivation
                                1. Applied rewrites49.2%

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

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

                                    \[\leadsto \left|\frac{ew}{1}\right| \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites51.6%

                                      \[\leadsto \left|\frac{ew}{1}\right| \]

                                    if -7.99999999999999968e-23 < ew < 1.36e-30

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

                                      \[\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. associate-*r*N/A

                                        \[\leadsto \left|-1 \cdot \color{blue}{\left(\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| \]
                                      2. associate-*r*N/A

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

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

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

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

                                        \[\leadsto \left|\left(\color{blue}{\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. distribute-neg-frac2N/A

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

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

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

                                      \[\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. Applied rewrites67.7%

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

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

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

                                      if 1.36e-30 < 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 rewrites99.6%

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

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

                                        \[\leadsto \color{blue}{ew \cdot \cos t} \]
                                      6. 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.f6473.8

                                          \[\leadsto \color{blue}{\cos t} \cdot ew \]
                                      7. Applied rewrites73.8%

                                        \[\leadsto \color{blue}{\cos t \cdot ew} \]
                                    9. Recombined 3 regimes into one program.
                                    10. Final simplification65.5%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -8 \cdot 10^{-23}:\\ \;\;\;\;\left|\frac{ew}{1}\right|\\ \mathbf{elif}\;ew \leq 1.36 \cdot 10^{-30}:\\ \;\;\;\;\left|\left(\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right) \cdot eh\right) \cdot \sin t\right|\\ \mathbf{else}:\\ \;\;\;\;\cos t \cdot ew\\ \end{array} \]
                                    11. Add Preprocessing

                                    Alternative 10: 42.5% accurate, 61.6× speedup?

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

                                      \[\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(-1 \cdot \frac{eh \cdot t}{ew}\right) \cdot ew\right| \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites39.9%

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

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

                                          \[\leadsto \left|\frac{ew}{1}\right| \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites41.9%

                                            \[\leadsto \left|\frac{ew}{1}\right| \]
                                          2. Add Preprocessing

                                          Reproduce

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