Example from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 23.2s
Alternatives: 14
Speedup: 1.0×

Specification

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

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

      \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew\right) \cdot \sin t + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
    3. fma-defineN/A

      \[\leadsto \mathsf{fabs.f64}\left(\left(\mathsf{fma}\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew, \sin t, \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
    4. fma-lowering-fma.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew\right), \sin t, \left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
  4. Applied egg-rr99.8%

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

Alternative 2: 99.8% accurate, 1.1× speedup?

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

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

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

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(ew \cdot \left(\sin t \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
    2. *-commutativeN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\left(\sin t \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right) \cdot ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\sin t \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
    4. cos-atanN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\sin t \cdot \frac{1}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
    5. un-div-invN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\frac{\sin t}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
    6. /-lowering-/.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\sin t, \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
    7. sin-lowering-sin.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
    8. hypot-1-defN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \left(\mathsf{hypot}\left(1, \frac{\frac{eh}{ew}}{\tan t}\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
    9. hypot-lowering-hypot.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
    10. associate-/l/N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \left(\frac{eh}{\tan t \cdot ew}\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
    11. /-lowering-/.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \left(\tan t \cdot ew\right)\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
    12. *-commutativeN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \left(ew \cdot \tan t\right)\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
    13. *-lowering-*.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \tan t\right)\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
    14. tan-lowering-tan.f6499.8%

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
  4. Applied egg-rr99.8%

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

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

Alternative 3: 98.6% accurate, 1.3× speedup?

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

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

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

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

      \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew\right) \cdot \sin t + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
    3. fma-defineN/A

      \[\leadsto \mathsf{fabs.f64}\left(\left(\mathsf{fma}\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew, \sin t, \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
    4. fma-lowering-fma.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew\right), \sin t, \left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
  4. Applied egg-rr99.8%

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

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right)\right)\right) \]
    2. *-commutativeN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \left(\sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right) \cdot \left(eh \cdot \cos t\right)\right)\right)\right) \]
    3. sin-atanN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \left(\frac{\frac{eh}{ew \cdot \tan t}}{\sqrt{1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}} \cdot \left(eh \cdot \cos t\right)\right)\right)\right) \]
    4. metadata-evalN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \left(\frac{\frac{eh}{ew \cdot \tan t}}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}} \cdot \left(eh \cdot \cos t\right)\right)\right)\right) \]
    5. associate-/r*N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \left(\frac{\frac{\frac{eh}{ew}}{\tan t}}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}} \cdot \left(eh \cdot \cos t\right)\right)\right)\right) \]
    6. div-invN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \left(\frac{\frac{eh}{ew} \cdot \frac{1}{\tan t}}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}} \cdot \left(eh \cdot \cos t\right)\right)\right)\right) \]
    7. associate-*r/N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \left(\left(\frac{eh}{ew} \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}}\right) \cdot \left(eh \cdot \cos t\right)\right)\right)\right) \]
    8. div-invN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \left(\left(\left(eh \cdot \frac{1}{ew}\right) \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}}\right) \cdot \left(eh \cdot \cos t\right)\right)\right)\right) \]
    9. associate-*l*N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \left(\left(eh \cdot \left(\frac{1}{ew} \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}}\right)\right) \cdot \left(eh \cdot \cos t\right)\right)\right)\right) \]
  6. Applied egg-rr77.5%

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

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \left(eh \cdot \frac{\frac{\frac{1}{\tan t}}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}} \cdot \left(eh \cdot \cos t\right)}{ew}\right)\right)\right) \]
    2. clear-numN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \left(eh \cdot \frac{1}{\frac{ew}{\frac{\frac{1}{\tan t}}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}} \cdot \left(eh \cdot \cos t\right)}}\right)\right)\right) \]
    3. un-div-invN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \left(\frac{eh}{\frac{ew}{\frac{\frac{1}{\tan t}}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}} \cdot \left(eh \cdot \cos t\right)}}\right)\right)\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \mathsf{/.f64}\left(eh, \left(\frac{ew}{\frac{\frac{1}{\tan t}}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}} \cdot \left(eh \cdot \cos t\right)}\right)\right)\right)\right) \]
    5. clear-numN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \mathsf{/.f64}\left(eh, \left(\frac{1}{\frac{\frac{\frac{1}{\tan t}}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}} \cdot \left(eh \cdot \cos t\right)}{ew}}\right)\right)\right)\right) \]
    6. associate-*l/N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \mathsf{/.f64}\left(eh, \left(\frac{1}{\frac{\frac{\frac{1}{\tan t}}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}}}{ew} \cdot \left(eh \cdot \cos t\right)}\right)\right)\right)\right) \]
  8. Applied egg-rr99.8%

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

    \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\color{blue}{ew}, \mathsf{sin.f64}\left(t\right), \mathsf{/.f64}\left(eh, \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(t\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right)\right)\right)\right) \]
  10. Step-by-step derivation
    1. Simplified97.4%

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

    Alternative 4: 86.5% accurate, 1.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := eh \cdot \cos t\\ t_2 := \frac{eh}{ew \cdot \tan t}\\ t_3 := \mathsf{hypot}\left(1, t\_2\right)\\ t_4 := \left|\frac{ew \cdot \sin t + t\_2 \cdot t\_1}{t\_3}\right|\\ \mathbf{if}\;t \leq -2.7 \cdot 10^{-15}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-50}:\\ \;\;\;\;\left|eh \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right) + \left(ew \cdot t\right) \cdot \cos \tan^{-1} t\_2\right|\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+146}:\\ \;\;\;\;\left|\mathsf{fma}\left(\frac{ew}{t\_3}, \sin t, eh \cdot \left(t\_1 \cdot \frac{\frac{ew}{eh}}{ew}\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \end{array} \]
    (FPCore (eh ew t)
     :precision binary64
     (let* ((t_1 (* eh (cos t)))
            (t_2 (/ eh (* ew (tan t))))
            (t_3 (hypot 1.0 t_2))
            (t_4 (fabs (/ (+ (* ew (sin t)) (* t_2 t_1)) t_3))))
       (if (<= t -2.7e-15)
         t_4
         (if (<= t 1.35e-50)
           (fabs
            (+ (* eh (sin (atan (/ eh (* ew t))))) (* (* ew t) (cos (atan t_2)))))
           (if (<= t 1.15e+146)
             (fabs (fma (/ ew t_3) (sin t) (* eh (* t_1 (/ (/ ew eh) ew)))))
             t_4)))))
    double code(double eh, double ew, double t) {
    	double t_1 = eh * cos(t);
    	double t_2 = eh / (ew * tan(t));
    	double t_3 = hypot(1.0, t_2);
    	double t_4 = fabs((((ew * sin(t)) + (t_2 * t_1)) / t_3));
    	double tmp;
    	if (t <= -2.7e-15) {
    		tmp = t_4;
    	} else if (t <= 1.35e-50) {
    		tmp = fabs(((eh * sin(atan((eh / (ew * t))))) + ((ew * t) * cos(atan(t_2)))));
    	} else if (t <= 1.15e+146) {
    		tmp = fabs(fma((ew / t_3), sin(t), (eh * (t_1 * ((ew / eh) / ew)))));
    	} else {
    		tmp = t_4;
    	}
    	return tmp;
    }
    
    function code(eh, ew, t)
    	t_1 = Float64(eh * cos(t))
    	t_2 = Float64(eh / Float64(ew * tan(t)))
    	t_3 = hypot(1.0, t_2)
    	t_4 = abs(Float64(Float64(Float64(ew * sin(t)) + Float64(t_2 * t_1)) / t_3))
    	tmp = 0.0
    	if (t <= -2.7e-15)
    		tmp = t_4;
    	elseif (t <= 1.35e-50)
    		tmp = abs(Float64(Float64(eh * sin(atan(Float64(eh / Float64(ew * t))))) + Float64(Float64(ew * t) * cos(atan(t_2)))));
    	elseif (t <= 1.15e+146)
    		tmp = abs(fma(Float64(ew / t_3), sin(t), Float64(eh * Float64(t_1 * Float64(Float64(ew / eh) / ew)))));
    	else
    		tmp = t_4;
    	end
    	return tmp
    end
    
    code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[1.0 ^ 2 + t$95$2 ^ 2], $MachinePrecision]}, Block[{t$95$4 = N[Abs[N[(N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -2.7e-15], t$95$4, If[LessEqual[t, 1.35e-50], N[Abs[N[(N[(eh * N[Sin[N[ArcTan[N[(eh / N[(ew * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(ew * t), $MachinePrecision] * N[Cos[N[ArcTan[t$95$2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.15e+146], N[Abs[N[(N[(ew / t$95$3), $MachinePrecision] * N[Sin[t], $MachinePrecision] + N[(eh * N[(t$95$1 * N[(N[(ew / eh), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$4]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := eh \cdot \cos t\\
    t_2 := \frac{eh}{ew \cdot \tan t}\\
    t_3 := \mathsf{hypot}\left(1, t\_2\right)\\
    t_4 := \left|\frac{ew \cdot \sin t + t\_2 \cdot t\_1}{t\_3}\right|\\
    \mathbf{if}\;t \leq -2.7 \cdot 10^{-15}:\\
    \;\;\;\;t\_4\\
    
    \mathbf{elif}\;t \leq 1.35 \cdot 10^{-50}:\\
    \;\;\;\;\left|eh \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right) + \left(ew \cdot t\right) \cdot \cos \tan^{-1} t\_2\right|\\
    
    \mathbf{elif}\;t \leq 1.15 \cdot 10^{+146}:\\
    \;\;\;\;\left|\mathsf{fma}\left(\frac{ew}{t\_3}, \sin t, eh \cdot \left(t\_1 \cdot \frac{\frac{ew}{eh}}{ew}\right)\right)\right|\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_4\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if t < -2.70000000000000009e-15 or 1.15e146 < t

      1. Initial program 99.8%

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(ew \cdot \left(\sin t \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\left(\sin t \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right) \cdot ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\sin t \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        4. cos-atanN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\sin t \cdot \frac{1}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        5. un-div-invN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\frac{\sin t}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\sin t, \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        7. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        8. hypot-1-defN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \left(\mathsf{hypot}\left(1, \frac{\frac{eh}{ew}}{\tan t}\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        9. hypot-lowering-hypot.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        10. associate-/l/N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \left(\frac{eh}{\tan t \cdot ew}\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        11. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \left(\tan t \cdot ew\right)\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        12. *-commutativeN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \left(ew \cdot \tan t\right)\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        13. *-lowering-*.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \tan t\right)\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        14. tan-lowering-tan.f6499.8%

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
      4. Applied egg-rr99.8%

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

        \[\leadsto \color{blue}{\frac{1}{\left|\frac{\mathsf{hypot}\left(1, \frac{eh}{ew \cdot \tan t}\right)}{\frac{eh \cdot \cos t}{\frac{ew}{\frac{eh}{\tan t}}} + \sin t \cdot ew}\right|}} \]
      6. Step-by-step derivation
        1. fabs-divN/A

          \[\leadsto \frac{1}{\frac{\left|\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}\right|}{\color{blue}{\left|\frac{eh \cdot \cos t}{\frac{ew}{\frac{eh}{\tan t}}} + \sin t \cdot ew\right|}}} \]
        2. clear-numN/A

          \[\leadsto \frac{\left|\frac{eh \cdot \cos t}{\frac{ew}{\frac{eh}{\tan t}}} + \sin t \cdot ew\right|}{\color{blue}{\left|\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}\right|}} \]
        3. div-fabsN/A

          \[\leadsto \left|\frac{\frac{eh \cdot \cos t}{\frac{ew}{\frac{eh}{\tan t}}} + \sin t \cdot ew}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}}\right| \]
        4. fabs-lowering-fabs.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\left(\frac{\frac{eh \cdot \cos t}{\frac{ew}{\frac{eh}{\tan t}}} + \sin t \cdot ew}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}}\right)\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{/.f64}\left(\left(\frac{eh \cdot \cos t}{\frac{ew}{\frac{eh}{\tan t}}} + \sin t \cdot ew\right), \left(\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}\right)\right)\right) \]
      7. Applied egg-rr86.3%

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

      if -2.70000000000000009e-15 < t < 1.35e-50

      1. Initial program 100.0%

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

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

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

          \[\leadsto \mathsf{fabs.f64}\left(\left(eh \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right) + \left(ew \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right) \cdot t\right)\right) \]
        3. +-lowering-+.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(eh \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right), \left(\left(ew \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right) \cdot t\right)\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right), \left(\left(ew \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right) \cdot t\right)\right)\right) \]
        5. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right)\right), \left(\left(ew \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right) \cdot t\right)\right)\right) \]
        6. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\left(\frac{eh}{ew \cdot \tan t}\right)\right)\right)\right), \left(\left(ew \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right) \cdot t\right)\right)\right) \]
        7. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \left(ew \cdot \tan t\right)\right)\right)\right)\right), \left(\left(ew \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right) \cdot t\right)\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \tan t\right)\right)\right)\right)\right), \left(\left(ew \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right) \cdot t\right)\right)\right) \]
        9. tan-lowering-tan.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right), \left(\left(ew \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right) \cdot t\right)\right)\right) \]
        10. *-commutativeN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right), \left(\left(\cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right) \cdot ew\right) \cdot t\right)\right)\right) \]
        11. associate-*l*N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right), \left(\cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right) \cdot \left(ew \cdot t\right)\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right), \left(ew \cdot t\right)\right)\right)\right) \]
      5. Simplified100.0%

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

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{eh}{ew \cdot t}\right)}\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{*.f64}\left(t, ew\right)\right)\right)\right) \]
      7. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \left(ew \cdot t\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{*.f64}\left(t, ew\right)\right)\right)\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \left(t \cdot ew\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{*.f64}\left(t, ew\right)\right)\right)\right) \]
        3. *-lowering-*.f64100.0%

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(t, ew\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{*.f64}\left(t, ew\right)\right)\right)\right) \]
      8. Simplified100.0%

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

      if 1.35e-50 < t < 1.15e146

      1. Initial program 99.4%

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

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

          \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew\right) \cdot \sin t + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
        3. fma-defineN/A

          \[\leadsto \mathsf{fabs.f64}\left(\left(\mathsf{fma}\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew, \sin t, \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
        4. fma-lowering-fma.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew\right), \sin t, \left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
      4. Applied egg-rr99.4%

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right)\right)\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \left(\sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right) \cdot \left(eh \cdot \cos t\right)\right)\right)\right) \]
        3. sin-atanN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \left(\frac{\frac{eh}{ew \cdot \tan t}}{\sqrt{1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}} \cdot \left(eh \cdot \cos t\right)\right)\right)\right) \]
        4. metadata-evalN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \left(\frac{\frac{eh}{ew \cdot \tan t}}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}} \cdot \left(eh \cdot \cos t\right)\right)\right)\right) \]
        5. associate-/r*N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \left(\frac{\frac{\frac{eh}{ew}}{\tan t}}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}} \cdot \left(eh \cdot \cos t\right)\right)\right)\right) \]
        6. div-invN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \left(\frac{\frac{eh}{ew} \cdot \frac{1}{\tan t}}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}} \cdot \left(eh \cdot \cos t\right)\right)\right)\right) \]
        7. associate-*r/N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \left(\left(\frac{eh}{ew} \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}}\right) \cdot \left(eh \cdot \cos t\right)\right)\right)\right) \]
        8. div-invN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \left(\left(\left(eh \cdot \frac{1}{ew}\right) \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}}\right) \cdot \left(eh \cdot \cos t\right)\right)\right)\right) \]
        9. associate-*l*N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \left(\left(eh \cdot \left(\frac{1}{ew} \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}}\right)\right) \cdot \left(eh \cdot \cos t\right)\right)\right)\right) \]
      6. Applied egg-rr94.8%

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

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \mathsf{*.f64}\left(eh, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(\frac{ew}{eh}\right)}, ew\right), \mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right)\right)\right)\right)\right) \]
      8. Step-by-step derivation
        1. /-lowering-/.f6488.3%

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(t\right), \mathsf{*.f64}\left(eh, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(ew, eh\right), ew\right), \mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right)\right)\right)\right)\right) \]
      9. Simplified88.3%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{-15}:\\ \;\;\;\;\left|\frac{ew \cdot \sin t + \frac{eh}{ew \cdot \tan t} \cdot \left(eh \cdot \cos t\right)}{\mathsf{hypot}\left(1, \frac{eh}{ew \cdot \tan t}\right)}\right|\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-50}:\\ \;\;\;\;\left|eh \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right) + \left(ew \cdot t\right) \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right|\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+146}:\\ \;\;\;\;\left|\mathsf{fma}\left(\frac{ew}{\mathsf{hypot}\left(1, \frac{eh}{ew \cdot \tan t}\right)}, \sin t, eh \cdot \left(\left(eh \cdot \cos t\right) \cdot \frac{\frac{ew}{eh}}{ew}\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{ew \cdot \sin t + \frac{eh}{ew \cdot \tan t} \cdot \left(eh \cdot \cos t\right)}{\mathsf{hypot}\left(1, \frac{eh}{ew \cdot \tan t}\right)}\right|\\ \end{array} \]
    5. Add Preprocessing

    Alternative 5: 87.7% accurate, 1.5× speedup?

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

      1. Initial program 99.6%

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(ew \cdot \left(\sin t \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\left(\sin t \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right) \cdot ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\sin t \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        4. cos-atanN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\sin t \cdot \frac{1}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        5. un-div-invN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\frac{\sin t}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\sin t, \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        7. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        8. hypot-1-defN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \left(\mathsf{hypot}\left(1, \frac{\frac{eh}{ew}}{\tan t}\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        9. hypot-lowering-hypot.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        10. associate-/l/N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \left(\frac{eh}{\tan t \cdot ew}\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        11. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \left(\tan t \cdot ew\right)\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        12. *-commutativeN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \left(ew \cdot \tan t\right)\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        13. *-lowering-*.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \tan t\right)\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        14. tan-lowering-tan.f6499.7%

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
      4. Applied egg-rr99.7%

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

        \[\leadsto \color{blue}{\frac{1}{\left|\frac{\mathsf{hypot}\left(1, \frac{eh}{ew \cdot \tan t}\right)}{\frac{eh \cdot \cos t}{\frac{ew}{\frac{eh}{\tan t}}} + \sin t \cdot ew}\right|}} \]
      6. Step-by-step derivation
        1. fabs-divN/A

          \[\leadsto \frac{1}{\frac{\left|\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}\right|}{\color{blue}{\left|\frac{eh \cdot \cos t}{\frac{ew}{\frac{eh}{\tan t}}} + \sin t \cdot ew\right|}}} \]
        2. clear-numN/A

          \[\leadsto \frac{\left|\frac{eh \cdot \cos t}{\frac{ew}{\frac{eh}{\tan t}}} + \sin t \cdot ew\right|}{\color{blue}{\left|\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}\right|}} \]
        3. div-fabsN/A

          \[\leadsto \left|\frac{\frac{eh \cdot \cos t}{\frac{ew}{\frac{eh}{\tan t}}} + \sin t \cdot ew}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}}\right| \]
        4. fabs-lowering-fabs.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\left(\frac{\frac{eh \cdot \cos t}{\frac{ew}{\frac{eh}{\tan t}}} + \sin t \cdot ew}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}}\right)\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{/.f64}\left(\left(\frac{eh \cdot \cos t}{\frac{ew}{\frac{eh}{\tan t}}} + \sin t \cdot ew\right), \left(\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}\right)\right)\right) \]
      7. Applied egg-rr82.8%

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

      if -2.70000000000000009e-15 < t < 1.5999999999999999e-6

      1. Initial program 100.0%

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

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

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

          \[\leadsto \mathsf{fabs.f64}\left(\left(eh \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right) + \left(ew \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right) \cdot t\right)\right) \]
        3. +-lowering-+.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(eh \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right), \left(\left(ew \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right) \cdot t\right)\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right), \left(\left(ew \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right) \cdot t\right)\right)\right) \]
        5. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right)\right), \left(\left(ew \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right) \cdot t\right)\right)\right) \]
        6. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\left(\frac{eh}{ew \cdot \tan t}\right)\right)\right)\right), \left(\left(ew \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right) \cdot t\right)\right)\right) \]
        7. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \left(ew \cdot \tan t\right)\right)\right)\right)\right), \left(\left(ew \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right) \cdot t\right)\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \tan t\right)\right)\right)\right)\right), \left(\left(ew \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right) \cdot t\right)\right)\right) \]
        9. tan-lowering-tan.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right), \left(\left(ew \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right) \cdot t\right)\right)\right) \]
        10. *-commutativeN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right), \left(\left(\cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right) \cdot ew\right) \cdot t\right)\right)\right) \]
        11. associate-*l*N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right), \left(\cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right) \cdot \left(ew \cdot t\right)\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right), \left(ew \cdot t\right)\right)\right)\right) \]
      5. Simplified100.0%

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

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{eh}{ew \cdot t}\right)}\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{*.f64}\left(t, ew\right)\right)\right)\right) \]
      7. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \left(ew \cdot t\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{*.f64}\left(t, ew\right)\right)\right)\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \left(t \cdot ew\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{*.f64}\left(t, ew\right)\right)\right)\right) \]
        3. *-lowering-*.f64100.0%

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(t, ew\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{*.f64}\left(t, ew\right)\right)\right)\right) \]
      8. Simplified100.0%

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

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

    Alternative 6: 79.4% accurate, 1.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{eh}{ew \cdot \tan t}\\ t_2 := \left|\frac{ew \cdot \sin t + eh \cdot t\_1}{\mathsf{hypot}\left(1, t\_1\right)}\right|\\ \mathbf{if}\;ew \leq -6.5 \cdot 10^{+35}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;ew \leq 10^{+136}:\\ \;\;\;\;\left|eh \cdot \cos t + \left(ew \cdot \frac{0.5}{eh}\right) \cdot \left(ew \cdot \left(\tan t \cdot \sin t\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
    (FPCore (eh ew t)
     :precision binary64
     (let* ((t_1 (/ eh (* ew (tan t))))
            (t_2 (fabs (/ (+ (* ew (sin t)) (* eh t_1)) (hypot 1.0 t_1)))))
       (if (<= ew -6.5e+35)
         t_2
         (if (<= ew 1e+136)
           (fabs
            (+ (* eh (cos t)) (* (* ew (/ 0.5 eh)) (* ew (* (tan t) (sin t))))))
           t_2))))
    double code(double eh, double ew, double t) {
    	double t_1 = eh / (ew * tan(t));
    	double t_2 = fabs((((ew * sin(t)) + (eh * t_1)) / hypot(1.0, t_1)));
    	double tmp;
    	if (ew <= -6.5e+35) {
    		tmp = t_2;
    	} else if (ew <= 1e+136) {
    		tmp = fabs(((eh * cos(t)) + ((ew * (0.5 / eh)) * (ew * (tan(t) * sin(t))))));
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    public static double code(double eh, double ew, double t) {
    	double t_1 = eh / (ew * Math.tan(t));
    	double t_2 = Math.abs((((ew * Math.sin(t)) + (eh * t_1)) / Math.hypot(1.0, t_1)));
    	double tmp;
    	if (ew <= -6.5e+35) {
    		tmp = t_2;
    	} else if (ew <= 1e+136) {
    		tmp = Math.abs(((eh * Math.cos(t)) + ((ew * (0.5 / eh)) * (ew * (Math.tan(t) * Math.sin(t))))));
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    def code(eh, ew, t):
    	t_1 = eh / (ew * math.tan(t))
    	t_2 = math.fabs((((ew * math.sin(t)) + (eh * t_1)) / math.hypot(1.0, t_1)))
    	tmp = 0
    	if ew <= -6.5e+35:
    		tmp = t_2
    	elif ew <= 1e+136:
    		tmp = math.fabs(((eh * math.cos(t)) + ((ew * (0.5 / eh)) * (ew * (math.tan(t) * math.sin(t))))))
    	else:
    		tmp = t_2
    	return tmp
    
    function code(eh, ew, t)
    	t_1 = Float64(eh / Float64(ew * tan(t)))
    	t_2 = abs(Float64(Float64(Float64(ew * sin(t)) + Float64(eh * t_1)) / hypot(1.0, t_1)))
    	tmp = 0.0
    	if (ew <= -6.5e+35)
    		tmp = t_2;
    	elseif (ew <= 1e+136)
    		tmp = abs(Float64(Float64(eh * cos(t)) + Float64(Float64(ew * Float64(0.5 / eh)) * Float64(ew * Float64(tan(t) * sin(t))))));
    	else
    		tmp = t_2;
    	end
    	return tmp
    end
    
    function tmp_2 = code(eh, ew, t)
    	t_1 = eh / (ew * tan(t));
    	t_2 = abs((((ew * sin(t)) + (eh * t_1)) / hypot(1.0, t_1)));
    	tmp = 0.0;
    	if (ew <= -6.5e+35)
    		tmp = t_2;
    	elseif (ew <= 1e+136)
    		tmp = abs(((eh * cos(t)) + ((ew * (0.5 / eh)) * (ew * (tan(t) * sin(t))))));
    	else
    		tmp = t_2;
    	end
    	tmp_2 = tmp;
    end
    
    code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Abs[N[(N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] + N[(eh * t$95$1), $MachinePrecision]), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + t$95$1 ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -6.5e+35], t$95$2, If[LessEqual[ew, 1e+136], N[Abs[N[(N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] + N[(N[(ew * N[(0.5 / eh), $MachinePrecision]), $MachinePrecision] * N[(ew * N[(N[Tan[t], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$2]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{eh}{ew \cdot \tan t}\\
    t_2 := \left|\frac{ew \cdot \sin t + eh \cdot t\_1}{\mathsf{hypot}\left(1, t\_1\right)}\right|\\
    \mathbf{if}\;ew \leq -6.5 \cdot 10^{+35}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;ew \leq 10^{+136}:\\
    \;\;\;\;\left|eh \cdot \cos t + \left(ew \cdot \frac{0.5}{eh}\right) \cdot \left(ew \cdot \left(\tan t \cdot \sin t\right)\right)\right|\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_2\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if ew < -6.5000000000000003e35 or 1.00000000000000006e136 < ew

      1. Initial program 99.8%

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

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

          \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew\right) \cdot \sin t + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
        3. fma-defineN/A

          \[\leadsto \mathsf{fabs.f64}\left(\left(\mathsf{fma}\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew, \sin t, \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
        4. fma-lowering-fma.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew\right), \sin t, \left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
      4. Applied egg-rr99.8%

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{fabs.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\color{blue}{eh}, \mathsf{/.f64}\left(\mathsf{tan.f64}\left(t\right), \mathsf{/.f64}\left(eh, ew\right)\right)\right), \mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
      7. Step-by-step derivation
        1. Simplified79.2%

          \[\leadsto \frac{1}{\left|\frac{1}{\frac{1}{\mathsf{hypot}\left(1, \frac{eh}{ew \cdot \tan t}\right)} \cdot \left(\frac{\color{blue}{eh}}{\frac{\tan t}{\frac{eh}{ew}}} + ew \cdot \sin t\right)}\right|} \]
        2. Step-by-step derivation
          1. fabs-divN/A

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

            \[\leadsto \frac{1}{\frac{1}{\left|\color{blue}{\frac{1}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}} \cdot \left(\frac{eh}{\frac{\tan t}{\frac{eh}{ew}}} + ew \cdot \sin t\right)}\right|}} \]
          3. remove-double-divN/A

            \[\leadsto \left|\frac{1}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}} \cdot \left(\frac{eh}{\frac{\tan t}{\frac{eh}{ew}}} + ew \cdot \sin t\right)\right| \]
          4. fabs-lowering-fabs.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\left(\frac{1}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}} \cdot \left(\frac{eh}{\frac{\tan t}{\frac{eh}{ew}}} + ew \cdot \sin t\right)\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\frac{eh}{\frac{\tan t}{\frac{eh}{ew}}} + ew \cdot \sin t\right) \cdot \frac{1}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}}\right)\right) \]
          6. un-div-invN/A

            \[\leadsto \mathsf{fabs.f64}\left(\left(\frac{\frac{eh}{\frac{\tan t}{\frac{eh}{ew}}} + ew \cdot \sin t}{\sqrt{1 \cdot 1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}}\right)\right) \]
        3. Applied egg-rr79.5%

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

        if -6.5000000000000003e35 < ew < 1.00000000000000006e136

        1. Initial program 99.8%

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

            \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
          2. sin-atanN/A

            \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{\frac{\frac{eh}{ew}}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
          3. div-invN/A

            \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{\frac{eh}{ew} \cdot \frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
          4. associate-/l*N/A

            \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \left(\frac{eh}{ew} \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
          5. associate-*r*N/A

            \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}\right) \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
          6. fma-defineN/A

            \[\leadsto \mathsf{fabs.f64}\left(\left(\mathsf{fma}\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}, \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}, \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
          7. fma-lowering-fma.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}\right), \left(\frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), \left(\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
        4. Applied egg-rr53.5%

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

          \[\leadsto \mathsf{fabs.f64}\left(\color{blue}{\left(eh \cdot \cos t + {ew}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t} + \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)}\right) \]
        6. Step-by-step derivation
          1. distribute-lft1-inN/A

            \[\leadsto \mathsf{fabs.f64}\left(\left(eh \cdot \cos t + {ew}^{2} \cdot \left(\left(\frac{-1}{2} + 1\right) \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right) \]
          2. metadata-evalN/A

            \[\leadsto \mathsf{fabs.f64}\left(\left(eh \cdot \cos t + {ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right) \]
          3. +-lowering-+.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(eh \cdot \cos t\right), \left({ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \cos t\right), \left({ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
          5. cos-lowering-cos.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left({ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\left({ew}^{2}\right), \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
          7. unpow2N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\left(ew \cdot ew\right), \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
          9. associate-*r/N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \left(\frac{\frac{1}{2} \cdot {\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
          10. /-lowering-/.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot {\sin t}^{2}\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
          11. *-lowering-*.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({\sin t}^{2}\right)\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
          12. pow-lowering-pow.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\sin t, 2\right)\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
          13. sin-lowering-sin.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(t\right), 2\right)\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
          14. *-lowering-*.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(t\right), 2\right)\right), \mathsf{*.f64}\left(eh, \cos t\right)\right)\right)\right)\right) \]
          15. cos-lowering-cos.f6480.6%

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(t\right), 2\right)\right), \mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right)\right)\right)\right)\right) \]
        7. Simplified80.6%

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

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(ew \cdot \left(ew \cdot \frac{\frac{1}{2} \cdot {\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
          2. *-commutativeN/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(ew \cdot \frac{\frac{1}{2} \cdot {\sin t}^{2}}{eh \cdot \cos t}\right) \cdot ew\right)\right)\right) \]
          3. times-fracN/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(ew \cdot \left(\frac{\frac{1}{2}}{eh} \cdot \frac{{\sin t}^{2}}{\cos t}\right)\right) \cdot ew\right)\right)\right) \]
          4. associate-*r*N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(\left(ew \cdot \frac{\frac{1}{2}}{eh}\right) \cdot \frac{{\sin t}^{2}}{\cos t}\right) \cdot ew\right)\right)\right) \]
          5. associate-*l*N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(ew \cdot \frac{\frac{1}{2}}{eh}\right) \cdot \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\left(ew \cdot \frac{\frac{1}{2}}{eh}\right), \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \left(\frac{\frac{1}{2}}{eh}\right)\right), \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
          8. /-lowering-/.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\frac{{\sin t}^{2}}{\cos t}\right), ew\right)\right)\right)\right) \]
          10. unpow2N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\frac{\sin t \cdot \sin t}{\cos t}\right), ew\right)\right)\right)\right) \]
          11. associate-/l*N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\sin t \cdot \frac{\sin t}{\cos t}\right), ew\right)\right)\right)\right) \]
          12. tan-quotN/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\sin t \cdot \tan t\right), ew\right)\right)\right)\right) \]
          13. *-lowering-*.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\sin t, \tan t\right), ew\right)\right)\right)\right) \]
          14. sin-lowering-sin.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), \tan t\right), ew\right)\right)\right)\right) \]
          15. tan-lowering-tan.f6480.8%

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right) \]
        9. Applied egg-rr80.8%

          \[\leadsto \left|eh \cdot \cos t + \color{blue}{\left(ew \cdot \frac{0.5}{eh}\right) \cdot \left(\left(\sin t \cdot \tan t\right) \cdot ew\right)}\right| \]
      8. Recombined 2 regimes into one program.
      9. Final simplification80.3%

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

      Alternative 7: 79.1% accurate, 2.1× speedup?

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

        1. Initial program 99.8%

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

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

            \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew\right) \cdot \sin t + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
          3. fma-defineN/A

            \[\leadsto \mathsf{fabs.f64}\left(\left(\mathsf{fma}\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew, \sin t, \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
          4. fma-lowering-fma.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew\right), \sin t, \left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
        4. Applied egg-rr99.8%

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

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

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{fabs.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\color{blue}{eh}, \mathsf{/.f64}\left(\mathsf{tan.f64}\left(t\right), \mathsf{/.f64}\left(eh, ew\right)\right)\right), \mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        7. Step-by-step derivation
          1. Simplified79.2%

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

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{fabs.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \color{blue}{\left(\frac{eh}{ew \cdot t}\right)}\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{/.f64}\left(\mathsf{tan.f64}\left(t\right), \mathsf{/.f64}\left(eh, ew\right)\right)\right), \mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
          3. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{fabs.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \left(ew \cdot t\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{/.f64}\left(\mathsf{tan.f64}\left(t\right), \mathsf{/.f64}\left(eh, ew\right)\right)\right), \mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
            2. *-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{fabs.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \left(t \cdot ew\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{/.f64}\left(\mathsf{tan.f64}\left(t\right), \mathsf{/.f64}\left(eh, ew\right)\right)\right), \mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
            3. *-lowering-*.f6478.6%

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{fabs.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(t, ew\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{/.f64}\left(\mathsf{tan.f64}\left(t\right), \mathsf{/.f64}\left(eh, ew\right)\right)\right), \mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
          4. Simplified78.6%

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

          if -5.5999999999999996e37 < ew < 1.00000000000000006e136

          1. Initial program 99.8%

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

              \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
            2. sin-atanN/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{\frac{\frac{eh}{ew}}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
            3. div-invN/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{\frac{eh}{ew} \cdot \frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
            4. associate-/l*N/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \left(\frac{eh}{ew} \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
            5. associate-*r*N/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}\right) \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
            6. fma-defineN/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(\mathsf{fma}\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}, \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}, \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
            7. fma-lowering-fma.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}\right), \left(\frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), \left(\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
          4. Applied egg-rr53.5%

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

            \[\leadsto \mathsf{fabs.f64}\left(\color{blue}{\left(eh \cdot \cos t + {ew}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t} + \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)}\right) \]
          6. Step-by-step derivation
            1. distribute-lft1-inN/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(eh \cdot \cos t + {ew}^{2} \cdot \left(\left(\frac{-1}{2} + 1\right) \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right) \]
            2. metadata-evalN/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(eh \cdot \cos t + {ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right) \]
            3. +-lowering-+.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(eh \cdot \cos t\right), \left({ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \cos t\right), \left({ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            5. cos-lowering-cos.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left({ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\left({ew}^{2}\right), \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            7. unpow2N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\left(ew \cdot ew\right), \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            9. associate-*r/N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \left(\frac{\frac{1}{2} \cdot {\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            10. /-lowering-/.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot {\sin t}^{2}\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
            11. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({\sin t}^{2}\right)\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
            12. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\sin t, 2\right)\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
            13. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(t\right), 2\right)\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
            14. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(t\right), 2\right)\right), \mathsf{*.f64}\left(eh, \cos t\right)\right)\right)\right)\right) \]
            15. cos-lowering-cos.f6480.6%

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(t\right), 2\right)\right), \mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right)\right)\right)\right)\right) \]
          7. Simplified80.6%

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

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(ew \cdot \left(ew \cdot \frac{\frac{1}{2} \cdot {\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            2. *-commutativeN/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(ew \cdot \frac{\frac{1}{2} \cdot {\sin t}^{2}}{eh \cdot \cos t}\right) \cdot ew\right)\right)\right) \]
            3. times-fracN/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(ew \cdot \left(\frac{\frac{1}{2}}{eh} \cdot \frac{{\sin t}^{2}}{\cos t}\right)\right) \cdot ew\right)\right)\right) \]
            4. associate-*r*N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(\left(ew \cdot \frac{\frac{1}{2}}{eh}\right) \cdot \frac{{\sin t}^{2}}{\cos t}\right) \cdot ew\right)\right)\right) \]
            5. associate-*l*N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(ew \cdot \frac{\frac{1}{2}}{eh}\right) \cdot \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\left(ew \cdot \frac{\frac{1}{2}}{eh}\right), \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \left(\frac{\frac{1}{2}}{eh}\right)\right), \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
            8. /-lowering-/.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
            9. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\frac{{\sin t}^{2}}{\cos t}\right), ew\right)\right)\right)\right) \]
            10. unpow2N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\frac{\sin t \cdot \sin t}{\cos t}\right), ew\right)\right)\right)\right) \]
            11. associate-/l*N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\sin t \cdot \frac{\sin t}{\cos t}\right), ew\right)\right)\right)\right) \]
            12. tan-quotN/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\sin t \cdot \tan t\right), ew\right)\right)\right)\right) \]
            13. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\sin t, \tan t\right), ew\right)\right)\right)\right) \]
            14. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), \tan t\right), ew\right)\right)\right)\right) \]
            15. tan-lowering-tan.f6480.8%

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right) \]
          9. Applied egg-rr80.8%

            \[\leadsto \left|eh \cdot \cos t + \color{blue}{\left(ew \cdot \frac{0.5}{eh}\right) \cdot \left(\left(\sin t \cdot \tan t\right) \cdot ew\right)}\right| \]
        8. Recombined 2 regimes into one program.
        9. Final simplification80.0%

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

        Alternative 8: 73.3% accurate, 2.1× speedup?

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

          1. Initial program 99.8%

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

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

              \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew\right) \cdot \sin t + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
            3. fma-defineN/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(\mathsf{fma}\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew, \sin t, \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
            4. fma-lowering-fma.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew\right), \sin t, \left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
          4. Applied egg-rr99.8%

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

            \[\leadsto \mathsf{fabs.f64}\left(\color{blue}{\left(ew \cdot \sin t\right)}\right) \]
          6. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(ew, \sin t\right)\right) \]
            2. sin-lowering-sin.f6482.6%

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right)\right) \]
          7. Simplified82.6%

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

          if -2.60000000000000012e196 < ew < 1.1e136

          1. Initial program 99.9%

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

              \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
            2. sin-atanN/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{\frac{\frac{eh}{ew}}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
            3. div-invN/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{\frac{eh}{ew} \cdot \frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
            4. associate-/l*N/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \left(\frac{eh}{ew} \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
            5. associate-*r*N/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}\right) \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
            6. fma-defineN/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(\mathsf{fma}\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}, \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}, \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
            7. fma-lowering-fma.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}\right), \left(\frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), \left(\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
          4. Applied egg-rr57.7%

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

            \[\leadsto \mathsf{fabs.f64}\left(\color{blue}{\left(eh \cdot \cos t + {ew}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t} + \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)}\right) \]
          6. Step-by-step derivation
            1. distribute-lft1-inN/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(eh \cdot \cos t + {ew}^{2} \cdot \left(\left(\frac{-1}{2} + 1\right) \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right) \]
            2. metadata-evalN/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(eh \cdot \cos t + {ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right) \]
            3. +-lowering-+.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(eh \cdot \cos t\right), \left({ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \cos t\right), \left({ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            5. cos-lowering-cos.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left({ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\left({ew}^{2}\right), \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            7. unpow2N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\left(ew \cdot ew\right), \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            9. associate-*r/N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \left(\frac{\frac{1}{2} \cdot {\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            10. /-lowering-/.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot {\sin t}^{2}\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
            11. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({\sin t}^{2}\right)\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
            12. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\sin t, 2\right)\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
            13. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(t\right), 2\right)\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
            14. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(t\right), 2\right)\right), \mathsf{*.f64}\left(eh, \cos t\right)\right)\right)\right)\right) \]
            15. cos-lowering-cos.f6475.0%

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(t\right), 2\right)\right), \mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right)\right)\right)\right)\right) \]
          7. Simplified75.0%

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

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(ew \cdot \left(ew \cdot \frac{\frac{1}{2} \cdot {\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            2. *-commutativeN/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(ew \cdot \frac{\frac{1}{2} \cdot {\sin t}^{2}}{eh \cdot \cos t}\right) \cdot ew\right)\right)\right) \]
            3. times-fracN/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(ew \cdot \left(\frac{\frac{1}{2}}{eh} \cdot \frac{{\sin t}^{2}}{\cos t}\right)\right) \cdot ew\right)\right)\right) \]
            4. associate-*r*N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(\left(ew \cdot \frac{\frac{1}{2}}{eh}\right) \cdot \frac{{\sin t}^{2}}{\cos t}\right) \cdot ew\right)\right)\right) \]
            5. associate-*l*N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(ew \cdot \frac{\frac{1}{2}}{eh}\right) \cdot \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\left(ew \cdot \frac{\frac{1}{2}}{eh}\right), \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \left(\frac{\frac{1}{2}}{eh}\right)\right), \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
            8. /-lowering-/.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
            9. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\frac{{\sin t}^{2}}{\cos t}\right), ew\right)\right)\right)\right) \]
            10. unpow2N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\frac{\sin t \cdot \sin t}{\cos t}\right), ew\right)\right)\right)\right) \]
            11. associate-/l*N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\sin t \cdot \frac{\sin t}{\cos t}\right), ew\right)\right)\right)\right) \]
            12. tan-quotN/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\sin t \cdot \tan t\right), ew\right)\right)\right)\right) \]
            13. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\sin t, \tan t\right), ew\right)\right)\right)\right) \]
            14. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), \tan t\right), ew\right)\right)\right)\right) \]
            15. tan-lowering-tan.f6477.8%

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right) \]
          9. Applied egg-rr77.8%

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

          if 1.1e136 < ew

          1. Initial program 99.7%

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

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(ew \cdot \left(\sin t \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
            2. *-commutativeN/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\left(\sin t \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right) \cdot ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\sin t \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
            4. cos-atanN/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\sin t \cdot \frac{1}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
            5. un-div-invN/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\frac{\sin t}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
            6. /-lowering-/.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\sin t, \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
            7. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
            8. hypot-1-defN/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \left(\mathsf{hypot}\left(1, \frac{\frac{eh}{ew}}{\tan t}\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
            9. hypot-lowering-hypot.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
            10. associate-/l/N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \left(\frac{eh}{\tan t \cdot ew}\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
            11. /-lowering-/.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \left(\tan t \cdot ew\right)\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
            12. *-commutativeN/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \left(ew \cdot \tan t\right)\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
            13. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \tan t\right)\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
            14. tan-lowering-tan.f6499.7%

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
          4. Applied egg-rr99.7%

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

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

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{fabs.f64}\left(\mathsf{/.f64}\left(\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right), \mathsf{+.f64}\left(\color{blue}{\left(\frac{{eh}^{2}}{ew \cdot t}\right)}, \mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), ew\right)\right)\right)\right)\right) \]
          7. Step-by-step derivation
            1. associate-/r*N/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{fabs.f64}\left(\mathsf{/.f64}\left(\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right), \mathsf{+.f64}\left(\left(\frac{\frac{{eh}^{2}}{ew}}{t}\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), ew\right)\right)\right)\right)\right) \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{fabs.f64}\left(\mathsf{/.f64}\left(\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\frac{{eh}^{2}}{ew}\right), t\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), ew\right)\right)\right)\right)\right) \]
            3. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{fabs.f64}\left(\mathsf{/.f64}\left(\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left({eh}^{2}\right), ew\right), t\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), ew\right)\right)\right)\right)\right) \]
            4. unpow2N/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{fabs.f64}\left(\mathsf{/.f64}\left(\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(eh \cdot eh\right), ew\right), t\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), ew\right)\right)\right)\right)\right) \]
            5. *-lowering-*.f6476.5%

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{fabs.f64}\left(\mathsf{/.f64}\left(\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(eh, eh\right), ew\right), t\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), ew\right)\right)\right)\right)\right) \]
          8. Simplified76.5%

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

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

        Alternative 9: 73.5% accurate, 2.2× speedup?

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

          1. Initial program 99.8%

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

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

              \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew\right) \cdot \sin t + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
            3. fma-defineN/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(\mathsf{fma}\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew, \sin t, \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
            4. fma-lowering-fma.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew\right), \sin t, \left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
          4. Applied egg-rr99.8%

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

            \[\leadsto \mathsf{fabs.f64}\left(\color{blue}{\left(ew \cdot \sin t\right)}\right) \]
          6. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(ew, \sin t\right)\right) \]
            2. sin-lowering-sin.f6482.6%

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right)\right) \]
          7. Simplified82.6%

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

          if -6.2000000000000003e190 < ew < 1.07999999999999994e136

          1. Initial program 99.9%

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

              \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
            2. sin-atanN/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{\frac{\frac{eh}{ew}}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
            3. div-invN/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{\frac{eh}{ew} \cdot \frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
            4. associate-/l*N/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \left(\frac{eh}{ew} \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
            5. associate-*r*N/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}\right) \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
            6. fma-defineN/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(\mathsf{fma}\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}, \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}, \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
            7. fma-lowering-fma.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}\right), \left(\frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), \left(\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
          4. Applied egg-rr57.7%

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

            \[\leadsto \mathsf{fabs.f64}\left(\color{blue}{\left(eh \cdot \cos t + {ew}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t} + \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)}\right) \]
          6. Step-by-step derivation
            1. distribute-lft1-inN/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(eh \cdot \cos t + {ew}^{2} \cdot \left(\left(\frac{-1}{2} + 1\right) \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right) \]
            2. metadata-evalN/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(eh \cdot \cos t + {ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right) \]
            3. +-lowering-+.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(eh \cdot \cos t\right), \left({ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \cos t\right), \left({ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            5. cos-lowering-cos.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left({ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\left({ew}^{2}\right), \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            7. unpow2N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\left(ew \cdot ew\right), \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            9. associate-*r/N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \left(\frac{\frac{1}{2} \cdot {\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            10. /-lowering-/.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot {\sin t}^{2}\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
            11. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({\sin t}^{2}\right)\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
            12. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\sin t, 2\right)\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
            13. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(t\right), 2\right)\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
            14. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(t\right), 2\right)\right), \mathsf{*.f64}\left(eh, \cos t\right)\right)\right)\right)\right) \]
            15. cos-lowering-cos.f6475.0%

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(t\right), 2\right)\right), \mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right)\right)\right)\right)\right) \]
          7. Simplified75.0%

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

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(ew \cdot \left(ew \cdot \frac{\frac{1}{2} \cdot {\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
            2. *-commutativeN/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(ew \cdot \frac{\frac{1}{2} \cdot {\sin t}^{2}}{eh \cdot \cos t}\right) \cdot ew\right)\right)\right) \]
            3. times-fracN/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(ew \cdot \left(\frac{\frac{1}{2}}{eh} \cdot \frac{{\sin t}^{2}}{\cos t}\right)\right) \cdot ew\right)\right)\right) \]
            4. associate-*r*N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(\left(ew \cdot \frac{\frac{1}{2}}{eh}\right) \cdot \frac{{\sin t}^{2}}{\cos t}\right) \cdot ew\right)\right)\right) \]
            5. associate-*l*N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(ew \cdot \frac{\frac{1}{2}}{eh}\right) \cdot \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\left(ew \cdot \frac{\frac{1}{2}}{eh}\right), \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \left(\frac{\frac{1}{2}}{eh}\right)\right), \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
            8. /-lowering-/.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
            9. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\frac{{\sin t}^{2}}{\cos t}\right), ew\right)\right)\right)\right) \]
            10. unpow2N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\frac{\sin t \cdot \sin t}{\cos t}\right), ew\right)\right)\right)\right) \]
            11. associate-/l*N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\sin t \cdot \frac{\sin t}{\cos t}\right), ew\right)\right)\right)\right) \]
            12. tan-quotN/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\sin t \cdot \tan t\right), ew\right)\right)\right)\right) \]
            13. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\sin t, \tan t\right), ew\right)\right)\right)\right) \]
            14. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), \tan t\right), ew\right)\right)\right)\right) \]
            15. tan-lowering-tan.f6477.8%

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right) \]
          9. Applied egg-rr77.8%

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

          if 1.07999999999999994e136 < ew

          1. Initial program 99.7%

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

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

              \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew\right) \cdot \sin t + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
            3. fma-defineN/A

              \[\leadsto \mathsf{fabs.f64}\left(\left(\mathsf{fma}\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew, \sin t, \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
            4. fma-lowering-fma.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew\right), \sin t, \left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
          4. Applied egg-rr99.7%

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

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

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{fabs.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{/.f64}\left(\mathsf{tan.f64}\left(t\right), \mathsf{/.f64}\left(eh, ew\right)\right)\right), \mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
          7. Step-by-step derivation
            1. Simplified74.9%

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

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

          Alternative 10: 73.4% accurate, 2.2× speedup?

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

            1. Initial program 99.8%

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

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

                \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew\right) \cdot \sin t + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
              3. fma-defineN/A

                \[\leadsto \mathsf{fabs.f64}\left(\left(\mathsf{fma}\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew, \sin t, \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
              4. fma-lowering-fma.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew\right), \sin t, \left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
            4. Applied egg-rr99.8%

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

              \[\leadsto \mathsf{fabs.f64}\left(\color{blue}{\left(ew \cdot \sin t\right)}\right) \]
            6. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(ew, \sin t\right)\right) \]
              2. sin-lowering-sin.f6482.6%

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right)\right) \]
            7. Simplified82.6%

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

            if -1.25000000000000005e191 < ew < 1.3500000000000001e136

            1. Initial program 99.9%

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

                \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
              2. sin-atanN/A

                \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{\frac{\frac{eh}{ew}}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
              3. div-invN/A

                \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{\frac{eh}{ew} \cdot \frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
              4. associate-/l*N/A

                \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \left(\frac{eh}{ew} \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
              5. associate-*r*N/A

                \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}\right) \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
              6. fma-defineN/A

                \[\leadsto \mathsf{fabs.f64}\left(\left(\mathsf{fma}\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}, \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}, \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
              7. fma-lowering-fma.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}\right), \left(\frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), \left(\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
            4. Applied egg-rr57.7%

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

              \[\leadsto \mathsf{fabs.f64}\left(\color{blue}{\left(eh \cdot \cos t + {ew}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t} + \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)}\right) \]
            6. Step-by-step derivation
              1. distribute-lft1-inN/A

                \[\leadsto \mathsf{fabs.f64}\left(\left(eh \cdot \cos t + {ew}^{2} \cdot \left(\left(\frac{-1}{2} + 1\right) \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right) \]
              2. metadata-evalN/A

                \[\leadsto \mathsf{fabs.f64}\left(\left(eh \cdot \cos t + {ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right) \]
              3. +-lowering-+.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(eh \cdot \cos t\right), \left({ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \cos t\right), \left({ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
              5. cos-lowering-cos.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left({ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\left({ew}^{2}\right), \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
              7. unpow2N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\left(ew \cdot ew\right), \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
              8. *-lowering-*.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
              9. associate-*r/N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \left(\frac{\frac{1}{2} \cdot {\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
              10. /-lowering-/.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot {\sin t}^{2}\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
              11. *-lowering-*.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({\sin t}^{2}\right)\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
              12. pow-lowering-pow.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\sin t, 2\right)\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
              13. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(t\right), 2\right)\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
              14. *-lowering-*.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(t\right), 2\right)\right), \mathsf{*.f64}\left(eh, \cos t\right)\right)\right)\right)\right) \]
              15. cos-lowering-cos.f6475.0%

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(t\right), 2\right)\right), \mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right)\right)\right)\right)\right) \]
            7. Simplified75.0%

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

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(ew \cdot \left(ew \cdot \frac{\frac{1}{2} \cdot {\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
              2. *-commutativeN/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(ew \cdot \frac{\frac{1}{2} \cdot {\sin t}^{2}}{eh \cdot \cos t}\right) \cdot ew\right)\right)\right) \]
              3. times-fracN/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(ew \cdot \left(\frac{\frac{1}{2}}{eh} \cdot \frac{{\sin t}^{2}}{\cos t}\right)\right) \cdot ew\right)\right)\right) \]
              4. associate-*r*N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(\left(ew \cdot \frac{\frac{1}{2}}{eh}\right) \cdot \frac{{\sin t}^{2}}{\cos t}\right) \cdot ew\right)\right)\right) \]
              5. associate-*l*N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(ew \cdot \frac{\frac{1}{2}}{eh}\right) \cdot \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\left(ew \cdot \frac{\frac{1}{2}}{eh}\right), \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \left(\frac{\frac{1}{2}}{eh}\right)\right), \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
              8. /-lowering-/.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\frac{{\sin t}^{2}}{\cos t}\right), ew\right)\right)\right)\right) \]
              10. unpow2N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\frac{\sin t \cdot \sin t}{\cos t}\right), ew\right)\right)\right)\right) \]
              11. associate-/l*N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\sin t \cdot \frac{\sin t}{\cos t}\right), ew\right)\right)\right)\right) \]
              12. tan-quotN/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\sin t \cdot \tan t\right), ew\right)\right)\right)\right) \]
              13. *-lowering-*.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\sin t, \tan t\right), ew\right)\right)\right)\right) \]
              14. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), \tan t\right), ew\right)\right)\right)\right) \]
              15. tan-lowering-tan.f6477.8%

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right) \]
            9. Applied egg-rr77.8%

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

            if 1.3500000000000001e136 < ew

            1. Initial program 99.7%

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

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(ew \cdot \left(\sin t \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
              2. *-commutativeN/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\left(\sin t \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right) \cdot ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\sin t \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
              4. cos-atanN/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\sin t \cdot \frac{1}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
              5. un-div-invN/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\frac{\sin t}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
              6. /-lowering-/.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\sin t, \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
              7. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
              8. hypot-1-defN/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \left(\mathsf{hypot}\left(1, \frac{\frac{eh}{ew}}{\tan t}\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
              9. hypot-lowering-hypot.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
              10. associate-/l/N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \left(\frac{eh}{\tan t \cdot ew}\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
              11. /-lowering-/.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \left(\tan t \cdot ew\right)\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
              12. *-commutativeN/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \left(ew \cdot \tan t\right)\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
              13. *-lowering-*.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \tan t\right)\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
              14. tan-lowering-tan.f6499.7%

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right), ew\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
            4. Applied egg-rr99.7%

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

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

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{fabs.f64}\left(\mathsf{/.f64}\left(\color{blue}{1}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{/.f64}\left(ew, \mathsf{/.f64}\left(eh, \mathsf{tan.f64}\left(t\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), ew\right)\right)\right)\right)\right) \]
            7. Step-by-step derivation
              1. Simplified74.8%

                \[\leadsto \frac{1}{\left|\frac{\color{blue}{1}}{\frac{eh \cdot \cos t}{\frac{ew}{\frac{eh}{\tan t}}} + \sin t \cdot ew}\right|} \]
            8. Recombined 3 regimes into one program.
            9. Final simplification77.8%

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

            Alternative 11: 73.4% accurate, 2.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|ew \cdot \sin t\right|\\ \mathbf{if}\;ew \leq -6.2 \cdot 10^{+190}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;ew \leq 1.85 \cdot 10^{+136}:\\ \;\;\;\;\left|eh \cdot \cos t + \left(ew \cdot \frac{0.5}{eh}\right) \cdot \left(ew \cdot \left(\tan t \cdot \sin t\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (eh ew t)
             :precision binary64
             (let* ((t_1 (fabs (* ew (sin t)))))
               (if (<= ew -6.2e+190)
                 t_1
                 (if (<= ew 1.85e+136)
                   (fabs
                    (+ (* eh (cos t)) (* (* ew (/ 0.5 eh)) (* ew (* (tan t) (sin t))))))
                   t_1))))
            double code(double eh, double ew, double t) {
            	double t_1 = fabs((ew * sin(t)));
            	double tmp;
            	if (ew <= -6.2e+190) {
            		tmp = t_1;
            	} else if (ew <= 1.85e+136) {
            		tmp = fabs(((eh * cos(t)) + ((ew * (0.5 / eh)) * (ew * (tan(t) * sin(t))))));
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            real(8) function code(eh, ew, t)
                real(8), intent (in) :: eh
                real(8), intent (in) :: ew
                real(8), intent (in) :: t
                real(8) :: t_1
                real(8) :: tmp
                t_1 = abs((ew * sin(t)))
                if (ew <= (-6.2d+190)) then
                    tmp = t_1
                else if (ew <= 1.85d+136) then
                    tmp = abs(((eh * cos(t)) + ((ew * (0.5d0 / eh)) * (ew * (tan(t) * sin(t))))))
                else
                    tmp = t_1
                end if
                code = tmp
            end function
            
            public static double code(double eh, double ew, double t) {
            	double t_1 = Math.abs((ew * Math.sin(t)));
            	double tmp;
            	if (ew <= -6.2e+190) {
            		tmp = t_1;
            	} else if (ew <= 1.85e+136) {
            		tmp = Math.abs(((eh * Math.cos(t)) + ((ew * (0.5 / eh)) * (ew * (Math.tan(t) * Math.sin(t))))));
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            def code(eh, ew, t):
            	t_1 = math.fabs((ew * math.sin(t)))
            	tmp = 0
            	if ew <= -6.2e+190:
            		tmp = t_1
            	elif ew <= 1.85e+136:
            		tmp = math.fabs(((eh * math.cos(t)) + ((ew * (0.5 / eh)) * (ew * (math.tan(t) * math.sin(t))))))
            	else:
            		tmp = t_1
            	return tmp
            
            function code(eh, ew, t)
            	t_1 = abs(Float64(ew * sin(t)))
            	tmp = 0.0
            	if (ew <= -6.2e+190)
            		tmp = t_1;
            	elseif (ew <= 1.85e+136)
            		tmp = abs(Float64(Float64(eh * cos(t)) + Float64(Float64(ew * Float64(0.5 / eh)) * Float64(ew * Float64(tan(t) * sin(t))))));
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            function tmp_2 = code(eh, ew, t)
            	t_1 = abs((ew * sin(t)));
            	tmp = 0.0;
            	if (ew <= -6.2e+190)
            		tmp = t_1;
            	elseif (ew <= 1.85e+136)
            		tmp = abs(((eh * cos(t)) + ((ew * (0.5 / eh)) * (ew * (tan(t) * sin(t))))));
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -6.2e+190], t$95$1, If[LessEqual[ew, 1.85e+136], N[Abs[N[(N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] + N[(N[(ew * N[(0.5 / eh), $MachinePrecision]), $MachinePrecision] * N[(ew * N[(N[Tan[t], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \left|ew \cdot \sin t\right|\\
            \mathbf{if}\;ew \leq -6.2 \cdot 10^{+190}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;ew \leq 1.85 \cdot 10^{+136}:\\
            \;\;\;\;\left|eh \cdot \cos t + \left(ew \cdot \frac{0.5}{eh}\right) \cdot \left(ew \cdot \left(\tan t \cdot \sin t\right)\right)\right|\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if ew < -6.2000000000000003e190 or 1.85000000000000005e136 < ew

              1. Initial program 99.7%

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

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

                  \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew\right) \cdot \sin t + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
                3. fma-defineN/A

                  \[\leadsto \mathsf{fabs.f64}\left(\left(\mathsf{fma}\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew, \sin t, \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
                4. fma-lowering-fma.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew\right), \sin t, \left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
              4. Applied egg-rr99.8%

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

                \[\leadsto \mathsf{fabs.f64}\left(\color{blue}{\left(ew \cdot \sin t\right)}\right) \]
              6. Step-by-step derivation
                1. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(ew, \sin t\right)\right) \]
                2. sin-lowering-sin.f6477.8%

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right)\right) \]
              7. Simplified77.8%

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

              if -6.2000000000000003e190 < ew < 1.85000000000000005e136

              1. Initial program 99.9%

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

                  \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
                2. sin-atanN/A

                  \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{\frac{\frac{eh}{ew}}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
                3. div-invN/A

                  \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{\frac{eh}{ew} \cdot \frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
                4. associate-/l*N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \left(\frac{eh}{ew} \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
                5. associate-*r*N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}\right) \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
                6. fma-defineN/A

                  \[\leadsto \mathsf{fabs.f64}\left(\left(\mathsf{fma}\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}, \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}, \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
                7. fma-lowering-fma.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}\right), \left(\frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), \left(\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
              4. Applied egg-rr57.7%

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

                \[\leadsto \mathsf{fabs.f64}\left(\color{blue}{\left(eh \cdot \cos t + {ew}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t} + \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)}\right) \]
              6. Step-by-step derivation
                1. distribute-lft1-inN/A

                  \[\leadsto \mathsf{fabs.f64}\left(\left(eh \cdot \cos t + {ew}^{2} \cdot \left(\left(\frac{-1}{2} + 1\right) \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right) \]
                2. metadata-evalN/A

                  \[\leadsto \mathsf{fabs.f64}\left(\left(eh \cdot \cos t + {ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right) \]
                3. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(eh \cdot \cos t\right), \left({ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
                4. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \cos t\right), \left({ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
                5. cos-lowering-cos.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left({ew}^{2} \cdot \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
                6. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\left({ew}^{2}\right), \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
                7. unpow2N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\left(ew \cdot ew\right), \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
                8. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \left(\frac{1}{2} \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
                9. associate-*r/N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \left(\frac{\frac{1}{2} \cdot {\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
                10. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot {\sin t}^{2}\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
                11. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({\sin t}^{2}\right)\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
                12. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\sin t, 2\right)\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
                13. sin-lowering-sin.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(t\right), 2\right)\right), \left(eh \cdot \cos t\right)\right)\right)\right)\right) \]
                14. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(t\right), 2\right)\right), \mathsf{*.f64}\left(eh, \cos t\right)\right)\right)\right)\right) \]
                15. cos-lowering-cos.f6475.0%

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, ew\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(t\right), 2\right)\right), \mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right)\right)\right)\right)\right) \]
              7. Simplified75.0%

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

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(ew \cdot \left(ew \cdot \frac{\frac{1}{2} \cdot {\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right)\right) \]
                2. *-commutativeN/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(ew \cdot \frac{\frac{1}{2} \cdot {\sin t}^{2}}{eh \cdot \cos t}\right) \cdot ew\right)\right)\right) \]
                3. times-fracN/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(ew \cdot \left(\frac{\frac{1}{2}}{eh} \cdot \frac{{\sin t}^{2}}{\cos t}\right)\right) \cdot ew\right)\right)\right) \]
                4. associate-*r*N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(\left(ew \cdot \frac{\frac{1}{2}}{eh}\right) \cdot \frac{{\sin t}^{2}}{\cos t}\right) \cdot ew\right)\right)\right) \]
                5. associate-*l*N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \left(\left(ew \cdot \frac{\frac{1}{2}}{eh}\right) \cdot \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
                6. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\left(ew \cdot \frac{\frac{1}{2}}{eh}\right), \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \left(\frac{\frac{1}{2}}{eh}\right)\right), \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
                8. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \left(\frac{{\sin t}^{2}}{\cos t} \cdot ew\right)\right)\right)\right) \]
                9. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\frac{{\sin t}^{2}}{\cos t}\right), ew\right)\right)\right)\right) \]
                10. unpow2N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\frac{\sin t \cdot \sin t}{\cos t}\right), ew\right)\right)\right)\right) \]
                11. associate-/l*N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\sin t \cdot \frac{\sin t}{\cos t}\right), ew\right)\right)\right)\right) \]
                12. tan-quotN/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\left(\sin t \cdot \tan t\right), ew\right)\right)\right)\right) \]
                13. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\sin t, \tan t\right), ew\right)\right)\right)\right) \]
                14. sin-lowering-sin.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), \tan t\right), ew\right)\right)\right)\right) \]
                15. tan-lowering-tan.f6477.8%

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{/.f64}\left(\frac{1}{2}, eh\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right) \]
              9. Applied egg-rr77.8%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -6.2 \cdot 10^{+190}:\\ \;\;\;\;\left|ew \cdot \sin t\right|\\ \mathbf{elif}\;ew \leq 1.85 \cdot 10^{+136}:\\ \;\;\;\;\left|eh \cdot \cos t + \left(ew \cdot \frac{0.5}{eh}\right) \cdot \left(ew \cdot \left(\tan t \cdot \sin t\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \sin t\right|\\ \end{array} \]
            5. Add Preprocessing

            Alternative 12: 73.3% accurate, 4.3× speedup?

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

              1. Initial program 99.7%

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

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

                  \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew\right) \cdot \sin t + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
                3. fma-defineN/A

                  \[\leadsto \mathsf{fabs.f64}\left(\left(\mathsf{fma}\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew, \sin t, \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
                4. fma-lowering-fma.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) \cdot ew\right), \sin t, \left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
              4. Applied egg-rr99.8%

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

                \[\leadsto \mathsf{fabs.f64}\left(\color{blue}{\left(ew \cdot \sin t\right)}\right) \]
              6. Step-by-step derivation
                1. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(ew, \sin t\right)\right) \]
                2. sin-lowering-sin.f6477.8%

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right)\right) \]
              7. Simplified77.8%

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

              if -6.2000000000000003e190 < ew < 6.19999999999999967e136

              1. Initial program 99.9%

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

                  \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
                2. sin-atanN/A

                  \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{\frac{\frac{eh}{ew}}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
                3. div-invN/A

                  \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{\frac{eh}{ew} \cdot \frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
                4. associate-/l*N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \left(\frac{eh}{ew} \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
                5. associate-*r*N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}\right) \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
                6. fma-defineN/A

                  \[\leadsto \mathsf{fabs.f64}\left(\left(\mathsf{fma}\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}, \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}, \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
                7. fma-lowering-fma.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}\right), \left(\frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), \left(\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
              4. Applied egg-rr57.7%

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

                \[\leadsto \mathsf{fabs.f64}\left(\color{blue}{\left(eh \cdot \cos t\right)}\right) \]
              6. Step-by-step derivation
                1. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \cos t\right)\right) \]
                2. cos-lowering-cos.f6477.1%

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right)\right) \]
              7. Simplified77.1%

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

            Alternative 13: 61.0% accurate, 4.5× speedup?

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

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

                \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
              2. sin-atanN/A

                \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{\frac{\frac{eh}{ew}}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
              3. div-invN/A

                \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{\frac{eh}{ew} \cdot \frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
              4. associate-/l*N/A

                \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \left(\frac{eh}{ew} \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
              5. associate-*r*N/A

                \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}\right) \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
              6. fma-defineN/A

                \[\leadsto \mathsf{fabs.f64}\left(\left(\mathsf{fma}\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}, \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}, \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
              7. fma-lowering-fma.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}\right), \left(\frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), \left(\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
            4. Applied egg-rr67.5%

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

              \[\leadsto \mathsf{fabs.f64}\left(\color{blue}{\left(eh \cdot \cos t\right)}\right) \]
            6. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \cos t\right)\right) \]
              2. cos-lowering-cos.f6463.5%

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right)\right) \]
            7. Simplified63.5%

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

            Alternative 14: 41.8% accurate, 9.1× speedup?

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

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

                \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
              2. sin-atanN/A

                \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{\frac{\frac{eh}{ew}}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
              3. div-invN/A

                \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{\frac{eh}{ew} \cdot \frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
              4. associate-/l*N/A

                \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \left(\frac{eh}{ew} \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
              5. associate-*r*N/A

                \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}\right) \cdot \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right) \]
              6. fma-defineN/A

                \[\leadsto \mathsf{fabs.f64}\left(\left(\mathsf{fma}\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}, \frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}, \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
              7. fma-lowering-fma.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \frac{eh}{ew}\right), \left(\frac{\frac{1}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), \left(\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
            4. Applied egg-rr67.5%

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

              \[\leadsto \mathsf{fabs.f64}\left(\color{blue}{eh}\right) \]
            6. Step-by-step derivation
              1. Simplified45.6%

                \[\leadsto \left|\color{blue}{eh}\right| \]
              2. Add Preprocessing

              Reproduce

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