Example from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 22.7s
Alternatives: 9
Speedup: 1.1×

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 9 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.1× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{\frac{eh}{ew}}{\tan t}\\
\left|\frac{ew \cdot \sin t}{\mathsf{hypot}\left(1, t\_1\right)} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} t\_1\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. cos-atanN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\left(ew \cdot \sin t\right) \cdot \frac{1}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\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. un-div-invN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\frac{ew \cdot \sin t}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\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(ew \cdot \sin t\right), \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\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) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \sin t\right), \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\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) \]
    5. sin-lowering-sin.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\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) \]
    6. hypot-1-defN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \left(\mathsf{hypot}\left(1, \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) \]
    7. hypot-lowering-hypot.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(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) \]
    8. /-lowering-/.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{eh}{ew}\right), \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) \]
    9. /-lowering-/.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \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) \]
    10. tan-lowering-tan.f6499.8%

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\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) \]
  4. Applied egg-rr99.8%

    \[\leadsto \left|\color{blue}{\frac{ew \cdot \sin t}{\mathsf{hypot}\left(1, \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| \]
  5. Add Preprocessing

Alternative 2: 99.1% accurate, 1.1× speedup?

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

\\
\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{eh}{ew \cdot 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. Taylor expanded in t around 0

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

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \left(ew \cdot t\right)\right)\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(\mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \left(t \cdot ew\right)\right)\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) \]
    3. *-lowering-*.f6499.2%

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(t, ew\right)\right)\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) \]
  5. Simplified99.2%

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

    \[\leadsto \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{eh}{ew \cdot t}\right)\right| \]
  7. Add Preprocessing

Alternative 3: 98.5% accurate, 1.5× speedup?

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

\\
\left|ew \cdot \sin t + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \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. cos-atanN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\left(ew \cdot \sin t\right) \cdot \frac{1}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\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. un-div-invN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\frac{ew \cdot \sin t}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\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(ew \cdot \sin t\right), \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\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) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \sin t\right), \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\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) \]
    5. sin-lowering-sin.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\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) \]
    6. hypot-1-defN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \left(\mathsf{hypot}\left(1, \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) \]
    7. hypot-lowering-hypot.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(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) \]
    8. /-lowering-/.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{eh}{ew}\right), \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) \]
    9. /-lowering-/.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \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) \]
    10. tan-lowering-tan.f6499.8%

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\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) \]
  4. Applied egg-rr99.8%

    \[\leadsto \left|\color{blue}{\frac{ew \cdot \sin t}{\mathsf{hypot}\left(1, \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| \]
  5. Taylor expanded in eh around 0

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\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(eh, \left(ew \cdot \tan t\right)\right)\right)\right)\right), \left(ew \cdot \sin t\right)\right)\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\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(eh, \mathsf{*.f64}\left(ew, \tan t\right)\right)\right)\right)\right), \left(ew \cdot \sin t\right)\right)\right) \]
    10. tan-lowering-tan.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\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(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right), \left(ew \cdot \sin t\right)\right)\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\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(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(ew, \sin t\right)\right)\right) \]
    12. sin-lowering-sin.f6499.0%

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\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(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right)\right)\right) \]
  7. Simplified99.0%

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

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

Alternative 4: 86.3% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;eh \leq 4.8 \cdot 10^{+156}:\\
\;\;\;\;\left|ew \cdot \sin t + eh \cdot t\_2\right|\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\left|\frac{1}{t\_1 \cdot t\_2}\right|}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if eh < -2.40000000000000005e134

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\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), \left(eh \cdot \cos t\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\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), \mathsf{*.f64}\left(eh, \cos t\right)\right)\right) \]
      10. cos-lowering-cos.f6489.9%

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\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), \mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right)\right)\right) \]
    5. Simplified89.9%

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

    if -2.40000000000000005e134 < eh < 4.8000000000000002e156

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

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{cos.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), \mathsf{*.f64}\left(\color{blue}{eh}, \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. Step-by-step derivation
      1. Simplified87.3%

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\left(ew \cdot \sin t\right) \cdot \frac{1}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), \mathsf{*.f64}\left(eh, \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. metadata-evalN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\left(ew \cdot \sin t\right) \cdot \frac{1}{\sqrt{1 \cdot 1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), \mathsf{*.f64}\left(eh, \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. div-invN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\frac{ew \cdot \sin t}{\sqrt{1 \cdot 1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), \mathsf{*.f64}\left(eh, \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. clear-numN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\frac{1}{\frac{\sqrt{1 \cdot 1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}{ew \cdot \sin t}}\right), \mathsf{*.f64}\left(eh, \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. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(1, \left(\frac{\sqrt{1 \cdot 1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}{ew \cdot \sin t}\right)\right), \mathsf{*.f64}\left(eh, \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(1, \mathsf{/.f64}\left(\left(\sqrt{1 \cdot 1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\right), \left(ew \cdot \sin t\right)\right)\right), \mathsf{*.f64}\left(eh, \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. hypot-undefineN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\mathsf{hypot}\left(1, \frac{\frac{eh}{ew}}{\tan t}\right)\right), \left(ew \cdot \sin t\right)\right)\right), \mathsf{*.f64}\left(eh, \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-lowering-hypot.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{hypot.f64}\left(1, \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right), \left(ew \cdot \sin t\right)\right)\right), \mathsf{*.f64}\left(eh, \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. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{eh}{ew}\right), \tan t\right)\right), \left(ew \cdot \sin t\right)\right)\right), \mathsf{*.f64}\left(eh, \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. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \tan t\right)\right), \left(ew \cdot \sin t\right)\right)\right), \mathsf{*.f64}\left(eh, \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. tan-lowering-tan.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right), \left(ew \cdot \sin t\right)\right)\right), \mathsf{*.f64}\left(eh, \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. *-lowering-*.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right), \mathsf{*.f64}\left(ew, \sin t\right)\right)\right), \mathsf{*.f64}\left(eh, \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. sin-lowering-sin.f6487.2%

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right), \mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right)\right)\right), \mathsf{*.f64}\left(eh, \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. Applied egg-rr87.2%

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

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\color{blue}{\left(ew \cdot \sin t\right)}, \mathsf{*.f64}\left(eh, \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. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(ew, \sin t\right), \mathsf{*.f64}\left(eh, \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. sin-lowering-sin.f6487.2%

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{*.f64}\left(eh, \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. Simplified87.2%

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

      if 4.8000000000000002e156 < eh

      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. Applied egg-rr99.9%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{fabs.f64}\left(\mathsf{/.f64}\left(1, \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(\left(\frac{eh}{ew}\right), \tan t\right)\right)\right)\right)\right)\right)\right) \]
        10. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{fabs.f64}\left(\mathsf{/.f64}\left(1, \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), \tan t\right)\right)\right)\right)\right)\right)\right) \]
        11. tan-lowering-tan.f6496.3%

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{fabs.f64}\left(\mathsf{/.f64}\left(1, \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)\right) \]
      6. Simplified96.3%

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

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

    Alternative 5: 86.3% accurate, 1.8× speedup?

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\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), \left(eh \cdot \cos t\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\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), \mathsf{*.f64}\left(eh, \cos t\right)\right)\right) \]
        10. cos-lowering-cos.f6492.9%

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\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), \mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right)\right)\right) \]
      5. Simplified92.9%

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

      if -1.71999999999999998e134 < eh < 5.2000000000000004e155

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

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{cos.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), \mathsf{*.f64}\left(\color{blue}{eh}, \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. Step-by-step derivation
        1. Simplified87.3%

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

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\left(ew \cdot \sin t\right) \cdot \frac{1}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), \mathsf{*.f64}\left(eh, \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. metadata-evalN/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\left(ew \cdot \sin t\right) \cdot \frac{1}{\sqrt{1 \cdot 1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), \mathsf{*.f64}\left(eh, \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. div-invN/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\frac{ew \cdot \sin t}{\sqrt{1 \cdot 1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right), \mathsf{*.f64}\left(eh, \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. clear-numN/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\frac{1}{\frac{\sqrt{1 \cdot 1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}{ew \cdot \sin t}}\right), \mathsf{*.f64}\left(eh, \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. /-lowering-/.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(1, \left(\frac{\sqrt{1 \cdot 1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}{ew \cdot \sin t}\right)\right), \mathsf{*.f64}\left(eh, \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(1, \mathsf{/.f64}\left(\left(\sqrt{1 \cdot 1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\right), \left(ew \cdot \sin t\right)\right)\right), \mathsf{*.f64}\left(eh, \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. hypot-undefineN/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\mathsf{hypot}\left(1, \frac{\frac{eh}{ew}}{\tan t}\right)\right), \left(ew \cdot \sin t\right)\right)\right), \mathsf{*.f64}\left(eh, \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-lowering-hypot.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{hypot.f64}\left(1, \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right), \left(ew \cdot \sin t\right)\right)\right), \mathsf{*.f64}\left(eh, \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. /-lowering-/.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{eh}{ew}\right), \tan t\right)\right), \left(ew \cdot \sin t\right)\right)\right), \mathsf{*.f64}\left(eh, \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. /-lowering-/.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \tan t\right)\right), \left(ew \cdot \sin t\right)\right)\right), \mathsf{*.f64}\left(eh, \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. tan-lowering-tan.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right), \left(ew \cdot \sin t\right)\right)\right), \mathsf{*.f64}\left(eh, \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. *-lowering-*.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right), \mathsf{*.f64}\left(ew, \sin t\right)\right)\right), \mathsf{*.f64}\left(eh, \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. sin-lowering-sin.f6487.2%

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right), \mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right)\right)\right), \mathsf{*.f64}\left(eh, \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. Applied egg-rr87.2%

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\color{blue}{\left(ew \cdot \sin t\right)}, \mathsf{*.f64}\left(eh, \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. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(ew, \sin t\right), \mathsf{*.f64}\left(eh, \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. sin-lowering-sin.f6487.2%

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{*.f64}\left(eh, \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. Simplified87.2%

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

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

      Alternative 6: 75.0% accurate, 1.8× speedup?

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\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), \left(eh \cdot \cos t\right)\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\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), \mathsf{*.f64}\left(eh, \cos t\right)\right)\right) \]
          10. cos-lowering-cos.f6477.9%

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\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), \mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right)\right)\right) \]
        5. Simplified77.9%

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

        if -4.0999999999999998e-37 < eh < 4.79999999999999988e-18

        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. cos-atanN/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\left(ew \cdot \sin t\right) \cdot \frac{1}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\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. un-div-invN/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\frac{ew \cdot \sin t}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\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(ew \cdot \sin t\right), \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\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) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \sin t\right), \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\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) \]
          5. sin-lowering-sin.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\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) \]
          6. hypot-1-defN/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \left(\mathsf{hypot}\left(1, \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) \]
          7. hypot-lowering-hypot.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(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) \]
          8. /-lowering-/.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{eh}{ew}\right), \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) \]
          9. /-lowering-/.f64N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \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) \]
          10. tan-lowering-tan.f6499.9%

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\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) \]
        4. Applied egg-rr99.9%

          \[\leadsto \left|\color{blue}{\frac{ew \cdot \sin t}{\mathsf{hypot}\left(1, \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| \]
        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.f6479.0%

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

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

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

      Alternative 7: 57.4% accurate, 4.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -1.36 \cdot 10^{+134}:\\ \;\;\;\;\left|eh\right|\\ \mathbf{elif}\;eh \leq 2.05 \cdot 10^{-18}:\\ \;\;\;\;\left|ew \cdot \sin t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|eh\right|\\ \end{array} \end{array} \]
      (FPCore (eh ew t)
       :precision binary64
       (if (<= eh -1.36e+134)
         (fabs eh)
         (if (<= eh 2.05e-18) (fabs (* ew (sin t))) (fabs eh))))
      double code(double eh, double ew, double t) {
      	double tmp;
      	if (eh <= -1.36e+134) {
      		tmp = fabs(eh);
      	} else if (eh <= 2.05e-18) {
      		tmp = fabs((ew * sin(t)));
      	} else {
      		tmp = fabs(eh);
      	}
      	return tmp;
      }
      
      real(8) function code(eh, ew, t)
          real(8), intent (in) :: eh
          real(8), intent (in) :: ew
          real(8), intent (in) :: t
          real(8) :: tmp
          if (eh <= (-1.36d+134)) then
              tmp = abs(eh)
          else if (eh <= 2.05d-18) then
              tmp = abs((ew * sin(t)))
          else
              tmp = abs(eh)
          end if
          code = tmp
      end function
      
      public static double code(double eh, double ew, double t) {
      	double tmp;
      	if (eh <= -1.36e+134) {
      		tmp = Math.abs(eh);
      	} else if (eh <= 2.05e-18) {
      		tmp = Math.abs((ew * Math.sin(t)));
      	} else {
      		tmp = Math.abs(eh);
      	}
      	return tmp;
      }
      
      def code(eh, ew, t):
      	tmp = 0
      	if eh <= -1.36e+134:
      		tmp = math.fabs(eh)
      	elif eh <= 2.05e-18:
      		tmp = math.fabs((ew * math.sin(t)))
      	else:
      		tmp = math.fabs(eh)
      	return tmp
      
      function code(eh, ew, t)
      	tmp = 0.0
      	if (eh <= -1.36e+134)
      		tmp = abs(eh);
      	elseif (eh <= 2.05e-18)
      		tmp = abs(Float64(ew * sin(t)));
      	else
      		tmp = abs(eh);
      	end
      	return tmp
      end
      
      function tmp_2 = code(eh, ew, t)
      	tmp = 0.0;
      	if (eh <= -1.36e+134)
      		tmp = abs(eh);
      	elseif (eh <= 2.05e-18)
      		tmp = abs((ew * sin(t)));
      	else
      		tmp = abs(eh);
      	end
      	tmp_2 = tmp;
      end
      
      code[eh_, ew_, t_] := If[LessEqual[eh, -1.36e+134], N[Abs[eh], $MachinePrecision], If[LessEqual[eh, 2.05e-18], N[Abs[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[eh], $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;eh \leq -1.36 \cdot 10^{+134}:\\
      \;\;\;\;\left|eh\right|\\
      
      \mathbf{elif}\;eh \leq 2.05 \cdot 10^{-18}:\\
      \;\;\;\;\left|ew \cdot \sin t\right|\\
      
      \mathbf{else}:\\
      \;\;\;\;\left|eh\right|\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if eh < -1.35999999999999995e134 or 2.0499999999999999e-18 < eh

        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. 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)\right)}\right) \]
        4. Step-by-step derivation
          1. *-lowering-*.f64N/A

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

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

            \[\leadsto \mathsf{fabs.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)\right) \]
          4. /-lowering-/.f64N/A

            \[\leadsto \mathsf{fabs.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)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{fabs.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)\right) \]
          6. tan-lowering-tan.f6452.8%

            \[\leadsto \mathsf{fabs.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)\right) \]
        5. Simplified52.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{*.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \tan t\right)\right)\right)\right)\right)\right) \]
          15. tan-lowering-tan.f6425.9%

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{*.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        7. Applied egg-rr25.9%

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

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

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

          if -1.35999999999999995e134 < eh < 2.0499999999999999e-18

          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. cos-atanN/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\left(ew \cdot \sin t\right) \cdot \frac{1}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\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. un-div-invN/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\frac{ew \cdot \sin t}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\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(ew \cdot \sin t\right), \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\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) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \sin t\right), \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\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) \]
            5. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\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) \]
            6. hypot-1-defN/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \left(\mathsf{hypot}\left(1, \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) \]
            7. hypot-lowering-hypot.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(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) \]
            8. /-lowering-/.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{eh}{ew}\right), \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) \]
            9. /-lowering-/.f64N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \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) \]
            10. tan-lowering-tan.f6499.8%

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\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) \]
          4. Applied egg-rr99.8%

            \[\leadsto \left|\color{blue}{\frac{ew \cdot \sin t}{\mathsf{hypot}\left(1, \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| \]
          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.f6470.9%

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

            \[\leadsto \left|\color{blue}{ew \cdot \sin t}\right| \]
        10. Recombined 2 regimes into one program.
        11. Add Preprocessing

        Alternative 8: 43.1% accurate, 8.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -5.8 \cdot 10^{-42}:\\ \;\;\;\;\left|eh\right|\\ \mathbf{elif}\;eh \leq 2.3 \cdot 10^{-44}:\\ \;\;\;\;\left|ew \cdot t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|eh\right|\\ \end{array} \end{array} \]
        (FPCore (eh ew t)
         :precision binary64
         (if (<= eh -5.8e-42)
           (fabs eh)
           (if (<= eh 2.3e-44) (fabs (* ew t)) (fabs eh))))
        double code(double eh, double ew, double t) {
        	double tmp;
        	if (eh <= -5.8e-42) {
        		tmp = fabs(eh);
        	} else if (eh <= 2.3e-44) {
        		tmp = fabs((ew * t));
        	} else {
        		tmp = fabs(eh);
        	}
        	return tmp;
        }
        
        real(8) function code(eh, ew, t)
            real(8), intent (in) :: eh
            real(8), intent (in) :: ew
            real(8), intent (in) :: t
            real(8) :: tmp
            if (eh <= (-5.8d-42)) then
                tmp = abs(eh)
            else if (eh <= 2.3d-44) then
                tmp = abs((ew * t))
            else
                tmp = abs(eh)
            end if
            code = tmp
        end function
        
        public static double code(double eh, double ew, double t) {
        	double tmp;
        	if (eh <= -5.8e-42) {
        		tmp = Math.abs(eh);
        	} else if (eh <= 2.3e-44) {
        		tmp = Math.abs((ew * t));
        	} else {
        		tmp = Math.abs(eh);
        	}
        	return tmp;
        }
        
        def code(eh, ew, t):
        	tmp = 0
        	if eh <= -5.8e-42:
        		tmp = math.fabs(eh)
        	elif eh <= 2.3e-44:
        		tmp = math.fabs((ew * t))
        	else:
        		tmp = math.fabs(eh)
        	return tmp
        
        function code(eh, ew, t)
        	tmp = 0.0
        	if (eh <= -5.8e-42)
        		tmp = abs(eh);
        	elseif (eh <= 2.3e-44)
        		tmp = abs(Float64(ew * t));
        	else
        		tmp = abs(eh);
        	end
        	return tmp
        end
        
        function tmp_2 = code(eh, ew, t)
        	tmp = 0.0;
        	if (eh <= -5.8e-42)
        		tmp = abs(eh);
        	elseif (eh <= 2.3e-44)
        		tmp = abs((ew * t));
        	else
        		tmp = abs(eh);
        	end
        	tmp_2 = tmp;
        end
        
        code[eh_, ew_, t_] := If[LessEqual[eh, -5.8e-42], N[Abs[eh], $MachinePrecision], If[LessEqual[eh, 2.3e-44], N[Abs[N[(ew * t), $MachinePrecision]], $MachinePrecision], N[Abs[eh], $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;eh \leq -5.8 \cdot 10^{-42}:\\
        \;\;\;\;\left|eh\right|\\
        
        \mathbf{elif}\;eh \leq 2.3 \cdot 10^{-44}:\\
        \;\;\;\;\left|ew \cdot t\right|\\
        
        \mathbf{else}:\\
        \;\;\;\;\left|eh\right|\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if eh < -5.8000000000000006e-42 or 2.29999999999999998e-44 < eh

          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. 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)\right)}\right) \]
          4. Step-by-step derivation
            1. *-lowering-*.f64N/A

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

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

              \[\leadsto \mathsf{fabs.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)\right) \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{fabs.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)\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.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)\right) \]
            6. tan-lowering-tan.f6446.2%

              \[\leadsto \mathsf{fabs.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)\right) \]
          5. Simplified46.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{*.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \tan t\right)\right)\right)\right)\right)\right) \]
            15. tan-lowering-tan.f6425.8%

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{*.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right) \]
          7. Applied egg-rr25.8%

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

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

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

            if -5.8000000000000006e-42 < eh < 2.29999999999999998e-44

            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. cos-atanN/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\left(ew \cdot \sin t\right) \cdot \frac{1}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\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. un-div-invN/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\frac{ew \cdot \sin t}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\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(ew \cdot \sin t\right), \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\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) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \sin t\right), \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\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) \]
              5. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \left(\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}\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) \]
              6. hypot-1-defN/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \left(\mathsf{hypot}\left(1, \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) \]
              7. hypot-lowering-hypot.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(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) \]
              8. /-lowering-/.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{eh}{ew}\right), \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) \]
              9. /-lowering-/.f64N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \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) \]
              10. tan-lowering-tan.f6499.9%

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{tan.f64}\left(t\right)\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) \]
            4. Applied egg-rr99.9%

              \[\leadsto \left|\color{blue}{\frac{ew \cdot \sin t}{\mathsf{hypot}\left(1, \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| \]
            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.f6480.8%

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

              \[\leadsto \left|\color{blue}{ew \cdot \sin t}\right| \]
            8. Taylor expanded in t around 0

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

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

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

              \[\leadsto \left|\color{blue}{t \cdot ew}\right| \]
          10. Recombined 2 regimes into one program.
          11. Final simplification45.8%

            \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -5.8 \cdot 10^{-42}:\\ \;\;\;\;\left|eh\right|\\ \mathbf{elif}\;eh \leq 2.3 \cdot 10^{-44}:\\ \;\;\;\;\left|ew \cdot t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|eh\right|\\ \end{array} \]
          12. Add Preprocessing

          Alternative 9: 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. 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)\right)}\right) \]
          4. Step-by-step derivation
            1. *-lowering-*.f64N/A

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

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

              \[\leadsto \mathsf{fabs.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)\right) \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{fabs.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)\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fabs.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)\right) \]
            6. tan-lowering-tan.f6432.4%

              \[\leadsto \mathsf{fabs.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)\right) \]
          5. Simplified32.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{*.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(eh, ew\right), \tan t\right)\right)\right)\right)\right)\right) \]
            15. tan-lowering-tan.f6420.7%

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

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

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

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

            Reproduce

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