Example 2 from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 25.6s
Alternatives: 21
Speedup: 0.9×

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 21 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, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\\
\left|\mathsf{fma}\left(ew, \cos t\_1 \cdot \left(-\cos t\right), eh \cdot \left(\sin t \cdot \sin t\_1\right)\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. Step-by-step derivation
    1. fabs-sub99.8%

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

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

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

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

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

      \[\leadsto \left|\color{blue}{\mathsf{fma}\left(ew, -\cos t \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)}\right| \]
  3. Simplified99.8%

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

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

Alternative 2: 99.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\\
\left|\cos t\_1 \cdot \left(ew \cdot \cos t\right) - eh \cdot \left(\sin t \cdot \sin t\_1\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. Step-by-step derivation
    1. sub-neg99.8%

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

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

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

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

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

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

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

Alternative 3: 94.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := \cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\\
\mathbf{if}\;ew \leq -1.02 \cdot 10^{+117} \lor \neg \left(ew \leq 6.5 \cdot 10^{+122}\right):\\
\;\;\;\;\left|t\_1 \cdot \left(ew \cdot \cos t\right)\right|\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if ew < -1.02e117 or 6.49999999999999963e122 < ew

    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. Step-by-step derivation
      1. sub-neg99.9%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right)\right| \]
      3. distribute-rgt-neg-in99.9%

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

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

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

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

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

        \[\leadsto \left|\color{blue}{\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(-1 \cdot \frac{eh \cdot \tan t}{ew}\right)}\right| \]
      2. *-commutative93.8%

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

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

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

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

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

    if -1.02e117 < ew < 6.49999999999999963e122

    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. Step-by-step derivation
      1. fabs-sub99.8%

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

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

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

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

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

        \[\leadsto \left|\color{blue}{\mathsf{fma}\left(ew, -\cos t \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)}\right| \]
    3. Simplified99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -1.02 \cdot 10^{+117} \lor \neg \left(ew \leq 6.5 \cdot 10^{+122}\right):\\ \;\;\;\;\left|\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \left(ew \cdot \cos t\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|eh \cdot \left(ew \cdot \left(\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \frac{\cos t}{eh}\right) - \sin t \cdot \sin \tan^{-1} \left(eh \cdot \frac{t}{-ew}\right)\right)\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 86.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\\ t_2 := \cos t\_1\\ \mathbf{if}\;eh \leq -4.6 \cdot 10^{-55} \lor \neg \left(eh \leq 9.5 \cdot 10^{-51}\right):\\ \;\;\;\;\left|eh \cdot \left(ew \cdot \frac{t\_2}{eh} - \sin t \cdot \sin t\_1\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|t\_2 \cdot \left(ew \cdot \cos t\right)\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (atan (* eh (/ (tan t) (- ew))))) (t_2 (cos t_1)))
   (if (or (<= eh -4.6e-55) (not (<= eh 9.5e-51)))
     (fabs (* eh (- (* ew (/ t_2 eh)) (* (sin t) (sin t_1)))))
     (fabs (* t_2 (* ew (cos t)))))))
double code(double eh, double ew, double t) {
	double t_1 = atan((eh * (tan(t) / -ew)));
	double t_2 = cos(t_1);
	double tmp;
	if ((eh <= -4.6e-55) || !(eh <= 9.5e-51)) {
		tmp = fabs((eh * ((ew * (t_2 / eh)) - (sin(t) * sin(t_1)))));
	} else {
		tmp = fabs((t_2 * (ew * cos(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) :: t_2
    real(8) :: tmp
    t_1 = atan((eh * (tan(t) / -ew)))
    t_2 = cos(t_1)
    if ((eh <= (-4.6d-55)) .or. (.not. (eh <= 9.5d-51))) then
        tmp = abs((eh * ((ew * (t_2 / eh)) - (sin(t) * sin(t_1)))))
    else
        tmp = abs((t_2 * (ew * cos(t))))
    end if
    code = tmp
end function
public static double code(double eh, double ew, double t) {
	double t_1 = Math.atan((eh * (Math.tan(t) / -ew)));
	double t_2 = Math.cos(t_1);
	double tmp;
	if ((eh <= -4.6e-55) || !(eh <= 9.5e-51)) {
		tmp = Math.abs((eh * ((ew * (t_2 / eh)) - (Math.sin(t) * Math.sin(t_1)))));
	} else {
		tmp = Math.abs((t_2 * (ew * Math.cos(t))));
	}
	return tmp;
}
def code(eh, ew, t):
	t_1 = math.atan((eh * (math.tan(t) / -ew)))
	t_2 = math.cos(t_1)
	tmp = 0
	if (eh <= -4.6e-55) or not (eh <= 9.5e-51):
		tmp = math.fabs((eh * ((ew * (t_2 / eh)) - (math.sin(t) * math.sin(t_1)))))
	else:
		tmp = math.fabs((t_2 * (ew * math.cos(t))))
	return tmp
function code(eh, ew, t)
	t_1 = atan(Float64(eh * Float64(tan(t) / Float64(-ew))))
	t_2 = cos(t_1)
	tmp = 0.0
	if ((eh <= -4.6e-55) || !(eh <= 9.5e-51))
		tmp = abs(Float64(eh * Float64(Float64(ew * Float64(t_2 / eh)) - Float64(sin(t) * sin(t_1)))));
	else
		tmp = abs(Float64(t_2 * Float64(ew * cos(t))));
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	t_1 = atan((eh * (tan(t) / -ew)));
	t_2 = cos(t_1);
	tmp = 0.0;
	if ((eh <= -4.6e-55) || ~((eh <= 9.5e-51)))
		tmp = abs((eh * ((ew * (t_2 / eh)) - (sin(t) * sin(t_1)))));
	else
		tmp = abs((t_2 * (ew * cos(t))));
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$1], $MachinePrecision]}, If[Or[LessEqual[eh, -4.6e-55], N[Not[LessEqual[eh, 9.5e-51]], $MachinePrecision]], N[Abs[N[(eh * N[(N[(ew * N[(t$95$2 / eh), $MachinePrecision]), $MachinePrecision] - N[(N[Sin[t], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(t$95$2 * N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\left|t\_2 \cdot \left(ew \cdot \cos t\right)\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if eh < -4.60000000000000023e-55 or 9.4999999999999998e-51 < 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. Step-by-step derivation
      1. fabs-sub99.8%

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

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

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

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

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

        \[\leadsto \left|\color{blue}{\mathsf{fma}\left(ew, -\cos t \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)}\right| \]
    3. Simplified99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.60000000000000023e-55 < eh < 9.4999999999999998e-51

    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. Step-by-step derivation
      1. sub-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 77.8% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \tan t \cdot \frac{eh}{ew}\\ t_2 := ew \cdot \cos t\\ t_3 := \frac{eh}{\frac{ew}{\tan t}}\\ \mathbf{if}\;ew \leq -1.55 \cdot 10^{-254}:\\ \;\;\;\;\left(-eh\right) \cdot \left(\sin t \cdot \sin \tan^{-1} t\_1\right) - \frac{t\_2}{\mathsf{hypot}\left(1, t\_1\right)}\\ \mathbf{elif}\;ew \leq 9 \cdot 10^{-180}:\\ \;\;\;\;\left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(eh \cdot \frac{t}{-ew}\right)\right)\right|\\ \mathbf{elif}\;ew \leq 7.2 \cdot 10^{+113}:\\ \;\;\;\;\sin \tan^{-1} t\_3 \cdot \left(eh \cdot \sin t\right) + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, t\_3\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot t\_2\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (* (tan t) (/ eh ew)))
        (t_2 (* ew (cos t)))
        (t_3 (/ eh (/ ew (tan t)))))
   (if (<= ew -1.55e-254)
     (- (* (- eh) (* (sin t) (sin (atan t_1)))) (/ t_2 (hypot 1.0 t_1)))
     (if (<= ew 9e-180)
       (fabs (* eh (* (sin t) (sin (atan (* eh (/ t (- ew))))))))
       (if (<= ew 7.2e+113)
         (+
          (* (sin (atan t_3)) (* eh (sin t)))
          (* ew (/ (cos t) (hypot 1.0 t_3))))
         (fabs (* (cos (atan (* eh (/ (tan t) (- ew))))) t_2)))))))
double code(double eh, double ew, double t) {
	double t_1 = tan(t) * (eh / ew);
	double t_2 = ew * cos(t);
	double t_3 = eh / (ew / tan(t));
	double tmp;
	if (ew <= -1.55e-254) {
		tmp = (-eh * (sin(t) * sin(atan(t_1)))) - (t_2 / hypot(1.0, t_1));
	} else if (ew <= 9e-180) {
		tmp = fabs((eh * (sin(t) * sin(atan((eh * (t / -ew)))))));
	} else if (ew <= 7.2e+113) {
		tmp = (sin(atan(t_3)) * (eh * sin(t))) + (ew * (cos(t) / hypot(1.0, t_3)));
	} else {
		tmp = fabs((cos(atan((eh * (tan(t) / -ew)))) * t_2));
	}
	return tmp;
}
public static double code(double eh, double ew, double t) {
	double t_1 = Math.tan(t) * (eh / ew);
	double t_2 = ew * Math.cos(t);
	double t_3 = eh / (ew / Math.tan(t));
	double tmp;
	if (ew <= -1.55e-254) {
		tmp = (-eh * (Math.sin(t) * Math.sin(Math.atan(t_1)))) - (t_2 / Math.hypot(1.0, t_1));
	} else if (ew <= 9e-180) {
		tmp = Math.abs((eh * (Math.sin(t) * Math.sin(Math.atan((eh * (t / -ew)))))));
	} else if (ew <= 7.2e+113) {
		tmp = (Math.sin(Math.atan(t_3)) * (eh * Math.sin(t))) + (ew * (Math.cos(t) / Math.hypot(1.0, t_3)));
	} else {
		tmp = Math.abs((Math.cos(Math.atan((eh * (Math.tan(t) / -ew)))) * t_2));
	}
	return tmp;
}
def code(eh, ew, t):
	t_1 = math.tan(t) * (eh / ew)
	t_2 = ew * math.cos(t)
	t_3 = eh / (ew / math.tan(t))
	tmp = 0
	if ew <= -1.55e-254:
		tmp = (-eh * (math.sin(t) * math.sin(math.atan(t_1)))) - (t_2 / math.hypot(1.0, t_1))
	elif ew <= 9e-180:
		tmp = math.fabs((eh * (math.sin(t) * math.sin(math.atan((eh * (t / -ew)))))))
	elif ew <= 7.2e+113:
		tmp = (math.sin(math.atan(t_3)) * (eh * math.sin(t))) + (ew * (math.cos(t) / math.hypot(1.0, t_3)))
	else:
		tmp = math.fabs((math.cos(math.atan((eh * (math.tan(t) / -ew)))) * t_2))
	return tmp
function code(eh, ew, t)
	t_1 = Float64(tan(t) * Float64(eh / ew))
	t_2 = Float64(ew * cos(t))
	t_3 = Float64(eh / Float64(ew / tan(t)))
	tmp = 0.0
	if (ew <= -1.55e-254)
		tmp = Float64(Float64(Float64(-eh) * Float64(sin(t) * sin(atan(t_1)))) - Float64(t_2 / hypot(1.0, t_1)));
	elseif (ew <= 9e-180)
		tmp = abs(Float64(eh * Float64(sin(t) * sin(atan(Float64(eh * Float64(t / Float64(-ew))))))));
	elseif (ew <= 7.2e+113)
		tmp = Float64(Float64(sin(atan(t_3)) * Float64(eh * sin(t))) + Float64(ew * Float64(cos(t) / hypot(1.0, t_3))));
	else
		tmp = abs(Float64(cos(atan(Float64(eh * Float64(tan(t) / Float64(-ew))))) * t_2));
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	t_1 = tan(t) * (eh / ew);
	t_2 = ew * cos(t);
	t_3 = eh / (ew / tan(t));
	tmp = 0.0;
	if (ew <= -1.55e-254)
		tmp = (-eh * (sin(t) * sin(atan(t_1)))) - (t_2 / hypot(1.0, t_1));
	elseif (ew <= 9e-180)
		tmp = abs((eh * (sin(t) * sin(atan((eh * (t / -ew)))))));
	elseif (ew <= 7.2e+113)
		tmp = (sin(atan(t_3)) * (eh * sin(t))) + (ew * (cos(t) / hypot(1.0, t_3)));
	else
		tmp = abs((cos(atan((eh * (tan(t) / -ew)))) * t_2));
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(eh / N[(ew / N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -1.55e-254], N[(N[((-eh) * N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 / N[Sqrt[1.0 ^ 2 + t$95$1 ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[ew, 9e-180], N[Abs[N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(eh * N[(t / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 7.2e+113], N[(N[(N[Sin[N[ArcTan[t$95$3], $MachinePrecision]], $MachinePrecision] * N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(ew * N[(N[Cos[t], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + t$95$3 ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Abs[N[(N[Cos[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;ew \leq 9 \cdot 10^{-180}:\\
\;\;\;\;\left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(eh \cdot \frac{t}{-ew}\right)\right)\right|\\

\mathbf{elif}\;ew \leq 7.2 \cdot 10^{+113}:\\
\;\;\;\;\sin \tan^{-1} t\_3 \cdot \left(eh \cdot \sin t\right) + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, t\_3\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if ew < -1.54999999999999994e-254

    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. Step-by-step derivation
      1. sub-neg99.9%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right)\right| \]
      3. distribute-rgt-neg-in99.9%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right) + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      3. associate-*r*80.6%

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

        \[\leadsto -\color{blue}{\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right), ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      5. associate-/r/80.6%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \color{blue}{\left(\tan t \cdot \frac{eh}{ew}\right)}, ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      7. associate-*r/80.6%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right), \frac{\color{blue}{\cos t \cdot ew}}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      9. associate-/l*80.6%

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

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

        \[\leadsto -\color{blue}{\left(eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right)\right) + \cos t \cdot \frac{ew}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right)} \]
      2. associate-*r/80.6%

        \[\leadsto -\left(eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right)\right) + \color{blue}{\frac{\cos t \cdot ew}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}}\right) \]
    9. Applied egg-rr80.6%

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

    if -1.54999999999999994e-254 < ew < 9.00000000000000019e-180

    1. Initial program 99.6%

      \[\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. Step-by-step derivation
      1. sub-neg99.6%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right)\right| \]
      3. distribute-rgt-neg-in99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|\color{blue}{-1 \cdot \left(eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot \tan t}{ew}\right)\right)\right)}\right| \]
    9. Step-by-step derivation
      1. associate-*r*87.9%

        \[\leadsto \left|\color{blue}{\left(-1 \cdot eh\right) \cdot \left(\sin t \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot \tan t}{ew}\right)\right)}\right| \]
      2. neg-mul-187.9%

        \[\leadsto \left|\color{blue}{\left(-eh\right)} \cdot \left(\sin t \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot \tan t}{ew}\right)\right)\right| \]
      3. mul-1-neg87.9%

        \[\leadsto \left|\left(-eh\right) \cdot \left(\sin t \cdot \sin \tan^{-1} \color{blue}{\left(-\frac{eh \cdot \tan t}{ew}\right)}\right)\right| \]
      4. distribute-frac-neg287.9%

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

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

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

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

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

        \[\leadsto \left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(-\color{blue}{eh \cdot \frac{t}{ew}}\right) - ew \cdot \left(\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \frac{\cos t}{eh}\right)\right)\right| \]
      3. distribute-lft-neg-in99.2%

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

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

    if 9.00000000000000019e-180 < ew < 7.19999999999999984e113

    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. Step-by-step derivation
      1. sub-neg99.8%

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

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

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

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

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

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

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

    if 7.19999999999999984e113 < ew

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -1.55 \cdot 10^{-254}:\\ \;\;\;\;\left(-eh\right) \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right)\right) - \frac{ew \cdot \cos t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\\ \mathbf{elif}\;ew \leq 9 \cdot 10^{-180}:\\ \;\;\;\;\left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(eh \cdot \frac{t}{-ew}\right)\right)\right|\\ \mathbf{elif}\;ew \leq 7.2 \cdot 10^{+113}:\\ \;\;\;\;\sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right) \cdot \left(eh \cdot \sin t\right) + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \left(ew \cdot \cos t\right)\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 73.8% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;eh \leq -4.8 \cdot 10^{-55}:\\
\;\;\;\;\left|\sin t\_2 \cdot \left(eh \cdot t\right) - ew \cdot t\_3\right|\\

\mathbf{elif}\;eh \leq 3.4 \cdot 10^{+104}:\\
\;\;\;\;\left|t\_3 \cdot \left(ew \cdot \cos t\right)\right|\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if eh < -4.4000000000000003e69 or 3.3999999999999997e104 < eh

    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. Step-by-step derivation
      1. sub-neg99.7%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right)\right| \]
      3. distribute-rgt-neg-in99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|ew \cdot \left(\color{blue}{\log \left(e^{\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \cos t}\right)} - eh \cdot \left(\sin \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \frac{\sin t}{ew}\right)\right)\right| \]
      2. exp-prod82.7%

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

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

      \[\leadsto \left|ew \cdot \left(\log \left({\left(e^{\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)}\right)}^{\cos t}\right) - eh \cdot \left(\sin \tan^{-1} \color{blue}{\left(-1 \cdot \frac{eh \cdot t}{ew}\right)} \cdot \frac{\sin t}{ew}\right)\right)\right| \]
    11. Step-by-step derivation
      1. mul-1-neg98.8%

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

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

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

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

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

        \[\leadsto \left|\color{blue}{-eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot t}{ew}\right)\right)}\right| \]
      2. associate-*r*79.2%

        \[\leadsto \left|-\color{blue}{\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot t}{ew}\right)}\right| \]
      3. distribute-rgt-neg-in79.2%

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

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

        \[\leadsto \left|\left(eh \cdot \sin t\right) \cdot \left(-\sin \tan^{-1} \left(\frac{\color{blue}{-eh \cdot t}}{ew}\right)\right)\right| \]
      6. distribute-lft-neg-in79.2%

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

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

    if -4.4000000000000003e69 < eh < -4.79999999999999983e-55

    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. Step-by-step derivation
      1. fabs-sub99.9%

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

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

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

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

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

        \[\leadsto \left|\color{blue}{\mathsf{fma}\left(ew, -\cos t \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)}\right| \]
    3. Simplified100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.79999999999999983e-55 < eh < 3.3999999999999997e104

    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. Step-by-step derivation
      1. sub-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -4.4 \cdot 10^{+69}:\\ \;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\ \mathbf{elif}\;eh \leq -4.8 \cdot 10^{-55}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \left(eh \cdot t\right) - ew \cdot \cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\right|\\ \mathbf{elif}\;eh \leq 3.4 \cdot 10^{+104}:\\ \;\;\;\;\left|\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \left(ew \cdot \cos t\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 73.8% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;eh \leq -7 \cdot 10^{-55}:\\
\;\;\;\;\left|\left(eh \cdot t\right) \cdot \sin \tan^{-1} \left(eh \cdot \frac{t}{-ew}\right) - ew \cdot t\_2\right|\\

\mathbf{elif}\;eh \leq 4.8 \cdot 10^{+104}:\\
\;\;\;\;\left|t\_2 \cdot \left(ew \cdot \cos t\right)\right|\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if eh < -5.3e70 or 4.8e104 < eh

    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. Step-by-step derivation
      1. sub-neg99.7%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right)\right| \]
      3. distribute-rgt-neg-in99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|ew \cdot \left(\color{blue}{\log \left(e^{\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \cos t}\right)} - eh \cdot \left(\sin \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \frac{\sin t}{ew}\right)\right)\right| \]
      2. exp-prod82.7%

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

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

      \[\leadsto \left|ew \cdot \left(\log \left({\left(e^{\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)}\right)}^{\cos t}\right) - eh \cdot \left(\sin \tan^{-1} \color{blue}{\left(-1 \cdot \frac{eh \cdot t}{ew}\right)} \cdot \frac{\sin t}{ew}\right)\right)\right| \]
    11. Step-by-step derivation
      1. mul-1-neg98.8%

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

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

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

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

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

        \[\leadsto \left|\color{blue}{-eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot t}{ew}\right)\right)}\right| \]
      2. associate-*r*79.2%

        \[\leadsto \left|-\color{blue}{\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot t}{ew}\right)}\right| \]
      3. distribute-rgt-neg-in79.2%

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

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

        \[\leadsto \left|\left(eh \cdot \sin t\right) \cdot \left(-\sin \tan^{-1} \left(\frac{\color{blue}{-eh \cdot t}}{ew}\right)\right)\right| \]
      6. distribute-lft-neg-in79.2%

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

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

    if -5.3e70 < eh < -7.00000000000000051e-55

    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. Step-by-step derivation
      1. sub-neg99.9%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right)\right| \]
      3. distribute-rgt-neg-in99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|ew \cdot \left(\color{blue}{\log \left(e^{\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \cos t}\right)} - eh \cdot \left(\sin \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \frac{\sin t}{ew}\right)\right)\right| \]
      2. exp-prod91.8%

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

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

      \[\leadsto \left|ew \cdot \left(\log \left({\left(e^{\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)}\right)}^{\cos t}\right) - eh \cdot \left(\sin \tan^{-1} \color{blue}{\left(-1 \cdot \frac{eh \cdot t}{ew}\right)} \cdot \frac{\sin t}{ew}\right)\right)\right| \]
    11. Step-by-step derivation
      1. mul-1-neg99.8%

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

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

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

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

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

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

    if -7.00000000000000051e-55 < eh < 4.8e104

    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. Step-by-step derivation
      1. sub-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -5.3 \cdot 10^{+70}:\\ \;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\ \mathbf{elif}\;eh \leq -7 \cdot 10^{-55}:\\ \;\;\;\;\left|\left(eh \cdot t\right) \cdot \sin \tan^{-1} \left(eh \cdot \frac{t}{-ew}\right) - ew \cdot \cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\right|\\ \mathbf{elif}\;eh \leq 4.8 \cdot 10^{+104}:\\ \;\;\;\;\left|\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \left(ew \cdot \cos t\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 74.3% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -9 \cdot 10^{+20} \lor \neg \left(eh \leq 3.4 \cdot 10^{+104}\right):\\ \;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \left(ew \cdot \cos t\right)\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (if (or (<= eh -9e+20) (not (<= eh 3.4e+104)))
   (fabs (* (* eh (sin t)) (sin (atan (/ (* eh (- t)) ew)))))
   (fabs (* (cos (atan (* eh (/ (tan t) (- ew))))) (* ew (cos t))))))
double code(double eh, double ew, double t) {
	double tmp;
	if ((eh <= -9e+20) || !(eh <= 3.4e+104)) {
		tmp = fabs(((eh * sin(t)) * sin(atan(((eh * -t) / ew)))));
	} else {
		tmp = fabs((cos(atan((eh * (tan(t) / -ew)))) * (ew * cos(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 <= (-9d+20)) .or. (.not. (eh <= 3.4d+104))) then
        tmp = abs(((eh * sin(t)) * sin(atan(((eh * -t) / ew)))))
    else
        tmp = abs((cos(atan((eh * (tan(t) / -ew)))) * (ew * cos(t))))
    end if
    code = tmp
end function
public static double code(double eh, double ew, double t) {
	double tmp;
	if ((eh <= -9e+20) || !(eh <= 3.4e+104)) {
		tmp = Math.abs(((eh * Math.sin(t)) * Math.sin(Math.atan(((eh * -t) / ew)))));
	} else {
		tmp = Math.abs((Math.cos(Math.atan((eh * (Math.tan(t) / -ew)))) * (ew * Math.cos(t))));
	}
	return tmp;
}
def code(eh, ew, t):
	tmp = 0
	if (eh <= -9e+20) or not (eh <= 3.4e+104):
		tmp = math.fabs(((eh * math.sin(t)) * math.sin(math.atan(((eh * -t) / ew)))))
	else:
		tmp = math.fabs((math.cos(math.atan((eh * (math.tan(t) / -ew)))) * (ew * math.cos(t))))
	return tmp
function code(eh, ew, t)
	tmp = 0.0
	if ((eh <= -9e+20) || !(eh <= 3.4e+104))
		tmp = abs(Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(eh * Float64(-t)) / ew)))));
	else
		tmp = abs(Float64(cos(atan(Float64(eh * Float64(tan(t) / Float64(-ew))))) * Float64(ew * cos(t))));
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	tmp = 0.0;
	if ((eh <= -9e+20) || ~((eh <= 3.4e+104)))
		tmp = abs(((eh * sin(t)) * sin(atan(((eh * -t) / ew)))));
	else
		tmp = abs((cos(atan((eh * (tan(t) / -ew)))) * (ew * cos(t))));
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -9e+20], N[Not[LessEqual[eh, 3.4e+104]], $MachinePrecision]], N[Abs[N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh * (-t)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[Cos[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;eh \leq -9 \cdot 10^{+20} \lor \neg \left(eh \leq 3.4 \cdot 10^{+104}\right):\\
\;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if eh < -9e20 or 3.3999999999999997e104 < 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. Step-by-step derivation
      1. sub-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|ew \cdot \left(\color{blue}{\log \left(e^{\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \cos t}\right)} - eh \cdot \left(\sin \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \frac{\sin t}{ew}\right)\right)\right| \]
      2. exp-prod82.8%

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

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

      \[\leadsto \left|ew \cdot \left(\log \left({\left(e^{\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)}\right)}^{\cos t}\right) - eh \cdot \left(\sin \tan^{-1} \color{blue}{\left(-1 \cdot \frac{eh \cdot t}{ew}\right)} \cdot \frac{\sin t}{ew}\right)\right)\right| \]
    11. Step-by-step derivation
      1. mul-1-neg98.9%

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

        \[\leadsto \left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(-\color{blue}{eh \cdot \frac{t}{ew}}\right) - ew \cdot \left(\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \frac{\cos t}{eh}\right)\right)\right| \]
      3. distribute-lft-neg-in98.9%

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

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

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

        \[\leadsto \left|\color{blue}{-eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot t}{ew}\right)\right)}\right| \]
      2. associate-*r*76.9%

        \[\leadsto \left|-\color{blue}{\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot t}{ew}\right)}\right| \]
      3. distribute-rgt-neg-in76.9%

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

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

        \[\leadsto \left|\left(eh \cdot \sin t\right) \cdot \left(-\sin \tan^{-1} \left(\frac{\color{blue}{-eh \cdot t}}{ew}\right)\right)\right| \]
      6. distribute-lft-neg-in76.9%

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

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

    if -9e20 < eh < 3.3999999999999997e104

    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. Step-by-step derivation
      1. sub-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 73.8% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\ \mathbf{if}\;eh \leq -9.5 \cdot 10^{+72}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;eh \leq -7 \cdot 10^{-55}:\\ \;\;\;\;\left|ew + eh \cdot \left(t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{-ew}\right)\right)\right|\\ \mathbf{elif}\;eh \leq 3.6 \cdot 10^{+104}:\\ \;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \frac{-1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}\right|\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (fabs (* (* eh (sin t)) (sin (atan (/ (* eh (- t)) ew)))))))
   (if (<= eh -9.5e+72)
     t_1
     (if (<= eh -7e-55)
       (fabs (+ ew (* eh (* t (sin (atan (* (tan t) (/ eh (- ew)))))))))
       (if (<= eh 3.6e+104)
         (fabs (* (* ew (cos t)) (/ -1.0 (hypot 1.0 (* eh (/ (tan t) ew))))))
         t_1)))))
double code(double eh, double ew, double t) {
	double t_1 = fabs(((eh * sin(t)) * sin(atan(((eh * -t) / ew)))));
	double tmp;
	if (eh <= -9.5e+72) {
		tmp = t_1;
	} else if (eh <= -7e-55) {
		tmp = fabs((ew + (eh * (t * sin(atan((tan(t) * (eh / -ew))))))));
	} else if (eh <= 3.6e+104) {
		tmp = fabs(((ew * cos(t)) * (-1.0 / hypot(1.0, (eh * (tan(t) / ew))))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double eh, double ew, double t) {
	double t_1 = Math.abs(((eh * Math.sin(t)) * Math.sin(Math.atan(((eh * -t) / ew)))));
	double tmp;
	if (eh <= -9.5e+72) {
		tmp = t_1;
	} else if (eh <= -7e-55) {
		tmp = Math.abs((ew + (eh * (t * Math.sin(Math.atan((Math.tan(t) * (eh / -ew))))))));
	} else if (eh <= 3.6e+104) {
		tmp = Math.abs(((ew * Math.cos(t)) * (-1.0 / Math.hypot(1.0, (eh * (Math.tan(t) / ew))))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(eh, ew, t):
	t_1 = math.fabs(((eh * math.sin(t)) * math.sin(math.atan(((eh * -t) / ew)))))
	tmp = 0
	if eh <= -9.5e+72:
		tmp = t_1
	elif eh <= -7e-55:
		tmp = math.fabs((ew + (eh * (t * math.sin(math.atan((math.tan(t) * (eh / -ew))))))))
	elif eh <= 3.6e+104:
		tmp = math.fabs(((ew * math.cos(t)) * (-1.0 / math.hypot(1.0, (eh * (math.tan(t) / ew))))))
	else:
		tmp = t_1
	return tmp
function code(eh, ew, t)
	t_1 = abs(Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(eh * Float64(-t)) / ew)))))
	tmp = 0.0
	if (eh <= -9.5e+72)
		tmp = t_1;
	elseif (eh <= -7e-55)
		tmp = abs(Float64(ew + Float64(eh * Float64(t * sin(atan(Float64(tan(t) * Float64(eh / Float64(-ew)))))))));
	elseif (eh <= 3.6e+104)
		tmp = abs(Float64(Float64(ew * cos(t)) * Float64(-1.0 / hypot(1.0, Float64(eh * Float64(tan(t) / ew))))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	t_1 = abs(((eh * sin(t)) * sin(atan(((eh * -t) / ew)))));
	tmp = 0.0;
	if (eh <= -9.5e+72)
		tmp = t_1;
	elseif (eh <= -7e-55)
		tmp = abs((ew + (eh * (t * sin(atan((tan(t) * (eh / -ew))))))));
	elseif (eh <= 3.6e+104)
		tmp = abs(((ew * cos(t)) * (-1.0 / hypot(1.0, (eh * (tan(t) / ew))))));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh * (-t)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eh, -9.5e+72], t$95$1, If[LessEqual[eh, -7e-55], N[Abs[N[(ew + N[(eh * N[(t * N[Sin[N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[(eh / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[eh, 3.6e+104], N[Abs[N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[(-1.0 / N[Sqrt[1.0 ^ 2 + N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

\mathbf{elif}\;eh \leq -7 \cdot 10^{-55}:\\
\;\;\;\;\left|ew + eh \cdot \left(t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{-ew}\right)\right)\right|\\

\mathbf{elif}\;eh \leq 3.6 \cdot 10^{+104}:\\
\;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \frac{-1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}\right|\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if eh < -9.50000000000000054e72 or 3.60000000000000001e104 < eh

    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. Step-by-step derivation
      1. sub-neg99.7%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right)\right| \]
      3. distribute-rgt-neg-in99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|ew \cdot \left(\color{blue}{\log \left(e^{\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \cos t}\right)} - eh \cdot \left(\sin \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \frac{\sin t}{ew}\right)\right)\right| \]
      2. exp-prod82.7%

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

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

      \[\leadsto \left|ew \cdot \left(\log \left({\left(e^{\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)}\right)}^{\cos t}\right) - eh \cdot \left(\sin \tan^{-1} \color{blue}{\left(-1 \cdot \frac{eh \cdot t}{ew}\right)} \cdot \frac{\sin t}{ew}\right)\right)\right| \]
    11. Step-by-step derivation
      1. mul-1-neg98.8%

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

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

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

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

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

        \[\leadsto \left|\color{blue}{-eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot t}{ew}\right)\right)}\right| \]
      2. associate-*r*79.2%

        \[\leadsto \left|-\color{blue}{\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot t}{ew}\right)}\right| \]
      3. distribute-rgt-neg-in79.2%

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

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

        \[\leadsto \left|\left(eh \cdot \sin t\right) \cdot \left(-\sin \tan^{-1} \left(\frac{\color{blue}{-eh \cdot t}}{ew}\right)\right)\right| \]
      6. distribute-lft-neg-in79.2%

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

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

    if -9.50000000000000054e72 < eh < -7.00000000000000051e-55

    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. Step-by-step derivation
      1. fabs-sub99.9%

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

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

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

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

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

        \[\leadsto \left|\color{blue}{\mathsf{fma}\left(ew, -\cos t \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)}\right| \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\left|\mathsf{fma}\left(ew, \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) \cdot \left(-\cos t\right), eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right)\right)\right)\right|} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. expm1-log1p-u100.0%

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

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

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

      \[\leadsto \left|\color{blue}{ew + eh \cdot \left(t \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot \tan t}{ew}\right)\right)}\right| \]
    8. Step-by-step derivation
      1. mul-1-neg78.2%

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

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

        \[\leadsto \left|ew + eh \cdot \left(t \cdot \sin \tan^{-1} \left(-\color{blue}{\tan t \cdot \frac{eh}{ew}}\right)\right)\right| \]
      4. distribute-rgt-neg-in78.2%

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

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

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

    if -7.00000000000000051e-55 < eh < 3.60000000000000001e104

    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. Step-by-step derivation
      1. sub-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(-\color{blue}{\tan t \cdot \frac{eh}{ew}}\right)\right| \]
      5. distribute-rgt-neg-in84.7%

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

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

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \left(\tan t \cdot \frac{eh}{-ew}\right) \cdot \left(\tan t \cdot \frac{eh}{-ew}\right)}}}\right| \]
      2. hypot-1-def84.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{-ew}\right)}}\right| \]
    12. Applied egg-rr84.6%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{-ew}\right)}}\right| \]
    13. Step-by-step derivation
      1. hypot-undefine84.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\sqrt{1 \cdot 1 + \left(\tan t \cdot \frac{eh}{-ew}\right) \cdot \left(\tan t \cdot \frac{eh}{-ew}\right)}}}\right| \]
      2. metadata-eval84.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\sqrt{\color{blue}{1} + \left(\tan t \cdot \frac{eh}{-ew}\right) \cdot \left(\tan t \cdot \frac{eh}{-ew}\right)}}\right| \]
      3. associate-*r/84.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\sqrt{1 + \color{blue}{\frac{\tan t \cdot eh}{-ew}} \cdot \left(\tan t \cdot \frac{eh}{-ew}\right)}}\right| \]
      4. *-commutative84.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\sqrt{1 + \frac{\color{blue}{eh \cdot \tan t}}{-ew} \cdot \left(\tan t \cdot \frac{eh}{-ew}\right)}}\right| \]
      5. distribute-frac-neg284.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\sqrt{1 + \color{blue}{\left(-\frac{eh \cdot \tan t}{ew}\right)} \cdot \left(\tan t \cdot \frac{eh}{-ew}\right)}}\right| \]
      6. associate-*r/84.6%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\sqrt{1 + \left(-eh \cdot \frac{\tan t}{ew}\right) \cdot \color{blue}{\frac{\tan t \cdot eh}{-ew}}}}\right| \]
      8. *-commutative84.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\sqrt{1 + \left(-eh \cdot \frac{\tan t}{ew}\right) \cdot \frac{\color{blue}{eh \cdot \tan t}}{-ew}}}\right| \]
      9. distribute-frac-neg284.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\sqrt{1 + \left(-eh \cdot \frac{\tan t}{ew}\right) \cdot \color{blue}{\left(-\frac{eh \cdot \tan t}{ew}\right)}}}\right| \]
      10. associate-*r/84.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\sqrt{1 + \left(-eh \cdot \frac{\tan t}{ew}\right) \cdot \left(-\color{blue}{eh \cdot \frac{\tan t}{ew}}\right)}}\right| \]
      11. sqr-neg84.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\sqrt{1 + \color{blue}{\left(eh \cdot \frac{\tan t}{ew}\right) \cdot \left(eh \cdot \frac{\tan t}{ew}\right)}}}\right| \]
      12. hypot-1-def84.6%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}}\right| \]
    14. Simplified84.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -9.5 \cdot 10^{+72}:\\ \;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\ \mathbf{elif}\;eh \leq -7 \cdot 10^{-55}:\\ \;\;\;\;\left|ew + eh \cdot \left(t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{-ew}\right)\right)\right|\\ \mathbf{elif}\;eh \leq 3.6 \cdot 10^{+104}:\\ \;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \frac{-1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 58.2% accurate, 2.2× speedup?

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

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

\mathbf{elif}\;ew \leq -3.2 \cdot 10^{-254}:\\
\;\;\;\;\left(-ew\right) - \left(eh \cdot t\right) \cdot \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\\

\mathbf{elif}\;ew \leq 10^{-179}:\\
\;\;\;\;eh \cdot \left(\sin t \cdot \left(-\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if ew < -7.6000000000000004e26 or 1e-179 < 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. Step-by-step derivation
      1. sub-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(-\color{blue}{\tan t \cdot \frac{eh}{ew}}\right)\right| \]
      5. distribute-rgt-neg-in74.1%

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

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

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

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

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{-eh \cdot t}}{ew}\right)\right| \]
      3. distribute-lft-neg-in66.3%

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

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

    if -7.6000000000000004e26 < ew < -3.2e-254

    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. Step-by-step derivation
      1. sub-neg99.8%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right) + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      3. associate-*r*77.4%

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

        \[\leadsto -\color{blue}{\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right), ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      5. associate-/r/77.4%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \color{blue}{\left(\tan t \cdot \frac{eh}{ew}\right)}, ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      7. associate-*r/77.4%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right), \frac{\color{blue}{\cos t \cdot ew}}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      9. associate-/l*77.4%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(eh \cdot \left(t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right)\right) - ew} \]
    9. Step-by-step derivation
      1. mul-1-neg55.8%

        \[\leadsto \color{blue}{\left(-eh \cdot \left(t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right)\right)} - ew \]
      2. associate-*r*55.8%

        \[\leadsto \left(-\color{blue}{\left(eh \cdot t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)}\right) - ew \]
      3. distribute-lft-neg-in55.8%

        \[\leadsto \color{blue}{\left(-eh \cdot t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)} - ew \]
      4. distribute-rgt-neg-in55.8%

        \[\leadsto \color{blue}{\left(eh \cdot \left(-t\right)\right)} \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right) - ew \]
      5. associate-/l*55.8%

        \[\leadsto \left(eh \cdot \left(-t\right)\right) \cdot \sin \tan^{-1} \color{blue}{\left(eh \cdot \frac{\tan t}{ew}\right)} - ew \]
    10. Simplified55.8%

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

    if -3.2e-254 < ew < 1e-179

    1. Initial program 99.6%

      \[\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. Step-by-step derivation
      1. sub-neg99.6%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right)\right| \]
      3. distribute-rgt-neg-in99.6%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right) + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      3. associate-*r*41.2%

        \[\leadsto -\left(\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right)\right)} + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      4. fma-undefine41.3%

        \[\leadsto -\color{blue}{\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right), ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      5. associate-/r/41.3%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \color{blue}{\left(\tan t \cdot \frac{eh}{ew}\right)}, ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      7. associate-*r/41.3%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right), \frac{\color{blue}{\cos t \cdot ew}}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      9. associate-/l*41.3%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right)\right)} \]
    9. Step-by-step derivation
      1. associate-*r*36.4%

        \[\leadsto \color{blue}{\left(-1 \cdot eh\right) \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right)} \]
      2. neg-mul-136.4%

        \[\leadsto \color{blue}{\left(-eh\right)} \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right) \]
      3. associate-/l*36.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -7.6 \cdot 10^{+26}:\\ \;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\ \mathbf{elif}\;ew \leq -3.2 \cdot 10^{-254}:\\ \;\;\;\;\left(-ew\right) - \left(eh \cdot t\right) \cdot \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\\ \mathbf{elif}\;ew \leq 10^{-179}:\\ \;\;\;\;eh \cdot \left(\sin t \cdot \left(-\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 50.5% accurate, 2.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;ew \leq -2.1 \cdot 10^{+209}:\\
\;\;\;\;\cos t \cdot \left(-ew\right)\\

\mathbf{elif}\;ew \leq -1.2 \cdot 10^{-237}:\\
\;\;\;\;\left(-ew\right) - \left(eh \cdot t\right) \cdot \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\\

\mathbf{elif}\;ew \leq 10^{-179}:\\
\;\;\;\;eh \cdot \left(\sin t \cdot \left(-\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if ew < -2.1e209

    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. Step-by-step derivation
      1. sub-neg99.9%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right)\right| \]
      3. distribute-rgt-neg-in99.9%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right) + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      3. associate-*r*87.5%

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

        \[\leadsto -\color{blue}{\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right), ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      5. associate-/r/87.5%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \color{blue}{\left(\tan t \cdot \frac{eh}{ew}\right)}, ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      7. associate-*r/87.5%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right), \frac{\color{blue}{\cos t \cdot ew}}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      9. associate-/l*87.5%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(ew \cdot \cos t\right)} \]
    9. Step-by-step derivation
      1. associate-*r*87.5%

        \[\leadsto \color{blue}{\left(-1 \cdot ew\right) \cdot \cos t} \]
      2. neg-mul-187.5%

        \[\leadsto \color{blue}{\left(-ew\right)} \cdot \cos t \]
    10. Simplified87.5%

      \[\leadsto \color{blue}{\left(-ew\right) \cdot \cos t} \]

    if -2.1e209 < ew < -1.2e-237

    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. Step-by-step derivation
      1. sub-neg99.8%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right) + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      3. associate-*r*78.7%

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

        \[\leadsto -\color{blue}{\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right), ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      5. associate-/r/78.7%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \color{blue}{\left(\tan t \cdot \frac{eh}{ew}\right)}, ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      7. associate-*r/78.7%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right), \frac{\color{blue}{\cos t \cdot ew}}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      9. associate-/l*78.7%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(eh \cdot \left(t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right)\right) - ew} \]
    9. Step-by-step derivation
      1. mul-1-neg56.7%

        \[\leadsto \color{blue}{\left(-eh \cdot \left(t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right)\right)} - ew \]
      2. associate-*r*56.7%

        \[\leadsto \left(-\color{blue}{\left(eh \cdot t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)}\right) - ew \]
      3. distribute-lft-neg-in56.7%

        \[\leadsto \color{blue}{\left(-eh \cdot t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)} - ew \]
      4. distribute-rgt-neg-in56.7%

        \[\leadsto \color{blue}{\left(eh \cdot \left(-t\right)\right)} \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right) - ew \]
      5. associate-/l*56.7%

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

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

    if -1.2e-237 < ew < 1e-179

    1. Initial program 99.6%

      \[\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. Step-by-step derivation
      1. sub-neg99.6%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right)\right| \]
      3. distribute-rgt-neg-in99.6%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right) + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      3. associate-*r*41.2%

        \[\leadsto -\left(\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right)\right)} + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      4. fma-undefine41.3%

        \[\leadsto -\color{blue}{\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right), ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      5. associate-/r/41.3%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \color{blue}{\left(\tan t \cdot \frac{eh}{ew}\right)}, ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      7. associate-*r/41.3%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right), \frac{\color{blue}{\cos t \cdot ew}}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      9. associate-/l*41.3%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right)\right)} \]
    9. Step-by-step derivation
      1. associate-*r*36.4%

        \[\leadsto \color{blue}{\left(-1 \cdot eh\right) \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right)} \]
      2. neg-mul-136.4%

        \[\leadsto \color{blue}{\left(-eh\right)} \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right) \]
      3. associate-/l*36.4%

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

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

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

    if 1e-179 < 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. Step-by-step derivation
      1. sub-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -2.1 \cdot 10^{+209}:\\ \;\;\;\;\cos t \cdot \left(-ew\right)\\ \mathbf{elif}\;ew \leq -1.2 \cdot 10^{-237}:\\ \;\;\;\;\left(-ew\right) - \left(eh \cdot t\right) \cdot \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\\ \mathbf{elif}\;ew \leq 10^{-179}:\\ \;\;\;\;eh \cdot \left(\sin t \cdot \left(-\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 74.1% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -2.6 \cdot 10^{+20} \lor \neg \left(eh \leq 5.1 \cdot 10^{+104}\right):\\ \;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \frac{-1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (if (or (<= eh -2.6e+20) (not (<= eh 5.1e+104)))
   (fabs (* (* eh (sin t)) (sin (atan (/ (* eh (- t)) ew)))))
   (fabs (* (* ew (cos t)) (/ -1.0 (hypot 1.0 (* eh (/ (tan t) ew))))))))
double code(double eh, double ew, double t) {
	double tmp;
	if ((eh <= -2.6e+20) || !(eh <= 5.1e+104)) {
		tmp = fabs(((eh * sin(t)) * sin(atan(((eh * -t) / ew)))));
	} else {
		tmp = fabs(((ew * cos(t)) * (-1.0 / hypot(1.0, (eh * (tan(t) / ew))))));
	}
	return tmp;
}
public static double code(double eh, double ew, double t) {
	double tmp;
	if ((eh <= -2.6e+20) || !(eh <= 5.1e+104)) {
		tmp = Math.abs(((eh * Math.sin(t)) * Math.sin(Math.atan(((eh * -t) / ew)))));
	} else {
		tmp = Math.abs(((ew * Math.cos(t)) * (-1.0 / Math.hypot(1.0, (eh * (Math.tan(t) / ew))))));
	}
	return tmp;
}
def code(eh, ew, t):
	tmp = 0
	if (eh <= -2.6e+20) or not (eh <= 5.1e+104):
		tmp = math.fabs(((eh * math.sin(t)) * math.sin(math.atan(((eh * -t) / ew)))))
	else:
		tmp = math.fabs(((ew * math.cos(t)) * (-1.0 / math.hypot(1.0, (eh * (math.tan(t) / ew))))))
	return tmp
function code(eh, ew, t)
	tmp = 0.0
	if ((eh <= -2.6e+20) || !(eh <= 5.1e+104))
		tmp = abs(Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(eh * Float64(-t)) / ew)))));
	else
		tmp = abs(Float64(Float64(ew * cos(t)) * Float64(-1.0 / hypot(1.0, Float64(eh * Float64(tan(t) / ew))))));
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	tmp = 0.0;
	if ((eh <= -2.6e+20) || ~((eh <= 5.1e+104)))
		tmp = abs(((eh * sin(t)) * sin(atan(((eh * -t) / ew)))));
	else
		tmp = abs(((ew * cos(t)) * (-1.0 / hypot(1.0, (eh * (tan(t) / ew))))));
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -2.6e+20], N[Not[LessEqual[eh, 5.1e+104]], $MachinePrecision]], N[Abs[N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh * (-t)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[(-1.0 / N[Sqrt[1.0 ^ 2 + N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;eh \leq -2.6 \cdot 10^{+20} \lor \neg \left(eh \leq 5.1 \cdot 10^{+104}\right):\\
\;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\

\mathbf{else}:\\
\;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \frac{-1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if eh < -2.6e20 or 5.1000000000000002e104 < 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. Step-by-step derivation
      1. sub-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|ew \cdot \left(\color{blue}{\log \left(e^{\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \cos t}\right)} - eh \cdot \left(\sin \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \frac{\sin t}{ew}\right)\right)\right| \]
      2. exp-prod82.8%

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

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

      \[\leadsto \left|ew \cdot \left(\log \left({\left(e^{\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)}\right)}^{\cos t}\right) - eh \cdot \left(\sin \tan^{-1} \color{blue}{\left(-1 \cdot \frac{eh \cdot t}{ew}\right)} \cdot \frac{\sin t}{ew}\right)\right)\right| \]
    11. Step-by-step derivation
      1. mul-1-neg98.9%

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

        \[\leadsto \left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(-\color{blue}{eh \cdot \frac{t}{ew}}\right) - ew \cdot \left(\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \frac{\cos t}{eh}\right)\right)\right| \]
      3. distribute-lft-neg-in98.9%

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

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

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

        \[\leadsto \left|\color{blue}{-eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot t}{ew}\right)\right)}\right| \]
      2. associate-*r*76.9%

        \[\leadsto \left|-\color{blue}{\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot t}{ew}\right)}\right| \]
      3. distribute-rgt-neg-in76.9%

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

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

        \[\leadsto \left|\left(eh \cdot \sin t\right) \cdot \left(-\sin \tan^{-1} \left(\frac{\color{blue}{-eh \cdot t}}{ew}\right)\right)\right| \]
      6. distribute-lft-neg-in76.9%

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

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

    if -2.6e20 < eh < 5.1000000000000002e104

    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. Step-by-step derivation
      1. sub-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(-\color{blue}{\tan t \cdot \frac{eh}{ew}}\right)\right| \]
      5. distribute-rgt-neg-in83.1%

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

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

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \left(\tan t \cdot \frac{eh}{-ew}\right) \cdot \left(\tan t \cdot \frac{eh}{-ew}\right)}}}\right| \]
      2. hypot-1-def83.0%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{-ew}\right)}}\right| \]
    12. Applied egg-rr83.0%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{-ew}\right)}}\right| \]
    13. Step-by-step derivation
      1. hypot-undefine83.0%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\sqrt{1 \cdot 1 + \left(\tan t \cdot \frac{eh}{-ew}\right) \cdot \left(\tan t \cdot \frac{eh}{-ew}\right)}}}\right| \]
      2. metadata-eval83.0%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\sqrt{\color{blue}{1} + \left(\tan t \cdot \frac{eh}{-ew}\right) \cdot \left(\tan t \cdot \frac{eh}{-ew}\right)}}\right| \]
      3. associate-*r/83.0%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\sqrt{1 + \color{blue}{\frac{\tan t \cdot eh}{-ew}} \cdot \left(\tan t \cdot \frac{eh}{-ew}\right)}}\right| \]
      4. *-commutative83.0%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\sqrt{1 + \frac{\color{blue}{eh \cdot \tan t}}{-ew} \cdot \left(\tan t \cdot \frac{eh}{-ew}\right)}}\right| \]
      5. distribute-frac-neg283.0%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\sqrt{1 + \color{blue}{\left(-\frac{eh \cdot \tan t}{ew}\right)} \cdot \left(\tan t \cdot \frac{eh}{-ew}\right)}}\right| \]
      6. associate-*r/83.0%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\sqrt{1 + \left(-eh \cdot \frac{\tan t}{ew}\right) \cdot \color{blue}{\frac{\tan t \cdot eh}{-ew}}}}\right| \]
      8. *-commutative83.0%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\sqrt{1 + \left(-eh \cdot \frac{\tan t}{ew}\right) \cdot \frac{\color{blue}{eh \cdot \tan t}}{-ew}}}\right| \]
      9. distribute-frac-neg283.0%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\sqrt{1 + \left(-eh \cdot \frac{\tan t}{ew}\right) \cdot \color{blue}{\left(-\frac{eh \cdot \tan t}{ew}\right)}}}\right| \]
      10. associate-*r/83.0%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\sqrt{1 + \left(-eh \cdot \frac{\tan t}{ew}\right) \cdot \left(-\color{blue}{eh \cdot \frac{\tan t}{ew}}\right)}}\right| \]
      11. sqr-neg83.0%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\sqrt{1 + \color{blue}{\left(eh \cdot \frac{\tan t}{ew}\right) \cdot \left(eh \cdot \frac{\tan t}{ew}\right)}}}\right| \]
      12. hypot-1-def83.0%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}}\right| \]
    14. Simplified83.0%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}}\right| \]
  3. Recombined 2 regimes into one program.
  4. Final simplification80.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -2.6 \cdot 10^{+20} \lor \neg \left(eh \leq 5.1 \cdot 10^{+104}\right):\\ \;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \frac{-1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 67.8% accurate, 2.2× speedup?

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

\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\\
\mathbf{if}\;eh \leq -8.8 \cdot 10^{+20} \lor \neg \left(eh \leq 3.8 \cdot 10^{+104}\right):\\
\;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin t\_1\right|\\

\mathbf{else}:\\
\;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \cos t\_1\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if eh < -8.8e20 or 3.79999999999999969e104 < 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. Step-by-step derivation
      1. sub-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|ew \cdot \left(\color{blue}{\log \left(e^{\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \cos t}\right)} - eh \cdot \left(\sin \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \frac{\sin t}{ew}\right)\right)\right| \]
      2. exp-prod82.8%

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

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

      \[\leadsto \left|ew \cdot \left(\log \left({\left(e^{\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)}\right)}^{\cos t}\right) - eh \cdot \left(\sin \tan^{-1} \color{blue}{\left(-1 \cdot \frac{eh \cdot t}{ew}\right)} \cdot \frac{\sin t}{ew}\right)\right)\right| \]
    11. Step-by-step derivation
      1. mul-1-neg98.9%

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

        \[\leadsto \left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(-\color{blue}{eh \cdot \frac{t}{ew}}\right) - ew \cdot \left(\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \frac{\cos t}{eh}\right)\right)\right| \]
      3. distribute-lft-neg-in98.9%

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

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

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

        \[\leadsto \left|\color{blue}{-eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot t}{ew}\right)\right)}\right| \]
      2. associate-*r*76.9%

        \[\leadsto \left|-\color{blue}{\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot t}{ew}\right)}\right| \]
      3. distribute-rgt-neg-in76.9%

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

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

        \[\leadsto \left|\left(eh \cdot \sin t\right) \cdot \left(-\sin \tan^{-1} \left(\frac{\color{blue}{-eh \cdot t}}{ew}\right)\right)\right| \]
      6. distribute-lft-neg-in76.9%

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

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

    if -8.8e20 < eh < 3.79999999999999969e104

    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. Step-by-step derivation
      1. sub-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(-\color{blue}{\tan t \cdot \frac{eh}{ew}}\right)\right| \]
      5. distribute-rgt-neg-in83.1%

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

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

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

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

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{-eh \cdot t}}{ew}\right)\right| \]
      3. distribute-lft-neg-in70.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -8.8 \cdot 10^{+20} \lor \neg \left(eh \leq 3.8 \cdot 10^{+104}\right):\\ \;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 67.6% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -2.15 \cdot 10^{+18} \lor \neg \left(eh \leq 3.8 \cdot 10^{+104}\right):\\ \;\;\;\;\left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(eh \cdot \frac{t}{-ew}\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (if (or (<= eh -2.15e+18) (not (<= eh 3.8e+104)))
   (fabs (* eh (* (sin t) (sin (atan (* eh (/ t (- ew))))))))
   (fabs (* (* ew (cos t)) (cos (atan (/ (* eh (- t)) ew)))))))
double code(double eh, double ew, double t) {
	double tmp;
	if ((eh <= -2.15e+18) || !(eh <= 3.8e+104)) {
		tmp = fabs((eh * (sin(t) * sin(atan((eh * (t / -ew)))))));
	} else {
		tmp = fabs(((ew * cos(t)) * cos(atan(((eh * -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 ((eh <= (-2.15d+18)) .or. (.not. (eh <= 3.8d+104))) then
        tmp = abs((eh * (sin(t) * sin(atan((eh * (t / -ew)))))))
    else
        tmp = abs(((ew * cos(t)) * cos(atan(((eh * -t) / ew)))))
    end if
    code = tmp
end function
public static double code(double eh, double ew, double t) {
	double tmp;
	if ((eh <= -2.15e+18) || !(eh <= 3.8e+104)) {
		tmp = Math.abs((eh * (Math.sin(t) * Math.sin(Math.atan((eh * (t / -ew)))))));
	} else {
		tmp = Math.abs(((ew * Math.cos(t)) * Math.cos(Math.atan(((eh * -t) / ew)))));
	}
	return tmp;
}
def code(eh, ew, t):
	tmp = 0
	if (eh <= -2.15e+18) or not (eh <= 3.8e+104):
		tmp = math.fabs((eh * (math.sin(t) * math.sin(math.atan((eh * (t / -ew)))))))
	else:
		tmp = math.fabs(((ew * math.cos(t)) * math.cos(math.atan(((eh * -t) / ew)))))
	return tmp
function code(eh, ew, t)
	tmp = 0.0
	if ((eh <= -2.15e+18) || !(eh <= 3.8e+104))
		tmp = abs(Float64(eh * Float64(sin(t) * sin(atan(Float64(eh * Float64(t / Float64(-ew))))))));
	else
		tmp = abs(Float64(Float64(ew * cos(t)) * cos(atan(Float64(Float64(eh * Float64(-t)) / ew)))));
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	tmp = 0.0;
	if ((eh <= -2.15e+18) || ~((eh <= 3.8e+104)))
		tmp = abs((eh * (sin(t) * sin(atan((eh * (t / -ew)))))));
	else
		tmp = abs(((ew * cos(t)) * cos(atan(((eh * -t) / ew)))));
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -2.15e+18], N[Not[LessEqual[eh, 3.8e+104]], $MachinePrecision]], N[Abs[N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(eh * N[(t / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(eh * (-t)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;eh \leq -2.15 \cdot 10^{+18} \lor \neg \left(eh \leq 3.8 \cdot 10^{+104}\right):\\
\;\;\;\;\left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(eh \cdot \frac{t}{-ew}\right)\right)\right|\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if eh < -2.15e18 or 3.79999999999999969e104 < 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. Step-by-step derivation
      1. sub-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|\color{blue}{-1 \cdot \left(eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot \tan t}{ew}\right)\right)\right)}\right| \]
    9. Step-by-step derivation
      1. associate-*r*76.8%

        \[\leadsto \left|\color{blue}{\left(-1 \cdot eh\right) \cdot \left(\sin t \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot \tan t}{ew}\right)\right)}\right| \]
      2. neg-mul-176.8%

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

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

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

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

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

      \[\leadsto \left|\left(-eh\right) \cdot \left(\sin t \cdot \sin \tan^{-1} \color{blue}{\left(-1 \cdot \frac{eh \cdot t}{ew}\right)}\right)\right| \]
    12. Step-by-step derivation
      1. mul-1-neg98.9%

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

        \[\leadsto \left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(-\color{blue}{eh \cdot \frac{t}{ew}}\right) - ew \cdot \left(\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \frac{\cos t}{eh}\right)\right)\right| \]
      3. distribute-lft-neg-in98.9%

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

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

    if -2.15e18 < eh < 3.79999999999999969e104

    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. Step-by-step derivation
      1. sub-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(-\color{blue}{\tan t \cdot \frac{eh}{ew}}\right)\right| \]
      5. distribute-rgt-neg-in83.1%

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

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

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

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

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{-eh \cdot t}}{ew}\right)\right| \]
      3. distribute-lft-neg-in70.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -2.15 \cdot 10^{+18} \lor \neg \left(eh \leq 3.8 \cdot 10^{+104}\right):\\ \;\;\;\;\left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(eh \cdot \frac{t}{-ew}\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 56.4% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -2.6 \cdot 10^{+164} \lor \neg \left(eh \leq 10^{+160}\right):\\ \;\;\;\;eh \cdot \left(\sin t \cdot \left(-\sin \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (if (or (<= eh -2.6e+164) (not (<= eh 1e+160)))
   (* eh (* (sin t) (- (sin (atan (* eh (/ (tan t) ew)))))))
   (fabs (* (* ew (cos t)) (cos (atan (/ (* eh (- t)) ew)))))))
double code(double eh, double ew, double t) {
	double tmp;
	if ((eh <= -2.6e+164) || !(eh <= 1e+160)) {
		tmp = eh * (sin(t) * -sin(atan((eh * (tan(t) / ew)))));
	} else {
		tmp = fabs(((ew * cos(t)) * cos(atan(((eh * -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 ((eh <= (-2.6d+164)) .or. (.not. (eh <= 1d+160))) then
        tmp = eh * (sin(t) * -sin(atan((eh * (tan(t) / ew)))))
    else
        tmp = abs(((ew * cos(t)) * cos(atan(((eh * -t) / ew)))))
    end if
    code = tmp
end function
public static double code(double eh, double ew, double t) {
	double tmp;
	if ((eh <= -2.6e+164) || !(eh <= 1e+160)) {
		tmp = eh * (Math.sin(t) * -Math.sin(Math.atan((eh * (Math.tan(t) / ew)))));
	} else {
		tmp = Math.abs(((ew * Math.cos(t)) * Math.cos(Math.atan(((eh * -t) / ew)))));
	}
	return tmp;
}
def code(eh, ew, t):
	tmp = 0
	if (eh <= -2.6e+164) or not (eh <= 1e+160):
		tmp = eh * (math.sin(t) * -math.sin(math.atan((eh * (math.tan(t) / ew)))))
	else:
		tmp = math.fabs(((ew * math.cos(t)) * math.cos(math.atan(((eh * -t) / ew)))))
	return tmp
function code(eh, ew, t)
	tmp = 0.0
	if ((eh <= -2.6e+164) || !(eh <= 1e+160))
		tmp = Float64(eh * Float64(sin(t) * Float64(-sin(atan(Float64(eh * Float64(tan(t) / ew)))))));
	else
		tmp = abs(Float64(Float64(ew * cos(t)) * cos(atan(Float64(Float64(eh * Float64(-t)) / ew)))));
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	tmp = 0.0;
	if ((eh <= -2.6e+164) || ~((eh <= 1e+160)))
		tmp = eh * (sin(t) * -sin(atan((eh * (tan(t) / ew)))));
	else
		tmp = abs(((ew * cos(t)) * cos(atan(((eh * -t) / ew)))));
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -2.6e+164], N[Not[LessEqual[eh, 1e+160]], $MachinePrecision]], N[(eh * N[(N[Sin[t], $MachinePrecision] * (-N[Sin[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[Abs[N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(eh * (-t)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;eh \leq -2.6 \cdot 10^{+164} \lor \neg \left(eh \leq 10^{+160}\right):\\
\;\;\;\;eh \cdot \left(\sin t \cdot \left(-\sin \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if eh < -2.5999999999999999e164 or 1.00000000000000001e160 < eh

    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. Step-by-step derivation
      1. sub-neg99.7%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right)\right| \]
      3. distribute-rgt-neg-in99.7%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right) + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      3. associate-*r*54.4%

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

        \[\leadsto -\color{blue}{\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right), ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      5. associate-/r/54.4%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \color{blue}{\left(\tan t \cdot \frac{eh}{ew}\right)}, ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      7. associate-*r/54.4%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right), \frac{\color{blue}{\cos t \cdot ew}}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      9. associate-/l*54.4%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right)\right)} \]
    9. Step-by-step derivation
      1. associate-*r*46.7%

        \[\leadsto \color{blue}{\left(-1 \cdot eh\right) \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right)} \]
      2. neg-mul-146.7%

        \[\leadsto \color{blue}{\left(-eh\right)} \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right) \]
      3. associate-/l*46.7%

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

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

    if -2.5999999999999999e164 < eh < 1.00000000000000001e160

    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. Step-by-step derivation
      1. sub-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(-\color{blue}{\tan t \cdot \frac{eh}{ew}}\right)\right| \]
      5. distribute-rgt-neg-in74.1%

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

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

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

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

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{-eh \cdot t}}{ew}\right)\right| \]
      3. distribute-lft-neg-in62.9%

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

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

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

Alternative 16: 50.4% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := eh \cdot \frac{\tan t}{ew}\\ \mathbf{if}\;ew \leq -2.1 \cdot 10^{+209}:\\ \;\;\;\;\cos t \cdot \left(-ew\right)\\ \mathbf{elif}\;ew \leq -1.7 \cdot 10^{-228}:\\ \;\;\;\;\left(-ew\right) - \left(eh \cdot t\right) \cdot \sin \tan^{-1} t\_1\\ \mathbf{elif}\;ew \leq 9.5 \cdot 10^{-178}:\\ \;\;\;\;eh \cdot \left(\sin t \cdot \left(-\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \frac{-1}{\mathsf{hypot}\left(1, t\_1\right)}\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (* eh (/ (tan t) ew))))
   (if (<= ew -2.1e+209)
     (* (cos t) (- ew))
     (if (<= ew -1.7e-228)
       (- (- ew) (* (* eh t) (sin (atan t_1))))
       (if (<= ew 9.5e-178)
         (* eh (* (sin t) (- (sin (atan (/ (* eh t) ew))))))
         (fabs (* ew (/ -1.0 (hypot 1.0 t_1)))))))))
double code(double eh, double ew, double t) {
	double t_1 = eh * (tan(t) / ew);
	double tmp;
	if (ew <= -2.1e+209) {
		tmp = cos(t) * -ew;
	} else if (ew <= -1.7e-228) {
		tmp = -ew - ((eh * t) * sin(atan(t_1)));
	} else if (ew <= 9.5e-178) {
		tmp = eh * (sin(t) * -sin(atan(((eh * t) / ew))));
	} else {
		tmp = fabs((ew * (-1.0 / hypot(1.0, t_1))));
	}
	return tmp;
}
public static double code(double eh, double ew, double t) {
	double t_1 = eh * (Math.tan(t) / ew);
	double tmp;
	if (ew <= -2.1e+209) {
		tmp = Math.cos(t) * -ew;
	} else if (ew <= -1.7e-228) {
		tmp = -ew - ((eh * t) * Math.sin(Math.atan(t_1)));
	} else if (ew <= 9.5e-178) {
		tmp = eh * (Math.sin(t) * -Math.sin(Math.atan(((eh * t) / ew))));
	} else {
		tmp = Math.abs((ew * (-1.0 / Math.hypot(1.0, t_1))));
	}
	return tmp;
}
def code(eh, ew, t):
	t_1 = eh * (math.tan(t) / ew)
	tmp = 0
	if ew <= -2.1e+209:
		tmp = math.cos(t) * -ew
	elif ew <= -1.7e-228:
		tmp = -ew - ((eh * t) * math.sin(math.atan(t_1)))
	elif ew <= 9.5e-178:
		tmp = eh * (math.sin(t) * -math.sin(math.atan(((eh * t) / ew))))
	else:
		tmp = math.fabs((ew * (-1.0 / math.hypot(1.0, t_1))))
	return tmp
function code(eh, ew, t)
	t_1 = Float64(eh * Float64(tan(t) / ew))
	tmp = 0.0
	if (ew <= -2.1e+209)
		tmp = Float64(cos(t) * Float64(-ew));
	elseif (ew <= -1.7e-228)
		tmp = Float64(Float64(-ew) - Float64(Float64(eh * t) * sin(atan(t_1))));
	elseif (ew <= 9.5e-178)
		tmp = Float64(eh * Float64(sin(t) * Float64(-sin(atan(Float64(Float64(eh * t) / ew))))));
	else
		tmp = abs(Float64(ew * Float64(-1.0 / hypot(1.0, t_1))));
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	t_1 = eh * (tan(t) / ew);
	tmp = 0.0;
	if (ew <= -2.1e+209)
		tmp = cos(t) * -ew;
	elseif (ew <= -1.7e-228)
		tmp = -ew - ((eh * t) * sin(atan(t_1)));
	elseif (ew <= 9.5e-178)
		tmp = eh * (sin(t) * -sin(atan(((eh * t) / ew))));
	else
		tmp = abs((ew * (-1.0 / hypot(1.0, t_1))));
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -2.1e+209], N[(N[Cos[t], $MachinePrecision] * (-ew)), $MachinePrecision], If[LessEqual[ew, -1.7e-228], N[((-ew) - N[(N[(eh * t), $MachinePrecision] * N[Sin[N[ArcTan[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[ew, 9.5e-178], N[(eh * N[(N[Sin[t], $MachinePrecision] * (-N[Sin[N[ArcTan[N[(N[(eh * t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[Abs[N[(ew * N[(-1.0 / N[Sqrt[1.0 ^ 2 + t$95$1 ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := eh \cdot \frac{\tan t}{ew}\\
\mathbf{if}\;ew \leq -2.1 \cdot 10^{+209}:\\
\;\;\;\;\cos t \cdot \left(-ew\right)\\

\mathbf{elif}\;ew \leq -1.7 \cdot 10^{-228}:\\
\;\;\;\;\left(-ew\right) - \left(eh \cdot t\right) \cdot \sin \tan^{-1} t\_1\\

\mathbf{elif}\;ew \leq 9.5 \cdot 10^{-178}:\\
\;\;\;\;eh \cdot \left(\sin t \cdot \left(-\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \frac{-1}{\mathsf{hypot}\left(1, t\_1\right)}\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if ew < -2.1e209

    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. Step-by-step derivation
      1. sub-neg99.9%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right)\right| \]
      3. distribute-rgt-neg-in99.9%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right) + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      3. associate-*r*87.5%

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

        \[\leadsto -\color{blue}{\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right), ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      5. associate-/r/87.5%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \color{blue}{\left(\tan t \cdot \frac{eh}{ew}\right)}, ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      7. associate-*r/87.5%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right), \frac{\color{blue}{\cos t \cdot ew}}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      9. associate-/l*87.5%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(ew \cdot \cos t\right)} \]
    9. Step-by-step derivation
      1. associate-*r*87.5%

        \[\leadsto \color{blue}{\left(-1 \cdot ew\right) \cdot \cos t} \]
      2. neg-mul-187.5%

        \[\leadsto \color{blue}{\left(-ew\right)} \cdot \cos t \]
    10. Simplified87.5%

      \[\leadsto \color{blue}{\left(-ew\right) \cdot \cos t} \]

    if -2.1e209 < ew < -1.69999999999999995e-228

    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. Step-by-step derivation
      1. sub-neg99.8%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right) + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      3. associate-*r*78.7%

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

        \[\leadsto -\color{blue}{\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right), ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      5. associate-/r/78.7%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \color{blue}{\left(\tan t \cdot \frac{eh}{ew}\right)}, ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      7. associate-*r/78.7%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right), \frac{\color{blue}{\cos t \cdot ew}}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      9. associate-/l*78.7%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(eh \cdot \left(t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right)\right) - ew} \]
    9. Step-by-step derivation
      1. mul-1-neg56.7%

        \[\leadsto \color{blue}{\left(-eh \cdot \left(t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right)\right)} - ew \]
      2. associate-*r*56.7%

        \[\leadsto \left(-\color{blue}{\left(eh \cdot t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)}\right) - ew \]
      3. distribute-lft-neg-in56.7%

        \[\leadsto \color{blue}{\left(-eh \cdot t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)} - ew \]
      4. distribute-rgt-neg-in56.7%

        \[\leadsto \color{blue}{\left(eh \cdot \left(-t\right)\right)} \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right) - ew \]
      5. associate-/l*56.7%

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

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

    if -1.69999999999999995e-228 < ew < 9.50000000000000009e-178

    1. Initial program 99.6%

      \[\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. Step-by-step derivation
      1. sub-neg99.6%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right)\right| \]
      3. distribute-rgt-neg-in99.6%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right) + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      3. associate-*r*41.2%

        \[\leadsto -\left(\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right)\right)} + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      4. fma-undefine41.3%

        \[\leadsto -\color{blue}{\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right), ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      5. associate-/r/41.3%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \color{blue}{\left(\tan t \cdot \frac{eh}{ew}\right)}, ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      7. associate-*r/41.3%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right), \frac{\color{blue}{\cos t \cdot ew}}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      9. associate-/l*41.3%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right)\right)} \]
    9. Step-by-step derivation
      1. associate-*r*36.4%

        \[\leadsto \color{blue}{\left(-1 \cdot eh\right) \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right)} \]
      2. neg-mul-136.4%

        \[\leadsto \color{blue}{\left(-eh\right)} \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right) \]
      3. associate-/l*36.4%

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

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

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

    if 9.50000000000000009e-178 < 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. Step-by-step derivation
      1. sub-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\sqrt{1 + \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \left(eh \cdot \frac{\tan t}{-ew}\right)}}}\right| \]
      2. hypot-1-def47.8%

        \[\leadsto \left|ew \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{-ew}\right)}}\right| \]
    9. Applied egg-rr47.8%

      \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{-ew}\right)}}\right| \]
    10. Step-by-step derivation
      1. hypot-undefine47.8%

        \[\leadsto \left|ew \cdot \frac{1}{\color{blue}{\sqrt{1 \cdot 1 + \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \left(eh \cdot \frac{\tan t}{-ew}\right)}}}\right| \]
      2. associate-*r/47.8%

        \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 \cdot 1 + \color{blue}{\frac{eh \cdot \tan t}{-ew}} \cdot \left(eh \cdot \frac{\tan t}{-ew}\right)}}\right| \]
      3. distribute-frac-neg247.8%

        \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 \cdot 1 + \color{blue}{\left(-\frac{eh \cdot \tan t}{ew}\right)} \cdot \left(eh \cdot \frac{\tan t}{-ew}\right)}}\right| \]
      4. associate-*l/47.8%

        \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 \cdot 1 + \left(-\color{blue}{\frac{eh}{ew} \cdot \tan t}\right) \cdot \left(eh \cdot \frac{\tan t}{-ew}\right)}}\right| \]
      5. associate-*r/47.8%

        \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 \cdot 1 + \left(-\frac{eh}{ew} \cdot \tan t\right) \cdot \color{blue}{\frac{eh \cdot \tan t}{-ew}}}}\right| \]
      6. distribute-frac-neg247.8%

        \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 \cdot 1 + \left(-\frac{eh}{ew} \cdot \tan t\right) \cdot \color{blue}{\left(-\frac{eh \cdot \tan t}{ew}\right)}}}\right| \]
      7. associate-*l/47.8%

        \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 \cdot 1 + \left(-\frac{eh}{ew} \cdot \tan t\right) \cdot \left(-\color{blue}{\frac{eh}{ew} \cdot \tan t}\right)}}\right| \]
      8. sqr-neg47.8%

        \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 \cdot 1 + \color{blue}{\left(\frac{eh}{ew} \cdot \tan t\right) \cdot \left(\frac{eh}{ew} \cdot \tan t\right)}}}\right| \]
      9. hypot-undefine47.8%

        \[\leadsto \left|ew \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \frac{eh}{ew} \cdot \tan t\right)}}\right| \]
      10. associate-*l/47.8%

        \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\frac{eh \cdot \tan t}{ew}}\right)}\right| \]
      11. associate-*r/47.8%

        \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh \cdot \frac{\tan t}{ew}}\right)}\right| \]
    11. Simplified47.8%

      \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}}\right| \]
  3. Recombined 4 regimes into one program.
  4. Final simplification54.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -2.1 \cdot 10^{+209}:\\ \;\;\;\;\cos t \cdot \left(-ew\right)\\ \mathbf{elif}\;ew \leq -1.7 \cdot 10^{-228}:\\ \;\;\;\;\left(-ew\right) - \left(eh \cdot t\right) \cdot \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\\ \mathbf{elif}\;ew \leq 9.5 \cdot 10^{-178}:\\ \;\;\;\;eh \cdot \left(\sin t \cdot \left(-\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \frac{-1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 49.8% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -1.8 \cdot 10^{-166}:\\ \;\;\;\;\cos t \cdot \left(-ew\right)\\ \mathbf{elif}\;ew \leq 9 \cdot 10^{-180}:\\ \;\;\;\;eh \cdot \left(\sin t \cdot \left(-\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \frac{-1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (if (<= ew -1.8e-166)
   (* (cos t) (- ew))
   (if (<= ew 9e-180)
     (* eh (* (sin t) (- (sin (atan (/ (* eh t) ew))))))
     (fabs (* ew (/ -1.0 (hypot 1.0 (* eh (/ (tan t) ew)))))))))
double code(double eh, double ew, double t) {
	double tmp;
	if (ew <= -1.8e-166) {
		tmp = cos(t) * -ew;
	} else if (ew <= 9e-180) {
		tmp = eh * (sin(t) * -sin(atan(((eh * t) / ew))));
	} else {
		tmp = fabs((ew * (-1.0 / hypot(1.0, (eh * (tan(t) / ew))))));
	}
	return tmp;
}
public static double code(double eh, double ew, double t) {
	double tmp;
	if (ew <= -1.8e-166) {
		tmp = Math.cos(t) * -ew;
	} else if (ew <= 9e-180) {
		tmp = eh * (Math.sin(t) * -Math.sin(Math.atan(((eh * t) / ew))));
	} else {
		tmp = Math.abs((ew * (-1.0 / Math.hypot(1.0, (eh * (Math.tan(t) / ew))))));
	}
	return tmp;
}
def code(eh, ew, t):
	tmp = 0
	if ew <= -1.8e-166:
		tmp = math.cos(t) * -ew
	elif ew <= 9e-180:
		tmp = eh * (math.sin(t) * -math.sin(math.atan(((eh * t) / ew))))
	else:
		tmp = math.fabs((ew * (-1.0 / math.hypot(1.0, (eh * (math.tan(t) / ew))))))
	return tmp
function code(eh, ew, t)
	tmp = 0.0
	if (ew <= -1.8e-166)
		tmp = Float64(cos(t) * Float64(-ew));
	elseif (ew <= 9e-180)
		tmp = Float64(eh * Float64(sin(t) * Float64(-sin(atan(Float64(Float64(eh * t) / ew))))));
	else
		tmp = abs(Float64(ew * Float64(-1.0 / hypot(1.0, Float64(eh * Float64(tan(t) / ew))))));
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	tmp = 0.0;
	if (ew <= -1.8e-166)
		tmp = cos(t) * -ew;
	elseif (ew <= 9e-180)
		tmp = eh * (sin(t) * -sin(atan(((eh * t) / ew))));
	else
		tmp = abs((ew * (-1.0 / hypot(1.0, (eh * (tan(t) / ew))))));
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := If[LessEqual[ew, -1.8e-166], N[(N[Cos[t], $MachinePrecision] * (-ew)), $MachinePrecision], If[LessEqual[ew, 9e-180], N[(eh * N[(N[Sin[t], $MachinePrecision] * (-N[Sin[N[ArcTan[N[(N[(eh * t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[Abs[N[(ew * N[(-1.0 / N[Sqrt[1.0 ^ 2 + N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;ew \leq -1.8 \cdot 10^{-166}:\\
\;\;\;\;\cos t \cdot \left(-ew\right)\\

\mathbf{elif}\;ew \leq 9 \cdot 10^{-180}:\\
\;\;\;\;eh \cdot \left(\sin t \cdot \left(-\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \frac{-1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if ew < -1.8e-166

    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. Step-by-step derivation
      1. sub-neg99.9%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right)\right| \]
      3. distribute-rgt-neg-in99.9%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right) + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      3. associate-*r*80.6%

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

        \[\leadsto -\color{blue}{\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right), ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      5. associate-/r/80.6%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \color{blue}{\left(\tan t \cdot \frac{eh}{ew}\right)}, ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      7. associate-*r/80.6%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right), \frac{\color{blue}{\cos t \cdot ew}}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      9. associate-/l*80.6%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(ew \cdot \cos t\right)} \]
    9. Step-by-step derivation
      1. associate-*r*59.3%

        \[\leadsto \color{blue}{\left(-1 \cdot ew\right) \cdot \cos t} \]
      2. neg-mul-159.3%

        \[\leadsto \color{blue}{\left(-ew\right)} \cdot \cos t \]
    10. Simplified59.3%

      \[\leadsto \color{blue}{\left(-ew\right) \cdot \cos t} \]

    if -1.8e-166 < ew < 9.00000000000000019e-180

    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. Step-by-step derivation
      1. sub-neg99.7%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right)\right| \]
      3. distribute-rgt-neg-in99.7%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right) + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      3. associate-*r*54.3%

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

        \[\leadsto -\color{blue}{\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right), ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      5. associate-/r/54.4%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \color{blue}{\left(\tan t \cdot \frac{eh}{ew}\right)}, ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      7. associate-*r/54.4%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right), \frac{\color{blue}{\cos t \cdot ew}}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      9. associate-/l*54.4%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right)\right)} \]
    9. Step-by-step derivation
      1. associate-*r*38.6%

        \[\leadsto \color{blue}{\left(-1 \cdot eh\right) \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right)} \]
      2. neg-mul-138.6%

        \[\leadsto \color{blue}{\left(-eh\right)} \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right) \]
      3. associate-/l*38.6%

        \[\leadsto \left(-eh\right) \cdot \left(\sin t \cdot \sin \tan^{-1} \color{blue}{\left(eh \cdot \frac{\tan t}{ew}\right)}\right) \]
    10. Simplified38.6%

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

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

    if 9.00000000000000019e-180 < 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. Step-by-step derivation
      1. sub-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\sqrt{1 + \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \left(eh \cdot \frac{\tan t}{-ew}\right)}}}\right| \]
      2. hypot-1-def47.8%

        \[\leadsto \left|ew \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{-ew}\right)}}\right| \]
    9. Applied egg-rr47.8%

      \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{-ew}\right)}}\right| \]
    10. Step-by-step derivation
      1. hypot-undefine47.8%

        \[\leadsto \left|ew \cdot \frac{1}{\color{blue}{\sqrt{1 \cdot 1 + \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \left(eh \cdot \frac{\tan t}{-ew}\right)}}}\right| \]
      2. associate-*r/47.8%

        \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 \cdot 1 + \color{blue}{\frac{eh \cdot \tan t}{-ew}} \cdot \left(eh \cdot \frac{\tan t}{-ew}\right)}}\right| \]
      3. distribute-frac-neg247.8%

        \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 \cdot 1 + \color{blue}{\left(-\frac{eh \cdot \tan t}{ew}\right)} \cdot \left(eh \cdot \frac{\tan t}{-ew}\right)}}\right| \]
      4. associate-*l/47.8%

        \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 \cdot 1 + \left(-\color{blue}{\frac{eh}{ew} \cdot \tan t}\right) \cdot \left(eh \cdot \frac{\tan t}{-ew}\right)}}\right| \]
      5. associate-*r/47.8%

        \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 \cdot 1 + \left(-\frac{eh}{ew} \cdot \tan t\right) \cdot \color{blue}{\frac{eh \cdot \tan t}{-ew}}}}\right| \]
      6. distribute-frac-neg247.8%

        \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 \cdot 1 + \left(-\frac{eh}{ew} \cdot \tan t\right) \cdot \color{blue}{\left(-\frac{eh \cdot \tan t}{ew}\right)}}}\right| \]
      7. associate-*l/47.8%

        \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 \cdot 1 + \left(-\frac{eh}{ew} \cdot \tan t\right) \cdot \left(-\color{blue}{\frac{eh}{ew} \cdot \tan t}\right)}}\right| \]
      8. sqr-neg47.8%

        \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 \cdot 1 + \color{blue}{\left(\frac{eh}{ew} \cdot \tan t\right) \cdot \left(\frac{eh}{ew} \cdot \tan t\right)}}}\right| \]
      9. hypot-undefine47.8%

        \[\leadsto \left|ew \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \frac{eh}{ew} \cdot \tan t\right)}}\right| \]
      10. associate-*l/47.8%

        \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\frac{eh \cdot \tan t}{ew}}\right)}\right| \]
      11. associate-*r/47.8%

        \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh \cdot \frac{\tan t}{ew}}\right)}\right| \]
    11. Simplified47.8%

      \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}}\right| \]
  3. Recombined 3 regimes into one program.
  4. Final simplification51.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -1.8 \cdot 10^{-166}:\\ \;\;\;\;\cos t \cdot \left(-ew\right)\\ \mathbf{elif}\;ew \leq 9 \cdot 10^{-180}:\\ \;\;\;\;eh \cdot \left(\sin t \cdot \left(-\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \frac{-1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 48.9% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -0.000202 \lor \neg \left(t \leq 58000000\right):\\ \;\;\;\;ew \cdot \left(-\cos t\right)\\ \mathbf{else}:\\ \;\;\;\;\cos \tan^{-1} \left(eh \cdot \frac{t}{ew}\right) \cdot \left|ew\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (if (or (<= t -0.000202) (not (<= t 58000000.0)))
   (* ew (- (cos t)))
   (* (cos (atan (* eh (/ t ew)))) (fabs ew))))
double code(double eh, double ew, double t) {
	double tmp;
	if ((t <= -0.000202) || !(t <= 58000000.0)) {
		tmp = ew * -cos(t);
	} else {
		tmp = cos(atan((eh * (t / ew)))) * fabs(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 ((t <= (-0.000202d0)) .or. (.not. (t <= 58000000.0d0))) then
        tmp = ew * -cos(t)
    else
        tmp = cos(atan((eh * (t / ew)))) * abs(ew)
    end if
    code = tmp
end function
public static double code(double eh, double ew, double t) {
	double tmp;
	if ((t <= -0.000202) || !(t <= 58000000.0)) {
		tmp = ew * -Math.cos(t);
	} else {
		tmp = Math.cos(Math.atan((eh * (t / ew)))) * Math.abs(ew);
	}
	return tmp;
}
def code(eh, ew, t):
	tmp = 0
	if (t <= -0.000202) or not (t <= 58000000.0):
		tmp = ew * -math.cos(t)
	else:
		tmp = math.cos(math.atan((eh * (t / ew)))) * math.fabs(ew)
	return tmp
function code(eh, ew, t)
	tmp = 0.0
	if ((t <= -0.000202) || !(t <= 58000000.0))
		tmp = Float64(ew * Float64(-cos(t)));
	else
		tmp = Float64(cos(atan(Float64(eh * Float64(t / ew)))) * abs(ew));
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	tmp = 0.0;
	if ((t <= -0.000202) || ~((t <= 58000000.0)))
		tmp = ew * -cos(t);
	else
		tmp = cos(atan((eh * (t / ew)))) * abs(ew);
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := If[Or[LessEqual[t, -0.000202], N[Not[LessEqual[t, 58000000.0]], $MachinePrecision]], N[(ew * (-N[Cos[t], $MachinePrecision])), $MachinePrecision], N[(N[Cos[N[ArcTan[N[(eh * N[(t / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Abs[ew], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.000202 \lor \neg \left(t \leq 58000000\right):\\
\;\;\;\;ew \cdot \left(-\cos t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.02000000000000004e-4 or 5.8e7 < t

    1. Initial program 99.6%

      \[\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. Step-by-step derivation
      1. sub-neg99.6%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right)\right| \]
      3. distribute-rgt-neg-in99.6%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right) + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      3. associate-*r*53.3%

        \[\leadsto -\left(\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right)\right)} + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      4. fma-undefine53.3%

        \[\leadsto -\color{blue}{\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right), ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      5. associate-/r/53.3%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \color{blue}{\left(\tan t \cdot \frac{eh}{ew}\right)}, ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      7. associate-*r/53.3%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right), \frac{\color{blue}{\cos t \cdot ew}}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      9. associate-/l*53.3%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(ew \cdot \cos t\right)} \]
    9. Step-by-step derivation
      1. associate-*r*24.7%

        \[\leadsto \color{blue}{\left(-1 \cdot ew\right) \cdot \cos t} \]
      2. neg-mul-124.7%

        \[\leadsto \color{blue}{\left(-ew\right)} \cdot \cos t \]
    10. Simplified24.7%

      \[\leadsto \color{blue}{\left(-ew\right) \cdot \cos t} \]

    if -2.02000000000000004e-4 < t < 5.8e7

    1. Initial program 100.0%

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

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right)\right| \]
      3. distribute-rgt-neg-in100.0%

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

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

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

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

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

        \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(-\frac{eh \cdot \tan t}{ew}\right)}\right| \]
      2. distribute-frac-neg271.0%

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

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

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

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

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

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

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

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(\left(-eh\right) \cdot \frac{t}{ew}\right)}\right| \]
    11. Step-by-step derivation
      1. *-un-lft-identity71.0%

        \[\leadsto \color{blue}{1 \cdot \left|ew \cdot \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{t}{ew}\right)\right|} \]
      2. distribute-lft-neg-out71.0%

        \[\leadsto 1 \cdot \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(-eh \cdot \frac{t}{ew}\right)}\right| \]
      3. atan-neg71.0%

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

      \[\leadsto \color{blue}{1 \cdot \left|ew \cdot \cos \left(-\tan^{-1} \left(eh \cdot \frac{t}{ew}\right)\right)\right|} \]
    13. Step-by-step derivation
      1. *-lft-identity71.0%

        \[\leadsto \color{blue}{\left|ew \cdot \cos \left(-\tan^{-1} \left(eh \cdot \frac{t}{ew}\right)\right)\right|} \]
      2. fabs-mul71.0%

        \[\leadsto \color{blue}{\left|ew\right| \cdot \left|\cos \left(-\tan^{-1} \left(eh \cdot \frac{t}{ew}\right)\right)\right|} \]
      3. *-commutative71.0%

        \[\leadsto \color{blue}{\left|\cos \left(-\tan^{-1} \left(eh \cdot \frac{t}{ew}\right)\right)\right| \cdot \left|ew\right|} \]
      4. rem-square-sqrt71.0%

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

        \[\leadsto \color{blue}{\left(\sqrt{\cos \left(-\tan^{-1} \left(eh \cdot \frac{t}{ew}\right)\right)} \cdot \sqrt{\cos \left(-\tan^{-1} \left(eh \cdot \frac{t}{ew}\right)\right)}\right)} \cdot \left|ew\right| \]
      6. rem-square-sqrt71.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -0.000202 \lor \neg \left(t \leq 58000000\right):\\ \;\;\;\;ew \cdot \left(-\cos t\right)\\ \mathbf{else}:\\ \;\;\;\;\cos \tan^{-1} \left(eh \cdot \frac{t}{ew}\right) \cdot \left|ew\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 48.8% accurate, 4.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -0.00042 \lor \neg \left(t \leq 58000000\right):\\ \;\;\;\;\cos t \cdot \left(-ew\right)\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{t}{-ew}\right)}\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (if (or (<= t -0.00042) (not (<= t 58000000.0)))
   (* (cos t) (- ew))
   (fabs (* ew (/ 1.0 (hypot 1.0 (* eh (/ t (- ew)))))))))
double code(double eh, double ew, double t) {
	double tmp;
	if ((t <= -0.00042) || !(t <= 58000000.0)) {
		tmp = cos(t) * -ew;
	} else {
		tmp = fabs((ew * (1.0 / hypot(1.0, (eh * (t / -ew))))));
	}
	return tmp;
}
public static double code(double eh, double ew, double t) {
	double tmp;
	if ((t <= -0.00042) || !(t <= 58000000.0)) {
		tmp = Math.cos(t) * -ew;
	} else {
		tmp = Math.abs((ew * (1.0 / Math.hypot(1.0, (eh * (t / -ew))))));
	}
	return tmp;
}
def code(eh, ew, t):
	tmp = 0
	if (t <= -0.00042) or not (t <= 58000000.0):
		tmp = math.cos(t) * -ew
	else:
		tmp = math.fabs((ew * (1.0 / math.hypot(1.0, (eh * (t / -ew))))))
	return tmp
function code(eh, ew, t)
	tmp = 0.0
	if ((t <= -0.00042) || !(t <= 58000000.0))
		tmp = Float64(cos(t) * Float64(-ew));
	else
		tmp = abs(Float64(ew * Float64(1.0 / hypot(1.0, Float64(eh * Float64(t / Float64(-ew)))))));
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	tmp = 0.0;
	if ((t <= -0.00042) || ~((t <= 58000000.0)))
		tmp = cos(t) * -ew;
	else
		tmp = abs((ew * (1.0 / hypot(1.0, (eh * (t / -ew))))));
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := If[Or[LessEqual[t, -0.00042], N[Not[LessEqual[t, 58000000.0]], $MachinePrecision]], N[(N[Cos[t], $MachinePrecision] * (-ew)), $MachinePrecision], N[Abs[N[(ew * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(eh * N[(t / (-ew)), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.00042 \lor \neg \left(t \leq 58000000\right):\\
\;\;\;\;\cos t \cdot \left(-ew\right)\\

\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{t}{-ew}\right)}\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.2000000000000002e-4 or 5.8e7 < t

    1. Initial program 99.6%

      \[\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. Step-by-step derivation
      1. sub-neg99.6%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right)\right| \]
      3. distribute-rgt-neg-in99.6%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right) + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      3. associate-*r*53.3%

        \[\leadsto -\left(\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right)\right)} + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      4. fma-undefine53.3%

        \[\leadsto -\color{blue}{\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right), ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
      5. associate-/r/53.3%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \color{blue}{\left(\tan t \cdot \frac{eh}{ew}\right)}, ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      7. associate-*r/53.3%

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

        \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right), \frac{\color{blue}{\cos t \cdot ew}}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
      9. associate-/l*53.3%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(ew \cdot \cos t\right)} \]
    9. Step-by-step derivation
      1. associate-*r*24.7%

        \[\leadsto \color{blue}{\left(-1 \cdot ew\right) \cdot \cos t} \]
      2. neg-mul-124.7%

        \[\leadsto \color{blue}{\left(-ew\right)} \cdot \cos t \]
    10. Simplified24.7%

      \[\leadsto \color{blue}{\left(-ew\right) \cdot \cos t} \]

    if -4.2000000000000002e-4 < t < 5.8e7

    1. Initial program 100.0%

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

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right)\right| \]
      3. distribute-rgt-neg-in100.0%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \color{blue}{eh \cdot \left(-\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
      4. cancel-sign-sub100.0%

        \[\leadsto \left|\color{blue}{\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(-eh\right) \cdot \left(-\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
      5. associate-/l*100.0%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \color{blue}{\left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right)} - \left(-eh\right) \cdot \left(-\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right| \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right)\right)\right|} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 71.0%

      \[\leadsto \left|\color{blue}{ew \cdot \cos \tan^{-1} \left(-1 \cdot \frac{eh \cdot \tan t}{ew}\right)}\right| \]
    6. Step-by-step derivation
      1. mul-1-neg71.0%

        \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(-\frac{eh \cdot \tan t}{ew}\right)}\right| \]
      2. distribute-frac-neg271.0%

        \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(\frac{eh \cdot \tan t}{-ew}\right)}\right| \]
      3. associate-/l*71.0%

        \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(eh \cdot \frac{\tan t}{-ew}\right)}\right| \]
    7. Simplified71.0%

      \[\leadsto \left|\color{blue}{ew \cdot \cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)}\right| \]
    8. Taylor expanded in t around 0 71.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(-1 \cdot \frac{eh \cdot t}{ew}\right)}\right| \]
    9. Step-by-step derivation
      1. mul-1-neg84.6%

        \[\leadsto \left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \color{blue}{\left(-\frac{eh \cdot t}{ew}\right)} - ew \cdot \left(\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \frac{\cos t}{eh}\right)\right)\right| \]
      2. associate-/l*84.6%

        \[\leadsto \left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(-\color{blue}{eh \cdot \frac{t}{ew}}\right) - ew \cdot \left(\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \frac{\cos t}{eh}\right)\right)\right| \]
      3. distribute-lft-neg-in84.6%

        \[\leadsto \left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \color{blue}{\left(\left(-eh\right) \cdot \frac{t}{ew}\right)} - ew \cdot \left(\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \frac{\cos t}{eh}\right)\right)\right| \]
    10. Simplified71.0%

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(\left(-eh\right) \cdot \frac{t}{ew}\right)}\right| \]
    11. Step-by-step derivation
      1. cos-atan70.8%

        \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\sqrt{1 + \left(\left(-eh\right) \cdot \frac{t}{ew}\right) \cdot \left(\left(-eh\right) \cdot \frac{t}{ew}\right)}}}\right| \]
      2. hypot-1-def70.8%

        \[\leadsto \left|ew \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \left(-eh\right) \cdot \frac{t}{ew}\right)}}\right| \]
    12. Applied egg-rr70.8%

      \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, \left(-eh\right) \cdot \frac{t}{ew}\right)}}\right| \]
  3. Recombined 2 regimes into one program.
  4. Final simplification49.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -0.00042 \lor \neg \left(t \leq 58000000\right):\\ \;\;\;\;\cos t \cdot \left(-ew\right)\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{t}{-ew}\right)}\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 31.8% accurate, 8.9× speedup?

\[\begin{array}{l} \\ ew \cdot \left(-\cos t\right) \end{array} \]
(FPCore (eh ew t) :precision binary64 (* ew (- (cos t))))
double code(double eh, double ew, double t) {
	return ew * -cos(t);
}
real(8) function code(eh, ew, t)
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    code = ew * -cos(t)
end function
public static double code(double eh, double ew, double t) {
	return ew * -Math.cos(t);
}
def code(eh, ew, t):
	return ew * -math.cos(t)
function code(eh, ew, t)
	return Float64(ew * Float64(-cos(t)))
end
function tmp = code(eh, ew, t)
	tmp = ew * -cos(t);
end
code[eh_, ew_, t_] := N[(ew * (-N[Cos[t], $MachinePrecision])), $MachinePrecision]
\begin{array}{l}

\\
ew \cdot \left(-\cos t\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. Step-by-step derivation
    1. sub-neg99.8%

      \[\leadsto \left|\color{blue}{\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
    2. associate-*l*99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right)\right| \]
    3. distribute-rgt-neg-in99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \color{blue}{eh \cdot \left(-\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
    4. cancel-sign-sub99.8%

      \[\leadsto \left|\color{blue}{\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(-eh\right) \cdot \left(-\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
    5. associate-/l*99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \color{blue}{\left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right)} - \left(-eh\right) \cdot \left(-\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right| \]
  3. Simplified99.8%

    \[\leadsto \color{blue}{\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right)\right)\right|} \]
  4. Add Preprocessing
  5. Applied egg-rr51.4%

    \[\leadsto \color{blue}{0 - \mathsf{fma}\left(eh \cdot \sin t, \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right), ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
  6. Step-by-step derivation
    1. neg-sub051.4%

      \[\leadsto \color{blue}{-\mathsf{fma}\left(eh \cdot \sin t, \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right), ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
    2. fma-undefine51.4%

      \[\leadsto -\color{blue}{\left(\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right) + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
    3. associate-*r*51.4%

      \[\leadsto -\left(\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right)\right)} + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
    4. fma-undefine51.4%

      \[\leadsto -\color{blue}{\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right), ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
    5. associate-/r/51.4%

      \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \color{blue}{\left(\frac{eh}{ew} \cdot \tan t\right)}, ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
    6. *-commutative51.4%

      \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \color{blue}{\left(\tan t \cdot \frac{eh}{ew}\right)}, ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
    7. associate-*r/51.4%

      \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right), \color{blue}{\frac{ew \cdot \cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}}\right) \]
    8. *-commutative51.4%

      \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right), \frac{\color{blue}{\cos t \cdot ew}}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
    9. associate-/l*51.4%

      \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right), \color{blue}{\cos t \cdot \frac{ew}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}}\right) \]
  7. Simplified51.4%

    \[\leadsto \color{blue}{-\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right), \cos t \cdot \frac{ew}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right)} \]
  8. Taylor expanded in eh around 0 31.4%

    \[\leadsto \color{blue}{-1 \cdot \left(ew \cdot \cos t\right)} \]
  9. Step-by-step derivation
    1. associate-*r*31.4%

      \[\leadsto \color{blue}{\left(-1 \cdot ew\right) \cdot \cos t} \]
    2. neg-mul-131.4%

      \[\leadsto \color{blue}{\left(-ew\right)} \cdot \cos t \]
  10. Simplified31.4%

    \[\leadsto \color{blue}{\left(-ew\right) \cdot \cos t} \]
  11. Final simplification31.4%

    \[\leadsto ew \cdot \left(-\cos t\right) \]
  12. Add Preprocessing

Alternative 21: 22.6% accurate, 460.5× speedup?

\[\begin{array}{l} \\ -ew \end{array} \]
(FPCore (eh ew t) :precision binary64 (- ew))
double code(double eh, double ew, double t) {
	return -ew;
}
real(8) function code(eh, ew, t)
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    code = -ew
end function
public static double code(double eh, double ew, double t) {
	return -ew;
}
def code(eh, ew, t):
	return -ew
function code(eh, ew, t)
	return Float64(-ew)
end
function tmp = code(eh, ew, t)
	tmp = -ew;
end
code[eh_, ew_, t_] := (-ew)
\begin{array}{l}

\\
-ew
\end{array}
Derivation
  1. Initial program 99.8%

    \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
  2. Step-by-step derivation
    1. sub-neg99.8%

      \[\leadsto \left|\color{blue}{\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
    2. associate-*l*99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \left(-\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right)\right| \]
    3. distribute-rgt-neg-in99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) + \color{blue}{eh \cdot \left(-\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
    4. cancel-sign-sub99.8%

      \[\leadsto \left|\color{blue}{\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(-eh\right) \cdot \left(-\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)}\right| \]
    5. associate-/l*99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \color{blue}{\left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right)} - \left(-eh\right) \cdot \left(-\sin t \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right)\right| \]
  3. Simplified99.8%

    \[\leadsto \color{blue}{\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right)\right)\right|} \]
  4. Add Preprocessing
  5. Applied egg-rr51.4%

    \[\leadsto \color{blue}{0 - \mathsf{fma}\left(eh \cdot \sin t, \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right), ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
  6. Step-by-step derivation
    1. neg-sub051.4%

      \[\leadsto \color{blue}{-\mathsf{fma}\left(eh \cdot \sin t, \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right), ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
    2. fma-undefine51.4%

      \[\leadsto -\color{blue}{\left(\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right) + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
    3. associate-*r*51.4%

      \[\leadsto -\left(\color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right)\right)} + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
    4. fma-undefine51.4%

      \[\leadsto -\color{blue}{\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\frac{eh}{\frac{ew}{\tan t}}\right), ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right)} \]
    5. associate-/r/51.4%

      \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \color{blue}{\left(\frac{eh}{ew} \cdot \tan t\right)}, ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
    6. *-commutative51.4%

      \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \color{blue}{\left(\tan t \cdot \frac{eh}{ew}\right)}, ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
    7. associate-*r/51.4%

      \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right), \color{blue}{\frac{ew \cdot \cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}}\right) \]
    8. *-commutative51.4%

      \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right), \frac{\color{blue}{\cos t \cdot ew}}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}\right) \]
    9. associate-/l*51.4%

      \[\leadsto -\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right), \color{blue}{\cos t \cdot \frac{ew}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}}\right) \]
  7. Simplified51.4%

    \[\leadsto \color{blue}{-\mathsf{fma}\left(eh, \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right), \cos t \cdot \frac{ew}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right)} \]
  8. Taylor expanded in t around 0 23.3%

    \[\leadsto \color{blue}{-1 \cdot ew} \]
  9. Step-by-step derivation
    1. neg-mul-123.3%

      \[\leadsto \color{blue}{-ew} \]
  10. Simplified23.3%

    \[\leadsto \color{blue}{-ew} \]
  11. Add Preprocessing

Reproduce

?
herbie shell --seed 2024119 
(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)))))))