Example 2 from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 18.5s
Alternatives: 9
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 9 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \tan^{-1} \left(\frac{\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.0× speedup?

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

\\
\left|\mathsf{fma}\left(\frac{ew}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}, \cos t, \sin \tan^{-1} \left(\frac{eh}{ew \cdot \frac{-1}{\tan t}}\right) \cdot \left(\sin t \cdot \left(0 - eh\right)\right)\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. distribute-lft-neg-outN/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 \cdot \tan t\right)\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) \]
    11. remove-double-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, \mathsf{hypot.f64}\left(1, \left(\frac{eh \cdot \tan t}{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) \]
    12. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(eh \cdot \frac{\tan t}{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) \]
    13. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(eh \cdot \frac{1}{\frac{ew}{\tan t}}\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) \]
    14. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(\frac{eh}{\frac{ew}{\tan t}}\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) \]
    15. /-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(eh, \left(\frac{ew}{\tan t}\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) \]
  4. Applied egg-rr99.8%

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

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

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

Alternative 2: 99.8% accurate, 1.1× speedup?

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

\\
\left|\frac{ew \cdot \cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{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. distribute-lft-neg-outN/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 \cdot \tan t\right)\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) \]
    11. remove-double-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, \mathsf{hypot.f64}\left(1, \left(\frac{eh \cdot \tan t}{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) \]
    12. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(eh \cdot \frac{\tan t}{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) \]
    13. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(eh \cdot \frac{1}{\frac{ew}{\tan t}}\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) \]
    14. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(\frac{eh}{\frac{ew}{\tan t}}\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) \]
    15. /-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(eh, \left(\frac{ew}{\tan t}\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) \]
  4. Applied egg-rr99.8%

    \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\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. un-div-invN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\left(\frac{ew \cdot \cos t}{\sqrt{1 \cdot 1 + \frac{eh}{\frac{ew}{\tan t}} \cdot \frac{eh}{\frac{ew}{\tan 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. /-rgt-identityN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\left(\frac{ew \cdot \cos t}{\frac{\sqrt{1 \cdot 1 + \frac{eh}{\frac{ew}{\tan t}} \cdot \frac{eh}{\frac{ew}{\tan t}}}}{1}}\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. /-rgt-identityN/A

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

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\left(\frac{ew \cdot \cos t}{\sqrt{1 + \frac{eh}{\frac{ew}{\tan t}} \cdot \frac{eh}{\frac{ew}{\tan 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) \]
    5. sqr-negN/A

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

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

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\left(\frac{ew \cdot \cos t}{\sqrt{1 + \left(\mathsf{neg}\left(eh \cdot \frac{\tan t}{ew}\right)\right) \cdot \left(\mathsf{neg}\left(\frac{eh}{\frac{ew}{\tan t}}\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. distribute-lft-neg-outN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\left(\frac{ew \cdot \cos t}{\sqrt{1 + \left(\left(\mathsf{neg}\left(eh\right)\right) \cdot \frac{\tan t}{ew}\right) \cdot \left(\mathsf{neg}\left(\frac{eh}{\frac{ew}{\tan t}}\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. associate-/l*N/A

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

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

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\left(\frac{ew \cdot \cos t}{\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \left(\mathsf{neg}\left(eh \cdot \frac{\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) \]
    12. distribute-lft-neg-outN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\left(\frac{ew \cdot \cos t}{\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \left(\left(\mathsf{neg}\left(eh\right)\right) \cdot \frac{\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) \]
  6. Applied egg-rr99.8%

    \[\leadsto \left|\color{blue}{\frac{ew \cdot \cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}} - \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 \cdot \cos t}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{0 - ew}\right)\right| \]
  8. Add Preprocessing

Alternative 3: 99.7% accurate, 1.1× speedup?

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

\\
\left|\frac{ew}{\frac{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}{\cos t}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{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. distribute-lft-neg-outN/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 \cdot \tan t\right)\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) \]
    11. remove-double-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, \mathsf{hypot.f64}\left(1, \left(\frac{eh \cdot \tan t}{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) \]
    12. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(eh \cdot \frac{\tan t}{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) \]
    13. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(eh \cdot \frac{1}{\frac{ew}{\tan t}}\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) \]
    14. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(\frac{eh}{\frac{ew}{\tan t}}\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) \]
    15. /-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(eh, \left(\frac{ew}{\tan t}\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) \]
  4. Applied egg-rr99.8%

    \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\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. un-div-invN/A

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

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

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \left(\frac{\sqrt{1 \cdot 1 + \frac{eh}{\frac{ew}{\tan t}} \cdot \frac{eh}{\frac{ew}{\tan t}}}}{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) \]
  6. Applied egg-rr99.7%

    \[\leadsto \left|\color{blue}{\frac{1}{\frac{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)}{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| \]
  7. Step-by-step derivation
    1. associate-/r*N/A

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\left(\frac{\cos t}{\sqrt{1 \cdot 1 + \frac{eh}{\frac{ew}{\tan t}} \cdot \frac{eh}{\frac{ew}{\tan t}}}} \cdot ew\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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 99.0% accurate, 1.3× speedup?

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

\\
\left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{t \cdot \left(\left(t \cdot t\right) \cdot \left(eh \cdot \left(-0.3333333333333333 + \left(t \cdot t\right) \cdot -0.13333333333333333\right)\right) - eh\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. 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{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(\color{blue}{\left(t \cdot \left(-1 \cdot eh + {t}^{2} \cdot \left(\frac{-1}{3} \cdot eh + \frac{-2}{15} \cdot \left(eh \cdot {t}^{2}\right)\right)\right)\right)}, ew\right)\right)\right)\right)\right)\right) \]
  4. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{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(\mathsf{*.f64}\left(t, \left(-1 \cdot eh + {t}^{2} \cdot \left(\frac{-1}{3} \cdot eh + \frac{-2}{15} \cdot \left(eh \cdot {t}^{2}\right)\right)\right)\right), 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(\mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2} \cdot \left(\frac{-1}{3} \cdot eh + \frac{-2}{15} \cdot \left(eh \cdot {t}^{2}\right)\right) + -1 \cdot eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    3. mul-1-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{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(\mathsf{*.f64}\left(t, \left({t}^{2} \cdot \left(\frac{-1}{3} \cdot eh + \frac{-2}{15} \cdot \left(eh \cdot {t}^{2}\right)\right) + \left(\mathsf{neg}\left(eh\right)\right)\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    4. unsub-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{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(\mathsf{*.f64}\left(t, \left({t}^{2} \cdot \left(\frac{-1}{3} \cdot eh + \frac{-2}{15} \cdot \left(eh \cdot {t}^{2}\right)\right) - eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    5. --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(\mathsf{*.f64}\left(t, \mathsf{\_.f64}\left(\left({t}^{2} \cdot \left(\frac{-1}{3} \cdot eh + \frac{-2}{15} \cdot \left(eh \cdot {t}^{2}\right)\right)\right), eh\right)\right), ew\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(\mathsf{*.f64}\left(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left({t}^{2}\right), \left(\frac{-1}{3} \cdot eh + \frac{-2}{15} \cdot \left(eh \cdot {t}^{2}\right)\right)\right), eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    7. unpow2N/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(\mathsf{*.f64}\left(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(t \cdot t\right), \left(\frac{-1}{3} \cdot eh + \frac{-2}{15} \cdot \left(eh \cdot {t}^{2}\right)\right)\right), eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{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(\mathsf{*.f64}\left(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\frac{-1}{3} \cdot eh + \frac{-2}{15} \cdot \left(eh \cdot {t}^{2}\right)\right)\right), eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    9. *-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(\mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\frac{-1}{3} \cdot eh + \frac{-2}{15} \cdot \left({t}^{2} \cdot eh\right)\right)\right), eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    10. 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(\mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\frac{-1}{3} \cdot eh + \left(\frac{-2}{15} \cdot {t}^{2}\right) \cdot eh\right)\right), eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    11. distribute-rgt-outN/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(\mathsf{*.f64}\left(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(eh \cdot \left(\frac{-1}{3} + \frac{-2}{15} \cdot {t}^{2}\right)\right)\right), eh\right)\right), ew\right)\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{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(eh, \left(\frac{-1}{3} + \frac{-2}{15} \cdot {t}^{2}\right)\right)\right), eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    13. +-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(\mathsf{*.f64}\left(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(eh, \mathsf{+.f64}\left(\frac{-1}{3}, \left(\frac{-2}{15} \cdot {t}^{2}\right)\right)\right)\right), eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    14. *-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(\mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(eh, \mathsf{+.f64}\left(\frac{-1}{3}, \left({t}^{2} \cdot \frac{-2}{15}\right)\right)\right)\right), eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    15. *-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(\mathsf{*.f64}\left(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(eh, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\left({t}^{2}\right), \frac{-2}{15}\right)\right)\right)\right), eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    16. unpow2N/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(\mathsf{*.f64}\left(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(eh, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\left(t \cdot t\right), \frac{-2}{15}\right)\right)\right)\right), eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    17. *-lowering-*.f6499.0%

      \[\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(\mathsf{*.f64}\left(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(eh, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \frac{-2}{15}\right)\right)\right)\right), eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
  5. Simplified99.0%

    \[\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} \left(\frac{\color{blue}{t \cdot \left(\left(t \cdot t\right) \cdot \left(eh \cdot \left(-0.3333333333333333 + \left(t \cdot t\right) \cdot -0.13333333333333333\right)\right) - eh\right)}}{ew}\right)\right| \]
  6. 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(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(eh, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \frac{-2}{15}\right)\right)\right)\right), eh\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(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(eh, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \frac{-2}{15}\right)\right)\right)\right), eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    3. 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{/.f64}\left(1, \left(\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \left(\left(\mathsf{neg}\left(eh\right)\right) \cdot \frac{\tan t}{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(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(eh, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \frac{-2}{15}\right)\right)\right)\right), eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    4. distribute-lft-neg-outN/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 \left(\mathsf{neg}\left(eh \cdot \frac{\tan t}{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(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(eh, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \frac{-2}{15}\right)\right)\right)\right), eh\right)\right), ew\right)\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{/.f64}\left(1, \left(\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \left(\mathsf{neg}\left(eh \cdot \frac{1}{\frac{ew}{\tan t}}\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(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(eh, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \frac{-2}{15}\right)\right)\right)\right), eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    6. 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{/.f64}\left(1, \left(\sqrt{1 + \frac{\left(\mathsf{neg}\left(eh\right)\right) \cdot \tan t}{ew} \cdot \left(\mathsf{neg}\left(\frac{eh}{\frac{ew}{\tan t}}\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(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(eh, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \frac{-2}{15}\right)\right)\right)\right), eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    7. 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{/.f64}\left(1, \left(\sqrt{1 + \left(\left(\mathsf{neg}\left(eh\right)\right) \cdot \frac{\tan t}{ew}\right) \cdot \left(\mathsf{neg}\left(\frac{eh}{\frac{ew}{\tan t}}\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(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(eh, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \frac{-2}{15}\right)\right)\right)\right), eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    8. distribute-lft-neg-outN/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(eh \cdot \frac{\tan t}{ew}\right)\right) \cdot \left(\mathsf{neg}\left(\frac{eh}{\frac{ew}{\tan t}}\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(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(eh, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \frac{-2}{15}\right)\right)\right)\right), eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    9. 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{/.f64}\left(1, \left(\sqrt{1 + \left(\mathsf{neg}\left(eh \cdot \frac{1}{\frac{ew}{\tan t}}\right)\right) \cdot \left(\mathsf{neg}\left(\frac{eh}{\frac{ew}{\tan t}}\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(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(eh, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \frac{-2}{15}\right)\right)\right)\right), eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    10. 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{/.f64}\left(1, \left(\sqrt{1 + \left(\mathsf{neg}\left(\frac{eh}{\frac{ew}{\tan t}}\right)\right) \cdot \left(\mathsf{neg}\left(\frac{eh}{\frac{ew}{\tan t}}\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(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(eh, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \frac{-2}{15}\right)\right)\right)\right), eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    11. 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{eh}{\frac{ew}{\tan t}} \cdot \frac{eh}{\frac{ew}{\tan t}}}\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(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(eh, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \frac{-2}{15}\right)\right)\right)\right), eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
    12. 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{eh}{\frac{ew}{\tan t}}\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(t, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(eh, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \frac{-2}{15}\right)\right)\right)\right), eh\right)\right), ew\right)\right)\right)\right)\right)\right) \]
  7. Applied egg-rr99.0%

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

Alternative 5: 98.2% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \left|ew \cdot \cos t - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{0 - ew}\right)\right| \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (fabs
  (-
   (* ew (cos t))
   (* (* eh (sin t)) (sin (atan (/ (* eh (tan t)) (- 0.0 ew))))))))
double code(double eh, double ew, double t) {
	return fabs(((ew * cos(t)) - ((eh * sin(t)) * sin(atan(((eh * tan(t)) / (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(((eh * tan(t)) / (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(((eh * Math.tan(t)) / (0.0 - ew)))))));
}
def code(eh, ew, t):
	return math.fabs(((ew * math.cos(t)) - ((eh * math.sin(t)) * math.sin(math.atan(((eh * math.tan(t)) / (0.0 - ew)))))))
function code(eh, ew, t)
	return abs(Float64(Float64(ew * cos(t)) - Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(eh * tan(t)) / Float64(0.0 - ew)))))))
end
function tmp = code(eh, ew, t)
	tmp = abs(((ew * cos(t)) - ((eh * sin(t)) * sin(atan(((eh * tan(t)) / (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[(eh * N[Tan[t], $MachinePrecision]), $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{eh \cdot \tan t}{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. distribute-lft-neg-outN/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 \cdot \tan t\right)\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) \]
    11. remove-double-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, \mathsf{hypot.f64}\left(1, \left(\frac{eh \cdot \tan t}{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) \]
    12. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(eh \cdot \frac{\tan t}{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) \]
    13. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(eh \cdot \frac{1}{\frac{ew}{\tan t}}\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) \]
    14. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(\frac{eh}{\frac{ew}{\tan t}}\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) \]
    15. /-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(eh, \left(\frac{ew}{\tan t}\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) \]
  4. Applied egg-rr99.8%

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

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

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

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

Alternative 6: 86.2% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|ew \cdot \cos t\right|\\ \mathbf{if}\;ew \leq -420000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;ew \leq 210:\\ \;\;\;\;\left|ew - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{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 -420000.0)
     t_1
     (if (<= ew 210.0)
       (fabs
        (- ew (* (* eh (sin t)) (sin (atan (/ (* eh (tan t)) (- 0.0 ew)))))))
       t_1))))
double code(double eh, double ew, double t) {
	double t_1 = fabs((ew * cos(t)));
	double tmp;
	if (ew <= -420000.0) {
		tmp = t_1;
	} else if (ew <= 210.0) {
		tmp = fabs((ew - ((eh * sin(t)) * sin(atan(((eh * tan(t)) / (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 <= (-420000.0d0)) then
        tmp = t_1
    else if (ew <= 210.0d0) then
        tmp = abs((ew - ((eh * sin(t)) * sin(atan(((eh * tan(t)) / (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 <= -420000.0) {
		tmp = t_1;
	} else if (ew <= 210.0) {
		tmp = Math.abs((ew - ((eh * Math.sin(t)) * Math.sin(Math.atan(((eh * Math.tan(t)) / (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 <= -420000.0:
		tmp = t_1
	elif ew <= 210.0:
		tmp = math.fabs((ew - ((eh * math.sin(t)) * math.sin(math.atan(((eh * math.tan(t)) / (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 <= -420000.0)
		tmp = t_1;
	elseif (ew <= 210.0)
		tmp = abs(Float64(ew - Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(eh * tan(t)) / 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 <= -420000.0)
		tmp = t_1;
	elseif (ew <= 210.0)
		tmp = abs((ew - ((eh * sin(t)) * sin(atan(((eh * tan(t)) / (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, -420000.0], t$95$1, If[LessEqual[ew, 210.0], N[Abs[N[(ew - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $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 -420000:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if ew < -4.2e5 or 210 < 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. distribute-lft-neg-outN/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 \cdot \tan t\right)\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) \]
      11. remove-double-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, \mathsf{hypot.f64}\left(1, \left(\frac{eh \cdot \tan t}{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) \]
      12. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(eh \cdot \frac{\tan t}{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) \]
      13. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(eh \cdot \frac{1}{\frac{ew}{\tan t}}\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) \]
      14. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(\frac{eh}{\frac{ew}{\tan t}}\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) \]
      15. /-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(eh, \left(\frac{ew}{\tan t}\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) \]
    4. Applied egg-rr99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\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.f6489.6%

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

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

    if -4.2e5 < ew < 210

    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. distribute-lft-neg-outN/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 \cdot \tan t\right)\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) \]
      11. remove-double-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, \mathsf{hypot.f64}\left(1, \left(\frac{eh \cdot \tan t}{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) \]
      12. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(eh \cdot \frac{\tan t}{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) \]
      13. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(eh \cdot \frac{1}{\frac{ew}{\tan t}}\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) \]
      14. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(\frac{eh}{\frac{ew}{\tan t}}\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) \]
      15. /-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(eh, \left(\frac{ew}{\tan t}\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) \]
    4. Applied egg-rr99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\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. Simplified91.3%

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

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

    Alternative 7: 74.9% accurate, 4.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|ew \cdot \cos t\right|\\ \mathbf{if}\;ew \leq -9.5 \cdot 10^{-52}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;ew \leq 2.1 \cdot 10^{-55}:\\ \;\;\;\;\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 -9.5e-52) t_1 (if (<= ew 2.1e-55) (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 <= -9.5e-52) {
    		tmp = t_1;
    	} else if (ew <= 2.1e-55) {
    		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 <= (-9.5d-52)) then
            tmp = t_1
        else if (ew <= 2.1d-55) 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 <= -9.5e-52) {
    		tmp = t_1;
    	} else if (ew <= 2.1e-55) {
    		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 <= -9.5e-52:
    		tmp = t_1
    	elif ew <= 2.1e-55:
    		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 <= -9.5e-52)
    		tmp = t_1;
    	elseif (ew <= 2.1e-55)
    		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 <= -9.5e-52)
    		tmp = t_1;
    	elseif (ew <= 2.1e-55)
    		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, -9.5e-52], t$95$1, If[LessEqual[ew, 2.1e-55], 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 -9.5 \cdot 10^{-52}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;ew \leq 2.1 \cdot 10^{-55}:\\
    \;\;\;\;\left|eh \cdot \sin t\right|\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if ew < -9.50000000000000007e-52 or 2.1000000000000002e-55 < 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. distribute-lft-neg-outN/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 \cdot \tan t\right)\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) \]
        11. remove-double-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, \mathsf{hypot.f64}\left(1, \left(\frac{eh \cdot \tan t}{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) \]
        12. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(eh \cdot \frac{\tan t}{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) \]
        13. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(eh \cdot \frac{1}{\frac{ew}{\tan t}}\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) \]
        14. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(\frac{eh}{\frac{ew}{\tan t}}\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) \]
        15. /-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(eh, \left(\frac{ew}{\tan t}\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) \]
      4. Applied egg-rr99.8%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\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.f6486.5%

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

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

      if -9.50000000000000007e-52 < ew < 2.1000000000000002e-55

      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. distribute-lft-neg-outN/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 \cdot \tan t\right)\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) \]
        11. remove-double-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, \mathsf{hypot.f64}\left(1, \left(\frac{eh \cdot \tan t}{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) \]
        12. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(eh \cdot \frac{\tan t}{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) \]
        13. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(eh \cdot \frac{1}{\frac{ew}{\tan t}}\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) \]
        14. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(\frac{eh}{\frac{ew}{\tan t}}\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) \]
        15. /-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(eh, \left(\frac{ew}{\tan t}\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) \]
      4. Applied egg-rr99.8%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right)\right)\right) \]
      7. Simplified74.7%

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

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

        \[\leadsto \mathsf{fabs.f64}\left(\color{blue}{\left(eh \cdot \sin t\right)}\right) \]
      10. 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.f6474.8%

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

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

    Alternative 8: 59.1% accurate, 4.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -7.2 \cdot 10^{-15}:\\ \;\;\;\;\left|ew\right|\\ \mathbf{elif}\;ew \leq 4.1 \cdot 10^{-56}:\\ \;\;\;\;\left|eh \cdot \sin t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew\right|\\ \end{array} \end{array} \]
    (FPCore (eh ew t)
     :precision binary64
     (if (<= ew -7.2e-15)
       (fabs ew)
       (if (<= ew 4.1e-56) (fabs (* eh (sin t))) (fabs ew))))
    double code(double eh, double ew, double t) {
    	double tmp;
    	if (ew <= -7.2e-15) {
    		tmp = fabs(ew);
    	} else if (ew <= 4.1e-56) {
    		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 <= (-7.2d-15)) then
            tmp = abs(ew)
        else if (ew <= 4.1d-56) 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 <= -7.2e-15) {
    		tmp = Math.abs(ew);
    	} else if (ew <= 4.1e-56) {
    		tmp = Math.abs((eh * Math.sin(t)));
    	} else {
    		tmp = Math.abs(ew);
    	}
    	return tmp;
    }
    
    def code(eh, ew, t):
    	tmp = 0
    	if ew <= -7.2e-15:
    		tmp = math.fabs(ew)
    	elif ew <= 4.1e-56:
    		tmp = math.fabs((eh * math.sin(t)))
    	else:
    		tmp = math.fabs(ew)
    	return tmp
    
    function code(eh, ew, t)
    	tmp = 0.0
    	if (ew <= -7.2e-15)
    		tmp = abs(ew);
    	elseif (ew <= 4.1e-56)
    		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 <= -7.2e-15)
    		tmp = abs(ew);
    	elseif (ew <= 4.1e-56)
    		tmp = abs((eh * sin(t)));
    	else
    		tmp = abs(ew);
    	end
    	tmp_2 = tmp;
    end
    
    code[eh_, ew_, t_] := If[LessEqual[ew, -7.2e-15], N[Abs[ew], $MachinePrecision], If[LessEqual[ew, 4.1e-56], N[Abs[N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[ew], $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;ew \leq -7.2 \cdot 10^{-15}:\\
    \;\;\;\;\left|ew\right|\\
    
    \mathbf{elif}\;ew \leq 4.1 \cdot 10^{-56}:\\
    \;\;\;\;\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 < -7.2000000000000002e-15 or 4.1000000000000001e-56 < 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. distribute-lft-neg-outN/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 \cdot \tan t\right)\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) \]
        11. remove-double-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, \mathsf{hypot.f64}\left(1, \left(\frac{eh \cdot \tan t}{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) \]
        12. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(eh \cdot \frac{\tan t}{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) \]
        13. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(eh \cdot \frac{1}{\frac{ew}{\tan t}}\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) \]
        14. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(\frac{eh}{\frac{ew}{\tan t}}\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) \]
        15. /-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(eh, \left(\frac{ew}{\tan t}\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) \]
      4. Applied egg-rr99.8%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\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. Simplified52.7%

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

        if -7.2000000000000002e-15 < ew < 4.1000000000000001e-56

        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. distribute-lft-neg-outN/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 \cdot \tan t\right)\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) \]
          11. remove-double-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, \mathsf{hypot.f64}\left(1, \left(\frac{eh \cdot \tan t}{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) \]
          12. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(eh \cdot \frac{\tan t}{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) \]
          13. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(eh \cdot \frac{1}{\frac{ew}{\tan t}}\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) \]
          14. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(\frac{eh}{\frac{ew}{\tan t}}\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) \]
          15. /-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(eh, \left(\frac{ew}{\tan t}\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) \]
        4. Applied egg-rr99.8%

          \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{tan.f64}\left(t\right)\right), ew\right)\right)\right)\right)\right)\right) \]
        7. Simplified72.8%

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

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

          \[\leadsto \mathsf{fabs.f64}\left(\color{blue}{\left(eh \cdot \sin t\right)}\right) \]
        10. 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.f6473.0%

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(t\right)\right)\right) \]
        11. Simplified73.0%

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

      Alternative 9: 42.3% 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. distribute-lft-neg-outN/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 \cdot \tan t\right)\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) \]
        11. remove-double-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, \mathsf{hypot.f64}\left(1, \left(\frac{eh \cdot \tan t}{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) \]
        12. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(eh \cdot \frac{\tan t}{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) \]
        13. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(eh \cdot \frac{1}{\frac{ew}{\tan t}}\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) \]
        14. 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{/.f64}\left(1, \mathsf{hypot.f64}\left(1, \left(\frac{eh}{\frac{ew}{\tan t}}\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) \]
        15. /-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(eh, \left(\frac{ew}{\tan t}\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) \]
      4. Applied egg-rr99.8%

        \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, \frac{eh}{\frac{ew}{\tan t}}\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. Simplified40.8%

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

        Reproduce

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