Example from Robby

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

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.1× speedup?

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

\\
\left|\mathsf{fma}\left(\frac{ew}{\sqrt{{\left(\frac{eh}{\tan t \cdot ew}\right)}^{2} + 1}}, \sin t, \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right) \cdot \left(\cos t \cdot eh\right)\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|\color{blue}{\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. lift-*.f64N/A

      \[\leadsto \left|\color{blue}{\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| \]
    3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|\mathsf{fma}\left(ew \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t}}}}, \sin t, \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right) \cdot \left(\cos t \cdot eh\right)\right)\right| \]
    6. un-div-invN/A

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

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

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

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

      \[\leadsto \left|\mathsf{fma}\left(\frac{ew}{\sqrt{\color{blue}{\frac{eh}{ew \cdot \tan t} \cdot \frac{eh}{ew \cdot \tan t} + 1}}}, \sin t, \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right) \cdot \left(\cos t \cdot eh\right)\right)\right| \]
    11. pow2N/A

      \[\leadsto \left|\mathsf{fma}\left(\frac{ew}{\sqrt{\color{blue}{{\left(\frac{eh}{ew \cdot \tan t}\right)}^{2}} + 1}}, \sin t, \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right) \cdot \left(\cos t \cdot eh\right)\right)\right| \]
    12. lower-pow.f6499.8

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

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

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

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

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

Alternative 2: 99.0% accurate, 1.1× speedup?

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

\\
\left|\mathsf{fma}\left(\cos \tan^{-1} \left(\frac{eh}{ew \cdot t}\right) \cdot ew, \sin t, \left(\cos t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)\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. *-commutativeN/A

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

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

    \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \color{blue}{\left(\frac{eh}{t \cdot ew}\right)} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
  6. 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}{t \cdot ew}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)}\right| \]
    2. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 99.0% accurate, 1.3× speedup?

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

\\
\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \frac{\sin t \cdot ew}{\sqrt{{\left(\frac{eh}{ew \cdot t}\right)}^{2} + 1}}\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. *-commutativeN/A

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

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

    \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \color{blue}{\left(\frac{eh}{t \cdot ew}\right)} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
  6. 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}{t \cdot ew}\right)} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
    2. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 74.4% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.15 \cdot 10^{+108} \lor \neg \left(t \leq 2.3 \cdot 10^{+61}\right):\\ \;\;\;\;\left|\cos \tan^{-1} \left(\frac{\frac{eh}{\sin t}}{ew} \cdot \cos t\right) \cdot \left(\sin t \cdot ew\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \frac{ew \cdot t}{\sqrt{{\left(\frac{\frac{eh}{ew}}{t}\right)}^{2} + 1}}\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (if (or (<= t -1.15e+108) (not (<= t 2.3e+61)))
   (fabs (* (cos (atan (* (/ (/ eh (sin t)) ew) (cos t)))) (* (sin t) ew)))
   (fabs
    (+
     (* (* eh (cos t)) (sin (atan (/ (/ eh ew) (tan t)))))
     (/ (* ew t) (sqrt (+ (pow (/ (/ eh ew) t) 2.0) 1.0)))))))
double code(double eh, double ew, double t) {
	double tmp;
	if ((t <= -1.15e+108) || !(t <= 2.3e+61)) {
		tmp = fabs((cos(atan((((eh / sin(t)) / ew) * cos(t)))) * (sin(t) * ew)));
	} else {
		tmp = fabs((((eh * cos(t)) * sin(atan(((eh / ew) / tan(t))))) + ((ew * t) / sqrt((pow(((eh / ew) / t), 2.0) + 1.0)))));
	}
	return tmp;
}
real(8) function code(eh, ew, t)
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((t <= (-1.15d+108)) .or. (.not. (t <= 2.3d+61))) then
        tmp = abs((cos(atan((((eh / sin(t)) / ew) * cos(t)))) * (sin(t) * ew)))
    else
        tmp = abs((((eh * cos(t)) * sin(atan(((eh / ew) / tan(t))))) + ((ew * t) / sqrt(((((eh / ew) / t) ** 2.0d0) + 1.0d0)))))
    end if
    code = tmp
end function
public static double code(double eh, double ew, double t) {
	double tmp;
	if ((t <= -1.15e+108) || !(t <= 2.3e+61)) {
		tmp = Math.abs((Math.cos(Math.atan((((eh / Math.sin(t)) / ew) * Math.cos(t)))) * (Math.sin(t) * ew)));
	} else {
		tmp = Math.abs((((eh * Math.cos(t)) * Math.sin(Math.atan(((eh / ew) / Math.tan(t))))) + ((ew * t) / Math.sqrt((Math.pow(((eh / ew) / t), 2.0) + 1.0)))));
	}
	return tmp;
}
def code(eh, ew, t):
	tmp = 0
	if (t <= -1.15e+108) or not (t <= 2.3e+61):
		tmp = math.fabs((math.cos(math.atan((((eh / math.sin(t)) / ew) * math.cos(t)))) * (math.sin(t) * ew)))
	else:
		tmp = math.fabs((((eh * math.cos(t)) * math.sin(math.atan(((eh / ew) / math.tan(t))))) + ((ew * t) / math.sqrt((math.pow(((eh / ew) / t), 2.0) + 1.0)))))
	return tmp
function code(eh, ew, t)
	tmp = 0.0
	if ((t <= -1.15e+108) || !(t <= 2.3e+61))
		tmp = abs(Float64(cos(atan(Float64(Float64(Float64(eh / sin(t)) / ew) * cos(t)))) * Float64(sin(t) * ew)));
	else
		tmp = abs(Float64(Float64(Float64(eh * cos(t)) * sin(atan(Float64(Float64(eh / ew) / tan(t))))) + Float64(Float64(ew * t) / sqrt(Float64((Float64(Float64(eh / ew) / t) ^ 2.0) + 1.0)))));
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	tmp = 0.0;
	if ((t <= -1.15e+108) || ~((t <= 2.3e+61)))
		tmp = abs((cos(atan((((eh / sin(t)) / ew) * cos(t)))) * (sin(t) * ew)));
	else
		tmp = abs((((eh * cos(t)) * sin(atan(((eh / ew) / tan(t))))) + ((ew * t) / sqrt(((((eh / ew) / t) ^ 2.0) + 1.0)))));
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := If[Or[LessEqual[t, -1.15e+108], N[Not[LessEqual[t, 2.3e+61]], $MachinePrecision]], N[Abs[N[(N[Cos[N[ArcTan[N[(N[(N[(eh / N[Sin[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision] * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(ew * t), $MachinePrecision] / N[Sqrt[N[(N[Power[N[(N[(eh / ew), $MachinePrecision] / t), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{+108} \lor \neg \left(t \leq 2.3 \cdot 10^{+61}\right):\\
\;\;\;\;\left|\cos \tan^{-1} \left(\frac{\frac{eh}{\sin t}}{ew} \cdot \cos t\right) \cdot \left(\sin t \cdot ew\right)\right|\\

\mathbf{else}:\\
\;\;\;\;\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \frac{ew \cdot t}{\sqrt{{\left(\frac{\frac{eh}{ew}}{t}\right)}^{2} + 1}}\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.1499999999999999e108 or 2.3e61 < 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. Taylor expanded in eh around 0

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

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

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

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

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

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

    if -1.1499999999999999e108 < t < 2.3e61

    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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.15 \cdot 10^{+108} \lor \neg \left(t \leq 2.3 \cdot 10^{+61}\right):\\ \;\;\;\;\left|\cos \tan^{-1} \left(\frac{\frac{eh}{\sin t}}{ew} \cdot \cos t\right) \cdot \left(\sin t \cdot ew\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \frac{ew \cdot t}{\sqrt{{\left(\frac{\frac{eh}{ew}}{t}\right)}^{2} + 1}}\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 42.6% accurate, 1.6× speedup?

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

\\
\left|\sin \tan^{-1} \left(\mathsf{fma}\left({ew}^{-1} \cdot \mathsf{fma}\left(0.041666666666666664 \cdot t, t, -0.5\right), t \cdot t, {ew}^{-1}\right) \cdot \frac{eh}{\sin t}\right) \cdot 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\sin \tan^{-1} \left(\mathsf{fma}\left(\frac{1}{ew} \cdot \mathsf{fma}\left(0.041666666666666664 \cdot t, t, -0.5\right), t \cdot t, \frac{1}{ew}\right) \cdot \frac{eh}{\sin t}\right) \cdot eh\right| \]
      2. Final simplification42.6%

        \[\leadsto \left|\sin \tan^{-1} \left(\mathsf{fma}\left({ew}^{-1} \cdot \mathsf{fma}\left(0.041666666666666664 \cdot t, t, -0.5\right), t \cdot t, {ew}^{-1}\right) \cdot \frac{eh}{\sin t}\right) \cdot eh\right| \]
      3. Add Preprocessing

      Alternative 6: 74.2% accurate, 1.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \tan^{-1} \left(\frac{\frac{eh}{\sin t}}{ew} \cdot \cos t\right)\\ \mathbf{if}\;eh \leq -7.5 \cdot 10^{-19} \lor \neg \left(eh \leq 2.6 \cdot 10^{-113}\right):\\ \;\;\;\;\left|\sin t\_1 \cdot \left(\cos t \cdot eh\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\cos t\_1 \cdot \left(\sin t \cdot ew\right)\right|\\ \end{array} \end{array} \]
      (FPCore (eh ew t)
       :precision binary64
       (let* ((t_1 (atan (* (/ (/ eh (sin t)) ew) (cos t)))))
         (if (or (<= eh -7.5e-19) (not (<= eh 2.6e-113)))
           (fabs (* (sin t_1) (* (cos t) eh)))
           (fabs (* (cos t_1) (* (sin t) ew))))))
      double code(double eh, double ew, double t) {
      	double t_1 = atan((((eh / sin(t)) / ew) * cos(t)));
      	double tmp;
      	if ((eh <= -7.5e-19) || !(eh <= 2.6e-113)) {
      		tmp = fabs((sin(t_1) * (cos(t) * eh)));
      	} else {
      		tmp = fabs((cos(t_1) * (sin(t) * ew)));
      	}
      	return tmp;
      }
      
      real(8) function code(eh, ew, t)
          real(8), intent (in) :: eh
          real(8), intent (in) :: ew
          real(8), intent (in) :: t
          real(8) :: t_1
          real(8) :: tmp
          t_1 = atan((((eh / sin(t)) / ew) * cos(t)))
          if ((eh <= (-7.5d-19)) .or. (.not. (eh <= 2.6d-113))) then
              tmp = abs((sin(t_1) * (cos(t) * eh)))
          else
              tmp = abs((cos(t_1) * (sin(t) * ew)))
          end if
          code = tmp
      end function
      
      public static double code(double eh, double ew, double t) {
      	double t_1 = Math.atan((((eh / Math.sin(t)) / ew) * Math.cos(t)));
      	double tmp;
      	if ((eh <= -7.5e-19) || !(eh <= 2.6e-113)) {
      		tmp = Math.abs((Math.sin(t_1) * (Math.cos(t) * eh)));
      	} else {
      		tmp = Math.abs((Math.cos(t_1) * (Math.sin(t) * ew)));
      	}
      	return tmp;
      }
      
      def code(eh, ew, t):
      	t_1 = math.atan((((eh / math.sin(t)) / ew) * math.cos(t)))
      	tmp = 0
      	if (eh <= -7.5e-19) or not (eh <= 2.6e-113):
      		tmp = math.fabs((math.sin(t_1) * (math.cos(t) * eh)))
      	else:
      		tmp = math.fabs((math.cos(t_1) * (math.sin(t) * ew)))
      	return tmp
      
      function code(eh, ew, t)
      	t_1 = atan(Float64(Float64(Float64(eh / sin(t)) / ew) * cos(t)))
      	tmp = 0.0
      	if ((eh <= -7.5e-19) || !(eh <= 2.6e-113))
      		tmp = abs(Float64(sin(t_1) * Float64(cos(t) * eh)));
      	else
      		tmp = abs(Float64(cos(t_1) * Float64(sin(t) * ew)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(eh, ew, t)
      	t_1 = atan((((eh / sin(t)) / ew) * cos(t)));
      	tmp = 0.0;
      	if ((eh <= -7.5e-19) || ~((eh <= 2.6e-113)))
      		tmp = abs((sin(t_1) * (cos(t) * eh)));
      	else
      		tmp = abs((cos(t_1) * (sin(t) * ew)));
      	end
      	tmp_2 = tmp;
      end
      
      code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[(N[(eh / N[Sin[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision] * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[eh, -7.5e-19], N[Not[LessEqual[eh, 2.6e-113]], $MachinePrecision]], N[Abs[N[(N[Sin[t$95$1], $MachinePrecision] * N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[Cos[t$95$1], $MachinePrecision] * N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \tan^{-1} \left(\frac{\frac{eh}{\sin t}}{ew} \cdot \cos t\right)\\
      \mathbf{if}\;eh \leq -7.5 \cdot 10^{-19} \lor \neg \left(eh \leq 2.6 \cdot 10^{-113}\right):\\
      \;\;\;\;\left|\sin t\_1 \cdot \left(\cos t \cdot eh\right)\right|\\
      
      \mathbf{else}:\\
      \;\;\;\;\left|\cos t\_1 \cdot \left(\sin t \cdot ew\right)\right|\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if eh < -7.49999999999999957e-19 or 2.5999999999999999e-113 < 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 eh around inf

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

            \[\leadsto \left|\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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -7.49999999999999957e-19 < eh < 2.5999999999999999e-113

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -7.5 \cdot 10^{-19} \lor \neg \left(eh \leq 2.6 \cdot 10^{-113}\right):\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\frac{eh}{\sin t}}{ew} \cdot \cos t\right) \cdot \left(\cos t \cdot eh\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\cos \tan^{-1} \left(\frac{\frac{eh}{\sin t}}{ew} \cdot \cos t\right) \cdot \left(\sin t \cdot ew\right)\right|\\ \end{array} \]
      5. Add Preprocessing

      Alternative 7: 59.3% accurate, 1.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{-117} \lor \neg \left(t \leq 0.45\right):\\ \;\;\;\;\left|\cos \tan^{-1} \left(\frac{\frac{eh}{\sin t}}{ew} \cdot \cos t\right) \cdot \left(\sin t \cdot ew\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{eh \cdot \mathsf{fma}\left(0.3333333333333333 \cdot t, t, -1\right)}{\left(-ew\right) \cdot t}\right) \cdot eh\right|\\ \end{array} \end{array} \]
      (FPCore (eh ew t)
       :precision binary64
       (if (or (<= t -4.2e-117) (not (<= t 0.45)))
         (fabs (* (cos (atan (* (/ (/ eh (sin t)) ew) (cos t)))) (* (sin t) ew)))
         (fabs
          (*
           (sin (atan (/ (* eh (fma (* 0.3333333333333333 t) t -1.0)) (* (- ew) t))))
           eh))))
      double code(double eh, double ew, double t) {
      	double tmp;
      	if ((t <= -4.2e-117) || !(t <= 0.45)) {
      		tmp = fabs((cos(atan((((eh / sin(t)) / ew) * cos(t)))) * (sin(t) * ew)));
      	} else {
      		tmp = fabs((sin(atan(((eh * fma((0.3333333333333333 * t), t, -1.0)) / (-ew * t)))) * eh));
      	}
      	return tmp;
      }
      
      function code(eh, ew, t)
      	tmp = 0.0
      	if ((t <= -4.2e-117) || !(t <= 0.45))
      		tmp = abs(Float64(cos(atan(Float64(Float64(Float64(eh / sin(t)) / ew) * cos(t)))) * Float64(sin(t) * ew)));
      	else
      		tmp = abs(Float64(sin(atan(Float64(Float64(eh * fma(Float64(0.3333333333333333 * t), t, -1.0)) / Float64(Float64(-ew) * t)))) * eh));
      	end
      	return tmp
      end
      
      code[eh_, ew_, t_] := If[Or[LessEqual[t, -4.2e-117], N[Not[LessEqual[t, 0.45]], $MachinePrecision]], N[Abs[N[(N[Cos[N[ArcTan[N[(N[(N[(eh / N[Sin[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision] * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[Sin[N[ArcTan[N[(N[(eh * N[(N[(0.3333333333333333 * t), $MachinePrecision] * t + -1.0), $MachinePrecision]), $MachinePrecision] / N[((-ew) * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;t \leq -4.2 \cdot 10^{-117} \lor \neg \left(t \leq 0.45\right):\\
      \;\;\;\;\left|\cos \tan^{-1} \left(\frac{\frac{eh}{\sin t}}{ew} \cdot \cos t\right) \cdot \left(\sin t \cdot ew\right)\right|\\
      
      \mathbf{else}:\\
      \;\;\;\;\left|\sin \tan^{-1} \left(\frac{eh \cdot \mathsf{fma}\left(0.3333333333333333 \cdot t, t, -1\right)}{\left(-ew\right) \cdot t}\right) \cdot eh\right|\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < -4.1999999999999998e-117 or 0.450000000000000011 < 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. Taylor expanded in eh around 0

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

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

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

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

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

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

        if -4.1999999999999998e-117 < t < 0.450000000000000011

        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. *-commutativeN/A

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

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

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

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

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

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

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

          \[\leadsto \left|\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) \cdot eh\right| \]
        7. Step-by-step derivation
          1. Applied rewrites68.8%

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

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

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

                \[\leadsto \left|\sin \tan^{-1} \left(\frac{eh \cdot \mathsf{fma}\left(0.3333333333333333 \cdot t, t, -1\right)}{\left(-ew\right) \cdot t}\right) \cdot eh\right| \]
            4. Recombined 2 regimes into one program.
            5. Final simplification69.6%

              \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{-117} \lor \neg \left(t \leq 0.45\right):\\ \;\;\;\;\left|\cos \tan^{-1} \left(\frac{\frac{eh}{\sin t}}{ew} \cdot \cos t\right) \cdot \left(\sin t \cdot ew\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{eh \cdot \mathsf{fma}\left(0.3333333333333333 \cdot t, t, -1\right)}{\left(-ew\right) \cdot t}\right) \cdot eh\right|\\ \end{array} \]
            6. Add Preprocessing

            Alternative 8: 42.6% accurate, 1.8× speedup?

            \[\begin{array}{l} \\ \left|\sin \tan^{-1} \left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{ew}, \mathsf{fma}\left(-0.001388888888888889 \cdot t, t, 0.041666666666666664\right), \frac{-0.5}{ew}\right), t \cdot t, {ew}^{-1}\right) \cdot \frac{eh}{\sin t}\right) \cdot eh\right| \end{array} \]
            (FPCore (eh ew t)
             :precision binary64
             (fabs
              (*
               (sin
                (atan
                 (*
                  (fma
                   (fma
                    (/ (* t t) ew)
                    (fma (* -0.001388888888888889 t) t 0.041666666666666664)
                    (/ -0.5 ew))
                   (* t t)
                   (pow ew -1.0))
                  (/ eh (sin t)))))
               eh)))
            double code(double eh, double ew, double t) {
            	return fabs((sin(atan((fma(fma(((t * t) / ew), fma((-0.001388888888888889 * t), t, 0.041666666666666664), (-0.5 / ew)), (t * t), pow(ew, -1.0)) * (eh / sin(t))))) * eh));
            }
            
            function code(eh, ew, t)
            	return abs(Float64(sin(atan(Float64(fma(fma(Float64(Float64(t * t) / ew), fma(Float64(-0.001388888888888889 * t), t, 0.041666666666666664), Float64(-0.5 / ew)), Float64(t * t), (ew ^ -1.0)) * Float64(eh / sin(t))))) * eh))
            end
            
            code[eh_, ew_, t_] := N[Abs[N[(N[Sin[N[ArcTan[N[(N[(N[(N[(N[(t * t), $MachinePrecision] / ew), $MachinePrecision] * N[(N[(-0.001388888888888889 * t), $MachinePrecision] * t + 0.041666666666666664), $MachinePrecision] + N[(-0.5 / ew), $MachinePrecision]), $MachinePrecision] * N[(t * t), $MachinePrecision] + N[Power[ew, -1.0], $MachinePrecision]), $MachinePrecision] * N[(eh / N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]
            
            \begin{array}{l}
            
            \\
            \left|\sin \tan^{-1} \left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{ew}, \mathsf{fma}\left(-0.001388888888888889 \cdot t, t, 0.041666666666666664\right), \frac{-0.5}{ew}\right), t \cdot t, {ew}^{-1}\right) \cdot \frac{eh}{\sin t}\right) \cdot 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left|\sin \tan^{-1} \left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{ew}, \mathsf{fma}\left(-0.001388888888888889 \cdot t, t, 0.041666666666666664\right), \frac{-0.5}{ew}\right), t \cdot t, \frac{1}{ew}\right) \cdot \frac{eh}{\sin t}\right) \cdot eh\right| \]
                2. Final simplification42.6%

                  \[\leadsto \left|\sin \tan^{-1} \left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{ew}, \mathsf{fma}\left(-0.001388888888888889 \cdot t, t, 0.041666666666666664\right), \frac{-0.5}{ew}\right), t \cdot t, {ew}^{-1}\right) \cdot \frac{eh}{\sin t}\right) \cdot eh\right| \]
                3. Add Preprocessing

                Alternative 9: 42.6% accurate, 1.9× speedup?

                \[\begin{array}{l} \\ \left|\sin \tan^{-1} \left(\mathsf{fma}\left(-0.5, \frac{t \cdot t}{ew}, {ew}^{-1}\right) \cdot \frac{eh}{\sin t}\right) \cdot eh\right| \end{array} \]
                (FPCore (eh ew t)
                 :precision binary64
                 (fabs
                  (*
                   (sin (atan (* (fma -0.5 (/ (* t t) ew) (pow ew -1.0)) (/ eh (sin t)))))
                   eh)))
                double code(double eh, double ew, double t) {
                	return fabs((sin(atan((fma(-0.5, ((t * t) / ew), pow(ew, -1.0)) * (eh / sin(t))))) * eh));
                }
                
                function code(eh, ew, t)
                	return abs(Float64(sin(atan(Float64(fma(-0.5, Float64(Float64(t * t) / ew), (ew ^ -1.0)) * Float64(eh / sin(t))))) * eh))
                end
                
                code[eh_, ew_, t_] := N[Abs[N[(N[Sin[N[ArcTan[N[(N[(-0.5 * N[(N[(t * t), $MachinePrecision] / ew), $MachinePrecision] + N[Power[ew, -1.0], $MachinePrecision]), $MachinePrecision] * N[(eh / N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]
                
                \begin{array}{l}
                
                \\
                \left|\sin \tan^{-1} \left(\mathsf{fma}\left(-0.5, \frac{t \cdot t}{ew}, {ew}^{-1}\right) \cdot \frac{eh}{\sin t}\right) \cdot 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left|\sin \tan^{-1} \left(\mathsf{fma}\left(-0.5, \frac{t \cdot t}{ew}, \frac{1}{ew}\right) \cdot \frac{eh}{\sin t}\right) \cdot eh\right| \]
                    2. Final simplification42.5%

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

                    Alternative 10: 42.6% accurate, 2.3× speedup?

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left|\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh + {t}^{2} \cdot \left({t}^{2} \cdot \left(-1 \cdot \left({t}^{2} \cdot \left(\frac{-1}{5040} \cdot eh + \left(\frac{1}{720} \cdot eh + \frac{1}{6} \cdot \left(\frac{-1}{36} \cdot eh + \frac{1}{120} \cdot eh\right)\right)\right)\right) - \left(\frac{-1}{36} \cdot eh + \frac{1}{120} \cdot eh\right)\right) - \frac{-1}{6} \cdot eh\right)}{t}\right) \cdot eh\right| \]
                      3. Applied rewrites42.6%

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

                        \[\leadsto \left|\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh \cdot \left(1 + {t}^{2} \cdot \left(\frac{1}{6} + {t}^{2} \cdot \left(\frac{7}{360} + \frac{31}{15120} \cdot {t}^{2}\right)\right)\right)}{t}\right) \cdot eh\right| \]
                      5. Step-by-step derivation
                        1. Applied rewrites42.6%

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

                        Alternative 11: 42.6% accurate, 2.4× speedup?

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left|\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh + {t}^{2} \cdot \left({t}^{2} \cdot \left(-1 \cdot \left({t}^{2} \cdot \left(\frac{-1}{5040} \cdot eh + \left(\frac{1}{720} \cdot eh + \frac{1}{6} \cdot \left(\frac{-1}{36} \cdot eh + \frac{1}{120} \cdot eh\right)\right)\right)\right) - \left(\frac{-1}{36} \cdot eh + \frac{1}{120} \cdot eh\right)\right) - \frac{-1}{6} \cdot eh\right)}{t}\right) \cdot eh\right| \]
                          3. Applied rewrites42.6%

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

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

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

                            Alternative 12: 42.6% accurate, 3.4× speedup?

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

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

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

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

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

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

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

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

                              \[\leadsto \left|\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) \cdot eh\right| \]
                            7. Step-by-step derivation
                              1. Applied rewrites34.5%

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

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

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

                                Alternative 13: 42.6% accurate, 3.5× speedup?

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

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

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

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

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

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

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

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

                                  \[\leadsto \left|\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) \cdot eh\right| \]
                                7. Step-by-step derivation
                                  1. Applied rewrites34.5%

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

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

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

                                    Alternative 14: 42.5% accurate, 3.5× speedup?

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

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

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

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

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

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

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

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

                                      \[\leadsto \left|\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) \cdot eh\right| \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites34.5%

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

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

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

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

                                          Alternative 15: 41.7% accurate, 3.6× speedup?

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

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

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

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

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

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

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

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

                                            \[\leadsto \left|\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) \cdot eh\right| \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites34.5%

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

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

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

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

                                                Alternative 16: 40.5% accurate, 3.8× speedup?

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

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

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

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

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

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

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

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

                                                  \[\leadsto \left|\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) \cdot eh\right| \]
                                                7. Step-by-step derivation
                                                  1. Applied rewrites34.5%

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

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

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

                                                    Alternative 17: 14.2% accurate, 4.9× speedup?

                                                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\frac{eh}{ew}}{t}\\ \left|\frac{t\_1}{\sqrt{{t\_1}^{2} + 1}} \cdot eh\right| \end{array} \end{array} \]
                                                    (FPCore (eh ew t)
                                                     :precision binary64
                                                     (let* ((t_1 (/ (/ eh ew) t)))
                                                       (fabs (* (/ t_1 (sqrt (+ (pow t_1 2.0) 1.0))) eh))))
                                                    double code(double eh, double ew, double t) {
                                                    	double t_1 = (eh / ew) / t;
                                                    	return fabs(((t_1 / sqrt((pow(t_1, 2.0) + 1.0))) * eh));
                                                    }
                                                    
                                                    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 = (eh / ew) / t
                                                        code = abs(((t_1 / sqrt(((t_1 ** 2.0d0) + 1.0d0))) * eh))
                                                    end function
                                                    
                                                    public static double code(double eh, double ew, double t) {
                                                    	double t_1 = (eh / ew) / t;
                                                    	return Math.abs(((t_1 / Math.sqrt((Math.pow(t_1, 2.0) + 1.0))) * eh));
                                                    }
                                                    
                                                    def code(eh, ew, t):
                                                    	t_1 = (eh / ew) / t
                                                    	return math.fabs(((t_1 / math.sqrt((math.pow(t_1, 2.0) + 1.0))) * eh))
                                                    
                                                    function code(eh, ew, t)
                                                    	t_1 = Float64(Float64(eh / ew) / t)
                                                    	return abs(Float64(Float64(t_1 / sqrt(Float64((t_1 ^ 2.0) + 1.0))) * eh))
                                                    end
                                                    
                                                    function tmp = code(eh, ew, t)
                                                    	t_1 = (eh / ew) / t;
                                                    	tmp = abs(((t_1 / sqrt(((t_1 ^ 2.0) + 1.0))) * eh));
                                                    end
                                                    
                                                    code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[(eh / ew), $MachinePrecision] / t), $MachinePrecision]}, N[Abs[N[(N[(t$95$1 / N[Sqrt[N[(N[Power[t$95$1, 2.0], $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    \begin{array}{l}
                                                    t_1 := \frac{\frac{eh}{ew}}{t}\\
                                                    \left|\frac{t\_1}{\sqrt{{t\_1}^{2} + 1}} \cdot eh\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|\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. *-commutativeN/A

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

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

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

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

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

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

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

                                                      \[\leadsto \left|\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) \cdot eh\right| \]
                                                    7. Step-by-step derivation
                                                      1. Applied rewrites34.5%

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

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

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

                                                            \[\leadsto \left|\frac{\frac{\frac{eh}{ew}}{t}}{\sqrt{{\left(\frac{\frac{eh}{ew}}{t}\right)}^{2} + 1}} \cdot eh\right| \]
                                                          2. Add Preprocessing

                                                          Reproduce

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