Example from Robby

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 98.5% accurate, 1.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 74.3% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;t \leq -0.0021:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.2 \cdot 10^{-6}:\\
\;\;\;\;\left|eh \cdot t\_2 + t \cdot ew\right|\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.8999999999999998e145

    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 ew around 0

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.8999999999999998e145 < t < -0.00209999999999999987 or 1.1999999999999999e-6 < t

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.00209999999999999987 < t < 1.1999999999999999e-6

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 74.2% accurate, 2.2× speedup?

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

\\
\begin{array}{l}
t_1 := \left|\sin t \cdot ew\right|\\
\mathbf{if}\;t \leq -0.01:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.2 \cdot 10^{-6}:\\
\;\;\;\;\left|eh \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right) + t \cdot ew\right|\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -0.0100000000000000002 or 1.1999999999999999e-6 < t

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.0100000000000000002 < t < 1.1999999999999999e-6

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 58.8% accurate, 4.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -1.55 \cdot 10^{+50}:\\ \;\;\;\;\left|eh\right|\\ \mathbf{elif}\;eh \leq 21000000000:\\ \;\;\;\;\left|\sin t \cdot ew\right|\\ \mathbf{else}:\\ \;\;\;\;\left|eh\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (if (<= eh -1.55e+50)
   (fabs eh)
   (if (<= eh 21000000000.0) (fabs (* (sin t) ew)) (fabs eh))))
double code(double eh, double ew, double t) {
	double tmp;
	if (eh <= -1.55e+50) {
		tmp = fabs(eh);
	} else if (eh <= 21000000000.0) {
		tmp = fabs((sin(t) * ew));
	} else {
		tmp = fabs(eh);
	}
	return tmp;
}
real(8) function code(eh, ew, t)
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    real(8) :: tmp
    if (eh <= (-1.55d+50)) then
        tmp = abs(eh)
    else if (eh <= 21000000000.0d0) then
        tmp = abs((sin(t) * ew))
    else
        tmp = abs(eh)
    end if
    code = tmp
end function
public static double code(double eh, double ew, double t) {
	double tmp;
	if (eh <= -1.55e+50) {
		tmp = Math.abs(eh);
	} else if (eh <= 21000000000.0) {
		tmp = Math.abs((Math.sin(t) * ew));
	} else {
		tmp = Math.abs(eh);
	}
	return tmp;
}
def code(eh, ew, t):
	tmp = 0
	if eh <= -1.55e+50:
		tmp = math.fabs(eh)
	elif eh <= 21000000000.0:
		tmp = math.fabs((math.sin(t) * ew))
	else:
		tmp = math.fabs(eh)
	return tmp
function code(eh, ew, t)
	tmp = 0.0
	if (eh <= -1.55e+50)
		tmp = abs(eh);
	elseif (eh <= 21000000000.0)
		tmp = abs(Float64(sin(t) * ew));
	else
		tmp = abs(eh);
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	tmp = 0.0;
	if (eh <= -1.55e+50)
		tmp = abs(eh);
	elseif (eh <= 21000000000.0)
		tmp = abs((sin(t) * ew));
	else
		tmp = abs(eh);
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := If[LessEqual[eh, -1.55e+50], N[Abs[eh], $MachinePrecision], If[LessEqual[eh, 21000000000.0], N[Abs[N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]], $MachinePrecision], N[Abs[eh], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;eh \leq -1.55 \cdot 10^{+50}:\\
\;\;\;\;\left|eh\right|\\

\mathbf{elif}\;eh \leq 21000000000:\\
\;\;\;\;\left|\sin t \cdot ew\right|\\

\mathbf{else}:\\
\;\;\;\;\left|eh\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if eh < -1.55000000000000001e50 or 2.1e10 < eh

    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. 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.f6464.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.55000000000000001e50 < eh < 2.1e10

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 6: 43.6% accurate, 6.9× speedup?

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

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -4.2e52 < ew < 8.9999999999999999e139

      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. 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.f6453.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 8.9999999999999999e139 < ew

        1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\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({t}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {t}^{2}\right) - \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({t}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {t}^{2}\right) - \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({t}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {t}^{2}\right) - \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({t}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {t}^{2}\right) - \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({t}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {t}^{2}\right) - \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({t}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {t}^{2}\right) - \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({t}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {t}^{2}\right) + \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({t}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {t}^{2}\right) + \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({t}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {t}^{2}\right)\right), \frac{-1}{6}\right)\right)\right)\right)\right)\right) \]
          9. *-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), \left(\frac{1}{120} + \frac{-1}{5040} \cdot {t}^{2}\right)\right), \frac{-1}{6}\right)\right)\right)\right)\right)\right) \]
          10. 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), \left(\frac{1}{120} + \frac{-1}{5040} \cdot {t}^{2}\right)\right), \frac{-1}{6}\right)\right)\right)\right)\right)\right) \]
          11. *-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(\mathsf{*.f64}\left(t, t\right), \left(\frac{1}{120} + \frac{-1}{5040} \cdot {t}^{2}\right)\right), \frac{-1}{6}\right)\right)\right)\right)\right)\right) \]
          12. +-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(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{120}, \left(\frac{-1}{5040} \cdot {t}^{2}\right)\right)\right), \frac{-1}{6}\right)\right)\right)\right)\right)\right) \]
          13. *-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(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{120}, \left({t}^{2} \cdot \frac{-1}{5040}\right)\right)\right), \frac{-1}{6}\right)\right)\right)\right)\right)\right) \]
          14. *-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(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\left({t}^{2}\right), \frac{-1}{5040}\right)\right)\right), \frac{-1}{6}\right)\right)\right)\right)\right)\right) \]
          15. 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(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\left(t \cdot t\right), \frac{-1}{5040}\right)\right)\right), \frac{-1}{6}\right)\right)\right)\right)\right)\right) \]
          16. *-lowering-*.f6444.7%

            \[\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), \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \frac{-1}{5040}\right)\right)\right), \frac{-1}{6}\right)\right)\right)\right)\right)\right) \]
        10. Simplified44.7%

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

      Alternative 7: 43.6% accurate, 7.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -1.6 \cdot 10^{+52}:\\ \;\;\;\;\left|t \cdot ew\right|\\ \mathbf{elif}\;ew \leq 2.8 \cdot 10^{+139}:\\ \;\;\;\;\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 -1.6e+52)
         (fabs (* t ew))
         (if (<= ew 2.8e+139)
           (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 <= -1.6e+52) {
      		tmp = fabs((t * ew));
      	} else if (ew <= 2.8e+139) {
      		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 <= (-1.6d+52)) then
              tmp = abs((t * ew))
          else if (ew <= 2.8d+139) 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 <= -1.6e+52) {
      		tmp = Math.abs((t * ew));
      	} else if (ew <= 2.8e+139) {
      		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 <= -1.6e+52:
      		tmp = math.fabs((t * ew))
      	elif ew <= 2.8e+139:
      		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 <= -1.6e+52)
      		tmp = abs(Float64(t * ew));
      	elseif (ew <= 2.8e+139)
      		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 <= -1.6e+52)
      		tmp = abs((t * ew));
      	elseif (ew <= 2.8e+139)
      		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, -1.6e+52], N[Abs[N[(t * ew), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 2.8e+139], 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 -1.6 \cdot 10^{+52}:\\
      \;\;\;\;\left|t \cdot ew\right|\\
      
      \mathbf{elif}\;ew \leq 2.8 \cdot 10^{+139}:\\
      \;\;\;\;\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 < -1.6e52

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -1.6e52 < ew < 2.7999999999999998e139

        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. 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.f6453.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 2.7999999999999998e139 < ew

          1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -1.6 \cdot 10^{+52}:\\ \;\;\;\;\left|t \cdot ew\right|\\ \mathbf{elif}\;ew \leq 2.8 \cdot 10^{+139}:\\ \;\;\;\;\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 8: 43.6% accurate, 7.6× speedup?

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

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -4e52 < ew < 5.00000000000000008e140

          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. 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.f6453.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 5.00000000000000008e140 < ew

            1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\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-*.f6444.2%

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

              \[\leadsto \left|\color{blue}{t \cdot \left(ew + -0.16666666666666666 \cdot \left(ew \cdot \left(t \cdot t\right)\right)\right)}\right| \]
          10. Recombined 3 regimes into one program.
          11. Add Preprocessing

          Alternative 9: 43.5% accurate, 8.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -8.99999999999999991e48 < ew < 2.3e139

            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. 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.f6453.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 10: 41.6% 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.f6441.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Reproduce

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