Example 2 from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 24.8s
Alternatives: 14
Speedup: N/A×

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

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

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.8%

      \[\leadsto \left|\color{blue}{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)}\right| \]
    3. sub-neg99.8%

      \[\leadsto \left|0 - \color{blue}{\left(\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)}\right| \]
    4. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 91.4% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\\ \mathbf{if}\;ew \leq -1.55 \cdot 10^{-105}:\\ \;\;\;\;\left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \left(t \cdot 0.3333333333333333 + \frac{-1}{t}\right)}\right)\right)\right|\\ \mathbf{elif}\;ew \leq 5.1 \cdot 10^{-100}:\\ \;\;\;\;\left|ew \cdot \left(\cos t \cdot \cos t_1\right) - eh \cdot \left(\sin t \cdot \sin t_1\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \cos t - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{-0.3333333333333333 \cdot \left(ew \cdot t\right) + \frac{ew}{t}}\right)\right)\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (atan (/ (- t) (/ ew eh)))))
   (if (<= ew -1.55e-105)
     (fabs
      (-
       (* ew (* (cos t) (/ 1.0 (hypot 1.0 (* (tan t) (/ eh ew))))))
       (*
        eh
        (*
         (sin t)
         (sin (atan (/ eh (* ew (+ (* t 0.3333333333333333) (/ -1.0 t))))))))))
     (if (<= ew 5.1e-100)
       (fabs (- (* ew (* (cos t) (cos t_1))) (* eh (* (sin t) (sin t_1)))))
       (fabs
        (-
         (* ew (cos t))
         (*
          eh
          (*
           (sin t)
           (sin
            (atan
             (/ (- eh) (+ (* -0.3333333333333333 (* ew t)) (/ ew t)))))))))))))
double code(double eh, double ew, double t) {
	double t_1 = atan((-t / (ew / eh)));
	double tmp;
	if (ew <= -1.55e-105) {
		tmp = fabs(((ew * (cos(t) * (1.0 / hypot(1.0, (tan(t) * (eh / ew)))))) - (eh * (sin(t) * sin(atan((eh / (ew * ((t * 0.3333333333333333) + (-1.0 / t))))))))));
	} else if (ew <= 5.1e-100) {
		tmp = fabs(((ew * (cos(t) * cos(t_1))) - (eh * (sin(t) * sin(t_1)))));
	} else {
		tmp = fabs(((ew * cos(t)) - (eh * (sin(t) * sin(atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t)))))))));
	}
	return tmp;
}
public static double code(double eh, double ew, double t) {
	double t_1 = Math.atan((-t / (ew / eh)));
	double tmp;
	if (ew <= -1.55e-105) {
		tmp = Math.abs(((ew * (Math.cos(t) * (1.0 / Math.hypot(1.0, (Math.tan(t) * (eh / ew)))))) - (eh * (Math.sin(t) * Math.sin(Math.atan((eh / (ew * ((t * 0.3333333333333333) + (-1.0 / t))))))))));
	} else if (ew <= 5.1e-100) {
		tmp = Math.abs(((ew * (Math.cos(t) * Math.cos(t_1))) - (eh * (Math.sin(t) * Math.sin(t_1)))));
	} else {
		tmp = Math.abs(((ew * Math.cos(t)) - (eh * (Math.sin(t) * Math.sin(Math.atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t)))))))));
	}
	return tmp;
}
def code(eh, ew, t):
	t_1 = math.atan((-t / (ew / eh)))
	tmp = 0
	if ew <= -1.55e-105:
		tmp = math.fabs(((ew * (math.cos(t) * (1.0 / math.hypot(1.0, (math.tan(t) * (eh / ew)))))) - (eh * (math.sin(t) * math.sin(math.atan((eh / (ew * ((t * 0.3333333333333333) + (-1.0 / t))))))))))
	elif ew <= 5.1e-100:
		tmp = math.fabs(((ew * (math.cos(t) * math.cos(t_1))) - (eh * (math.sin(t) * math.sin(t_1)))))
	else:
		tmp = math.fabs(((ew * math.cos(t)) - (eh * (math.sin(t) * math.sin(math.atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t)))))))))
	return tmp
function code(eh, ew, t)
	t_1 = atan(Float64(Float64(-t) / Float64(ew / eh)))
	tmp = 0.0
	if (ew <= -1.55e-105)
		tmp = abs(Float64(Float64(ew * Float64(cos(t) * Float64(1.0 / hypot(1.0, Float64(tan(t) * Float64(eh / ew)))))) - Float64(eh * Float64(sin(t) * sin(atan(Float64(eh / Float64(ew * Float64(Float64(t * 0.3333333333333333) + Float64(-1.0 / t))))))))));
	elseif (ew <= 5.1e-100)
		tmp = abs(Float64(Float64(ew * Float64(cos(t) * cos(t_1))) - Float64(eh * Float64(sin(t) * sin(t_1)))));
	else
		tmp = abs(Float64(Float64(ew * cos(t)) - Float64(eh * Float64(sin(t) * sin(atan(Float64(Float64(-eh) / Float64(Float64(-0.3333333333333333 * Float64(ew * t)) + Float64(ew / t)))))))));
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	t_1 = atan((-t / (ew / eh)));
	tmp = 0.0;
	if (ew <= -1.55e-105)
		tmp = abs(((ew * (cos(t) * (1.0 / hypot(1.0, (tan(t) * (eh / ew)))))) - (eh * (sin(t) * sin(atan((eh / (ew * ((t * 0.3333333333333333) + (-1.0 / t))))))))));
	elseif (ew <= 5.1e-100)
		tmp = abs(((ew * (cos(t) * cos(t_1))) - (eh * (sin(t) * sin(t_1)))));
	else
		tmp = abs(((ew * cos(t)) - (eh * (sin(t) * sin(atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t)))))))));
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[((-t) / N[(ew / eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -1.55e-105], N[Abs[N[(N[(ew * N[(N[Cos[t], $MachinePrecision] * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(eh / N[(ew * N[(N[(t * 0.3333333333333333), $MachinePrecision] + N[(-1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 5.1e-100], N[Abs[N[(N[(ew * N[(N[Cos[t], $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] - N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[((-eh) / N[(N[(-0.3333333333333333 * N[(ew * t), $MachinePrecision]), $MachinePrecision] + N[(ew / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\\
\mathbf{if}\;ew \leq -1.55 \cdot 10^{-105}:\\
\;\;\;\;\left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \left(t \cdot 0.3333333333333333 + \frac{-1}{t}\right)}\right)\right)\right|\\

\mathbf{elif}\;ew \leq 5.1 \cdot 10^{-100}:\\
\;\;\;\;\left|ew \cdot \left(\cos t \cdot \cos t_1\right) - eh \cdot \left(\sin t \cdot \sin t_1\right)\right|\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if ew < -1.55000000000000007e-105

    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. Step-by-step derivation
      1. fabs-neg99.7%

        \[\leadsto \color{blue}{\left|-\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)\right|} \]
      2. sub0-neg99.7%

        \[\leadsto \left|\color{blue}{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)}\right| \]
      3. sub-neg99.7%

        \[\leadsto \left|0 - \color{blue}{\left(\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)}\right| \]
      4. +-commutative99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.55000000000000007e-105 < ew < 5.0999999999999999e-100

    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. Step-by-step derivation
      1. fabs-neg99.8%

        \[\leadsto \color{blue}{\left|-\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)\right|} \]
      2. sub0-neg99.8%

        \[\leadsto \left|\color{blue}{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)}\right| \]
      3. sub-neg99.8%

        \[\leadsto \left|0 - \color{blue}{\left(\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)}\right| \]
      4. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0999999999999999e-100 < 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. Step-by-step derivation
      1. fabs-neg99.8%

        \[\leadsto \color{blue}{\left|-\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)\right|} \]
      2. sub0-neg99.8%

        \[\leadsto \left|\color{blue}{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)}\right| \]
      3. sub-neg99.8%

        \[\leadsto \left|0 - \color{blue}{\left(\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)}\right| \]
      4. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -1.55 \cdot 10^{-105}:\\ \;\;\;\;\left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \left(t \cdot 0.3333333333333333 + \frac{-1}{t}\right)}\right)\right)\right|\\ \mathbf{elif}\;ew \leq 5.1 \cdot 10^{-100}:\\ \;\;\;\;\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \cos t - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{-0.3333333333333333 \cdot \left(ew \cdot t\right) + \frac{ew}{t}}\right)\right)\right|\\ \end{array} \]

Alternative 3: 91.3% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\\ \mathbf{if}\;ew \leq -1.55 \cdot 10^{-105} \lor \neg \left(ew \leq 1.9 \cdot 10^{-99}\right):\\ \;\;\;\;\left|ew \cdot \cos t - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{-0.3333333333333333 \cdot \left(ew \cdot t\right) + \frac{ew}{t}}\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \left(\cos t \cdot \cos t_1\right) - eh \cdot \left(\sin t \cdot \sin t_1\right)\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (atan (/ (- t) (/ ew eh)))))
   (if (or (<= ew -1.55e-105) (not (<= ew 1.9e-99)))
     (fabs
      (-
       (* ew (cos t))
       (*
        eh
        (*
         (sin t)
         (sin
          (atan (/ (- eh) (+ (* -0.3333333333333333 (* ew t)) (/ ew t)))))))))
     (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((-t / (ew / eh)));
	double tmp;
	if ((ew <= -1.55e-105) || !(ew <= 1.9e-99)) {
		tmp = fabs(((ew * cos(t)) - (eh * (sin(t) * sin(atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t)))))))));
	} else {
		tmp = fabs(((ew * (cos(t) * cos(t_1))) - (eh * (sin(t) * sin(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 = atan((-t / (ew / eh)))
    if ((ew <= (-1.55d-105)) .or. (.not. (ew <= 1.9d-99))) then
        tmp = abs(((ew * cos(t)) - (eh * (sin(t) * sin(atan((-eh / (((-0.3333333333333333d0) * (ew * t)) + (ew / t)))))))))
    else
        tmp = abs(((ew * (cos(t) * cos(t_1))) - (eh * (sin(t) * sin(t_1)))))
    end if
    code = tmp
end function
public static double code(double eh, double ew, double t) {
	double t_1 = Math.atan((-t / (ew / eh)));
	double tmp;
	if ((ew <= -1.55e-105) || !(ew <= 1.9e-99)) {
		tmp = Math.abs(((ew * Math.cos(t)) - (eh * (Math.sin(t) * Math.sin(Math.atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t)))))))));
	} else {
		tmp = Math.abs(((ew * (Math.cos(t) * Math.cos(t_1))) - (eh * (Math.sin(t) * Math.sin(t_1)))));
	}
	return tmp;
}
def code(eh, ew, t):
	t_1 = math.atan((-t / (ew / eh)))
	tmp = 0
	if (ew <= -1.55e-105) or not (ew <= 1.9e-99):
		tmp = math.fabs(((ew * math.cos(t)) - (eh * (math.sin(t) * math.sin(math.atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t)))))))))
	else:
		tmp = math.fabs(((ew * (math.cos(t) * math.cos(t_1))) - (eh * (math.sin(t) * math.sin(t_1)))))
	return tmp
function code(eh, ew, t)
	t_1 = atan(Float64(Float64(-t) / Float64(ew / eh)))
	tmp = 0.0
	if ((ew <= -1.55e-105) || !(ew <= 1.9e-99))
		tmp = abs(Float64(Float64(ew * cos(t)) - Float64(eh * Float64(sin(t) * sin(atan(Float64(Float64(-eh) / Float64(Float64(-0.3333333333333333 * Float64(ew * t)) + Float64(ew / t)))))))));
	else
		tmp = abs(Float64(Float64(ew * Float64(cos(t) * cos(t_1))) - Float64(eh * Float64(sin(t) * sin(t_1)))));
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	t_1 = atan((-t / (ew / eh)));
	tmp = 0.0;
	if ((ew <= -1.55e-105) || ~((ew <= 1.9e-99)))
		tmp = abs(((ew * cos(t)) - (eh * (sin(t) * sin(atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t)))))))));
	else
		tmp = abs(((ew * (cos(t) * cos(t_1))) - (eh * (sin(t) * sin(t_1)))));
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[((-t) / N[(ew / eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[ew, -1.55e-105], N[Not[LessEqual[ew, 1.9e-99]], $MachinePrecision]], N[Abs[N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] - N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[((-eh) / N[(N[(-0.3333333333333333 * N[(ew * t), $MachinePrecision]), $MachinePrecision] + N[(ew / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(ew * N[(N[Cos[t], $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\\
\mathbf{if}\;ew \leq -1.55 \cdot 10^{-105} \lor \neg \left(ew \leq 1.9 \cdot 10^{-99}\right):\\
\;\;\;\;\left|ew \cdot \cos t - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{-0.3333333333333333 \cdot \left(ew \cdot t\right) + \frac{ew}{t}}\right)\right)\right|\\

\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \left(\cos t \cdot \cos t_1\right) - eh \cdot \left(\sin t \cdot \sin t_1\right)\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if ew < -1.55000000000000007e-105 or 1.8999999999999998e-99 < 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. Step-by-step derivation
      1. fabs-neg99.8%

        \[\leadsto \color{blue}{\left|-\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)\right|} \]
      2. sub0-neg99.8%

        \[\leadsto \left|\color{blue}{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)}\right| \]
      3. sub-neg99.8%

        \[\leadsto \left|0 - \color{blue}{\left(\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)}\right| \]
      4. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.55000000000000007e-105 < ew < 1.8999999999999998e-99

    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. Step-by-step derivation
      1. fabs-neg99.8%

        \[\leadsto \color{blue}{\left|-\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)\right|} \]
      2. sub0-neg99.8%

        \[\leadsto \left|\color{blue}{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)}\right| \]
      3. sub-neg99.8%

        \[\leadsto \left|0 - \color{blue}{\left(\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)}\right| \]
      4. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -1.55 \cdot 10^{-105} \lor \neg \left(ew \leq 1.9 \cdot 10^{-99}\right):\\ \;\;\;\;\left|ew \cdot \cos t - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{-0.3333333333333333 \cdot \left(ew \cdot t\right) + \frac{ew}{t}}\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right)\right|\\ \end{array} \]

Alternative 4: 89.3% accurate, 1.8× speedup?

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

\\
\left|ew \cdot \cos t - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{-0.3333333333333333 \cdot \left(ew \cdot t\right) + \frac{ew}{t}}\right)\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. Step-by-step derivation
    1. fabs-neg99.8%

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.8%

      \[\leadsto \left|\color{blue}{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)}\right| \]
    3. sub-neg99.8%

      \[\leadsto \left|0 - \color{blue}{\left(\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)}\right| \]
    4. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 89.1% accurate, 1.8× speedup?

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

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

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.8%

      \[\leadsto \left|\color{blue}{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)}\right| \]
    3. sub-neg99.8%

      \[\leadsto \left|0 - \color{blue}{\left(\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)}\right| \]
    4. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 89.1% accurate, 1.8× speedup?

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

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

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.8%

      \[\leadsto \left|\color{blue}{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)}\right| \]
    3. sub-neg99.8%

      \[\leadsto \left|0 - \color{blue}{\left(\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)}\right| \]
    4. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 79.5% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -5 \cdot 10^{+121} \lor \neg \left(ew \leq 1.5 \cdot 10^{-50}\right):\\ \;\;\;\;\left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{-0.3333333333333333 \cdot \left(ew \cdot t\right) + \frac{ew}{t}}\right)\right)\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (if (or (<= ew -5e+121) (not (<= ew 1.5e-50)))
   (fabs (* ew (* (cos t) (/ 1.0 (hypot 1.0 (* (tan t) (/ eh ew)))))))
   (fabs
    (-
     ew
     (*
      eh
      (*
       (sin t)
       (sin
        (atan (/ (- eh) (+ (* -0.3333333333333333 (* ew t)) (/ ew t)))))))))))
double code(double eh, double ew, double t) {
	double tmp;
	if ((ew <= -5e+121) || !(ew <= 1.5e-50)) {
		tmp = fabs((ew * (cos(t) * (1.0 / hypot(1.0, (tan(t) * (eh / ew)))))));
	} else {
		tmp = fabs((ew - (eh * (sin(t) * sin(atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t)))))))));
	}
	return tmp;
}
public static double code(double eh, double ew, double t) {
	double tmp;
	if ((ew <= -5e+121) || !(ew <= 1.5e-50)) {
		tmp = Math.abs((ew * (Math.cos(t) * (1.0 / Math.hypot(1.0, (Math.tan(t) * (eh / ew)))))));
	} else {
		tmp = Math.abs((ew - (eh * (Math.sin(t) * Math.sin(Math.atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t)))))))));
	}
	return tmp;
}
def code(eh, ew, t):
	tmp = 0
	if (ew <= -5e+121) or not (ew <= 1.5e-50):
		tmp = math.fabs((ew * (math.cos(t) * (1.0 / math.hypot(1.0, (math.tan(t) * (eh / ew)))))))
	else:
		tmp = math.fabs((ew - (eh * (math.sin(t) * math.sin(math.atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t)))))))))
	return tmp
function code(eh, ew, t)
	tmp = 0.0
	if ((ew <= -5e+121) || !(ew <= 1.5e-50))
		tmp = abs(Float64(ew * Float64(cos(t) * Float64(1.0 / hypot(1.0, Float64(tan(t) * Float64(eh / ew)))))));
	else
		tmp = abs(Float64(ew - Float64(eh * Float64(sin(t) * sin(atan(Float64(Float64(-eh) / Float64(Float64(-0.3333333333333333 * Float64(ew * t)) + Float64(ew / t)))))))));
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	tmp = 0.0;
	if ((ew <= -5e+121) || ~((ew <= 1.5e-50)))
		tmp = abs((ew * (cos(t) * (1.0 / hypot(1.0, (tan(t) * (eh / ew)))))));
	else
		tmp = abs((ew - (eh * (sin(t) * sin(atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t)))))))));
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := If[Or[LessEqual[ew, -5e+121], N[Not[LessEqual[ew, 1.5e-50]], $MachinePrecision]], N[Abs[N[(ew * N[(N[Cos[t], $MachinePrecision] * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew - N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[((-eh) / N[(N[(-0.3333333333333333 * N[(ew * t), $MachinePrecision]), $MachinePrecision] + N[(ew / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;ew \leq -5 \cdot 10^{+121} \lor \neg \left(ew \leq 1.5 \cdot 10^{-50}\right):\\
\;\;\;\;\left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right)\right|\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if ew < -5.00000000000000007e121 or 1.49999999999999995e-50 < 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. Step-by-step derivation
      1. fabs-neg99.8%

        \[\leadsto \color{blue}{\left|-\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)\right|} \]
      2. sub0-neg99.8%

        \[\leadsto \left|\color{blue}{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)}\right| \]
      3. sub-neg99.8%

        \[\leadsto \left|0 - \color{blue}{\left(\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)}\right| \]
      4. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right) - \color{blue}{\frac{eh \cdot \left(\cos \left(t + \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right) - \cos \left(t + \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right)\right)}{2}}\right| \]
    10. Step-by-step derivation
      1. +-inverses86.8%

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

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

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

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

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

    if -5.00000000000000007e121 < ew < 1.49999999999999995e-50

    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. Step-by-step derivation
      1. fabs-neg99.8%

        \[\leadsto \color{blue}{\left|-\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)\right|} \]
      2. sub0-neg99.8%

        \[\leadsto \left|\color{blue}{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)}\right| \]
      3. sub-neg99.8%

        \[\leadsto \left|0 - \color{blue}{\left(\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)}\right| \]
      4. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -5 \cdot 10^{+121} \lor \neg \left(ew \leq 1.5 \cdot 10^{-50}\right):\\ \;\;\;\;\left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{-0.3333333333333333 \cdot \left(ew \cdot t\right) + \frac{ew}{t}}\right)\right)\right|\\ \end{array} \]

Alternative 8: 79.7% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \tan^{-1} \left(\frac{-eh}{-0.3333333333333333 \cdot \left(ew \cdot t\right) + \frac{ew}{t}}\right)\\ \mathbf{if}\;ew \leq -5.4 \cdot 10^{+119} \lor \neg \left(ew \leq 1.55 \cdot 10^{-50}\right):\\ \;\;\;\;\left|ew \cdot \left(\cos t \cdot \cos t_1\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew - eh \cdot \left(\sin t \cdot \sin t_1\right)\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (atan (/ (- eh) (+ (* -0.3333333333333333 (* ew t)) (/ ew t))))))
   (if (or (<= ew -5.4e+119) (not (<= ew 1.55e-50)))
     (fabs (* ew (* (cos t) (cos t_1))))
     (fabs (- ew (* eh (* (sin t) (sin t_1))))))))
double code(double eh, double ew, double t) {
	double t_1 = atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t))));
	double tmp;
	if ((ew <= -5.4e+119) || !(ew <= 1.55e-50)) {
		tmp = fabs((ew * (cos(t) * cos(t_1))));
	} else {
		tmp = fabs((ew - (eh * (sin(t) * sin(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 = atan((-eh / (((-0.3333333333333333d0) * (ew * t)) + (ew / t))))
    if ((ew <= (-5.4d+119)) .or. (.not. (ew <= 1.55d-50))) then
        tmp = abs((ew * (cos(t) * cos(t_1))))
    else
        tmp = abs((ew - (eh * (sin(t) * sin(t_1)))))
    end if
    code = tmp
end function
public static double code(double eh, double ew, double t) {
	double t_1 = Math.atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t))));
	double tmp;
	if ((ew <= -5.4e+119) || !(ew <= 1.55e-50)) {
		tmp = Math.abs((ew * (Math.cos(t) * Math.cos(t_1))));
	} else {
		tmp = Math.abs((ew - (eh * (Math.sin(t) * Math.sin(t_1)))));
	}
	return tmp;
}
def code(eh, ew, t):
	t_1 = math.atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t))))
	tmp = 0
	if (ew <= -5.4e+119) or not (ew <= 1.55e-50):
		tmp = math.fabs((ew * (math.cos(t) * math.cos(t_1))))
	else:
		tmp = math.fabs((ew - (eh * (math.sin(t) * math.sin(t_1)))))
	return tmp
function code(eh, ew, t)
	t_1 = atan(Float64(Float64(-eh) / Float64(Float64(-0.3333333333333333 * Float64(ew * t)) + Float64(ew / t))))
	tmp = 0.0
	if ((ew <= -5.4e+119) || !(ew <= 1.55e-50))
		tmp = abs(Float64(ew * Float64(cos(t) * cos(t_1))));
	else
		tmp = abs(Float64(ew - Float64(eh * Float64(sin(t) * sin(t_1)))));
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	t_1 = atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t))));
	tmp = 0.0;
	if ((ew <= -5.4e+119) || ~((ew <= 1.55e-50)))
		tmp = abs((ew * (cos(t) * cos(t_1))));
	else
		tmp = abs((ew - (eh * (sin(t) * sin(t_1)))));
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[((-eh) / N[(N[(-0.3333333333333333 * N[(ew * t), $MachinePrecision]), $MachinePrecision] + N[(ew / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[ew, -5.4e+119], N[Not[LessEqual[ew, 1.55e-50]], $MachinePrecision]], N[Abs[N[(ew * N[(N[Cos[t], $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew - N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{-eh}{-0.3333333333333333 \cdot \left(ew \cdot t\right) + \frac{ew}{t}}\right)\\
\mathbf{if}\;ew \leq -5.4 \cdot 10^{+119} \lor \neg \left(ew \leq 1.55 \cdot 10^{-50}\right):\\
\;\;\;\;\left|ew \cdot \left(\cos t \cdot \cos t_1\right)\right|\\

\mathbf{else}:\\
\;\;\;\;\left|ew - eh \cdot \left(\sin t \cdot \sin t_1\right)\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if ew < -5.3999999999999997e119 or 1.5500000000000001e-50 < 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. Step-by-step derivation
      1. fabs-neg99.8%

        \[\leadsto \color{blue}{\left|-\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)\right|} \]
      2. sub0-neg99.8%

        \[\leadsto \left|\color{blue}{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)}\right| \]
      3. sub-neg99.8%

        \[\leadsto \left|0 - \color{blue}{\left(\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)}\right| \]
      4. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.3999999999999997e119 < ew < 1.5500000000000001e-50

    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. Step-by-step derivation
      1. fabs-neg99.8%

        \[\leadsto \color{blue}{\left|-\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)\right|} \]
      2. sub0-neg99.8%

        \[\leadsto \left|\color{blue}{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)}\right| \]
      3. sub-neg99.8%

        \[\leadsto \left|0 - \color{blue}{\left(\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)}\right| \]
      4. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -5.4 \cdot 10^{+119} \lor \neg \left(ew \leq 1.55 \cdot 10^{-50}\right):\\ \;\;\;\;\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{-0.3333333333333333 \cdot \left(ew \cdot t\right) + \frac{ew}{t}}\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{-0.3333333333333333 \cdot \left(ew \cdot t\right) + \frac{ew}{t}}\right)\right)\right|\\ \end{array} \]

Alternative 9: 61.3% accurate, 2.2× speedup?

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

\\
\left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\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. Step-by-step derivation
    1. fabs-neg99.8%

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.8%

      \[\leadsto \left|\color{blue}{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)}\right| \]
    3. sub-neg99.8%

      \[\leadsto \left|0 - \color{blue}{\left(\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)}\right| \]
    4. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right) - \color{blue}{0}\right| \]
  12. Final simplification60.1%

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

Alternative 10: 52.2% accurate, 2.2× speedup?

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

\\
\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\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. Step-by-step derivation
    1. fabs-neg99.8%

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.8%

      \[\leadsto \left|\color{blue}{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)}\right| \]
    3. sub-neg99.8%

      \[\leadsto \left|0 - \color{blue}{\left(\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)}\right| \]
    4. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 42.4% accurate, 2.3× speedup?

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

\\
\left|ew \cdot \cos \tan^{-1} \left(\frac{\tan 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. Step-by-step derivation
    1. fabs-neg99.8%

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.8%

      \[\leadsto \left|\color{blue}{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)}\right| \]
    3. sub-neg99.8%

      \[\leadsto \left|0 - \color{blue}{\left(\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)}\right| \]
    4. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - \color{blue}{0}\right| \]
  8. Step-by-step derivation
    1. add-sqr-sqrt28.7%

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

      \[\leadsto \left|\color{blue}{{\left(\sqrt{ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right)}\right)}^{2}} - 0\right| \]
  9. Applied egg-rr28.7%

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

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

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

Alternative 12: 42.1% accurate, 3.0× speedup?

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

\\
\left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{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. Step-by-step derivation
    1. fabs-neg99.8%

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.8%

      \[\leadsto \left|\color{blue}{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)}\right| \]
    3. sub-neg99.8%

      \[\leadsto \left|0 - \color{blue}{\left(\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)}\right| \]
    4. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\sqrt{1 + \left(\tan t \cdot \frac{-eh}{ew}\right) \cdot \left(\tan t \cdot \frac{-eh}{ew}\right)}}} - 0\right| \]
  12. Applied egg-rr41.0%

    \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\sqrt{1 + \left(\tan t \cdot \frac{-eh}{ew}\right) \cdot \left(\tan t \cdot \frac{-eh}{ew}\right)}}} - 0\right| \]
  13. Step-by-step derivation
    1. hypot-1-def41.1%

      \[\leadsto \left|ew \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \tan t \cdot \frac{-eh}{ew}\right)}} - 0\right| \]
    2. *-commutative41.1%

      \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\frac{-eh}{ew} \cdot \tan t}\right)} - 0\right| \]
    3. associate-/r/41.1%

      \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\frac{-eh}{\frac{ew}{\tan t}}}\right)} - 0\right| \]
    4. hypot-1-def41.1%

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

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \frac{-eh}{\frac{ew}{\tan t}} \cdot \color{blue}{\left(-\frac{eh}{\frac{ew}{\tan t}}\right)}}} - 0\right| \]
    6. neg-mul-141.1%

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \frac{-eh}{\frac{ew}{\tan t}} \cdot \color{blue}{\left(-1 \cdot \frac{eh}{\frac{ew}{\tan t}}\right)}}} - 0\right| \]
    7. associate-/l*41.1%

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

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

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \color{blue}{\left(-\frac{eh}{\frac{ew}{\tan t}}\right)} \cdot \left(-1 \cdot \frac{\tan t \cdot eh}{ew}\right)}} - 0\right| \]
    10. associate-/r/41.0%

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \left(-\color{blue}{\frac{eh}{ew} \cdot \tan t}\right) \cdot \left(-1 \cdot \frac{\tan t \cdot eh}{ew}\right)}} - 0\right| \]
    11. *-commutative41.0%

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

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \left(-\color{blue}{\frac{\tan t \cdot eh}{ew}}\right) \cdot \left(-1 \cdot \frac{\tan t \cdot eh}{ew}\right)}} - 0\right| \]
    13. mul-1-neg41.1%

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

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \color{blue}{\frac{\tan t \cdot eh}{ew} \cdot \frac{\tan t \cdot eh}{ew}}}} - 0\right| \]
  14. Simplified41.1%

    \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}} - 0\right| \]
  15. Final simplification41.1%

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

Alternative 13: 41.1% accurate, 3.0× speedup?

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

\\
\left|ew \cdot \cos \tan^{-1} \left(\frac{t \cdot \left(-eh\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. Step-by-step derivation
    1. fabs-neg99.8%

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.8%

      \[\leadsto \left|\color{blue}{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)}\right| \]
    3. sub-neg99.8%

      \[\leadsto \left|0 - \color{blue}{\left(\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)}\right| \]
    4. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 40.3% accurate, 4.4× speedup?

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

\\
\left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, t \cdot \frac{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. Step-by-step derivation
    1. fabs-neg99.8%

      \[\leadsto \color{blue}{\left|-\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)\right|} \]
    2. sub0-neg99.8%

      \[\leadsto \left|\color{blue}{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)}\right| \]
    3. sub-neg99.8%

      \[\leadsto \left|0 - \color{blue}{\left(\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)}\right| \]
    4. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\left(-eh\right) \cdot t}{ew} \cdot \frac{\left(-eh\right) \cdot t}{ew}}}} - 0\right| \]
    2. associate-/l*38.8%

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

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \frac{-eh}{\frac{ew}{t}} \cdot \color{blue}{\frac{-eh}{\frac{ew}{t}}}}} - 0\right| \]
  15. Applied egg-rr38.9%

    \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{-eh}{\frac{ew}{t}} \cdot \frac{-eh}{\frac{ew}{t}}}}} - 0\right| \]
  16. Step-by-step derivation
    1. distribute-frac-neg38.9%

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

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

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \color{blue}{\frac{eh}{\frac{ew}{t}} \cdot \frac{eh}{\frac{ew}{t}}}}} - 0\right| \]
    4. associate-/l*38.8%

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \color{blue}{\frac{eh \cdot t}{ew}} \cdot \frac{eh}{\frac{ew}{t}}}} - 0\right| \]
    5. *-commutative38.8%

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \frac{\color{blue}{t \cdot eh}}{ew} \cdot \frac{eh}{\frac{ew}{t}}}} - 0\right| \]
    6. associate-/l*38.9%

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \color{blue}{\frac{t}{\frac{ew}{eh}}} \cdot \frac{eh}{\frac{ew}{t}}}} - 0\right| \]
    7. associate-/l*38.8%

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

      \[\leadsto \left|ew \cdot \frac{1}{\sqrt{1 + \frac{t}{\frac{ew}{eh}} \cdot \frac{\color{blue}{t \cdot eh}}{ew}}} - 0\right| \]
    9. associate-/l*38.9%

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

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

      \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\frac{t \cdot eh}{ew}}\right)} - 0\right| \]
    12. *-rgt-identity38.9%

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

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

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

      \[\leadsto \left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, t \cdot \color{blue}{\frac{eh \cdot 1}{ew}}\right)} - 0\right| \]
    16. *-rgt-identity39.0%

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

    \[\leadsto \left|ew \cdot \color{blue}{\frac{1}{\mathsf{hypot}\left(1, t \cdot \frac{eh}{ew}\right)}} - 0\right| \]
  18. Final simplification39.0%

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

Reproduce

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