Example 2 from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 18.7s
Alternatives: 10
Speedup: N/A×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 10 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 98.9% accurate, 1.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{cos.f64}\left(t\right)\right), \mathsf{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(t\right), eh\right), ew\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(eh\right), \color{blue}{t}\right), ew\right)\right)\right)\right)\right)\right) \]
  6. Step-by-step derivation
    1. Simplified98.6%

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

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

    Alternative 3: 98.3% accurate, 1.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(ew, \cos t\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(eh\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right)\right)\right) \]
      2. cos-lowering-cos.f6498.3%

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{cos.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(eh\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    7. Simplified98.3%

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

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

    Alternative 4: 98.1% accurate, 1.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{cos.f64}\left(t\right)\right), \mathsf{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(t\right), eh\right), ew\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(eh\right), \color{blue}{t}\right), ew\right)\right)\right)\right)\right)\right) \]
    6. Step-by-step derivation
      1. Simplified98.6%

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

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

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

          \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\mathsf{neg}\left(eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot t}{ew}\right)\right)\right)\right) + \left(ew \cdot \cos t\right) \cdot \frac{1}{\sqrt{1 \cdot 1 + \frac{\tan t \cdot eh}{ew} \cdot \frac{\tan t \cdot eh}{ew}}}\right)\right) \]
        4. distribute-rgt-neg-inN/A

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

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

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

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

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(eh, \color{blue}{\left(-1 \cdot \sin t\right)}, \mathsf{/.f64}\left(\mathsf{cos.f64}\left(t\right), \mathsf{/.f64}\left(\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(t\right), eh\right), ew\right)\right), ew\right)\right)\right)\right) \]
      5. Step-by-step derivation
        1. mul-1-negN/A

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

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

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

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

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

      Alternative 5: 86.7% accurate, 1.8× speedup?

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

        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -4.59999999999999981e123 < ew < 9.9999999999999992e22

        1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\color{blue}{ew}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(eh\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right)\right)\right) \]
        6. Step-by-step derivation
          1. Simplified88.2%

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

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

        Alternative 6: 98.1% accurate, 1.8× speedup?

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

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

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{cos.f64}\left(t\right)\right), \mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(eh\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\left(\left(\mathsf{neg}\left(eh\right)\right) \cdot \frac{\tan t}{ew}\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{cos.f64}\left(t\right)\right), \mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(eh\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\tan t}{ew} \cdot \left(\mathsf{neg}\left(eh\right)\right)\right)\right)\right)\right)\right)\right) \]
          3. neg-sub0N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{cos.f64}\left(t\right)\right), \mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(eh\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\tan t}{ew} \cdot \left(0 - eh\right)\right)\right)\right)\right)\right)\right) \]
          4. flip--N/A

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

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

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{cos.f64}\left(t\right)\right), \mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(eh\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{\tan t}{ew} \cdot \left(0 \cdot 0 - eh \cdot eh\right)\right), \left(0 + eh\right)\right)\right)\right)\right)\right)\right) \]
        4. Applied egg-rr94.3%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{cos.f64}\left(t\right)\right), \mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(eh\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(eh, eh\right)\right), \mathsf{/.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right), \mathsf{*.f64}\left(\left(\sqrt{1 + \frac{\frac{\tan t}{ew} \cdot \left(0 - eh \cdot eh\right)}{eh} \cdot \frac{\frac{\tan t}{ew} \cdot \left(0 - eh \cdot eh\right)}{eh}}\right), eh\right)\right)\right)\right)\right) \]
        6. Applied egg-rr71.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{+.f64}\left(\left(\frac{\cos t \cdot ew}{\sqrt{1 \cdot 1 + {\left(\frac{0 - \tan t \cdot eh}{ew}\right)}^{2}}}\right), \mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right)\right)\right) \]
        11. Applied egg-rr97.6%

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

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

        Alternative 7: 74.8% accurate, 4.3× speedup?

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

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -1.65e-126 < ew < 5.39999999999999988e-118

          1. Initial program 99.7%

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

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{cos.f64}\left(t\right)\right), \mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(eh\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\left(\left(\mathsf{neg}\left(eh\right)\right) \cdot \frac{\tan t}{ew}\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{cos.f64}\left(t\right)\right), \mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(eh\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\tan t}{ew} \cdot \left(\mathsf{neg}\left(eh\right)\right)\right)\right)\right)\right)\right)\right) \]
            3. neg-sub0N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{cos.f64}\left(t\right)\right), \mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(eh\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\tan t}{ew} \cdot \left(0 - eh\right)\right)\right)\right)\right)\right)\right) \]
            4. flip--N/A

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

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

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{cos.f64}\left(t\right)\right), \mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(eh\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{\tan t}{ew} \cdot \left(0 \cdot 0 - eh \cdot eh\right)\right), \left(0 + eh\right)\right)\right)\right)\right)\right)\right) \]
          4. Applied egg-rr94.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right)\right) \]
          9. Simplified83.1%

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

        Alternative 8: 58.4% accurate, 4.3× speedup?

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

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -3.5e28 < ew < 3.00000000000000016e-77

            1. Initial program 99.8%

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

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{cos.f64}\left(t\right)\right), \mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(eh\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\left(\left(\mathsf{neg}\left(eh\right)\right) \cdot \frac{\tan t}{ew}\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{cos.f64}\left(t\right)\right), \mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(eh\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\tan t}{ew} \cdot \left(\mathsf{neg}\left(eh\right)\right)\right)\right)\right)\right)\right)\right) \]
              3. neg-sub0N/A

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{cos.f64}\left(t\right)\right), \mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(eh\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\tan t}{ew} \cdot \left(0 - eh\right)\right)\right)\right)\right)\right)\right) \]
              4. flip--N/A

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

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

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{cos.f64}\left(t\right)\right), \mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(eh\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{\tan t}{ew} \cdot \left(0 \cdot 0 - eh \cdot eh\right)\right), \left(0 + eh\right)\right)\right)\right)\right)\right)\right) \]
            4. Applied egg-rr96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right)\right) \]
            9. Simplified71.8%

              \[\leadsto \left|\color{blue}{eh \cdot \sin t}\right| \]
          7. Recombined 2 regimes into one program.
          8. Add Preprocessing

          Alternative 9: 44.4% accurate, 8.1× speedup?

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

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -1.49999999999999987e-181 < ew < 2.5000000000000001e-143

              1. Initial program 99.8%

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

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{cos.f64}\left(t\right)\right), \mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(eh\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\left(\left(\mathsf{neg}\left(eh\right)\right) \cdot \frac{\tan t}{ew}\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{cos.f64}\left(t\right)\right), \mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(eh\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\tan t}{ew} \cdot \left(\mathsf{neg}\left(eh\right)\right)\right)\right)\right)\right)\right)\right) \]
                3. neg-sub0N/A

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{cos.f64}\left(t\right)\right), \mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(eh\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\tan t}{ew} \cdot \left(0 - eh\right)\right)\right)\right)\right)\right)\right) \]
                4. flip--N/A

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

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

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{cos.f64}\left(t\right)\right), \mathsf{cos.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(eh\right), \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{\tan t}{ew} \cdot \left(0 \cdot 0 - eh \cdot eh\right)\right), \left(0 + eh\right)\right)\right)\right)\right)\right)\right) \]
              4. Applied egg-rr92.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right)\right) \]
              9. Simplified86.1%

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

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

                  \[\leadsto \mathsf{fabs.f64}\left(\left(t \cdot eh\right)\right) \]
                2. *-lowering-*.f6440.4%

                  \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(t, eh\right)\right) \]
              12. Simplified40.4%

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

            Alternative 10: 42.1% accurate, 9.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Reproduce

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