Example 2 from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 23.1s
Alternatives: 16
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 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 \cdot \left(-\cos t\_1\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) (- (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(fma(ew, (cos(t) * -cos(t_1)), (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) * Float64(-cos(t_1))), 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], $MachinePrecision] * (-N[Cos[t$95$1], $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 \cdot \left(-\cos t\_1\right), eh \cdot \left(\sin t \cdot \sin t\_1\right)\right)\right|
\end{array}
\end{array}
Derivation
  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. fabs-sub99.7%

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

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

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

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

      \[\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 t \cdot \left(-\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\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|\left(ew \cdot \cos t\right) \cdot \cos t\_1 - 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 (- (* (* 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(eh * Float64(tan(t) / Float64(-ew))))
	return abs(Float64(Float64(Float64(ew * cos(t)) * cos(t_1)) - Float64(eh * Float64(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[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $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|\left(ew \cdot \cos t\right) \cdot \cos t\_1 - eh \cdot \left(\sin t \cdot \sin t\_1\right)\right|
\end{array}
\end{array}
Derivation
  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. Final simplification99.8%

    \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\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: 97.9% accurate, 1.1× speedup?

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

\\
{\left(\sqrt{\left|ew \cdot \cos t - \left(eh \cdot \sin t\right) \cdot \sin \left(-\tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right)\right)\right|}\right)}^{2}
\end{array}
Derivation
  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. Step-by-step derivation
    1. add-cube-cbrt98.5%

      \[\leadsto \left|\color{blue}{\left(\sqrt[3]{\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right)} \cdot \sqrt[3]{\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right)}\right) \cdot \sqrt[3]{\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| \]
    2. pow398.5%

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

    \[\leadsto \left|\color{blue}{{\left(\sqrt[3]{ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}}\right)}^{3}} - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right)\right)\right| \]
  7. Step-by-step derivation
    1. add-sqr-sqrt98.2%

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

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

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

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

Alternative 4: 97.5% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
t_1 := \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\\
\mathbf{if}\;eh \leq -5.2 \cdot 10^{+36} \lor \neg \left(eh \leq 1.3 \cdot 10^{+149}\right):\\
\;\;\;\;\left|eh \cdot \left(\sin t + \frac{\left(ew \cdot \cos t\right) \cdot \cos t\_1}{eh}\right)\right|\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if eh < -5.2000000000000003e36 or 1.29999999999999989e149 < 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. Step-by-step derivation
      1. associate-*r*99.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) - \frac{\left(eh \cdot \sin t\right) \cdot \frac{eh}{\frac{ew}{\tan t}}}{\color{blue}{\mathsf{hypot}\left(1, \left(-eh\right) \cdot \frac{\tan t}{ew}\right)}}\right| \]
      12. add-sqr-sqrt35.1%

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

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

      \[\leadsto \left|\color{blue}{-1 \cdot \left(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\right)\right)}\right| \]
    8. Step-by-step derivation
      1. associate-*r*99.3%

        \[\leadsto \left|\color{blue}{\left(-1 \cdot eh\right) \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\right)}\right| \]
      2. neg-mul-199.3%

        \[\leadsto \left|\color{blue}{\left(-eh\right)} \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\right)\right| \]
      3. mul-1-neg99.3%

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

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

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

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

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

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

    if -5.2000000000000003e36 < eh < 1.29999999999999989e149

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

        \[\leadsto \left|\mathsf{fma}\left(ew, \color{blue}{\left(-\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)\right| \]
      2. add-sqr-sqrt19.9%

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

        \[\leadsto \left|\mathsf{fma}\left(ew, \color{blue}{\sqrt{\left(-\cos t\right) \cdot \left(-\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)\right| \]
      4. sqr-neg99.5%

        \[\leadsto \left|\mathsf{fma}\left(ew, \sqrt{\color{blue}{\cos t \cdot \cos t}} \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)\right| \]
      5. sqrt-unprod79.4%

        \[\leadsto \left|\mathsf{fma}\left(ew, \color{blue}{\left(\sqrt{\cos t} \cdot \sqrt{\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)\right| \]
      6. add-sqr-sqrt99.4%

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

        \[\leadsto \left|\mathsf{fma}\left(ew, \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\cos t \cdot \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\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| \]
      8. cos-atan99.4%

        \[\leadsto \left|\mathsf{fma}\left(ew, \mathsf{log1p}\left(\mathsf{expm1}\left(\cos t \cdot \color{blue}{\frac{1}{\sqrt{1 + \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) \cdot \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\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| \]
      9. un-div-inv99.4%

        \[\leadsto \left|\mathsf{fma}\left(ew, \mathsf{log1p}\left(\mathsf{expm1}\left(\color{blue}{\frac{\cos t}{\sqrt{1 + \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) \cdot \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\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| \]
      10. hypot-1-def99.4%

        \[\leadsto \left|\mathsf{fma}\left(ew, \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\cos t}{\color{blue}{\mathsf{hypot}\left(1, \left(-eh\right) \cdot \frac{\tan t}{ew}\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| \]
      11. add-sqr-sqrt50.1%

        \[\leadsto \left|\mathsf{fma}\left(ew, \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\cos t}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\tan t}{ew}\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| \]
    6. Applied egg-rr99.4%

      \[\leadsto \left|\mathsf{fma}\left(ew, \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan 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| \]
    7. Taylor expanded in ew around inf 99.2%

      \[\leadsto \left|\color{blue}{ew \cdot \left(\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| \]
    8. Step-by-step derivation
      1. associate-/l*99.1%

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

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

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

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

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

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

Alternative 5: 91.6% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;eh \leq -8.8 \cdot 10^{+192} \lor \neg \left(eh \leq 4.8 \cdot 10^{+182}\right):\\
\;\;\;\;\left|eh \cdot \sin t\right|\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if eh < -8.8000000000000003e192 or 4.80000000000000019e182 < 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. Step-by-step derivation
      1. associate-*r*99.7%

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

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

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

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

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

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

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

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) - \frac{\left(eh \cdot \sin t\right) \cdot \left(eh \cdot \color{blue}{\frac{1}{\frac{ew}{\tan t}}}\right)}{\sqrt{1 + \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) \cdot \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right)}}\right| \]
      10. un-div-inv29.5%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) - \frac{\left(eh \cdot \sin t\right) \cdot \frac{eh}{\frac{ew}{\tan t}}}{\color{blue}{\mathsf{hypot}\left(1, \left(-eh\right) \cdot \frac{\tan t}{ew}\right)}}\right| \]
      12. add-sqr-sqrt16.3%

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

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

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

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

    if -8.8000000000000003e192 < eh < 4.80000000000000019e182

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

        \[\leadsto \left|\mathsf{fma}\left(ew, \color{blue}{\left(-\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)\right| \]
      2. add-sqr-sqrt21.9%

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

        \[\leadsto \left|\mathsf{fma}\left(ew, \color{blue}{\sqrt{\left(-\cos t\right) \cdot \left(-\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)\right| \]
      4. sqr-neg99.6%

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

        \[\leadsto \left|\mathsf{fma}\left(ew, \color{blue}{\left(\sqrt{\cos t} \cdot \sqrt{\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)\right| \]
      6. add-sqr-sqrt99.5%

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

        \[\leadsto \left|\mathsf{fma}\left(ew, \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\cos t \cdot \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\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| \]
      8. cos-atan99.5%

        \[\leadsto \left|\mathsf{fma}\left(ew, \mathsf{log1p}\left(\mathsf{expm1}\left(\cos t \cdot \color{blue}{\frac{1}{\sqrt{1 + \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) \cdot \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\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| \]
      9. un-div-inv99.5%

        \[\leadsto \left|\mathsf{fma}\left(ew, \mathsf{log1p}\left(\mathsf{expm1}\left(\color{blue}{\frac{\cos t}{\sqrt{1 + \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) \cdot \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\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| \]
      10. hypot-1-def99.5%

        \[\leadsto \left|\mathsf{fma}\left(ew, \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\cos t}{\color{blue}{\mathsf{hypot}\left(1, \left(-eh\right) \cdot \frac{\tan t}{ew}\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| \]
      11. add-sqr-sqrt54.2%

        \[\leadsto \left|\mathsf{fma}\left(ew, \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\cos t}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\tan t}{ew}\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| \]
    6. Applied egg-rr99.5%

      \[\leadsto \left|\mathsf{fma}\left(ew, \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan 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| \]
    7. Taylor expanded in ew around inf 98.2%

      \[\leadsto \left|\color{blue}{ew \cdot \left(\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| \]
    8. Step-by-step derivation
      1. associate-/l*98.1%

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

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

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

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

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

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

Alternative 6: 77.6% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := ew \cdot \cos t\\ t_2 := \left|t\_1 \cdot \cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\right|\\ \mathbf{if}\;ew \leq -2 \cdot 10^{-79}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;ew \leq 7.4 \cdot 10^{-283}:\\ \;\;\;\;\left|eh \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin t\right)\right)\right|\\ \mathbf{elif}\;ew \leq 4.2 \cdot 10^{+138}:\\ \;\;\;\;t\_1 + \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (* ew (cos t)))
        (t_2 (fabs (* t_1 (cos (atan (* eh (/ (tan t) (- ew)))))))))
   (if (<= ew -2e-79)
     t_2
     (if (<= ew 7.4e-283)
       (fabs (* eh (expm1 (log1p (sin t)))))
       (if (<= ew 4.2e+138)
         (+ t_1 (* (* eh (sin t)) (sin (atan (* (tan t) (/ eh ew))))))
         t_2)))))
double code(double eh, double ew, double t) {
	double t_1 = ew * cos(t);
	double t_2 = fabs((t_1 * cos(atan((eh * (tan(t) / -ew))))));
	double tmp;
	if (ew <= -2e-79) {
		tmp = t_2;
	} else if (ew <= 7.4e-283) {
		tmp = fabs((eh * expm1(log1p(sin(t)))));
	} else if (ew <= 4.2e+138) {
		tmp = t_1 + ((eh * sin(t)) * sin(atan((tan(t) * (eh / ew)))));
	} else {
		tmp = t_2;
	}
	return tmp;
}
public static double code(double eh, double ew, double t) {
	double t_1 = ew * Math.cos(t);
	double t_2 = Math.abs((t_1 * Math.cos(Math.atan((eh * (Math.tan(t) / -ew))))));
	double tmp;
	if (ew <= -2e-79) {
		tmp = t_2;
	} else if (ew <= 7.4e-283) {
		tmp = Math.abs((eh * Math.expm1(Math.log1p(Math.sin(t)))));
	} else if (ew <= 4.2e+138) {
		tmp = t_1 + ((eh * Math.sin(t)) * Math.sin(Math.atan((Math.tan(t) * (eh / ew)))));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(eh, ew, t):
	t_1 = ew * math.cos(t)
	t_2 = math.fabs((t_1 * math.cos(math.atan((eh * (math.tan(t) / -ew))))))
	tmp = 0
	if ew <= -2e-79:
		tmp = t_2
	elif ew <= 7.4e-283:
		tmp = math.fabs((eh * math.expm1(math.log1p(math.sin(t)))))
	elif ew <= 4.2e+138:
		tmp = t_1 + ((eh * math.sin(t)) * math.sin(math.atan((math.tan(t) * (eh / ew)))))
	else:
		tmp = t_2
	return tmp
function code(eh, ew, t)
	t_1 = Float64(ew * cos(t))
	t_2 = abs(Float64(t_1 * cos(atan(Float64(eh * Float64(tan(t) / Float64(-ew)))))))
	tmp = 0.0
	if (ew <= -2e-79)
		tmp = t_2;
	elseif (ew <= 7.4e-283)
		tmp = abs(Float64(eh * expm1(log1p(sin(t)))));
	elseif (ew <= 4.2e+138)
		tmp = Float64(t_1 + Float64(Float64(eh * sin(t)) * sin(atan(Float64(tan(t) * Float64(eh / ew))))));
	else
		tmp = t_2;
	end
	return tmp
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Abs[N[(t$95$1 * N[Cos[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -2e-79], t$95$2, If[LessEqual[ew, 7.4e-283], N[Abs[N[(eh * N[(Exp[N[Log[1 + N[Sin[t], $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 4.2e+138], N[(t$95$1 + N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}

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

\mathbf{elif}\;ew \leq 7.4 \cdot 10^{-283}:\\
\;\;\;\;\left|eh \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin t\right)\right)\right|\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if ew < -2e-79 or 4.20000000000000014e138 < 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 86.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*86.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. *-commutative86.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-neg86.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-neg286.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*86.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. Simplified86.6%

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

    if -2e-79 < ew < 7.4000000000000001e-283

    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. Step-by-step derivation
      1. associate-*r*99.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) - \frac{\left(eh \cdot \sin t\right) \cdot \frac{eh}{\frac{ew}{\tan t}}}{\color{blue}{\mathsf{hypot}\left(1, \left(-eh\right) \cdot \frac{\tan t}{ew}\right)}}\right| \]
      12. add-sqr-sqrt37.5%

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

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

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

      \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
    9. Step-by-step derivation
      1. expm1-log1p-u77.0%

        \[\leadsto \left|eh \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sin t\right)\right)}\right| \]
      2. expm1-undefine45.3%

        \[\leadsto \left|eh \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\sin t\right)} - 1\right)}\right| \]
    10. Applied egg-rr45.3%

      \[\leadsto \left|eh \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\sin t\right)} - 1\right)}\right| \]
    11. Step-by-step derivation
      1. expm1-define77.0%

        \[\leadsto \left|eh \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sin t\right)\right)}\right| \]
    12. Simplified77.0%

      \[\leadsto \left|eh \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sin t\right)\right)}\right| \]

    if 7.4000000000000001e-283 < ew < 4.20000000000000014e138

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -2 \cdot 10^{-79}:\\ \;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\right|\\ \mathbf{elif}\;ew \leq 7.4 \cdot 10^{-283}:\\ \;\;\;\;\left|eh \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin t\right)\right)\right|\\ \mathbf{elif}\;ew \leq 4.2 \cdot 10^{+138}:\\ \;\;\;\;ew \cdot \cos t + \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right)\\ \mathbf{else}:\\ \;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 73.2% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;t \leq -0.0015:\\
\;\;\;\;\left|t\_1 \cdot \cos t\_2\right|\\

\mathbf{elif}\;t \leq 0.0136:\\
\;\;\;\;\left|ew + eh \cdot \left(t \cdot \sin t\_2\right)\right|\\

\mathbf{else}:\\
\;\;\;\;t\_1 + eh \cdot \sin t\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.8999999999999998e235

    1. Initial program 99.5%

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

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

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

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

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

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

      \[\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. Step-by-step derivation
      1. associate-*r*99.5%

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

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

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

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

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

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

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

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) - \frac{\left(eh \cdot \sin t\right) \cdot \left(eh \cdot \color{blue}{\frac{1}{\frac{ew}{\tan t}}}\right)}{\sqrt{1 + \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) \cdot \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right)}}\right| \]
      10. un-div-inv49.4%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) - \frac{\left(eh \cdot \sin t\right) \cdot \frac{eh}{\frac{ew}{\tan t}}}{\color{blue}{\mathsf{hypot}\left(1, \left(-eh\right) \cdot \frac{\tan t}{ew}\right)}}\right| \]
      12. add-sqr-sqrt25.9%

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

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

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

      \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
    9. Step-by-step derivation
      1. expm1-log1p-u83.6%

        \[\leadsto \left|eh \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sin t\right)\right)}\right| \]
      2. expm1-undefine83.7%

        \[\leadsto \left|eh \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\sin t\right)} - 1\right)}\right| \]
    10. Applied egg-rr83.7%

      \[\leadsto \left|eh \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\sin t\right)} - 1\right)}\right| \]
    11. Step-by-step derivation
      1. expm1-define83.6%

        \[\leadsto \left|eh \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sin t\right)\right)}\right| \]
    12. Simplified83.6%

      \[\leadsto \left|eh \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sin t\right)\right)}\right| \]

    if -4.8999999999999998e235 < t < -0.0015

    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 69.4%

      \[\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*69.4%

        \[\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. *-commutative69.4%

        \[\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-neg69.4%

        \[\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-neg269.4%

        \[\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*69.4%

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

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

    if -0.0015 < t < 0.0135999999999999992

    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. fabs-sub100.0%

        \[\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-neg100.0%

        \[\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. +-commutative100.0%

        \[\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*100.0%

        \[\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-in100.0%

        \[\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. *-commutative100.0%

        \[\leadsto \left|\mathsf{fma}\left(ew, \color{blue}{\left(-\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)\right| \]
      2. add-sqr-sqrt0.0%

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

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

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

        \[\leadsto \left|\mathsf{fma}\left(ew, \color{blue}{\left(\sqrt{\cos t} \cdot \sqrt{\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)\right| \]
      6. add-sqr-sqrt100.0%

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

        \[\leadsto \left|\mathsf{fma}\left(ew, \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\cos t \cdot \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\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| \]
      8. cos-atan100.0%

        \[\leadsto \left|\mathsf{fma}\left(ew, \mathsf{log1p}\left(\mathsf{expm1}\left(\cos t \cdot \color{blue}{\frac{1}{\sqrt{1 + \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) \cdot \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\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| \]
      9. un-div-inv100.0%

        \[\leadsto \left|\mathsf{fma}\left(ew, \mathsf{log1p}\left(\mathsf{expm1}\left(\color{blue}{\frac{\cos t}{\sqrt{1 + \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) \cdot \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\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| \]
      10. hypot-1-def100.0%

        \[\leadsto \left|\mathsf{fma}\left(ew, \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\cos t}{\color{blue}{\mathsf{hypot}\left(1, \left(-eh\right) \cdot \frac{\tan t}{ew}\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| \]
      11. add-sqr-sqrt52.8%

        \[\leadsto \left|\mathsf{fma}\left(ew, \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\cos t}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\tan t}{ew}\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| \]
    6. Applied egg-rr100.0%

      \[\leadsto \left|\mathsf{fma}\left(ew, \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan 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| \]
    7. Taylor expanded in t around 0 98.4%

      \[\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-neg98.4%

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

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

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

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

    if 0.0135999999999999992 < t

    1. Initial program 99.4%

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

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

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

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

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

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

      \[\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-rr55.6%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto ew \cdot \cos t - \color{blue}{\frac{\tan t \cdot \frac{eh}{ew}}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} \cdot \left(eh \cdot \left(-\sin t\right)\right) \]
    11. Step-by-step derivation
      1. associate-/l*48.5%

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

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

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

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

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

      \[\leadsto ew \cdot \cos t - \color{blue}{-1 \cdot \left(eh \cdot \sin t\right)} \]
    14. Step-by-step derivation
      1. mul-1-neg59.9%

        \[\leadsto ew \cdot \cos t - \color{blue}{\left(-eh \cdot \sin t\right)} \]
      2. *-commutative59.9%

        \[\leadsto ew \cdot \cos t - \left(-\color{blue}{\sin t \cdot eh}\right) \]
      3. distribute-rgt-neg-in59.9%

        \[\leadsto ew \cdot \cos t - \color{blue}{\sin t \cdot \left(-eh\right)} \]
    15. Simplified59.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.9 \cdot 10^{+235}:\\ \;\;\;\;\left|eh \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin t\right)\right)\right|\\ \mathbf{elif}\;t \leq -0.0015:\\ \;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\right|\\ \mathbf{elif}\;t \leq 0.0136:\\ \;\;\;\;\left|ew + eh \cdot \left(t \cdot \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;ew \cdot \cos t + eh \cdot \sin t\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 72.8% accurate, 2.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.00145 \lor \neg \left(t \leq 0.0135\right):\\
\;\;\;\;ew \cdot \cos t + eh \cdot \sin t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -0.00145 or 0.0134999999999999998 < t

    1. Initial program 99.5%

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

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

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

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

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

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

      \[\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-rr55.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto ew \cdot \cos t - \frac{\tan t \cdot \frac{eh}{ew}}{\sqrt{\color{blue}{1 \cdot 1} + \left(\tan t \cdot \frac{eh}{ew}\right) \cdot \left(\tan t \cdot \frac{eh}{ew}\right)}} \cdot \left(eh \cdot \left(-\sin t\right)\right) \]
      3. hypot-undefine50.1%

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

      \[\leadsto ew \cdot \cos t - \color{blue}{\frac{\tan t \cdot \frac{eh}{ew}}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} \cdot \left(eh \cdot \left(-\sin t\right)\right) \]
    11. Step-by-step derivation
      1. associate-/l*50.0%

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

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

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

        \[\leadsto ew \cdot \cos t - \left(\tan t \cdot \frac{\frac{eh}{ew}}{\mathsf{hypot}\left(1, \color{blue}{eh \cdot \frac{\tan t}{ew}}\right)}\right) \cdot \left(eh \cdot \left(-\sin t\right)\right) \]
    12. Simplified49.9%

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

      \[\leadsto ew \cdot \cos t - \color{blue}{-1 \cdot \left(eh \cdot \sin t\right)} \]
    14. Step-by-step derivation
      1. mul-1-neg58.1%

        \[\leadsto ew \cdot \cos t - \color{blue}{\left(-eh \cdot \sin t\right)} \]
      2. *-commutative58.1%

        \[\leadsto ew \cdot \cos t - \left(-\color{blue}{\sin t \cdot eh}\right) \]
      3. distribute-rgt-neg-in58.1%

        \[\leadsto ew \cdot \cos t - \color{blue}{\sin t \cdot \left(-eh\right)} \]
    15. Simplified58.1%

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

    if -0.00145 < t < 0.0134999999999999998

    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. fabs-sub100.0%

        \[\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-neg100.0%

        \[\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. +-commutative100.0%

        \[\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*100.0%

        \[\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-in100.0%

        \[\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. *-commutative100.0%

        \[\leadsto \left|\mathsf{fma}\left(ew, \color{blue}{\left(-\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)\right| \]
      2. add-sqr-sqrt0.0%

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

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

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

        \[\leadsto \left|\mathsf{fma}\left(ew, \color{blue}{\left(\sqrt{\cos t} \cdot \sqrt{\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)\right| \]
      6. add-sqr-sqrt100.0%

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

        \[\leadsto \left|\mathsf{fma}\left(ew, \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\cos t \cdot \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\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| \]
      8. cos-atan100.0%

        \[\leadsto \left|\mathsf{fma}\left(ew, \mathsf{log1p}\left(\mathsf{expm1}\left(\cos t \cdot \color{blue}{\frac{1}{\sqrt{1 + \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) \cdot \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\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| \]
      9. un-div-inv100.0%

        \[\leadsto \left|\mathsf{fma}\left(ew, \mathsf{log1p}\left(\mathsf{expm1}\left(\color{blue}{\frac{\cos t}{\sqrt{1 + \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) \cdot \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\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| \]
      10. hypot-1-def100.0%

        \[\leadsto \left|\mathsf{fma}\left(ew, \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\cos t}{\color{blue}{\mathsf{hypot}\left(1, \left(-eh\right) \cdot \frac{\tan t}{ew}\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| \]
      11. add-sqr-sqrt52.8%

        \[\leadsto \left|\mathsf{fma}\left(ew, \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\cos t}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{-eh} \cdot \sqrt{-eh}\right)} \cdot \frac{\tan t}{ew}\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| \]
    6. Applied egg-rr100.0%

      \[\leadsto \left|\mathsf{fma}\left(ew, \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan 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| \]
    7. Taylor expanded in t around 0 98.4%

      \[\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-neg98.4%

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

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

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

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

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

Alternative 9: 65.3% accurate, 2.2× speedup?

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

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

\mathbf{elif}\;ew \leq 6 \cdot 10^{-113}:\\
\;\;\;\;\left|t\_1\right|\\

\mathbf{else}:\\
\;\;\;\;ew \cdot \cos t + t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if ew < -6.4999999999999999e-73

    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 t around 0 58.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-neg58.1%

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

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

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

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

    if -6.4999999999999999e-73 < ew < 6.0000000000000002e-113

    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. Step-by-step derivation
      1. associate-*r*99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.0000000000000002e-113 < 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.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-rr77.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto ew \cdot \cos t - \frac{\tan t \cdot \frac{eh}{ew}}{\color{blue}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} \cdot \left(eh \cdot \left(-\sin t\right)\right) \]
    10. Applied egg-rr72.8%

      \[\leadsto ew \cdot \cos t - \color{blue}{\frac{\tan t \cdot \frac{eh}{ew}}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} \cdot \left(eh \cdot \left(-\sin t\right)\right) \]
    11. Step-by-step derivation
      1. associate-/l*72.7%

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

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

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

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

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

      \[\leadsto ew \cdot \cos t - \color{blue}{-1 \cdot \left(eh \cdot \sin t\right)} \]
    14. Step-by-step derivation
      1. mul-1-neg75.0%

        \[\leadsto ew \cdot \cos t - \color{blue}{\left(-eh \cdot \sin t\right)} \]
      2. *-commutative75.0%

        \[\leadsto ew \cdot \cos t - \left(-\color{blue}{\sin t \cdot eh}\right) \]
      3. distribute-rgt-neg-in75.0%

        \[\leadsto ew \cdot \cos t - \color{blue}{\sin t \cdot \left(-eh\right)} \]
    15. Simplified75.0%

      \[\leadsto ew \cdot \cos t - \color{blue}{\sin t \cdot \left(-eh\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification70.3%

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

Alternative 10: 65.3% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
t_1 := eh \cdot \sin t\\
\mathbf{if}\;ew \leq -4.6 \cdot 10^{-73}:\\
\;\;\;\;\left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{-ew}\right)}\right|\\

\mathbf{elif}\;ew \leq 6.8 \cdot 10^{-113}:\\
\;\;\;\;\left|t\_1\right|\\

\mathbf{else}:\\
\;\;\;\;ew \cdot \cos t + t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if ew < -4.59999999999999977e-73

    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 t around 0 58.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-neg58.1%

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

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

        \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(eh \cdot \frac{\tan t}{-ew}\right)}\right| \]
    7. Simplified58.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-atan57.9%

        \[\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-def58.0%

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

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

    if -4.59999999999999977e-73 < ew < 6.8000000000000005e-113

    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. Step-by-step derivation
      1. associate-*r*99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.8000000000000005e-113 < 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.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-rr77.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto ew \cdot \cos t - \frac{\tan t \cdot \frac{eh}{ew}}{\color{blue}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} \cdot \left(eh \cdot \left(-\sin t\right)\right) \]
    10. Applied egg-rr72.8%

      \[\leadsto ew \cdot \cos t - \color{blue}{\frac{\tan t \cdot \frac{eh}{ew}}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} \cdot \left(eh \cdot \left(-\sin t\right)\right) \]
    11. Step-by-step derivation
      1. associate-/l*72.7%

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

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

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

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

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

      \[\leadsto ew \cdot \cos t - \color{blue}{-1 \cdot \left(eh \cdot \sin t\right)} \]
    14. Step-by-step derivation
      1. mul-1-neg75.0%

        \[\leadsto ew \cdot \cos t - \color{blue}{\left(-eh \cdot \sin t\right)} \]
      2. *-commutative75.0%

        \[\leadsto ew \cdot \cos t - \left(-\color{blue}{\sin t \cdot eh}\right) \]
      3. distribute-rgt-neg-in75.0%

        \[\leadsto ew \cdot \cos t - \color{blue}{\sin t \cdot \left(-eh\right)} \]
    15. Simplified75.0%

      \[\leadsto ew \cdot \cos t - \color{blue}{\sin t \cdot \left(-eh\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification70.3%

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

Alternative 11: 64.9% accurate, 2.9× speedup?

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

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

\mathbf{elif}\;ew \leq 6 \cdot 10^{-113}:\\
\;\;\;\;\left|t\_1\right|\\

\mathbf{else}:\\
\;\;\;\;ew \cdot \cos t + t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if ew < -4.59999999999999977e-73

    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 t around 0 58.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-neg58.1%

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

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

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

      \[\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 57.1%

      \[\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. associate-*r/57.1%

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

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

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

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

    if -4.59999999999999977e-73 < ew < 6.0000000000000002e-113

    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. Step-by-step derivation
      1. associate-*r*99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.0000000000000002e-113 < 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.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-rr77.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto ew \cdot \cos t - \frac{\tan t \cdot \frac{eh}{ew}}{\color{blue}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} \cdot \left(eh \cdot \left(-\sin t\right)\right) \]
    10. Applied egg-rr72.8%

      \[\leadsto ew \cdot \cos t - \color{blue}{\frac{\tan t \cdot \frac{eh}{ew}}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} \cdot \left(eh \cdot \left(-\sin t\right)\right) \]
    11. Step-by-step derivation
      1. associate-/l*72.7%

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

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

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

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

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

      \[\leadsto ew \cdot \cos t - \color{blue}{-1 \cdot \left(eh \cdot \sin t\right)} \]
    14. Step-by-step derivation
      1. mul-1-neg75.0%

        \[\leadsto ew \cdot \cos t - \color{blue}{\left(-eh \cdot \sin t\right)} \]
      2. *-commutative75.0%

        \[\leadsto ew \cdot \cos t - \left(-\color{blue}{\sin t \cdot eh}\right) \]
      3. distribute-rgt-neg-in75.0%

        \[\leadsto ew \cdot \cos t - \color{blue}{\sin t \cdot \left(-eh\right)} \]
    15. Simplified75.0%

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

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

Alternative 12: 58.5% accurate, 4.2× speedup?

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

\\
\begin{array}{l}
t_1 := eh \cdot \sin t\\
\mathbf{if}\;ew \leq -2.2 \cdot 10^{+148} \lor \neg \left(ew \leq 4.4 \cdot 10^{-90}\right):\\
\;\;\;\;ew \cdot \cos t - t\_1\\

\mathbf{else}:\\
\;\;\;\;\left|t\_1\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if ew < -2.1999999999999999e148 or 4.39999999999999972e-90 < 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. Applied egg-rr62.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto ew \cdot \cos t - \frac{\tan t \cdot \frac{eh}{ew}}{\sqrt{\color{blue}{1 \cdot 1} + \left(\tan t \cdot \frac{eh}{ew}\right) \cdot \left(\tan t \cdot \frac{eh}{ew}\right)}} \cdot \left(eh \cdot \left(-\sin t\right)\right) \]
      3. hypot-undefine61.3%

        \[\leadsto ew \cdot \cos t - \frac{\tan t \cdot \frac{eh}{ew}}{\color{blue}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} \cdot \left(eh \cdot \left(-\sin t\right)\right) \]
    10. Applied egg-rr61.3%

      \[\leadsto ew \cdot \cos t - \color{blue}{\frac{\tan t \cdot \frac{eh}{ew}}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} \cdot \left(eh \cdot \left(-\sin t\right)\right) \]
    11. Step-by-step derivation
      1. associate-/l*61.2%

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

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

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

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

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

      \[\leadsto ew \cdot \cos t - \color{blue}{eh \cdot \sin t} \]

    if -2.1999999999999999e148 < ew < 4.39999999999999972e-90

    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. Step-by-step derivation
      1. associate-*r*99.7%

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

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

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

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

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

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

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

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) - \frac{\left(eh \cdot \sin t\right) \cdot \left(eh \cdot \color{blue}{\frac{1}{\frac{ew}{\tan t}}}\right)}{\sqrt{1 + \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) \cdot \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right)}}\right| \]
      10. un-div-inv62.5%

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) - \frac{\left(eh \cdot \sin t\right) \cdot \frac{eh}{\frac{ew}{\tan t}}}{\color{blue}{\mathsf{hypot}\left(1, \left(-eh\right) \cdot \frac{\tan t}{ew}\right)}}\right| \]
      12. add-sqr-sqrt40.5%

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

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

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

      \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -2.2 \cdot 10^{+148} \lor \neg \left(ew \leq 4.4 \cdot 10^{-90}\right):\\ \;\;\;\;ew \cdot \cos t - eh \cdot \sin t\\ \mathbf{else}:\\ \;\;\;\;\left|eh \cdot \sin t\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 64.6% accurate, 4.2× speedup?

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

\\
\begin{array}{l}
t_1 := eh \cdot \sin t\\
\mathbf{if}\;ew \leq -9.8 \cdot 10^{-74}:\\
\;\;\;\;\left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{t}{-ew}\right)}\right|\\

\mathbf{elif}\;ew \leq 7 \cdot 10^{-113}:\\
\;\;\;\;\left|t\_1\right|\\

\mathbf{else}:\\
\;\;\;\;ew \cdot \cos t + t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if ew < -9.8000000000000006e-74

    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 t around 0 58.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-neg58.1%

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

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

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

      \[\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 57.1%

      \[\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. associate-*r/57.1%

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

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

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

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

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

        \[\leadsto \left|ew \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \frac{\left(-eh\right) \cdot t}{ew}\right)}}\right| \]
      3. associate-/l*56.4%

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

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

    if -9.8000000000000006e-74 < ew < 7.00000000000000057e-113

    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. Step-by-step derivation
      1. associate-*r*99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.00000000000000057e-113 < 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.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-rr77.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto ew \cdot \cos t - \frac{\tan t \cdot \frac{eh}{ew}}{\color{blue}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} \cdot \left(eh \cdot \left(-\sin t\right)\right) \]
    10. Applied egg-rr72.8%

      \[\leadsto ew \cdot \cos t - \color{blue}{\frac{\tan t \cdot \frac{eh}{ew}}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} \cdot \left(eh \cdot \left(-\sin t\right)\right) \]
    11. Step-by-step derivation
      1. associate-/l*72.7%

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

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

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

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

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

      \[\leadsto ew \cdot \cos t - \color{blue}{-1 \cdot \left(eh \cdot \sin t\right)} \]
    14. Step-by-step derivation
      1. mul-1-neg75.0%

        \[\leadsto ew \cdot \cos t - \color{blue}{\left(-eh \cdot \sin t\right)} \]
      2. *-commutative75.0%

        \[\leadsto ew \cdot \cos t - \left(-\color{blue}{\sin t \cdot eh}\right) \]
      3. distribute-rgt-neg-in75.0%

        \[\leadsto ew \cdot \cos t - \color{blue}{\sin t \cdot \left(-eh\right)} \]
    15. Simplified75.0%

      \[\leadsto ew \cdot \cos t - \color{blue}{\sin t \cdot \left(-eh\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification69.9%

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

Alternative 14: 58.7% accurate, 4.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := ew \cdot \cos t\\ t_2 := eh \cdot \sin t\\ \mathbf{if}\;ew \leq -2.5 \cdot 10^{+144}:\\ \;\;\;\;t\_1 - t\_2\\ \mathbf{elif}\;ew \leq 6 \cdot 10^{-113}:\\ \;\;\;\;\left|t\_2\right|\\ \mathbf{else}:\\ \;\;\;\;t\_1 + t\_2\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (* ew (cos t))) (t_2 (* eh (sin t))))
   (if (<= ew -2.5e+144)
     (- t_1 t_2)
     (if (<= ew 6e-113) (fabs t_2) (+ t_1 t_2)))))
double code(double eh, double ew, double t) {
	double t_1 = ew * cos(t);
	double t_2 = eh * sin(t);
	double tmp;
	if (ew <= -2.5e+144) {
		tmp = t_1 - t_2;
	} else if (ew <= 6e-113) {
		tmp = fabs(t_2);
	} else {
		tmp = t_1 + t_2;
	}
	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 = ew * cos(t)
    t_2 = eh * sin(t)
    if (ew <= (-2.5d+144)) then
        tmp = t_1 - t_2
    else if (ew <= 6d-113) then
        tmp = abs(t_2)
    else
        tmp = t_1 + t_2
    end if
    code = tmp
end function
public static double code(double eh, double ew, double t) {
	double t_1 = ew * Math.cos(t);
	double t_2 = eh * Math.sin(t);
	double tmp;
	if (ew <= -2.5e+144) {
		tmp = t_1 - t_2;
	} else if (ew <= 6e-113) {
		tmp = Math.abs(t_2);
	} else {
		tmp = t_1 + t_2;
	}
	return tmp;
}
def code(eh, ew, t):
	t_1 = ew * math.cos(t)
	t_2 = eh * math.sin(t)
	tmp = 0
	if ew <= -2.5e+144:
		tmp = t_1 - t_2
	elif ew <= 6e-113:
		tmp = math.fabs(t_2)
	else:
		tmp = t_1 + t_2
	return tmp
function code(eh, ew, t)
	t_1 = Float64(ew * cos(t))
	t_2 = Float64(eh * sin(t))
	tmp = 0.0
	if (ew <= -2.5e+144)
		tmp = Float64(t_1 - t_2);
	elseif (ew <= 6e-113)
		tmp = abs(t_2);
	else
		tmp = Float64(t_1 + t_2);
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	t_1 = ew * cos(t);
	t_2 = eh * sin(t);
	tmp = 0.0;
	if (ew <= -2.5e+144)
		tmp = t_1 - t_2;
	elseif (ew <= 6e-113)
		tmp = abs(t_2);
	else
		tmp = t_1 + t_2;
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -2.5e+144], N[(t$95$1 - t$95$2), $MachinePrecision], If[LessEqual[ew, 6e-113], N[Abs[t$95$2], $MachinePrecision], N[(t$95$1 + t$95$2), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := ew \cdot \cos t\\
t_2 := eh \cdot \sin t\\
\mathbf{if}\;ew \leq -2.5 \cdot 10^{+144}:\\
\;\;\;\;t\_1 - t\_2\\

\mathbf{elif}\;ew \leq 6 \cdot 10^{-113}:\\
\;\;\;\;\left|t\_2\right|\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if ew < -2.5e144

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto ew \cdot \cos t - \frac{\tan t \cdot \frac{eh}{ew}}{\color{blue}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} \cdot \left(eh \cdot \left(-\sin t\right)\right) \]
    10. Applied egg-rr21.4%

      \[\leadsto ew \cdot \cos t - \color{blue}{\frac{\tan t \cdot \frac{eh}{ew}}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} \cdot \left(eh \cdot \left(-\sin t\right)\right) \]
    11. Step-by-step derivation
      1. associate-/l*21.4%

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

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

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

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

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

      \[\leadsto ew \cdot \cos t - \color{blue}{eh \cdot \sin t} \]

    if -2.5e144 < ew < 6.0000000000000002e-113

    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. Step-by-step derivation
      1. associate-*r*99.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) - \frac{\left(eh \cdot \sin t\right) \cdot \frac{eh}{\frac{ew}{\tan t}}}{\color{blue}{\mathsf{hypot}\left(1, \left(-eh\right) \cdot \frac{\tan t}{ew}\right)}}\right| \]
      12. add-sqr-sqrt40.1%

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

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

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

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

    if 6.0000000000000002e-113 < 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.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-rr77.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto ew \cdot \cos t - \frac{\tan t \cdot \frac{eh}{ew}}{\color{blue}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} \cdot \left(eh \cdot \left(-\sin t\right)\right) \]
    10. Applied egg-rr72.8%

      \[\leadsto ew \cdot \cos t - \color{blue}{\frac{\tan t \cdot \frac{eh}{ew}}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} \cdot \left(eh \cdot \left(-\sin t\right)\right) \]
    11. Step-by-step derivation
      1. associate-/l*72.7%

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

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

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

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

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

      \[\leadsto ew \cdot \cos t - \color{blue}{-1 \cdot \left(eh \cdot \sin t\right)} \]
    14. Step-by-step derivation
      1. mul-1-neg75.0%

        \[\leadsto ew \cdot \cos t - \color{blue}{\left(-eh \cdot \sin t\right)} \]
      2. *-commutative75.0%

        \[\leadsto ew \cdot \cos t - \left(-\color{blue}{\sin t \cdot eh}\right) \]
      3. distribute-rgt-neg-in75.0%

        \[\leadsto ew \cdot \cos t - \color{blue}{\sin t \cdot \left(-eh\right)} \]
    15. Simplified75.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -2.5 \cdot 10^{+144}:\\ \;\;\;\;ew \cdot \cos t - eh \cdot \sin t\\ \mathbf{elif}\;ew \leq 6 \cdot 10^{-113}:\\ \;\;\;\;\left|eh \cdot \sin t\right|\\ \mathbf{else}:\\ \;\;\;\;ew \cdot \cos t + eh \cdot \sin t\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 42.1% accurate, 4.5× speedup?

\[\begin{array}{l} \\ \left|eh \cdot \sin t\right| \end{array} \]
(FPCore (eh ew t) :precision binary64 (fabs (* eh (sin t))))
double code(double eh, double ew, double t) {
	return fabs((eh * sin(t)));
}
real(8) function code(eh, ew, t)
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    code = abs((eh * sin(t)))
end function
public static double code(double eh, double ew, double t) {
	return Math.abs((eh * Math.sin(t)));
}
def code(eh, ew, t):
	return math.fabs((eh * math.sin(t)))
function code(eh, ew, t)
	return abs(Float64(eh * sin(t)))
end
function tmp = code(eh, ew, t)
	tmp = abs((eh * sin(t)));
end
code[eh_, ew_, t_] := N[Abs[N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\left|eh \cdot \sin t\right|
\end{array}
Derivation
  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. Step-by-step derivation
    1. associate-*r*99.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) - \frac{\left(eh \cdot \sin t\right) \cdot \frac{eh}{\frac{ew}{\tan t}}}{\color{blue}{\mathsf{hypot}\left(1, \left(-eh\right) \cdot \frac{\tan t}{ew}\right)}}\right| \]
    12. add-sqr-sqrt45.0%

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

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

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

    \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
  9. Add Preprocessing

Alternative 16: 18.6% accurate, 8.9× speedup?

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

\\
\left|eh \cdot t\right|
\end{array}
Derivation
  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. Step-by-step derivation
    1. associate-*r*99.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) - \frac{\left(eh \cdot \sin t\right) \cdot \frac{eh}{\frac{ew}{\tan t}}}{\color{blue}{\mathsf{hypot}\left(1, \left(-eh\right) \cdot \frac{\tan t}{ew}\right)}}\right| \]
    12. add-sqr-sqrt45.0%

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

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

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

    \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
  9. Taylor expanded in t around 0 21.7%

    \[\leadsto \left|\color{blue}{eh \cdot t}\right| \]
  10. Step-by-step derivation
    1. *-commutative21.7%

      \[\leadsto \left|\color{blue}{t \cdot eh}\right| \]
  11. Simplified21.7%

    \[\leadsto \left|\color{blue}{t \cdot eh}\right| \]
  12. Final simplification21.7%

    \[\leadsto \left|eh \cdot t\right| \]
  13. Add Preprocessing

Reproduce

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