Example 2 from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 14.7s
Alternatives: 8
Speedup: 1.0×

Specification

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

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 52.1% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right)\\ \mathbf{if}\;\left(ew \cdot \cos t\right) \cdot \cos t\_1 - \left(eh \cdot \sin t\right) \cdot \sin t\_1 \leq 2 \cdot 10^{-182}:\\ \;\;\;\;\left|1 \cdot ew\right|\\ \mathbf{else}:\\ \;\;\;\;\cos t \cdot ew\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (atan (/ (* eh (tan t)) (- ew)))))
   (if (<=
        (- (* (* ew (cos t)) (cos t_1)) (* (* eh (sin t)) (sin t_1)))
        2e-182)
     (fabs (* 1.0 ew))
     (* (cos t) ew))))
double code(double eh, double ew, double t) {
	double t_1 = atan(((eh * tan(t)) / -ew));
	double tmp;
	if ((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))) <= 2e-182) {
		tmp = fabs((1.0 * ew));
	} else {
		tmp = cos(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 * tan(t)) / -ew))
    if ((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))) <= 2d-182) then
        tmp = abs((1.0d0 * ew))
    else
        tmp = cos(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.tan(t)) / -ew));
	double tmp;
	if ((((ew * Math.cos(t)) * Math.cos(t_1)) - ((eh * Math.sin(t)) * Math.sin(t_1))) <= 2e-182) {
		tmp = Math.abs((1.0 * ew));
	} else {
		tmp = Math.cos(t) * ew;
	}
	return tmp;
}
def code(eh, ew, t):
	t_1 = math.atan(((eh * math.tan(t)) / -ew))
	tmp = 0
	if (((ew * math.cos(t)) * math.cos(t_1)) - ((eh * math.sin(t)) * math.sin(t_1))) <= 2e-182:
		tmp = math.fabs((1.0 * ew))
	else:
		tmp = math.cos(t) * ew
	return tmp
function code(eh, ew, t)
	t_1 = atan(Float64(Float64(eh * tan(t)) / Float64(-ew)))
	tmp = 0.0
	if (Float64(Float64(Float64(ew * cos(t)) * cos(t_1)) - Float64(Float64(eh * sin(t)) * sin(t_1))) <= 2e-182)
		tmp = abs(Float64(1.0 * ew));
	else
		tmp = Float64(cos(t) * ew);
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	t_1 = atan(((eh * tan(t)) / -ew));
	tmp = 0.0;
	if ((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))) <= 2e-182)
		tmp = abs((1.0 * ew));
	else
		tmp = cos(t) * ew;
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / (-ew)), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e-182], N[Abs[N[(1.0 * ew), $MachinePrecision]], $MachinePrecision], N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right)\\
\mathbf{if}\;\left(ew \cdot \cos t\right) \cdot \cos t\_1 - \left(eh \cdot \sin t\right) \cdot \sin t\_1 \leq 2 \cdot 10^{-182}:\\
\;\;\;\;\left|1 \cdot ew\right|\\

\mathbf{else}:\\
\;\;\;\;\cos t \cdot ew\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < 2.0000000000000001e-182

    1. Initial program 99.8%

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

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

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

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

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

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

        \[\leadsto \left|1 \cdot ew\right| \]
      3. Step-by-step derivation
        1. Applied rewrites44.6%

          \[\leadsto \left|1 \cdot ew\right| \]

        if 2.0000000000000001e-182 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))))

        1. Initial program 99.8%

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

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

          \[\leadsto \color{blue}{ew \cdot \cos t} \]
        5. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{\cos t \cdot ew} \]
          2. lower-*.f64N/A

            \[\leadsto \color{blue}{\cos t \cdot ew} \]
          3. lower-cos.f6459.5

            \[\leadsto \color{blue}{\cos t} \cdot ew \]
        6. Applied rewrites59.5%

          \[\leadsto \color{blue}{\cos t \cdot ew} \]
      4. Recombined 2 regimes into one program.
      5. Final simplification51.9%

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

      Alternative 3: 99.0% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 4: 91.8% accurate, 1.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := eh \cdot \frac{\tan t}{ew}\\ \mathbf{if}\;eh \leq -8 \cdot 10^{+149} \lor \neg \left(eh \leq 1.25 \cdot 10^{+219}\right):\\ \;\;\;\;\left|\left(\sin t \cdot eh\right) \cdot \tanh \sinh^{-1} t\_1\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\mathsf{fma}\left(\frac{\sin t}{ew}, \tanh \left(\frac{eh \cdot t}{ew}\right) \cdot eh, \cos t \cdot \cos \tan^{-1} t\_1\right) \cdot ew\right|\\ \end{array} \end{array} \]
      (FPCore (eh ew t)
       :precision binary64
       (let* ((t_1 (* eh (/ (tan t) ew))))
         (if (or (<= eh -8e+149) (not (<= eh 1.25e+219)))
           (fabs (* (* (sin t) eh) (tanh (asinh t_1))))
           (fabs
            (*
             (fma
              (/ (sin t) ew)
              (* (tanh (/ (* eh t) ew)) eh)
              (* (cos t) (cos (atan t_1))))
             ew)))))
      double code(double eh, double ew, double t) {
      	double t_1 = eh * (tan(t) / ew);
      	double tmp;
      	if ((eh <= -8e+149) || !(eh <= 1.25e+219)) {
      		tmp = fabs(((sin(t) * eh) * tanh(asinh(t_1))));
      	} else {
      		tmp = fabs((fma((sin(t) / ew), (tanh(((eh * t) / ew)) * eh), (cos(t) * cos(atan(t_1)))) * ew));
      	}
      	return tmp;
      }
      
      function code(eh, ew, t)
      	t_1 = Float64(eh * Float64(tan(t) / ew))
      	tmp = 0.0
      	if ((eh <= -8e+149) || !(eh <= 1.25e+219))
      		tmp = abs(Float64(Float64(sin(t) * eh) * tanh(asinh(t_1))));
      	else
      		tmp = abs(Float64(fma(Float64(sin(t) / ew), Float64(tanh(Float64(Float64(eh * t) / ew)) * eh), Float64(cos(t) * cos(atan(t_1)))) * ew));
      	end
      	return tmp
      end
      
      code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[eh, -8e+149], N[Not[LessEqual[eh, 1.25e+219]], $MachinePrecision]], N[Abs[N[(N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision] * N[Tanh[N[ArcSinh[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(N[Sin[t], $MachinePrecision] / ew), $MachinePrecision] * N[(N[Tanh[N[(N[(eh * t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision] + N[(N[Cos[t], $MachinePrecision] * N[Cos[N[ArcTan[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * ew), $MachinePrecision]], $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := eh \cdot \frac{\tan t}{ew}\\
      \mathbf{if}\;eh \leq -8 \cdot 10^{+149} \lor \neg \left(eh \leq 1.25 \cdot 10^{+219}\right):\\
      \;\;\;\;\left|\left(\sin t \cdot eh\right) \cdot \tanh \sinh^{-1} t\_1\right|\\
      
      \mathbf{else}:\\
      \;\;\;\;\left|\mathsf{fma}\left(\frac{\sin t}{ew}, \tanh \left(\frac{eh \cdot t}{ew}\right) \cdot eh, \cos t \cdot \cos \tan^{-1} t\_1\right) \cdot ew\right|\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if eh < -8.00000000000000039e149 or 1.25e219 < eh

        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -8.00000000000000039e149 < eh < 1.25e219

        1. Initial program 99.8%

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

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

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

          \[\leadsto \left|\mathsf{fma}\left(\left(\tanh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right) \cdot \left(-eh\right)\right) \cdot \sin t, {ew}^{-1}, \cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right) \cdot \cos t\right) \cdot ew\right| \]
        6. Applied rewrites98.3%

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

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

            \[\leadsto \left|\mathsf{fma}\left(\frac{\sin t}{ew}, \tanh \left(\frac{eh \cdot t}{ew}\right) \cdot eh, \cos t \cdot \cos \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right) \cdot ew\right| \]
        9. Recombined 2 regimes into one program.
        10. Final simplification95.1%

          \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -8 \cdot 10^{+149} \lor \neg \left(eh \leq 1.25 \cdot 10^{+219}\right):\\ \;\;\;\;\left|\left(\sin t \cdot eh\right) \cdot \tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\mathsf{fma}\left(\frac{\sin t}{ew}, \tanh \left(\frac{eh \cdot t}{ew}\right) \cdot eh, \cos t \cdot \cos \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right) \cdot ew\right|\\ \end{array} \]
        11. Add Preprocessing

        Alternative 5: 74.7% accurate, 2.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -3.3 \cdot 10^{+96} \lor \neg \left(eh \leq 1.6 \cdot 10^{+141}\right):\\ \;\;\;\;\left|\left(\sin t \cdot eh\right) \cdot \tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \cos t\right|\\ \end{array} \end{array} \]
        (FPCore (eh ew t)
         :precision binary64
         (if (or (<= eh -3.3e+96) (not (<= eh 1.6e+141)))
           (fabs (* (* (sin t) eh) (tanh (asinh (* eh (/ (tan t) ew))))))
           (fabs (* ew (cos t)))))
        double code(double eh, double ew, double t) {
        	double tmp;
        	if ((eh <= -3.3e+96) || !(eh <= 1.6e+141)) {
        		tmp = fabs(((sin(t) * eh) * tanh(asinh((eh * (tan(t) / ew))))));
        	} else {
        		tmp = fabs((ew * cos(t)));
        	}
        	return tmp;
        }
        
        def code(eh, ew, t):
        	tmp = 0
        	if (eh <= -3.3e+96) or not (eh <= 1.6e+141):
        		tmp = math.fabs(((math.sin(t) * eh) * math.tanh(math.asinh((eh * (math.tan(t) / ew))))))
        	else:
        		tmp = math.fabs((ew * math.cos(t)))
        	return tmp
        
        function code(eh, ew, t)
        	tmp = 0.0
        	if ((eh <= -3.3e+96) || !(eh <= 1.6e+141))
        		tmp = abs(Float64(Float64(sin(t) * eh) * tanh(asinh(Float64(eh * Float64(tan(t) / ew))))));
        	else
        		tmp = abs(Float64(ew * cos(t)));
        	end
        	return tmp
        end
        
        function tmp_2 = code(eh, ew, t)
        	tmp = 0.0;
        	if ((eh <= -3.3e+96) || ~((eh <= 1.6e+141)))
        		tmp = abs(((sin(t) * eh) * tanh(asinh((eh * (tan(t) / ew))))));
        	else
        		tmp = abs((ew * cos(t)));
        	end
        	tmp_2 = tmp;
        end
        
        code[eh_, ew_, t_] := If[Or[LessEqual[eh, -3.3e+96], N[Not[LessEqual[eh, 1.6e+141]], $MachinePrecision]], N[Abs[N[(N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision] * N[Tanh[N[ArcSinh[N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;eh \leq -3.3 \cdot 10^{+96} \lor \neg \left(eh \leq 1.6 \cdot 10^{+141}\right):\\
        \;\;\;\;\left|\left(\sin t \cdot eh\right) \cdot \tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right|\\
        
        \mathbf{else}:\\
        \;\;\;\;\left|ew \cdot \cos t\right|\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if eh < -3.29999999999999984e96 or 1.60000000000000009e141 < eh

          1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -3.29999999999999984e96 < eh < 1.60000000000000009e141

          1. Initial program 99.8%

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

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

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

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

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

            \[\leadsto \left|\color{blue}{ew \cdot \cos t}\right| \]
          8. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto \left|\color{blue}{ew \cdot \cos t}\right| \]
            2. lower-cos.f6478.6

              \[\leadsto \left|ew \cdot \color{blue}{\cos t}\right| \]
          9. Applied rewrites78.6%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -3.3 \cdot 10^{+96} \lor \neg \left(eh \leq 1.6 \cdot 10^{+141}\right):\\ \;\;\;\;\left|\left(\sin t \cdot eh\right) \cdot \tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \cos t\right|\\ \end{array} \]
        5. Add Preprocessing

        Alternative 6: 71.1% accurate, 2.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -3.3 \cdot 10^{+96} \lor \neg \left(eh \leq 4.4 \cdot 10^{+221}\right):\\ \;\;\;\;\left|\left(\left(-eh\right) \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\mathsf{fma}\left(\frac{eh}{ew} \cdot 0.3333333333333333, t \cdot t, \frac{eh}{ew}\right) \cdot \left(-t\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \cos t\right|\\ \end{array} \end{array} \]
        (FPCore (eh ew t)
         :precision binary64
         (if (or (<= eh -3.3e+96) (not (<= eh 4.4e+221)))
           (fabs
            (*
             (* (- eh) (sin t))
             (sin
              (atan
               (* (fma (* (/ eh ew) 0.3333333333333333) (* t t) (/ eh ew)) (- t))))))
           (fabs (* ew (cos t)))))
        double code(double eh, double ew, double t) {
        	double tmp;
        	if ((eh <= -3.3e+96) || !(eh <= 4.4e+221)) {
        		tmp = fabs(((-eh * sin(t)) * sin(atan((fma(((eh / ew) * 0.3333333333333333), (t * t), (eh / ew)) * -t)))));
        	} else {
        		tmp = fabs((ew * cos(t)));
        	}
        	return tmp;
        }
        
        function code(eh, ew, t)
        	tmp = 0.0
        	if ((eh <= -3.3e+96) || !(eh <= 4.4e+221))
        		tmp = abs(Float64(Float64(Float64(-eh) * sin(t)) * sin(atan(Float64(fma(Float64(Float64(eh / ew) * 0.3333333333333333), Float64(t * t), Float64(eh / ew)) * Float64(-t))))));
        	else
        		tmp = abs(Float64(ew * cos(t)));
        	end
        	return tmp
        end
        
        code[eh_, ew_, t_] := If[Or[LessEqual[eh, -3.3e+96], N[Not[LessEqual[eh, 4.4e+221]], $MachinePrecision]], N[Abs[N[(N[((-eh) * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(N[(N[(eh / ew), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] * N[(t * t), $MachinePrecision] + N[(eh / ew), $MachinePrecision]), $MachinePrecision] * (-t)), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;eh \leq -3.3 \cdot 10^{+96} \lor \neg \left(eh \leq 4.4 \cdot 10^{+221}\right):\\
        \;\;\;\;\left|\left(\left(-eh\right) \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\mathsf{fma}\left(\frac{eh}{ew} \cdot 0.3333333333333333, t \cdot t, \frac{eh}{ew}\right) \cdot \left(-t\right)\right)\right|\\
        
        \mathbf{else}:\\
        \;\;\;\;\left|ew \cdot \cos t\right|\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if eh < -3.29999999999999984e96 or 4.3999999999999999e221 < eh

          1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -3.29999999999999984e96 < eh < 4.3999999999999999e221

            1. Initial program 99.8%

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

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

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

              \[\leadsto \left|\mathsf{fma}\left(\left(\tanh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right) \cdot \left(-eh\right)\right) \cdot \sin t, {ew}^{-1}, \cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right) \cdot \cos t\right) \cdot ew\right| \]
            6. Applied rewrites97.7%

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

              \[\leadsto \left|\color{blue}{ew \cdot \cos t}\right| \]
            8. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto \left|\color{blue}{ew \cdot \cos t}\right| \]
              2. lower-cos.f6475.1

                \[\leadsto \left|ew \cdot \color{blue}{\cos t}\right| \]
            9. Applied rewrites75.1%

              \[\leadsto \left|\color{blue}{ew \cdot \cos t}\right| \]
          8. Recombined 2 regimes into one program.
          9. Final simplification75.6%

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

          Alternative 7: 62.0% accurate, 8.0× speedup?

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

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

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

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

            \[\leadsto \left|\mathsf{fma}\left(\left(\tanh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right) \cdot \left(-eh\right)\right) \cdot \sin t, {ew}^{-1}, \cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right) \cdot \cos t\right) \cdot ew\right| \]
          6. Applied rewrites91.3%

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

            \[\leadsto \left|\color{blue}{ew \cdot \cos t}\right| \]
          8. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto \left|\color{blue}{ew \cdot \cos t}\right| \]
            2. lower-cos.f6461.8

              \[\leadsto \left|ew \cdot \color{blue}{\cos t}\right| \]
          9. Applied rewrites61.8%

            \[\leadsto \left|\color{blue}{ew \cdot \cos t}\right| \]
          10. Add Preprocessing

          Alternative 8: 42.1% accurate, 107.8× speedup?

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

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

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

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

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

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

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

              \[\leadsto \left|1 \cdot ew\right| \]
            3. Step-by-step derivation
              1. Applied rewrites42.8%

                \[\leadsto \left|1 \cdot ew\right| \]
              2. Add Preprocessing

              Reproduce

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