Example from Robby

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

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

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

      \[\leadsto \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} \color{blue}{\left(\frac{\frac{eh}{ew}}{\tan t}\right)}\right| \]
    2. lift-/.f64N/A

      \[\leadsto \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{\color{blue}{\frac{eh}{ew}}}{\tan t}\right)\right| \]
    3. associate-/l/N/A

      \[\leadsto \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} \color{blue}{\left(\frac{eh}{\tan t \cdot ew}\right)}\right| \]
    4. lower-/.f64N/A

      \[\leadsto \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} \color{blue}{\left(\frac{eh}{\tan t \cdot ew}\right)}\right| \]
    5. lower-*.f6499.8

      \[\leadsto \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{eh}{\color{blue}{\tan t \cdot ew}}\right)\right| \]
  4. Applied rewrites99.8%

    \[\leadsto \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} \color{blue}{\left(\frac{eh}{\tan t \cdot ew}\right)}\right| \]
  5. Final simplification99.8%

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

Alternative 2: 99.0% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{eh}{t \cdot ew}\\
\left|\mathsf{fma}\left(\sin \tan^{-1} \left(\frac{eh}{\tan t \cdot ew}\right) \cdot \cos t, eh, \frac{\sin t \cdot ew}{\sqrt{\mathsf{fma}\left(t\_1, t\_1, 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. Taylor expanded in t around 0

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

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

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

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

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

      \[\leadsto \left|\color{blue}{\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot t}\right)}\right| \]
    3. lift-*.f64N/A

      \[\leadsto \left|\color{blue}{\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot t}\right)\right| \]
    4. lift-*.f64N/A

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

      \[\leadsto \left|\color{blue}{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{eh}{ew \cdot t}\right)\right| \]
    6. *-commutativeN/A

      \[\leadsto \left|\color{blue}{\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{eh}{ew \cdot t}\right)\right| \]
    7. lower-fma.f64N/A

      \[\leadsto \left|\color{blue}{\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{eh}{ew \cdot t}\right)\right)}\right| \]
  7. Applied rewrites99.2%

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

Alternative 3: 98.4% accurate, 1.6× speedup?

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

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

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

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

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

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

      \[\leadsto \left|\color{blue}{\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot t}\right)}\right| \]
    3. lift-*.f64N/A

      \[\leadsto \left|\color{blue}{\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot t}\right)\right| \]
    4. lift-*.f64N/A

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

      \[\leadsto \left|\color{blue}{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{eh}{ew \cdot t}\right)\right| \]
    6. *-commutativeN/A

      \[\leadsto \left|\color{blue}{\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{eh}{ew \cdot t}\right)\right| \]
    7. lower-fma.f64N/A

      \[\leadsto \left|\color{blue}{\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{eh}{ew \cdot t}\right)\right)}\right| \]
  7. Applied rewrites99.2%

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

    \[\leadsto \left|\mathsf{fma}\left(\sin \tan^{-1} \left(\frac{eh}{\tan t \cdot ew}\right) \cdot \cos t, eh, \frac{\sin t \cdot ew}{\color{blue}{1}}\right)\right| \]
  9. Step-by-step derivation
    1. Applied rewrites98.2%

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

    Alternative 4: 75.3% accurate, 1.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{eh}{t \cdot ew}\\ t_2 := \sin \tan^{-1} \left(\frac{eh}{\tan t \cdot ew}\right)\\ t_3 := \left|\sin t \cdot ew\right|\\ \mathbf{if}\;t \leq -2.6 \cdot 10^{+173}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq -1.4 \cdot 10^{+52}:\\ \;\;\;\;\left|\left(\cos t \cdot eh\right) \cdot t\_2\right|\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-6}:\\ \;\;\;\;\left|\mathsf{fma}\left(t\_2 \cdot \cos t, eh, \frac{t \cdot ew}{\sqrt{\mathsf{fma}\left(t\_1, t\_1, 1\right)}}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
    (FPCore (eh ew t)
     :precision binary64
     (let* ((t_1 (/ eh (* t ew)))
            (t_2 (sin (atan (/ eh (* (tan t) ew)))))
            (t_3 (fabs (* (sin t) ew))))
       (if (<= t -2.6e+173)
         t_3
         (if (<= t -1.4e+52)
           (fabs (* (* (cos t) eh) t_2))
           (if (<= t 1.75e-6)
             (fabs (fma (* t_2 (cos t)) eh (/ (* t ew) (sqrt (fma t_1 t_1 1.0)))))
             t_3)))))
    double code(double eh, double ew, double t) {
    	double t_1 = eh / (t * ew);
    	double t_2 = sin(atan((eh / (tan(t) * ew))));
    	double t_3 = fabs((sin(t) * ew));
    	double tmp;
    	if (t <= -2.6e+173) {
    		tmp = t_3;
    	} else if (t <= -1.4e+52) {
    		tmp = fabs(((cos(t) * eh) * t_2));
    	} else if (t <= 1.75e-6) {
    		tmp = fabs(fma((t_2 * cos(t)), eh, ((t * ew) / sqrt(fma(t_1, t_1, 1.0)))));
    	} else {
    		tmp = t_3;
    	}
    	return tmp;
    }
    
    function code(eh, ew, t)
    	t_1 = Float64(eh / Float64(t * ew))
    	t_2 = sin(atan(Float64(eh / Float64(tan(t) * ew))))
    	t_3 = abs(Float64(sin(t) * ew))
    	tmp = 0.0
    	if (t <= -2.6e+173)
    		tmp = t_3;
    	elseif (t <= -1.4e+52)
    		tmp = abs(Float64(Float64(cos(t) * eh) * t_2));
    	elseif (t <= 1.75e-6)
    		tmp = abs(fma(Float64(t_2 * cos(t)), eh, Float64(Float64(t * ew) / sqrt(fma(t_1, t_1, 1.0)))));
    	else
    		tmp = t_3;
    	end
    	return tmp
    end
    
    code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh / N[(t * ew), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[ArcTan[N[(eh / N[(N[Tan[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Abs[N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -2.6e+173], t$95$3, If[LessEqual[t, -1.4e+52], N[Abs[N[(N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision] * t$95$2), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.75e-6], N[Abs[N[(N[(t$95$2 * N[Cos[t], $MachinePrecision]), $MachinePrecision] * eh + N[(N[(t * ew), $MachinePrecision] / N[Sqrt[N[(t$95$1 * t$95$1 + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$3]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{eh}{t \cdot ew}\\
    t_2 := \sin \tan^{-1} \left(\frac{eh}{\tan t \cdot ew}\right)\\
    t_3 := \left|\sin t \cdot ew\right|\\
    \mathbf{if}\;t \leq -2.6 \cdot 10^{+173}:\\
    \;\;\;\;t\_3\\
    
    \mathbf{elif}\;t \leq -1.4 \cdot 10^{+52}:\\
    \;\;\;\;\left|\left(\cos t \cdot eh\right) \cdot t\_2\right|\\
    
    \mathbf{elif}\;t \leq 1.75 \cdot 10^{-6}:\\
    \;\;\;\;\left|\mathsf{fma}\left(t\_2 \cdot \cos t, eh, \frac{t \cdot ew}{\sqrt{\mathsf{fma}\left(t\_1, t\_1, 1\right)}}\right)\right|\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_3\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if t < -2.5999999999999999e173 or 1.74999999999999997e-6 < t

      1. Initial program 99.7%

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

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

        \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{ew \cdot \sin t}}\right|} \]
      5. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t \cdot ew}}\right|} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t \cdot ew}}\right|} \]
        3. lower-sin.f6462.9

          \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t} \cdot ew}\right|} \]
      6. Applied rewrites62.9%

        \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t \cdot ew}}\right|} \]
      7. Applied rewrites63.0%

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

      if -2.5999999999999999e173 < t < -1.4e52

      1. Initial program 99.4%

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

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

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

          \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right)}}\right|} \]
        2. lower-*.f64N/A

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

          \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\left(\cos t \cdot eh\right)} \cdot \sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right)}\right|} \]
        4. lower-*.f64N/A

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

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

          \[\leadsto \frac{1}{\left|\frac{1}{\left(\cos t \cdot eh\right) \cdot \color{blue}{\sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right)}}\right|} \]
        7. lower-atan.f64N/A

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

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

          \[\leadsto \frac{1}{\left|\frac{1}{\left(\cos t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\color{blue}{\cos t \cdot eh}}{ew \cdot \sin t}\right)}\right|} \]
        10. lower-*.f64N/A

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

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

          \[\leadsto \frac{1}{\left|\frac{1}{\left(\cos t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\cos t \cdot eh}{\color{blue}{\sin t \cdot ew}}\right)}\right|} \]
        13. lower-*.f64N/A

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

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

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

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

      if -1.4e52 < t < 1.74999999999999997e-6

      1. Initial program 99.9%

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

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

          \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \color{blue}{\left(\frac{eh}{ew \cdot t}\right)} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
        2. lower-*.f6499.9

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

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

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

          \[\leadsto \left|\color{blue}{\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot t}\right)}\right| \]
        3. lift-*.f64N/A

          \[\leadsto \left|\color{blue}{\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)} + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{eh}{ew \cdot t}\right)\right| \]
        4. lift-*.f64N/A

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

          \[\leadsto \left|\color{blue}{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{eh}{ew \cdot t}\right)\right| \]
        6. *-commutativeN/A

          \[\leadsto \left|\color{blue}{\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{eh}{ew \cdot t}\right)\right| \]
        7. lower-fma.f64N/A

          \[\leadsto \left|\color{blue}{\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{eh}{ew \cdot t}\right)\right)}\right| \]
      7. Applied rewrites99.9%

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

        \[\leadsto \left|\mathsf{fma}\left(\sin \tan^{-1} \left(\frac{eh}{\tan t \cdot ew}\right) \cdot \cos t, eh, \frac{\color{blue}{ew \cdot t}}{\sqrt{\mathsf{fma}\left(\frac{eh}{t \cdot ew}, \frac{eh}{t \cdot ew}, 1\right)}}\right)\right| \]
      9. Step-by-step derivation
        1. lower-*.f6496.1

          \[\leadsto \left|\mathsf{fma}\left(\sin \tan^{-1} \left(\frac{eh}{\tan t \cdot ew}\right) \cdot \cos t, eh, \frac{\color{blue}{ew \cdot t}}{\sqrt{\mathsf{fma}\left(\frac{eh}{t \cdot ew}, \frac{eh}{t \cdot ew}, 1\right)}}\right)\right| \]
      10. Applied rewrites96.1%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{+173}:\\ \;\;\;\;\left|\sin t \cdot ew\right|\\ \mathbf{elif}\;t \leq -1.4 \cdot 10^{+52}:\\ \;\;\;\;\left|\left(\cos t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{eh}{\tan t \cdot ew}\right)\right|\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-6}:\\ \;\;\;\;\left|\mathsf{fma}\left(\sin \tan^{-1} \left(\frac{eh}{\tan t \cdot ew}\right) \cdot \cos t, eh, \frac{t \cdot ew}{\sqrt{\mathsf{fma}\left(\frac{eh}{t \cdot ew}, \frac{eh}{t \cdot ew}, 1\right)}}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\sin t \cdot ew\right|\\ \end{array} \]
    5. Add Preprocessing

    Alternative 5: 75.1% accurate, 2.0× speedup?

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

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

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

          \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right)}}\right|} \]
        2. lower-*.f64N/A

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

          \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\left(\cos t \cdot eh\right)} \cdot \sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right)}\right|} \]
        4. lower-*.f64N/A

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

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

          \[\leadsto \frac{1}{\left|\frac{1}{\left(\cos t \cdot eh\right) \cdot \color{blue}{\sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right)}}\right|} \]
        7. lower-atan.f64N/A

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

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

          \[\leadsto \frac{1}{\left|\frac{1}{\left(\cos t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\color{blue}{\cos t \cdot eh}}{ew \cdot \sin t}\right)}\right|} \]
        10. lower-*.f64N/A

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

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

          \[\leadsto \frac{1}{\left|\frac{1}{\left(\cos t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\cos t \cdot eh}{\color{blue}{\sin t \cdot ew}}\right)}\right|} \]
        13. lower-*.f64N/A

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

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

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

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

      if -4.80000000000000011e-73 < eh < 1.1199999999999999e-127

      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. Applied rewrites74.7%

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

        \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{ew \cdot \sin t}}\right|} \]
      5. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t \cdot ew}}\right|} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t \cdot ew}}\right|} \]
        3. lower-sin.f6475.3

          \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t} \cdot ew}\right|} \]
      6. Applied rewrites75.3%

        \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t \cdot ew}}\right|} \]
      7. Applied rewrites75.4%

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

    Alternative 6: 69.6% accurate, 2.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \cos t \cdot eh\\ t_2 := \frac{1}{\left|\frac{1}{\sin \tan^{-1} \left(\frac{eh}{t \cdot ew}\right) \cdot t\_1}\right|}\\ t_3 := \frac{1}{\left|\frac{1}{\sin \tan^{-1} \left(\frac{\mathsf{fma}\left(-0.3333333333333333 \cdot \frac{eh}{ew}, t \cdot t, \frac{eh}{ew}\right)}{t}\right) \cdot t\_1}\right|}\\ \mathbf{if}\;eh \leq -2.2 \cdot 10^{+141}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;eh \leq -4.8 \cdot 10^{-73}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;eh \leq 1.12 \cdot 10^{-127}:\\ \;\;\;\;\left|\sin t \cdot ew\right|\\ \mathbf{elif}\;eh \leq 1.9 \cdot 10^{+60}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
    (FPCore (eh ew t)
     :precision binary64
     (let* ((t_1 (* (cos t) eh))
            (t_2 (/ 1.0 (fabs (/ 1.0 (* (sin (atan (/ eh (* t ew)))) t_1)))))
            (t_3
             (/
              1.0
              (fabs
               (/
                1.0
                (*
                 (sin
                  (atan
                   (/
                    (fma (* -0.3333333333333333 (/ eh ew)) (* t t) (/ eh ew))
                    t)))
                 t_1))))))
       (if (<= eh -2.2e+141)
         t_2
         (if (<= eh -4.8e-73)
           t_3
           (if (<= eh 1.12e-127)
             (fabs (* (sin t) ew))
             (if (<= eh 1.9e+60) t_3 t_2))))))
    double code(double eh, double ew, double t) {
    	double t_1 = cos(t) * eh;
    	double t_2 = 1.0 / fabs((1.0 / (sin(atan((eh / (t * ew)))) * t_1)));
    	double t_3 = 1.0 / fabs((1.0 / (sin(atan((fma((-0.3333333333333333 * (eh / ew)), (t * t), (eh / ew)) / t))) * t_1)));
    	double tmp;
    	if (eh <= -2.2e+141) {
    		tmp = t_2;
    	} else if (eh <= -4.8e-73) {
    		tmp = t_3;
    	} else if (eh <= 1.12e-127) {
    		tmp = fabs((sin(t) * ew));
    	} else if (eh <= 1.9e+60) {
    		tmp = t_3;
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    function code(eh, ew, t)
    	t_1 = Float64(cos(t) * eh)
    	t_2 = Float64(1.0 / abs(Float64(1.0 / Float64(sin(atan(Float64(eh / Float64(t * ew)))) * t_1))))
    	t_3 = Float64(1.0 / abs(Float64(1.0 / Float64(sin(atan(Float64(fma(Float64(-0.3333333333333333 * Float64(eh / ew)), Float64(t * t), Float64(eh / ew)) / t))) * t_1))))
    	tmp = 0.0
    	if (eh <= -2.2e+141)
    		tmp = t_2;
    	elseif (eh <= -4.8e-73)
    		tmp = t_3;
    	elseif (eh <= 1.12e-127)
    		tmp = abs(Float64(sin(t) * ew));
    	elseif (eh <= 1.9e+60)
    		tmp = t_3;
    	else
    		tmp = t_2;
    	end
    	return tmp
    end
    
    code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[Abs[N[(1.0 / N[(N[Sin[N[ArcTan[N[(eh / N[(t * ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 / N[Abs[N[(1.0 / N[(N[Sin[N[ArcTan[N[(N[(N[(-0.3333333333333333 * N[(eh / ew), $MachinePrecision]), $MachinePrecision] * N[(t * t), $MachinePrecision] + N[(eh / ew), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[eh, -2.2e+141], t$95$2, If[LessEqual[eh, -4.8e-73], t$95$3, If[LessEqual[eh, 1.12e-127], N[Abs[N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]], $MachinePrecision], If[LessEqual[eh, 1.9e+60], t$95$3, t$95$2]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \cos t \cdot eh\\
    t_2 := \frac{1}{\left|\frac{1}{\sin \tan^{-1} \left(\frac{eh}{t \cdot ew}\right) \cdot t\_1}\right|}\\
    t_3 := \frac{1}{\left|\frac{1}{\sin \tan^{-1} \left(\frac{\mathsf{fma}\left(-0.3333333333333333 \cdot \frac{eh}{ew}, t \cdot t, \frac{eh}{ew}\right)}{t}\right) \cdot t\_1}\right|}\\
    \mathbf{if}\;eh \leq -2.2 \cdot 10^{+141}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;eh \leq -4.8 \cdot 10^{-73}:\\
    \;\;\;\;t\_3\\
    
    \mathbf{elif}\;eh \leq 1.12 \cdot 10^{-127}:\\
    \;\;\;\;\left|\sin t \cdot ew\right|\\
    
    \mathbf{elif}\;eh \leq 1.9 \cdot 10^{+60}:\\
    \;\;\;\;t\_3\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_2\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if eh < -2.2e141 or 1.90000000000000005e60 < 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. Applied rewrites88.5%

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

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

          \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right)}}\right|} \]
        2. lower-*.f64N/A

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

          \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\left(\cos t \cdot eh\right)} \cdot \sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right)}\right|} \]
        4. lower-*.f64N/A

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

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

          \[\leadsto \frac{1}{\left|\frac{1}{\left(\cos t \cdot eh\right) \cdot \color{blue}{\sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right)}}\right|} \]
        7. lower-atan.f64N/A

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

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

          \[\leadsto \frac{1}{\left|\frac{1}{\left(\cos t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\color{blue}{\cos t \cdot eh}}{ew \cdot \sin t}\right)}\right|} \]
        10. lower-*.f64N/A

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

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

          \[\leadsto \frac{1}{\left|\frac{1}{\left(\cos t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\cos t \cdot eh}{\color{blue}{\sin t \cdot ew}}\right)}\right|} \]
        13. lower-*.f64N/A

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

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

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

        \[\leadsto \frac{1}{\left|\frac{1}{\left(\cos t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right)}\right|} \]
      8. Step-by-step derivation
        1. Applied rewrites75.6%

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

        if -2.2e141 < eh < -4.80000000000000011e-73 or 1.1199999999999999e-127 < eh < 1.90000000000000005e60

        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. Applied rewrites99.7%

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

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

            \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right)}}\right|} \]
          2. lower-*.f64N/A

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

            \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\left(\cos t \cdot eh\right)} \cdot \sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right)}\right|} \]
          4. lower-*.f64N/A

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

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

            \[\leadsto \frac{1}{\left|\frac{1}{\left(\cos t \cdot eh\right) \cdot \color{blue}{\sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right)}}\right|} \]
          7. lower-atan.f64N/A

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

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

            \[\leadsto \frac{1}{\left|\frac{1}{\left(\cos t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\color{blue}{\cos t \cdot eh}}{ew \cdot \sin t}\right)}\right|} \]
          10. lower-*.f64N/A

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

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

            \[\leadsto \frac{1}{\left|\frac{1}{\left(\cos t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\cos t \cdot eh}{\color{blue}{\sin t \cdot ew}}\right)}\right|} \]
          13. lower-*.f64N/A

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

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

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

          \[\leadsto \frac{1}{\left|\frac{1}{\left(\cos t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{{t}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{eh}{ew} - \frac{-1}{6} \cdot \frac{eh}{ew}\right) + \frac{eh}{ew}}{t}\right)}\right|} \]
        8. Step-by-step derivation
          1. Applied rewrites70.3%

            \[\leadsto \frac{1}{\left|\frac{1}{\left(\cos t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\mathsf{fma}\left(-0.3333333333333333 \cdot \frac{eh}{ew}, t \cdot t, \frac{eh}{ew}\right)}{t}\right)}\right|} \]

          if -4.80000000000000011e-73 < eh < 1.1199999999999999e-127

          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. Applied rewrites74.7%

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

            \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{ew \cdot \sin t}}\right|} \]
          5. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t \cdot ew}}\right|} \]
            2. lower-*.f64N/A

              \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t \cdot ew}}\right|} \]
            3. lower-sin.f6475.3

              \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t} \cdot ew}\right|} \]
          6. Applied rewrites75.3%

            \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t \cdot ew}}\right|} \]
          7. Applied rewrites75.4%

            \[\leadsto \color{blue}{\left|\sin t \cdot ew\right|} \]
        9. Recombined 3 regimes into one program.
        10. Final simplification73.8%

          \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -2.2 \cdot 10^{+141}:\\ \;\;\;\;\frac{1}{\left|\frac{1}{\sin \tan^{-1} \left(\frac{eh}{t \cdot ew}\right) \cdot \left(\cos t \cdot eh\right)}\right|}\\ \mathbf{elif}\;eh \leq -4.8 \cdot 10^{-73}:\\ \;\;\;\;\frac{1}{\left|\frac{1}{\sin \tan^{-1} \left(\frac{\mathsf{fma}\left(-0.3333333333333333 \cdot \frac{eh}{ew}, t \cdot t, \frac{eh}{ew}\right)}{t}\right) \cdot \left(\cos t \cdot eh\right)}\right|}\\ \mathbf{elif}\;eh \leq 1.12 \cdot 10^{-127}:\\ \;\;\;\;\left|\sin t \cdot ew\right|\\ \mathbf{elif}\;eh \leq 1.9 \cdot 10^{+60}:\\ \;\;\;\;\frac{1}{\left|\frac{1}{\sin \tan^{-1} \left(\frac{\mathsf{fma}\left(-0.3333333333333333 \cdot \frac{eh}{ew}, t \cdot t, \frac{eh}{ew}\right)}{t}\right) \cdot \left(\cos t \cdot eh\right)}\right|}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left|\frac{1}{\sin \tan^{-1} \left(\frac{eh}{t \cdot ew}\right) \cdot \left(\cos t \cdot eh\right)}\right|}\\ \end{array} \]
        11. Add Preprocessing

        Alternative 7: 66.3% accurate, 2.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{1}{\left|\frac{1}{\sin \tan^{-1} \left(\frac{eh}{t \cdot ew}\right) \cdot \left(\cos t \cdot eh\right)}\right|}\\ \mathbf{if}\;eh \leq -9 \cdot 10^{+28}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;eh \leq 1.12 \cdot 10^{-127}:\\ \;\;\;\;\left|\sin t \cdot ew\right|\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (eh ew t)
         :precision binary64
         (let* ((t_1
                 (/
                  1.0
                  (fabs (/ 1.0 (* (sin (atan (/ eh (* t ew)))) (* (cos t) eh)))))))
           (if (<= eh -9e+28) t_1 (if (<= eh 1.12e-127) (fabs (* (sin t) ew)) t_1))))
        double code(double eh, double ew, double t) {
        	double t_1 = 1.0 / fabs((1.0 / (sin(atan((eh / (t * ew)))) * (cos(t) * eh))));
        	double tmp;
        	if (eh <= -9e+28) {
        		tmp = t_1;
        	} else if (eh <= 1.12e-127) {
        		tmp = fabs((sin(t) * ew));
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        real(8) function code(eh, ew, t)
            real(8), intent (in) :: eh
            real(8), intent (in) :: ew
            real(8), intent (in) :: t
            real(8) :: t_1
            real(8) :: tmp
            t_1 = 1.0d0 / abs((1.0d0 / (sin(atan((eh / (t * ew)))) * (cos(t) * eh))))
            if (eh <= (-9d+28)) then
                tmp = t_1
            else if (eh <= 1.12d-127) then
                tmp = abs((sin(t) * ew))
            else
                tmp = t_1
            end if
            code = tmp
        end function
        
        public static double code(double eh, double ew, double t) {
        	double t_1 = 1.0 / Math.abs((1.0 / (Math.sin(Math.atan((eh / (t * ew)))) * (Math.cos(t) * eh))));
        	double tmp;
        	if (eh <= -9e+28) {
        		tmp = t_1;
        	} else if (eh <= 1.12e-127) {
        		tmp = Math.abs((Math.sin(t) * ew));
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(eh, ew, t):
        	t_1 = 1.0 / math.fabs((1.0 / (math.sin(math.atan((eh / (t * ew)))) * (math.cos(t) * eh))))
        	tmp = 0
        	if eh <= -9e+28:
        		tmp = t_1
        	elif eh <= 1.12e-127:
        		tmp = math.fabs((math.sin(t) * ew))
        	else:
        		tmp = t_1
        	return tmp
        
        function code(eh, ew, t)
        	t_1 = Float64(1.0 / abs(Float64(1.0 / Float64(sin(atan(Float64(eh / Float64(t * ew)))) * Float64(cos(t) * eh)))))
        	tmp = 0.0
        	if (eh <= -9e+28)
        		tmp = t_1;
        	elseif (eh <= 1.12e-127)
        		tmp = abs(Float64(sin(t) * ew));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(eh, ew, t)
        	t_1 = 1.0 / abs((1.0 / (sin(atan((eh / (t * ew)))) * (cos(t) * eh))));
        	tmp = 0.0;
        	if (eh <= -9e+28)
        		tmp = t_1;
        	elseif (eh <= 1.12e-127)
        		tmp = abs((sin(t) * ew));
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        code[eh_, ew_, t_] := Block[{t$95$1 = N[(1.0 / N[Abs[N[(1.0 / N[(N[Sin[N[ArcTan[N[(eh / N[(t * ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[eh, -9e+28], t$95$1, If[LessEqual[eh, 1.12e-127], N[Abs[N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]], $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \frac{1}{\left|\frac{1}{\sin \tan^{-1} \left(\frac{eh}{t \cdot ew}\right) \cdot \left(\cos t \cdot eh\right)}\right|}\\
        \mathbf{if}\;eh \leq -9 \cdot 10^{+28}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;eh \leq 1.12 \cdot 10^{-127}:\\
        \;\;\;\;\left|\sin t \cdot ew\right|\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if eh < -8.9999999999999994e28 or 1.1199999999999999e-127 < 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. Applied rewrites93.2%

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

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

              \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right)}}\right|} \]
            2. lower-*.f64N/A

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

              \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\left(\cos t \cdot eh\right)} \cdot \sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right)}\right|} \]
            4. lower-*.f64N/A

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

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

              \[\leadsto \frac{1}{\left|\frac{1}{\left(\cos t \cdot eh\right) \cdot \color{blue}{\sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right)}}\right|} \]
            7. lower-atan.f64N/A

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

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

              \[\leadsto \frac{1}{\left|\frac{1}{\left(\cos t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\color{blue}{\cos t \cdot eh}}{ew \cdot \sin t}\right)}\right|} \]
            10. lower-*.f64N/A

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

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

              \[\leadsto \frac{1}{\left|\frac{1}{\left(\cos t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\cos t \cdot eh}{\color{blue}{\sin t \cdot ew}}\right)}\right|} \]
            13. lower-*.f64N/A

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

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

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

            \[\leadsto \frac{1}{\left|\frac{1}{\left(\cos t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right)}\right|} \]
          8. Step-by-step derivation
            1. Applied rewrites68.4%

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

            if -8.9999999999999994e28 < eh < 1.1199999999999999e-127

            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. Applied rewrites79.7%

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

              \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{ew \cdot \sin t}}\right|} \]
            5. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t \cdot ew}}\right|} \]
              2. lower-*.f64N/A

                \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t \cdot ew}}\right|} \]
              3. lower-sin.f6469.9

                \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t} \cdot ew}\right|} \]
            6. Applied rewrites69.9%

              \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t \cdot ew}}\right|} \]
            7. Applied rewrites70.0%

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

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

          Alternative 8: 61.9% accurate, 7.2× speedup?

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

            1. Initial program 99.6%

              \[\left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
            2. Add Preprocessing
            3. Applied rewrites90.2%

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

              \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{ew \cdot \sin t}}\right|} \]
            5. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t \cdot ew}}\right|} \]
              2. lower-*.f64N/A

                \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t \cdot ew}}\right|} \]
              3. lower-sin.f6456.7

                \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t} \cdot ew}\right|} \]
            6. Applied rewrites56.7%

              \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t \cdot ew}}\right|} \]
            7. Applied rewrites56.7%

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

            if -9.9999999999999994e-37 < t < 3.3000000000000002e-7

            1. Initial program 100.0%

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

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

                \[\leadsto \left|\color{blue}{\sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right) \cdot eh}\right| \]
              2. lower-*.f64N/A

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

                \[\leadsto \left|\color{blue}{\sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right)} \cdot eh\right| \]
              4. lower-atan.f64N/A

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

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

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

                \[\leadsto \left|\sin \tan^{-1} \color{blue}{\left(\frac{eh}{ew \cdot \sin t} \cdot \cos t\right)} \cdot eh\right| \]
              8. lower-*.f64N/A

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

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

                \[\leadsto \left|\sin \tan^{-1} \left(\frac{eh}{\color{blue}{\sin t \cdot ew}} \cdot \cos t\right) \cdot eh\right| \]
              11. lower-*.f64N/A

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

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

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

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

              \[\leadsto \left|\frac{\frac{eh}{\tan t}}{\sqrt{\mathsf{fma}\left({\left(\tan t \cdot ew\right)}^{-2}, eh \cdot eh, 1\right)} \cdot ew} \cdot eh\right| \]
            7. Taylor expanded in eh around -inf

              \[\leadsto \left|-1 \cdot \color{blue}{eh}\right| \]
            8. Step-by-step derivation
              1. Applied rewrites79.6%

                \[\leadsto \left|-eh\right| \]
            9. Recombined 2 regimes into one program.
            10. Add Preprocessing

            Alternative 9: 49.2% accurate, 7.4× speedup?

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

              1. Initial program 99.6%

                \[\left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
              2. Add Preprocessing
              3. Applied rewrites89.6%

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

                \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{ew \cdot \sin t}}\right|} \]
              5. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t \cdot ew}}\right|} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t \cdot ew}}\right|} \]
                3. lower-sin.f6457.8

                  \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t} \cdot ew}\right|} \]
              6. Applied rewrites57.8%

                \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t \cdot ew}}\right|} \]
              7. Applied rewrites25.2%

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

              if -4.3999999999999999e47 < t < 8.6000000000000002e-7

              1. Initial program 99.9%

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

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

                  \[\leadsto \left|\color{blue}{\sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right) \cdot eh}\right| \]
                2. lower-*.f64N/A

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

                  \[\leadsto \left|\color{blue}{\sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right)} \cdot eh\right| \]
                4. lower-atan.f64N/A

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

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

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

                  \[\leadsto \left|\sin \tan^{-1} \color{blue}{\left(\frac{eh}{ew \cdot \sin t} \cdot \cos t\right)} \cdot eh\right| \]
                8. lower-*.f64N/A

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

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

                  \[\leadsto \left|\sin \tan^{-1} \left(\frac{eh}{\color{blue}{\sin t \cdot ew}} \cdot \cos t\right) \cdot eh\right| \]
                11. lower-*.f64N/A

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

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

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

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

                \[\leadsto \left|\frac{\frac{eh}{\tan t}}{\sqrt{\mathsf{fma}\left({\left(\tan t \cdot ew\right)}^{-2}, eh \cdot eh, 1\right)} \cdot ew} \cdot eh\right| \]
              7. Taylor expanded in eh around -inf

                \[\leadsto \left|-1 \cdot \color{blue}{eh}\right| \]
              8. Step-by-step derivation
                1. Applied rewrites72.0%

                  \[\leadsto \left|-eh\right| \]
              9. Recombined 2 regimes into one program.
              10. Add Preprocessing

              Alternative 10: 45.3% accurate, 20.7× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|-eh\right|\\ \mathbf{if}\;eh \leq -1.15 \cdot 10^{-129}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;eh \leq 6.8 \cdot 10^{-229}:\\ \;\;\;\;\frac{1}{\left|\frac{1}{t \cdot ew}\right|}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
              (FPCore (eh ew t)
               :precision binary64
               (let* ((t_1 (fabs (- eh))))
                 (if (<= eh -1.15e-129)
                   t_1
                   (if (<= eh 6.8e-229) (/ 1.0 (fabs (/ 1.0 (* t ew)))) t_1))))
              double code(double eh, double ew, double t) {
              	double t_1 = fabs(-eh);
              	double tmp;
              	if (eh <= -1.15e-129) {
              		tmp = t_1;
              	} else if (eh <= 6.8e-229) {
              		tmp = 1.0 / fabs((1.0 / (t * ew)));
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              real(8) function code(eh, ew, t)
                  real(8), intent (in) :: eh
                  real(8), intent (in) :: ew
                  real(8), intent (in) :: t
                  real(8) :: t_1
                  real(8) :: tmp
                  t_1 = abs(-eh)
                  if (eh <= (-1.15d-129)) then
                      tmp = t_1
                  else if (eh <= 6.8d-229) then
                      tmp = 1.0d0 / abs((1.0d0 / (t * ew)))
                  else
                      tmp = t_1
                  end if
                  code = tmp
              end function
              
              public static double code(double eh, double ew, double t) {
              	double t_1 = Math.abs(-eh);
              	double tmp;
              	if (eh <= -1.15e-129) {
              		tmp = t_1;
              	} else if (eh <= 6.8e-229) {
              		tmp = 1.0 / Math.abs((1.0 / (t * ew)));
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              def code(eh, ew, t):
              	t_1 = math.fabs(-eh)
              	tmp = 0
              	if eh <= -1.15e-129:
              		tmp = t_1
              	elif eh <= 6.8e-229:
              		tmp = 1.0 / math.fabs((1.0 / (t * ew)))
              	else:
              		tmp = t_1
              	return tmp
              
              function code(eh, ew, t)
              	t_1 = abs(Float64(-eh))
              	tmp = 0.0
              	if (eh <= -1.15e-129)
              		tmp = t_1;
              	elseif (eh <= 6.8e-229)
              		tmp = Float64(1.0 / abs(Float64(1.0 / Float64(t * ew))));
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              function tmp_2 = code(eh, ew, t)
              	t_1 = abs(-eh);
              	tmp = 0.0;
              	if (eh <= -1.15e-129)
              		tmp = t_1;
              	elseif (eh <= 6.8e-229)
              		tmp = 1.0 / abs((1.0 / (t * ew)));
              	else
              		tmp = t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[(-eh)], $MachinePrecision]}, If[LessEqual[eh, -1.15e-129], t$95$1, If[LessEqual[eh, 6.8e-229], N[(1.0 / N[Abs[N[(1.0 / N[(t * ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \left|-eh\right|\\
              \mathbf{if}\;eh \leq -1.15 \cdot 10^{-129}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;eh \leq 6.8 \cdot 10^{-229}:\\
              \;\;\;\;\frac{1}{\left|\frac{1}{t \cdot ew}\right|}\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if eh < -1.15e-129 or 6.7999999999999998e-229 < 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 \left|\color{blue}{eh \cdot \sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right)}\right| \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \left|\color{blue}{\sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right) \cdot eh}\right| \]
                  2. lower-*.f64N/A

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

                    \[\leadsto \left|\color{blue}{\sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right)} \cdot eh\right| \]
                  4. lower-atan.f64N/A

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

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

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

                    \[\leadsto \left|\sin \tan^{-1} \color{blue}{\left(\frac{eh}{ew \cdot \sin t} \cdot \cos t\right)} \cdot eh\right| \]
                  8. lower-*.f64N/A

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

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

                    \[\leadsto \left|\sin \tan^{-1} \left(\frac{eh}{\color{blue}{\sin t \cdot ew}} \cdot \cos t\right) \cdot eh\right| \]
                  11. lower-*.f64N/A

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

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

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

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

                  \[\leadsto \left|\frac{\frac{eh}{\tan t}}{\sqrt{\mathsf{fma}\left({\left(\tan t \cdot ew\right)}^{-2}, eh \cdot eh, 1\right)} \cdot ew} \cdot eh\right| \]
                7. Taylor expanded in eh around -inf

                  \[\leadsto \left|-1 \cdot \color{blue}{eh}\right| \]
                8. Step-by-step derivation
                  1. Applied rewrites50.9%

                    \[\leadsto \left|-eh\right| \]

                  if -1.15e-129 < eh < 6.7999999999999998e-229

                  1. Initial program 99.7%

                    \[\left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
                  2. Add Preprocessing
                  3. Applied rewrites72.2%

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

                    \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{ew \cdot \sin t}}\right|} \]
                  5. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t \cdot ew}}\right|} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t \cdot ew}}\right|} \]
                    3. lower-sin.f6485.2

                      \[\leadsto \frac{1}{\left|\frac{1}{\color{blue}{\sin t} \cdot ew}\right|} \]
                  6. Applied rewrites85.2%

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

                    \[\leadsto \frac{1}{\left|\frac{1}{ew \cdot \color{blue}{t}}\right|} \]
                  8. Step-by-step derivation
                    1. Applied rewrites35.7%

                      \[\leadsto \frac{1}{\left|\frac{1}{ew \cdot \color{blue}{t}}\right|} \]
                  9. Recombined 2 regimes into one program.
                  10. Final simplification47.8%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -1.15 \cdot 10^{-129}:\\ \;\;\;\;\left|-eh\right|\\ \mathbf{elif}\;eh \leq 6.8 \cdot 10^{-229}:\\ \;\;\;\;\frac{1}{\left|\frac{1}{t \cdot ew}\right|}\\ \mathbf{else}:\\ \;\;\;\;\left|-eh\right|\\ \end{array} \]
                  11. Add Preprocessing

                  Alternative 11: 42.9% accurate, 174.0× 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(Float64(-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 \left|\color{blue}{eh \cdot \sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right)}\right| \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \left|\color{blue}{\sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right) \cdot eh}\right| \]
                    2. lower-*.f64N/A

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

                      \[\leadsto \left|\color{blue}{\sin \tan^{-1} \left(\frac{eh \cdot \cos t}{ew \cdot \sin t}\right)} \cdot eh\right| \]
                    4. lower-atan.f64N/A

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

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

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

                      \[\leadsto \left|\sin \tan^{-1} \color{blue}{\left(\frac{eh}{ew \cdot \sin t} \cdot \cos t\right)} \cdot eh\right| \]
                    8. lower-*.f64N/A

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

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

                      \[\leadsto \left|\sin \tan^{-1} \left(\frac{eh}{\color{blue}{\sin t \cdot ew}} \cdot \cos t\right) \cdot eh\right| \]
                    11. lower-*.f64N/A

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

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

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

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

                    \[\leadsto \left|\frac{\frac{eh}{\tan t}}{\sqrt{\mathsf{fma}\left({\left(\tan t \cdot ew\right)}^{-2}, eh \cdot eh, 1\right)} \cdot ew} \cdot eh\right| \]
                  7. Taylor expanded in eh around -inf

                    \[\leadsto \left|-1 \cdot \color{blue}{eh}\right| \]
                  8. Step-by-step derivation
                    1. Applied rewrites43.9%

                      \[\leadsto \left|-eh\right| \]
                    2. Add Preprocessing

                    Reproduce

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