Example from Robby

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

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 10 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.1% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

Alternative 3: 98.5% accurate, 1.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 94.2% accurate, 1.7× speedup?

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

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

\mathbf{elif}\;ew \leq 1.25 \cdot 10^{-89}:\\
\;\;\;\;\left|eh \cdot \cos t\right|\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if ew < -6.4999999999999995e-141 or 1.24999999999999992e-89 < ew

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -6.4999999999999995e-141 < ew < 1.24999999999999992e-89

      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fabs.f64}\left(\left(\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \frac{ew \cdot \sin t}{\sqrt{1 \cdot 1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}\right)\right) \]
      6. Applied egg-rr48.9%

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

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

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right)\right) \]
      9. Simplified93.6%

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

    Alternative 5: 87.1% accurate, 1.8× speedup?

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

      1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -5.7999999999999998e-139 < ew < 7.50000000000000069e-40

        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right)\right) \]
        9. Simplified92.3%

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

      Alternative 6: 75.7% accurate, 4.3× speedup?

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

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right)\right) \]
        9. Simplified82.0%

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

        if -9.00000000000000081e-37 < eh < 7.99999999999999997e-70

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 7: 64.4% accurate, 4.3× speedup?

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

        1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(ew, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(ew, \left({t}^{2}\right)\right)\right)\right)\right)\right) \]
          5. unpow2N/A

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(ew, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(ew, \left(t \cdot t\right)\right)\right)\right)\right)\right) \]
          6. *-lowering-*.f6454.4%

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(ew, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(ew, \mathsf{*.f64}\left(t, t\right)\right)\right)\right)\right)\right) \]
        10. Simplified54.4%

          \[\leadsto \left|\color{blue}{t \cdot \left(ew + -0.16666666666666666 \cdot \left(ew \cdot \left(t \cdot t\right)\right)\right)}\right| \]

        if -4.3999999999999999e224 < ew < 1.4500000000000001e201

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{cos.f64}\left(t\right)\right)\right) \]
        9. Simplified68.3%

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

        if 1.4500000000000001e201 < ew

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -4.4 \cdot 10^{+224}:\\ \;\;\;\;\left|t \cdot \left(ew + -0.16666666666666666 \cdot \left(ew \cdot \left(t \cdot t\right)\right)\right)\right|\\ \mathbf{elif}\;ew \leq 1.45 \cdot 10^{+201}:\\ \;\;\;\;\left|eh \cdot \cos t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot t\right|\\ \end{array} \]
      5. Add Preprocessing

      Alternative 8: 45.7% accurate, 7.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -4.2 \cdot 10^{+128}:\\ \;\;\;\;\left|ew \cdot t\right|\\ \mathbf{elif}\;ew \leq 1.85 \cdot 10^{+186}:\\ \;\;\;\;\left|eh\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \left(t \cdot \left(1 + \left(t \cdot t\right) \cdot \left(-0.16666666666666666 + \left(t \cdot t\right) \cdot 0.008333333333333333\right)\right)\right)\right|\\ \end{array} \end{array} \]
      (FPCore (eh ew t)
       :precision binary64
       (if (<= ew -4.2e+128)
         (fabs (* ew t))
         (if (<= ew 1.85e+186)
           (fabs eh)
           (fabs
            (*
             ew
             (*
              t
              (+
               1.0
               (*
                (* t t)
                (+ -0.16666666666666666 (* (* t t) 0.008333333333333333))))))))))
      double code(double eh, double ew, double t) {
      	double tmp;
      	if (ew <= -4.2e+128) {
      		tmp = fabs((ew * t));
      	} else if (ew <= 1.85e+186) {
      		tmp = fabs(eh);
      	} else {
      		tmp = fabs((ew * (t * (1.0 + ((t * t) * (-0.16666666666666666 + ((t * t) * 0.008333333333333333)))))));
      	}
      	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 <= (-4.2d+128)) then
              tmp = abs((ew * t))
          else if (ew <= 1.85d+186) then
              tmp = abs(eh)
          else
              tmp = abs((ew * (t * (1.0d0 + ((t * t) * ((-0.16666666666666666d0) + ((t * t) * 0.008333333333333333d0)))))))
          end if
          code = tmp
      end function
      
      public static double code(double eh, double ew, double t) {
      	double tmp;
      	if (ew <= -4.2e+128) {
      		tmp = Math.abs((ew * t));
      	} else if (ew <= 1.85e+186) {
      		tmp = Math.abs(eh);
      	} else {
      		tmp = Math.abs((ew * (t * (1.0 + ((t * t) * (-0.16666666666666666 + ((t * t) * 0.008333333333333333)))))));
      	}
      	return tmp;
      }
      
      def code(eh, ew, t):
      	tmp = 0
      	if ew <= -4.2e+128:
      		tmp = math.fabs((ew * t))
      	elif ew <= 1.85e+186:
      		tmp = math.fabs(eh)
      	else:
      		tmp = math.fabs((ew * (t * (1.0 + ((t * t) * (-0.16666666666666666 + ((t * t) * 0.008333333333333333)))))))
      	return tmp
      
      function code(eh, ew, t)
      	tmp = 0.0
      	if (ew <= -4.2e+128)
      		tmp = abs(Float64(ew * t));
      	elseif (ew <= 1.85e+186)
      		tmp = abs(eh);
      	else
      		tmp = abs(Float64(ew * Float64(t * Float64(1.0 + Float64(Float64(t * t) * Float64(-0.16666666666666666 + Float64(Float64(t * t) * 0.008333333333333333)))))));
      	end
      	return tmp
      end
      
      function tmp_2 = code(eh, ew, t)
      	tmp = 0.0;
      	if (ew <= -4.2e+128)
      		tmp = abs((ew * t));
      	elseif (ew <= 1.85e+186)
      		tmp = abs(eh);
      	else
      		tmp = abs((ew * (t * (1.0 + ((t * t) * (-0.16666666666666666 + ((t * t) * 0.008333333333333333)))))));
      	end
      	tmp_2 = tmp;
      end
      
      code[eh_, ew_, t_] := If[LessEqual[ew, -4.2e+128], N[Abs[N[(ew * t), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 1.85e+186], N[Abs[eh], $MachinePrecision], N[Abs[N[(ew * N[(t * N[(1.0 + N[(N[(t * t), $MachinePrecision] * N[(-0.16666666666666666 + N[(N[(t * t), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;ew \leq -4.2 \cdot 10^{+128}:\\
      \;\;\;\;\left|ew \cdot t\right|\\
      
      \mathbf{elif}\;ew \leq 1.85 \cdot 10^{+186}:\\
      \;\;\;\;\left|eh\right|\\
      
      \mathbf{else}:\\
      \;\;\;\;\left|ew \cdot \left(t \cdot \left(1 + \left(t \cdot t\right) \cdot \left(-0.16666666666666666 + \left(t \cdot t\right) \cdot 0.008333333333333333\right)\right)\right)\right|\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if ew < -4.1999999999999999e128

        1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -4.1999999999999999e128 < ew < 1.85e186

        1. Initial program 99.8%

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

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

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

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

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

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

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \tan t\right)\right)\right)\right)\right)\right) \]
          6. tan-lowering-tan.f6452.0%

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{*.f64}\left(\left(\frac{\frac{eh}{ew}}{\tan t}\right), \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
        7. Applied egg-rr27.3%

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

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

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

          if 1.85e186 < ew

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(ew, \color{blue}{\left(t \cdot \left(1 + {t}^{2} \cdot \left(\frac{1}{120} \cdot {t}^{2} - \frac{1}{6}\right)\right)\right)}\right)\right) \]
          9. Step-by-step derivation
            1. *-lowering-*.f64N/A

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

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

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({t}^{2}\right), \left(\frac{1}{120} \cdot {t}^{2} - \frac{1}{6}\right)\right)\right)\right)\right)\right) \]
            4. unpow2N/A

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

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\frac{1}{120} \cdot {t}^{2} - \frac{1}{6}\right)\right)\right)\right)\right)\right) \]
            6. sub-negN/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\frac{1}{120} \cdot {t}^{2} + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)\right)\right)\right)\right)\right)\right) \]
            7. metadata-evalN/A

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

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

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

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({t}^{2}\right), \frac{1}{120}\right), \frac{-1}{6}\right)\right)\right)\right)\right)\right) \]
            11. unpow2N/A

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(t \cdot t\right), \frac{1}{120}\right), \frac{-1}{6}\right)\right)\right)\right)\right)\right) \]
            12. *-lowering-*.f6441.2%

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \frac{1}{120}\right), \frac{-1}{6}\right)\right)\right)\right)\right)\right) \]
          10. Simplified41.2%

            \[\leadsto \left|ew \cdot \color{blue}{\left(t \cdot \left(1 + \left(t \cdot t\right) \cdot \left(\left(t \cdot t\right) \cdot 0.008333333333333333 + -0.16666666666666666\right)\right)\right)}\right| \]
        10. Recombined 3 regimes into one program.
        11. Final simplification48.9%

          \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -4.2 \cdot 10^{+128}:\\ \;\;\;\;\left|ew \cdot t\right|\\ \mathbf{elif}\;ew \leq 1.85 \cdot 10^{+186}:\\ \;\;\;\;\left|eh\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \left(t \cdot \left(1 + \left(t \cdot t\right) \cdot \left(-0.16666666666666666 + \left(t \cdot t\right) \cdot 0.008333333333333333\right)\right)\right)\right|\\ \end{array} \]
        12. Add Preprocessing

        Alternative 9: 45.6% accurate, 8.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|ew \cdot t\right|\\ \mathbf{if}\;ew \leq -1.7 \cdot 10^{+123}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;ew \leq 1.62 \cdot 10^{+188}:\\ \;\;\;\;\left|eh\right|\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (eh ew t)
         :precision binary64
         (let* ((t_1 (fabs (* ew t))))
           (if (<= ew -1.7e+123) t_1 (if (<= ew 1.62e+188) (fabs eh) t_1))))
        double code(double eh, double ew, double t) {
        	double t_1 = fabs((ew * t));
        	double tmp;
        	if (ew <= -1.7e+123) {
        		tmp = t_1;
        	} else if (ew <= 1.62e+188) {
        		tmp = fabs(eh);
        	} 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 * t))
            if (ew <= (-1.7d+123)) then
                tmp = t_1
            else if (ew <= 1.62d+188) then
                tmp = abs(eh)
            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 * t));
        	double tmp;
        	if (ew <= -1.7e+123) {
        		tmp = t_1;
        	} else if (ew <= 1.62e+188) {
        		tmp = Math.abs(eh);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(eh, ew, t):
        	t_1 = math.fabs((ew * t))
        	tmp = 0
        	if ew <= -1.7e+123:
        		tmp = t_1
        	elif ew <= 1.62e+188:
        		tmp = math.fabs(eh)
        	else:
        		tmp = t_1
        	return tmp
        
        function code(eh, ew, t)
        	t_1 = abs(Float64(ew * t))
        	tmp = 0.0
        	if (ew <= -1.7e+123)
        		tmp = t_1;
        	elseif (ew <= 1.62e+188)
        		tmp = abs(eh);
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(eh, ew, t)
        	t_1 = abs((ew * t));
        	tmp = 0.0;
        	if (ew <= -1.7e+123)
        		tmp = t_1;
        	elseif (ew <= 1.62e+188)
        		tmp = abs(eh);
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(ew * t), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -1.7e+123], t$95$1, If[LessEqual[ew, 1.62e+188], N[Abs[eh], $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \left|ew \cdot t\right|\\
        \mathbf{if}\;ew \leq -1.7 \cdot 10^{+123}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;ew \leq 1.62 \cdot 10^{+188}:\\
        \;\;\;\;\left|eh\right|\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if ew < -1.70000000000000001e123 or 1.62000000000000012e188 < ew

          1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -1.70000000000000001e123 < ew < 1.62000000000000012e188

          1. Initial program 99.8%

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

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

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

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

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

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

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \tan t\right)\right)\right)\right)\right)\right) \]
            6. tan-lowering-tan.f6452.0%

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{*.f64}\left(\left(\frac{\frac{eh}{ew}}{\tan t}\right), \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
          7. Applied egg-rr27.3%

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

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

              \[\leadsto \left|\color{blue}{eh}\right| \]
          10. Recombined 2 regimes into one program.
          11. Final simplification48.9%

            \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -1.7 \cdot 10^{+123}:\\ \;\;\;\;\left|ew \cdot t\right|\\ \mathbf{elif}\;ew \leq 1.62 \cdot 10^{+188}:\\ \;\;\;\;\left|eh\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot t\right|\\ \end{array} \]
          12. Add Preprocessing

          Alternative 10: 42.1% accurate, 9.1× speedup?

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \tan t\right)\right)\right)\right)\right)\right) \]
            6. tan-lowering-tan.f6442.8%

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{*.f64}\left(\left(\frac{\frac{eh}{ew}}{\tan t}\right), \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
          7. Applied egg-rr21.6%

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

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

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

            Reproduce

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