Example 2 from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 24.0s
Alternatives: 10
Speedup: 1.1×

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 10 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \tan^{-1} \left(\frac{\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.1× speedup?

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

\\
\begin{array}{l}
t_1 := \tan t \cdot \frac{eh}{ew}\\
\left|\frac{ew \cdot \cos t}{\mathsf{hypot}\left(1, t\_1\right)} + \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} 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. Step-by-step derivation
    1. sub-neg99.8%

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

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

    \[\leadsto \left|\frac{ew \cdot \cos t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} + \color{blue}{eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right)}\right| \]
  6. Step-by-step derivation
    1. associate-*r*99.8%

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

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

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

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

Alternative 2: 99.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := \tan t \cdot \frac{eh}{ew}\\
\left|\frac{ew \cdot \cos t}{\mathsf{hypot}\left(1, t\_1\right)} + \sin t \cdot \left(eh \cdot \sin \tan^{-1} t\_1\right)\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. Step-by-step derivation
    1. sub-neg99.8%

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

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

Alternative 3: 99.0% accurate, 1.3× speedup?

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

\\
\left|\frac{ew \cdot \cos t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{t \cdot eh}{-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. Step-by-step derivation
    1. associate-*r/99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \color{blue}{\left(\left(-eh\right) \cdot \frac{\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. cos-atan99.8%

      \[\leadsto \left|\left(ew \cdot \cos t\right) \cdot \color{blue}{\frac{1}{\sqrt{1 + \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) \cdot \left(\left(-eh\right) \cdot \frac{\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| \]
    3. un-div-inv99.8%

      \[\leadsto \left|\color{blue}{\frac{ew \cdot \cos t}{\sqrt{1 + \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) \cdot \left(\left(-eh\right) \cdot \frac{\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| \]
    4. hypot-1-def99.8%

      \[\leadsto \left|\frac{ew \cdot \cos t}{\color{blue}{\mathsf{hypot}\left(1, \left(-eh\right) \cdot \frac{\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| \]
    5. associate-*r/99.8%

      \[\leadsto \left|\frac{ew \cdot \cos t}{\mathsf{hypot}\left(1, \color{blue}{\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| \]
    6. *-commutative99.8%

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

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

      \[\leadsto \left|\frac{ew \cdot \cos t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{\color{blue}{\sqrt{-eh} \cdot \sqrt{-eh}}}{ew}\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
    9. sqrt-unprod94.0%

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

      \[\leadsto \left|\frac{ew \cdot \cos t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{\sqrt{\color{blue}{eh \cdot eh}}}{ew}\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
    11. sqrt-unprod53.4%

      \[\leadsto \left|\frac{ew \cdot \cos t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{\color{blue}{\sqrt{eh} \cdot \sqrt{eh}}}{ew}\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
    12. add-sqr-sqrt99.8%

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

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

    \[\leadsto \left|\frac{ew \cdot \cos t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\color{blue}{-1 \cdot \left(eh \cdot t\right)}}{ew}\right)\right| \]
  6. Step-by-step derivation
    1. mul-1-neg98.4%

      \[\leadsto \left|\frac{ew \cdot \cos t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\color{blue}{-eh \cdot t}}{ew}\right)\right| \]
    2. distribute-rgt-neg-in98.4%

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

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

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

Alternative 4: 98.5% accurate, 1.5× speedup?

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

\\
\left|ew \cdot \cos t - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-\tan t\right)}{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. Step-by-step derivation
    1. add-cbrt-cube54.3%

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

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

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

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

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

Alternative 5: 86.7% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -1.12 \cdot 10^{-79} \lor \neg \left(eh \leq 1.25 \cdot 10^{-30}\right):\\ \;\;\;\;\left|eh \cdot \left(ew \cdot \frac{1}{eh} - \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{-ew}\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \cos t\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (if (or (<= eh -1.12e-79) (not (<= eh 1.25e-30)))
   (fabs
    (*
     eh
     (- (* ew (/ 1.0 eh)) (* (sin t) (sin (atan (* (tan t) (/ eh (- ew)))))))))
   (fabs (* ew (cos t)))))
double code(double eh, double ew, double t) {
	double tmp;
	if ((eh <= -1.12e-79) || !(eh <= 1.25e-30)) {
		tmp = fabs((eh * ((ew * (1.0 / eh)) - (sin(t) * sin(atan((tan(t) * (eh / -ew))))))));
	} else {
		tmp = fabs((ew * cos(t)));
	}
	return tmp;
}
real(8) function code(eh, ew, t)
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((eh <= (-1.12d-79)) .or. (.not. (eh <= 1.25d-30))) then
        tmp = abs((eh * ((ew * (1.0d0 / eh)) - (sin(t) * sin(atan((tan(t) * (eh / -ew))))))))
    else
        tmp = abs((ew * cos(t)))
    end if
    code = tmp
end function
public static double code(double eh, double ew, double t) {
	double tmp;
	if ((eh <= -1.12e-79) || !(eh <= 1.25e-30)) {
		tmp = Math.abs((eh * ((ew * (1.0 / eh)) - (Math.sin(t) * Math.sin(Math.atan((Math.tan(t) * (eh / -ew))))))));
	} else {
		tmp = Math.abs((ew * Math.cos(t)));
	}
	return tmp;
}
def code(eh, ew, t):
	tmp = 0
	if (eh <= -1.12e-79) or not (eh <= 1.25e-30):
		tmp = math.fabs((eh * ((ew * (1.0 / eh)) - (math.sin(t) * math.sin(math.atan((math.tan(t) * (eh / -ew))))))))
	else:
		tmp = math.fabs((ew * math.cos(t)))
	return tmp
function code(eh, ew, t)
	tmp = 0.0
	if ((eh <= -1.12e-79) || !(eh <= 1.25e-30))
		tmp = abs(Float64(eh * Float64(Float64(ew * Float64(1.0 / eh)) - Float64(sin(t) * sin(atan(Float64(tan(t) * Float64(eh / Float64(-ew)))))))));
	else
		tmp = abs(Float64(ew * cos(t)));
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	tmp = 0.0;
	if ((eh <= -1.12e-79) || ~((eh <= 1.25e-30)))
		tmp = abs((eh * ((ew * (1.0 / eh)) - (sin(t) * sin(atan((tan(t) * (eh / -ew))))))));
	else
		tmp = abs((ew * cos(t)));
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -1.12e-79], N[Not[LessEqual[eh, 1.25e-30]], $MachinePrecision]], N[Abs[N[(eh * N[(N[(ew * N[(1.0 / eh), $MachinePrecision]), $MachinePrecision] - N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[(eh / (-ew)), $MachinePrecision]), $MachinePrecision]], $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 -1.12 \cdot 10^{-79} \lor \neg \left(eh \leq 1.25 \cdot 10^{-30}\right):\\
\;\;\;\;\left|eh \cdot \left(ew \cdot \frac{1}{eh} - \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{-ew}\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 < -1.11999999999999996e-79 or 1.24999999999999993e-30 < eh

    1. Initial program 99.7%

      \[\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. Step-by-step derivation
      1. add-cbrt-cube65.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.11999999999999996e-79 < eh < 1.24999999999999993e-30

    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. Step-by-step derivation
      1. add-cbrt-cube38.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 74.8% accurate, 2.1× speedup?

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

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

\mathbf{elif}\;t \leq -0.01:\\
\;\;\;\;\left|ew \cdot \cos t\right|\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.0000000000000003e213 or 0.0135999999999999992 < t

    1. Initial program 99.7%

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

      \[\leadsto \left|\color{blue}{ew} \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| \]
    4. Taylor expanded in ew around 0 58.8%

      \[\leadsto \left|\color{blue}{-1 \cdot \left(eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot \tan t}{ew}\right)\right)\right)}\right| \]
    5. Step-by-step derivation
      1. mul-1-neg58.8%

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

        \[\leadsto \left|-\color{blue}{\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot \tan t}{ew}\right)}\right| \]
      3. distribute-lft-neg-in58.8%

        \[\leadsto \left|\color{blue}{\left(-eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot \tan t}{ew}\right)}\right| \]
      4. mul-1-neg58.8%

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

        \[\leadsto \left|\left(-eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(-\color{blue}{eh \cdot \frac{\tan t}{ew}}\right)\right| \]
      6. distribute-lft-neg-out58.8%

        \[\leadsto \left|\left(-eh \cdot \sin t\right) \cdot \sin \tan^{-1} \color{blue}{\left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right)}\right| \]
      7. *-commutative58.8%

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

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

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

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

        \[\leadsto \left|\sin \tan^{-1} \left(-\color{blue}{eh \cdot \frac{t}{ew}}\right) \cdot \left(eh \cdot \left(-\sin t\right)\right)\right| \]
      3. distribute-rgt-neg-in59.2%

        \[\leadsto \left|\sin \tan^{-1} \color{blue}{\left(eh \cdot \left(-\frac{t}{ew}\right)\right)} \cdot \left(eh \cdot \left(-\sin t\right)\right)\right| \]
      4. mul-1-neg59.2%

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

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

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

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

    if -9.0000000000000003e213 < t < -0.0100000000000000002

    1. Initial program 99.7%

      \[\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. Step-by-step derivation
      1. add-cbrt-cube53.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.0100000000000000002 < t < 0.0135999999999999992

    1. Initial program 100.0%

      \[\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. Step-by-step derivation
      1. add-cbrt-cube47.1%

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

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

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

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

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

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

      \[\leadsto \left|\color{blue}{ew + t \cdot \left(-0.5 \cdot \left(ew \cdot t\right) - eh \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot \tan t}{ew}\right)\right)}\right| \]
    9. Step-by-step derivation
      1. associate-*r*95.6%

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

        \[\leadsto \left|ew + t \cdot \left(\color{blue}{\left(ew \cdot -0.5\right)} \cdot t - eh \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot \tan t}{ew}\right)\right)\right| \]
      3. mul-1-neg95.6%

        \[\leadsto \left|ew + t \cdot \left(\left(ew \cdot -0.5\right) \cdot t - eh \cdot \sin \tan^{-1} \color{blue}{\left(-\frac{eh \cdot \tan t}{ew}\right)}\right)\right| \]
      4. *-commutative95.6%

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

        \[\leadsto \left|ew + t \cdot \left(\left(ew \cdot -0.5\right) \cdot t - eh \cdot \sin \tan^{-1} \left(-\color{blue}{\tan t \cdot \frac{eh}{ew}}\right)\right)\right| \]
    10. Simplified95.6%

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

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

Alternative 7: 74.3% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -3.4 \cdot 10^{+114} \lor \neg \left(eh \leq -4.2 \cdot 10^{+44}\right) \land \left(eh \leq -15500000000 \lor \neg \left(eh \leq 7.5 \cdot 10^{+136}\right)\right):\\ \;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(eh \cdot \frac{-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.4e+114)
         (and (not (<= eh -4.2e+44))
              (or (<= eh -15500000000.0) (not (<= eh 7.5e+136)))))
   (fabs (* (* eh (sin t)) (sin (atan (* eh (/ (- t) ew))))))
   (fabs (* ew (cos t)))))
double code(double eh, double ew, double t) {
	double tmp;
	if ((eh <= -3.4e+114) || (!(eh <= -4.2e+44) && ((eh <= -15500000000.0) || !(eh <= 7.5e+136)))) {
		tmp = fabs(((eh * sin(t)) * sin(atan((eh * (-t / ew))))));
	} else {
		tmp = fabs((ew * cos(t)));
	}
	return tmp;
}
real(8) function code(eh, ew, t)
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((eh <= (-3.4d+114)) .or. (.not. (eh <= (-4.2d+44))) .and. (eh <= (-15500000000.0d0)) .or. (.not. (eh <= 7.5d+136))) then
        tmp = abs(((eh * sin(t)) * sin(atan((eh * (-t / ew))))))
    else
        tmp = abs((ew * cos(t)))
    end if
    code = tmp
end function
public static double code(double eh, double ew, double t) {
	double tmp;
	if ((eh <= -3.4e+114) || (!(eh <= -4.2e+44) && ((eh <= -15500000000.0) || !(eh <= 7.5e+136)))) {
		tmp = Math.abs(((eh * Math.sin(t)) * Math.sin(Math.atan((eh * (-t / ew))))));
	} else {
		tmp = Math.abs((ew * Math.cos(t)));
	}
	return tmp;
}
def code(eh, ew, t):
	tmp = 0
	if (eh <= -3.4e+114) or (not (eh <= -4.2e+44) and ((eh <= -15500000000.0) or not (eh <= 7.5e+136))):
		tmp = math.fabs(((eh * math.sin(t)) * math.sin(math.atan((eh * (-t / ew))))))
	else:
		tmp = math.fabs((ew * math.cos(t)))
	return tmp
function code(eh, ew, t)
	tmp = 0.0
	if ((eh <= -3.4e+114) || (!(eh <= -4.2e+44) && ((eh <= -15500000000.0) || !(eh <= 7.5e+136))))
		tmp = abs(Float64(Float64(eh * sin(t)) * sin(atan(Float64(eh * Float64(Float64(-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.4e+114) || (~((eh <= -4.2e+44)) && ((eh <= -15500000000.0) || ~((eh <= 7.5e+136)))))
		tmp = abs(((eh * sin(t)) * sin(atan((eh * (-t / ew))))));
	else
		tmp = abs((ew * cos(t)));
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -3.4e+114], And[N[Not[LessEqual[eh, -4.2e+44]], $MachinePrecision], Or[LessEqual[eh, -15500000000.0], N[Not[LessEqual[eh, 7.5e+136]], $MachinePrecision]]]], N[Abs[N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(eh * N[((-t) / 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.4 \cdot 10^{+114} \lor \neg \left(eh \leq -4.2 \cdot 10^{+44}\right) \land \left(eh \leq -15500000000 \lor \neg \left(eh \leq 7.5 \cdot 10^{+136}\right)\right):\\
\;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(eh \cdot \frac{-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.4000000000000001e114 or -4.19999999999999974e44 < eh < -1.55e10 or 7.5000000000000002e136 < eh

    1. Initial program 99.7%

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

      \[\leadsto \left|\color{blue}{ew} \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| \]
    4. Taylor expanded in ew around 0 74.3%

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

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

        \[\leadsto \left|-\color{blue}{\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot \tan t}{ew}\right)}\right| \]
      3. distribute-lft-neg-in74.4%

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

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

        \[\leadsto \left|\left(-eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(-\color{blue}{eh \cdot \frac{\tan t}{ew}}\right)\right| \]
      6. distribute-lft-neg-out74.2%

        \[\leadsto \left|\left(-eh \cdot \sin t\right) \cdot \sin \tan^{-1} \color{blue}{\left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right)}\right| \]
      7. *-commutative74.2%

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

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

      \[\leadsto \left|\sin \tan^{-1} \color{blue}{\left(-1 \cdot \frac{eh \cdot t}{ew}\right)} \cdot \left(eh \cdot \left(-\sin t\right)\right)\right| \]
    8. Step-by-step derivation
      1. mul-1-neg74.5%

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

        \[\leadsto \left|\sin \tan^{-1} \left(-\color{blue}{eh \cdot \frac{t}{ew}}\right) \cdot \left(eh \cdot \left(-\sin t\right)\right)\right| \]
      3. distribute-rgt-neg-in74.4%

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

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

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

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

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

    if -3.4000000000000001e114 < eh < -4.19999999999999974e44 or -1.55e10 < eh < 7.5000000000000002e136

    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. Step-by-step derivation
      1. add-cbrt-cube45.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -3.4 \cdot 10^{+114} \lor \neg \left(eh \leq -4.2 \cdot 10^{+44}\right) \land \left(eh \leq -15500000000 \lor \neg \left(eh \leq 7.5 \cdot 10^{+136}\right)\right):\\ \;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(eh \cdot \frac{-t}{ew}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \cos t\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 74.5% accurate, 2.2× speedup?

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

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

\mathbf{elif}\;t \leq -0.00185:\\
\;\;\;\;\left|ew \cdot \cos t\right|\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.79999999999999983e213 or 2.5e11 < t

    1. Initial program 99.6%

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

      \[\leadsto \left|\color{blue}{ew} \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| \]
    4. Taylor expanded in ew around 0 59.4%

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

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

        \[\leadsto \left|-\color{blue}{\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(-1 \cdot \frac{eh \cdot \tan t}{ew}\right)}\right| \]
      3. distribute-lft-neg-in59.4%

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

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

        \[\leadsto \left|\left(-eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(-\color{blue}{eh \cdot \frac{\tan t}{ew}}\right)\right| \]
      6. distribute-lft-neg-out59.4%

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

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

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

      \[\leadsto \left|\sin \tan^{-1} \color{blue}{\left(-1 \cdot \frac{eh \cdot t}{ew}\right)} \cdot \left(eh \cdot \left(-\sin t\right)\right)\right| \]
    8. Step-by-step derivation
      1. mul-1-neg59.8%

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

        \[\leadsto \left|\sin \tan^{-1} \left(-\color{blue}{eh \cdot \frac{t}{ew}}\right) \cdot \left(eh \cdot \left(-\sin t\right)\right)\right| \]
      3. distribute-rgt-neg-in59.8%

        \[\leadsto \left|\sin \tan^{-1} \color{blue}{\left(eh \cdot \left(-\frac{t}{ew}\right)\right)} \cdot \left(eh \cdot \left(-\sin t\right)\right)\right| \]
      4. mul-1-neg59.8%

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

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

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

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

    if -6.79999999999999983e213 < t < -0.0018500000000000001

    1. Initial program 99.7%

      \[\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. Step-by-step derivation
      1. add-cbrt-cube53.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.0018500000000000001 < t < 2.5e11

    1. Initial program 100.0%

      \[\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. Step-by-step derivation
      1. add-cbrt-cube46.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 61.5% accurate, 4.5× 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. Step-by-step derivation
    1. add-cbrt-cube54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 41.9% accurate, 9.1× speedup?

\[\begin{array}{l} \\ \left|ew\right| \end{array} \]
(FPCore (eh ew t) :precision binary64 (fabs ew))
double code(double eh, double ew, double t) {
	return fabs(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(ew)
end function
public static double code(double eh, double ew, double t) {
	return Math.abs(ew);
}
def code(eh, ew, t):
	return math.fabs(ew)
function code(eh, ew, t)
	return abs(ew)
end
function tmp = code(eh, ew, t)
	tmp = abs(ew);
end
code[eh_, ew_, t_] := N[Abs[ew], $MachinePrecision]
\begin{array}{l}

\\
\left|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 41.4%

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

      \[\leadsto \left|ew \cdot \cos \tan^{-1} \color{blue}{\left(-\frac{eh \cdot \tan t}{ew}\right)}\right| \]
    2. distribute-frac-neg241.4%

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

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

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

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

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

      \[\leadsto \left|\sin \tan^{-1} \left(-\color{blue}{eh \cdot \frac{t}{ew}}\right) \cdot \left(eh \cdot \left(-\sin t\right)\right)\right| \]
    3. distribute-rgt-neg-in39.3%

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

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

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

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

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

      \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\sqrt{1 + \left(eh \cdot \frac{-t}{ew}\right) \cdot \left(eh \cdot \frac{-t}{ew}\right)}}}\right| \]
    2. hypot-1-def39.2%

      \[\leadsto \left|ew \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, eh \cdot \frac{-t}{ew}\right)}}\right| \]
  10. Applied egg-rr39.2%

    \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{-t}{ew}\right)}}\right| \]
  11. Step-by-step derivation
    1. hypot-undefine39.1%

      \[\leadsto \left|ew \cdot \frac{1}{\color{blue}{\sqrt{1 \cdot 1 + \left(eh \cdot \frac{-t}{ew}\right) \cdot \left(eh \cdot \frac{-t}{ew}\right)}}}\right| \]
    2. metadata-eval39.1%

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{\color{blue}{1} + \left(eh \cdot \frac{-t}{ew}\right) \cdot \left(eh \cdot \frac{-t}{ew}\right)}}\right| \]
    3. associate-*r/39.0%

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \color{blue}{\frac{eh \cdot \left(-t\right)}{ew}} \cdot \left(eh \cdot \frac{-t}{ew}\right)}}\right| \]
    4. distribute-rgt-neg-out39.0%

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \frac{\color{blue}{-eh \cdot t}}{ew} \cdot \left(eh \cdot \frac{-t}{ew}\right)}}\right| \]
    5. distribute-frac-neg39.0%

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \color{blue}{\left(-\frac{eh \cdot t}{ew}\right)} \cdot \left(eh \cdot \frac{-t}{ew}\right)}}\right| \]
    6. associate-*r/39.0%

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \left(-\frac{eh \cdot t}{ew}\right) \cdot \color{blue}{\frac{eh \cdot \left(-t\right)}{ew}}}}\right| \]
    7. distribute-rgt-neg-out39.0%

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \left(-\frac{eh \cdot t}{ew}\right) \cdot \frac{\color{blue}{-eh \cdot t}}{ew}}}\right| \]
    8. distribute-frac-neg39.0%

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \left(-\frac{eh \cdot t}{ew}\right) \cdot \color{blue}{\left(-\frac{eh \cdot t}{ew}\right)}}}\right| \]
    9. sqr-neg39.0%

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \color{blue}{\frac{eh \cdot t}{ew} \cdot \frac{eh \cdot t}{ew}}}}\right| \]
    10. hypot-1-def39.1%

      \[\leadsto \left|ew \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \frac{eh \cdot t}{ew}\right)}}\right| \]
    11. associate-/l*39.2%

      \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{eh \cdot \frac{t}{ew}}\right)}\right| \]
  12. Simplified39.2%

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

    \[\leadsto \left|\color{blue}{ew}\right| \]
  14. Add Preprocessing

Reproduce

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