Example from Robby

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

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right), eh, \left(\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
  4. Applied egg-rr99.8%

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

Alternative 2: 99.8% accurate, 1.1× speedup?

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

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

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

      \[\leadsto \mathsf{fabs.f64}\left(\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)\right) \]
    2. +-lowering-+.f64N/A

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

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

Alternative 3: 99.0% accurate, 1.1× speedup?

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

\\
\left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{eh}{t \cdot ew}\right) + \left(\cos t \cdot eh\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. Taylor expanded in t around 0

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

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

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

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

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

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

Alternative 4: 98.5% accurate, 1.5× speedup?

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right), eh, \left(\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
  4. Applied egg-rr99.8%

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

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

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

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

Alternative 5: 87.1% accurate, 1.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if ew < -6.8000000000000004e-38 or 5.0000000000000003e-34 < ew

    1. Initial program 99.8%

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

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

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

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

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

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right), eh, \left(\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
    4. Applied egg-rr99.8%

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

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(t\right), \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), eh, \mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right)\right) \]
      2. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -6.8000000000000004e-38 < ew < 5.0000000000000003e-34

      1. Initial program 99.8%

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

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

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

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

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right), eh, \left(\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
      4. Applied egg-rr99.8%

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(t\right), \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), eh, \mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right)\right) \]
        2. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -6.8 \cdot 10^{-38}:\\ \;\;\;\;\left|\mathsf{fma}\left(1, eh, \sin t \cdot \frac{ew}{\mathsf{hypot}\left(1, \frac{eh}{ew \cdot \tan t}\right)}\right)\right|\\ \mathbf{elif}\;ew \leq 5 \cdot 10^{-34}:\\ \;\;\;\;\left|\cos t \cdot eh\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\mathsf{fma}\left(1, eh, \sin t \cdot \frac{ew}{\mathsf{hypot}\left(1, \frac{eh}{ew \cdot \tan t}\right)}\right)\right|\\ \end{array} \]
    11. Add Preprocessing

    Alternative 6: 75.3% accurate, 4.3× speedup?

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

      1. Initial program 99.8%

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

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

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

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

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right), eh, \left(\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
      4. Applied egg-rr99.8%

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(t\right), \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), eh, \mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right)\right) \]
        2. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(t\right), \mathsf{*.f64}\left(eh, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, ew\right), \mathsf{tan.f64}\left(t\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{eh}{ew}\right), \tan t\right)\right)\right)\right)\right), eh, \mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right)\right) \]
      6. Applied egg-rr64.2%

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

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

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

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

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

      if -1.9199999999999999e-134 < eh < 2.4000000000000002e-90

      1. Initial program 99.8%

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

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

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

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

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right), eh, \left(\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
      4. Applied egg-rr99.8%

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -1.92 \cdot 10^{-134}:\\ \;\;\;\;\left|\cos t \cdot eh\right|\\ \mathbf{elif}\;eh \leq 2.4 \cdot 10^{-90}:\\ \;\;\;\;\left|ew \cdot \sin t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\cos t \cdot eh\right|\\ \end{array} \]
    5. Add Preprocessing

    Alternative 7: 63.7% accurate, 4.3× speedup?

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

      1. Initial program 99.8%

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

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

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

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

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right), eh, \left(\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
      4. Applied egg-rr99.8%

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(t\right), \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), eh, \mathsf{*.f64}\left(\mathsf{sin.f64}\left(t\right), \mathsf{/.f64}\left(ew, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \mathsf{tan.f64}\left(t\right)\right)\right)\right)\right)\right)\right)\right) \]
        2. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.61999999999999999e-211 < eh < 2.15000000000000014e-266

      1. Initial program 99.9%

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

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

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

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

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right), eh, \left(\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
      4. Applied egg-rr99.9%

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(ew, \mathsf{sin.f64}\left(t\right)\right)\right) \]
      7. Simplified89.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 + {t}^{2} \cdot \left(\frac{-1}{6} \cdot ew + {t}^{2} \cdot \left(\frac{-1}{5040} \cdot \left(ew \cdot {t}^{2}\right) + \frac{1}{120} \cdot ew\right)\right)\right)\right)}\right) \]
      9. Step-by-step derivation
        1. *-lowering-*.f64N/A

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(ew, \left({t}^{2} \cdot \left(\frac{-1}{6} \cdot ew + {t}^{2} \cdot \left(\frac{-1}{5040} \cdot \left(ew \cdot {t}^{2}\right) + \frac{1}{120} \cdot ew\right)\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(\left({t}^{2}\right), \left(\frac{-1}{6} \cdot ew + {t}^{2} \cdot \left(\frac{-1}{5040} \cdot \left(ew \cdot {t}^{2}\right) + \frac{1}{120} \cdot ew\right)\right)\right)\right)\right)\right) \]
        4. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(ew, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(ew, \frac{-1}{6}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{5040}, \mathsf{*.f64}\left(ew, \mathsf{*.f64}\left(t, t\right)\right)\right), \left(ew \cdot \frac{1}{120}\right)\right)\right)\right)\right)\right)\right)\right) \]
        18. *-lowering-*.f6449.0%

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

        \[\leadsto \left|\color{blue}{t \cdot \left(ew + \left(t \cdot t\right) \cdot \left(ew \cdot -0.16666666666666666 + \left(t \cdot t\right) \cdot \left(-0.0001984126984126984 \cdot \left(ew \cdot \left(t \cdot t\right)\right) + ew \cdot 0.008333333333333333\right)\right)\right)}\right| \]
      11. Taylor expanded in ew around 0

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

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(ew, \mathsf{*.f64}\left(ew, \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) \]
        3. unpow2N/A

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(ew, \mathsf{*.f64}\left(ew, \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) \]
        5. sub-negN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(ew, \mathsf{*.f64}\left(ew, \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) \]
        6. metadata-evalN/A

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

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(ew, \mathsf{*.f64}\left(ew, \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) \]
        9. unpow2N/A

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

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(ew, \mathsf{*.f64}\left(ew, \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) \]
        12. *-commutativeN/A

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(ew, \mathsf{*.f64}\left(ew, \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) \]
        14. unpow2N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(ew, \mathsf{*.f64}\left(ew, \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) \]
        15. *-lowering-*.f6449.0%

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

        \[\leadsto \left|t \cdot \left(ew + \color{blue}{ew \cdot \left(\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| \]
    3. Recombined 2 regimes into one program.
    4. Final simplification66.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -1.62 \cdot 10^{-211}:\\ \;\;\;\;\left|\cos t \cdot eh\right|\\ \mathbf{elif}\;eh \leq 2.15 \cdot 10^{-266}:\\ \;\;\;\;\left|t \cdot \left(ew + ew \cdot \left(\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|\\ \mathbf{else}:\\ \;\;\;\;\left|\cos t \cdot eh\right|\\ \end{array} \]
    5. Add Preprocessing

    Alternative 8: 45.3% accurate, 8.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -1.16 \cdot 10^{-134}:\\ \;\;\;\;\left|eh\right|\\ \mathbf{elif}\;eh \leq 3.6 \cdot 10^{-186}:\\ \;\;\;\;\left|t \cdot ew\right|\\ \mathbf{else}:\\ \;\;\;\;\left|eh\right|\\ \end{array} \end{array} \]
    (FPCore (eh ew t)
     :precision binary64
     (if (<= eh -1.16e-134)
       (fabs eh)
       (if (<= eh 3.6e-186) (fabs (* t ew)) (fabs eh))))
    double code(double eh, double ew, double t) {
    	double tmp;
    	if (eh <= -1.16e-134) {
    		tmp = fabs(eh);
    	} else if (eh <= 3.6e-186) {
    		tmp = fabs((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.16d-134)) then
            tmp = abs(eh)
        else if (eh <= 3.6d-186) then
            tmp = abs((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.16e-134) {
    		tmp = Math.abs(eh);
    	} else if (eh <= 3.6e-186) {
    		tmp = Math.abs((t * ew));
    	} else {
    		tmp = Math.abs(eh);
    	}
    	return tmp;
    }
    
    def code(eh, ew, t):
    	tmp = 0
    	if eh <= -1.16e-134:
    		tmp = math.fabs(eh)
    	elif eh <= 3.6e-186:
    		tmp = math.fabs((t * ew))
    	else:
    		tmp = math.fabs(eh)
    	return tmp
    
    function code(eh, ew, t)
    	tmp = 0.0
    	if (eh <= -1.16e-134)
    		tmp = abs(eh);
    	elseif (eh <= 3.6e-186)
    		tmp = abs(Float64(t * ew));
    	else
    		tmp = abs(eh);
    	end
    	return tmp
    end
    
    function tmp_2 = code(eh, ew, t)
    	tmp = 0.0;
    	if (eh <= -1.16e-134)
    		tmp = abs(eh);
    	elseif (eh <= 3.6e-186)
    		tmp = abs((t * ew));
    	else
    		tmp = abs(eh);
    	end
    	tmp_2 = tmp;
    end
    
    code[eh_, ew_, t_] := If[LessEqual[eh, -1.16e-134], N[Abs[eh], $MachinePrecision], If[LessEqual[eh, 3.6e-186], N[Abs[N[(t * ew), $MachinePrecision]], $MachinePrecision], N[Abs[eh], $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;eh \leq -1.16 \cdot 10^{-134}:\\
    \;\;\;\;\left|eh\right|\\
    
    \mathbf{elif}\;eh \leq 3.6 \cdot 10^{-186}:\\
    \;\;\;\;\left|t \cdot ew\right|\\
    
    \mathbf{else}:\\
    \;\;\;\;\left|eh\right|\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if eh < -1.1600000000000001e-134 or 3.5999999999999998e-186 < eh

      1. Initial program 99.8%

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

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

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

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

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

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

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(eh, \mathsf{sin.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(eh, \mathsf{*.f64}\left(ew, \tan t\right)\right)\right)\right)\right)\right) \]
        6. tan-lowering-tan.f6451.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. Simplified51.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. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -1.1600000000000001e-134 < eh < 3.5999999999999998e-186

        1. Initial program 99.8%

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

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

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

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

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

            \[\leadsto \mathsf{fabs.f64}\left(\mathsf{fma.f64}\left(\left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right), eh, \left(\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right) \]
        4. Applied egg-rr99.8%

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

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

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

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

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

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

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

      Alternative 9: 42.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.f6442.6%

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

        \[\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. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Reproduce

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