Example from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 33.0s
Alternatives: 13
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.9× speedup?

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

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

    \[\left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
  2. Step-by-step derivation
    1. associate-*l*99.7%

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

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

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

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

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

Alternative 2: 99.8% accurate, 1.0× speedup?

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

\\
\left|\mathsf{fma}\left(ew, \frac{\sin t}{\mathsf{hypot}\left(1, \frac{eh}{ew \cdot \tan t}\right)}, eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right|
\end{array}
Derivation
  1. Initial program 99.7%

    \[\left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
  2. Step-by-step derivation
    1. associate-*l*99.7%

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

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

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

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

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

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

      \[\leadsto \left|\mathsf{fma}\left(ew, e^{\mathsf{log1p}\left(\sin t \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}}\right)} - 1, eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right| \]
    4. un-div-inv88.2%

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

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

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

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

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

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

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

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

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

Alternative 3: 99.8% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

Alternative 4: 99.1% accurate, 1.1× speedup?

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

\\
\left|\mathsf{fma}\left(ew, \frac{\sin t}{\mathsf{hypot}\left(1, \frac{eh}{ew \cdot t}\right)}, eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right|
\end{array}
Derivation
  1. Initial program 99.7%

    \[\left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
  2. Step-by-step derivation
    1. associate-*l*99.7%

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

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

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

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

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

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

      \[\leadsto \left|\mathsf{fma}\left(ew, e^{\mathsf{log1p}\left(\sin t \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}}\right)} - 1, eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right| \]
    4. un-div-inv88.2%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 98.5% accurate, 1.3× speedup?

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

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

    \[\left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
  2. Step-by-step derivation
    1. associate-*l*99.7%

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

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

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

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

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

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

      \[\leadsto \left|\mathsf{fma}\left(ew, e^{\mathsf{log1p}\left(\sin t \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}}\right)} - 1, eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right| \]
    4. un-div-inv88.2%

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

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

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

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

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

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

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

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

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

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

Alternative 6: 98.5% accurate, 1.5× speedup?

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

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

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

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

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

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

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

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

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

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

Alternative 7: 90.8% accurate, 1.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if ew < -1.16e-207 or 2.3e-144 < ew

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if -1.16e-207 < ew < 2.3e-144

    1. Initial program 99.7%

      \[\left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
    2. Step-by-step derivation
      1. associate-*l*99.7%

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

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

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

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

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

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

        \[\leadsto \left|\mathsf{fma}\left(ew, e^{\mathsf{log1p}\left(\sin t \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}}\right)} - 1, eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right| \]
      4. un-div-inv99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 86.5% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_1 := \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\\
\mathbf{if}\;ew \leq -4.2 \cdot 10^{-144} \lor \neg \left(ew \leq 2.7 \cdot 10^{-146}\right):\\
\;\;\;\;\left|ew \cdot \sin t + eh \cdot t_1\right|\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if ew < -4.2000000000000002e-144 or 2.69999999999999995e-146 < ew

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    if -4.2000000000000002e-144 < ew < 2.69999999999999995e-146

    1. Initial program 99.7%

      \[\left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
    2. Step-by-step derivation
      1. associate-*l*99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 60.8% accurate, 1.8× speedup?

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

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

    \[\left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
  2. Step-by-step derivation
    1. associate-*l*99.7%

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

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

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

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

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

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

      \[\leadsto \left|\mathsf{fma}\left(ew, e^{\mathsf{log1p}\left(\sin t \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}}\right)} - 1, eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right| \]
    4. un-div-inv88.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 41.5% accurate, 2.3× speedup?

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

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

    \[\left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
  2. Step-by-step derivation
    1. associate-*l*99.7%

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

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

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

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

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

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

      \[\leadsto \left|\mathsf{fma}\left(ew, e^{\mathsf{log1p}\left(\sin t \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}}\right)} - 1, eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right| \]
    4. un-div-inv88.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 3.8% accurate, 8.4× speedup?

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

\\
\left(ew \cdot ew\right) \cdot \frac{t \cdot t}{\left|eh\right|}
\end{array}
Derivation
  1. Initial program 99.7%

    \[\left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
  2. Step-by-step derivation
    1. associate-*l*99.7%

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

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

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

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

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

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

      \[\leadsto \left|\mathsf{fma}\left(ew, e^{\mathsf{log1p}\left(\sin t \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}}\right)} - 1, eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right| \]
    4. un-div-inv88.2%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left|\color{blue}{\frac{{ew}^{2} \cdot {t}^{2}}{eh}}\right| \]
  12. Step-by-step derivation
    1. associate-/l*3.9%

      \[\leadsto \left|\color{blue}{\frac{{ew}^{2}}{\frac{eh}{{t}^{2}}}}\right| \]
    2. unpow23.9%

      \[\leadsto \left|\frac{\color{blue}{ew \cdot ew}}{\frac{eh}{{t}^{2}}}\right| \]
    3. unpow23.9%

      \[\leadsto \left|\frac{ew \cdot ew}{\frac{eh}{\color{blue}{t \cdot t}}}\right| \]
  13. Simplified3.9%

    \[\leadsto \left|\color{blue}{\frac{ew \cdot ew}{\frac{eh}{t \cdot t}}}\right| \]
  14. Step-by-step derivation
    1. div-inv3.9%

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

      \[\leadsto \left|\left(ew \cdot ew\right) \cdot \color{blue}{\frac{t \cdot t}{eh}}\right| \]
  15. Applied egg-rr3.9%

    \[\leadsto \left|\color{blue}{\left(ew \cdot ew\right) \cdot \frac{t \cdot t}{eh}}\right| \]
  16. Final simplification3.9%

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

Alternative 12: 3.9% accurate, 8.4× speedup?

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

\\
\left|\left(t \cdot t\right) \cdot \frac{ew}{\frac{eh}{ew}}\right|
\end{array}
Derivation
  1. Initial program 99.7%

    \[\left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
  2. Step-by-step derivation
    1. associate-*l*99.7%

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

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

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

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

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

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

      \[\leadsto \left|\mathsf{fma}\left(ew, e^{\mathsf{log1p}\left(\sin t \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}}\right)} - 1, eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right| \]
    4. un-div-inv88.2%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left|\color{blue}{\frac{{ew}^{2} \cdot {t}^{2}}{eh}}\right| \]
  12. Step-by-step derivation
    1. associate-/l*3.9%

      \[\leadsto \left|\color{blue}{\frac{{ew}^{2}}{\frac{eh}{{t}^{2}}}}\right| \]
    2. unpow23.9%

      \[\leadsto \left|\frac{\color{blue}{ew \cdot ew}}{\frac{eh}{{t}^{2}}}\right| \]
    3. unpow23.9%

      \[\leadsto \left|\frac{ew \cdot ew}{\frac{eh}{\color{blue}{t \cdot t}}}\right| \]
  13. Simplified3.9%

    \[\leadsto \left|\color{blue}{\frac{ew \cdot ew}{\frac{eh}{t \cdot t}}}\right| \]
  14. Taylor expanded in ew around 0 4.0%

    \[\leadsto \left|\color{blue}{\frac{{ew}^{2} \cdot {t}^{2}}{eh}}\right| \]
  15. Step-by-step derivation
    1. *-commutative4.0%

      \[\leadsto \left|\frac{\color{blue}{{t}^{2} \cdot {ew}^{2}}}{eh}\right| \]
    2. associate-*r/3.9%

      \[\leadsto \left|\color{blue}{{t}^{2} \cdot \frac{{ew}^{2}}{eh}}\right| \]
    3. unpow23.9%

      \[\leadsto \left|\color{blue}{\left(t \cdot t\right)} \cdot \frac{{ew}^{2}}{eh}\right| \]
    4. unpow23.9%

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

      \[\leadsto \left|\left(t \cdot t\right) \cdot \color{blue}{\frac{ew}{\frac{eh}{ew}}}\right| \]
  16. Simplified4.0%

    \[\leadsto \left|\color{blue}{\left(t \cdot t\right) \cdot \frac{ew}{\frac{eh}{ew}}}\right| \]
  17. Final simplification4.0%

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

Alternative 13: 4.4% accurate, 8.4× speedup?

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

\\
\left|t \cdot \left(t \cdot \frac{ew \cdot ew}{eh}\right)\right|
\end{array}
Derivation
  1. Initial program 99.7%

    \[\left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
  2. Step-by-step derivation
    1. associate-*l*99.7%

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

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

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

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

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

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

      \[\leadsto \left|\mathsf{fma}\left(ew, e^{\mathsf{log1p}\left(\sin t \cdot \color{blue}{\frac{1}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}}\right)} - 1, eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right)\right| \]
    4. un-div-inv88.2%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left|\color{blue}{\frac{{ew}^{2} \cdot {t}^{2}}{eh}}\right| \]
  12. Step-by-step derivation
    1. associate-/l*3.9%

      \[\leadsto \left|\color{blue}{\frac{{ew}^{2}}{\frac{eh}{{t}^{2}}}}\right| \]
    2. unpow23.9%

      \[\leadsto \left|\frac{\color{blue}{ew \cdot ew}}{\frac{eh}{{t}^{2}}}\right| \]
    3. unpow23.9%

      \[\leadsto \left|\frac{ew \cdot ew}{\frac{eh}{\color{blue}{t \cdot t}}}\right| \]
  13. Simplified3.9%

    \[\leadsto \left|\color{blue}{\frac{ew \cdot ew}{\frac{eh}{t \cdot t}}}\right| \]
  14. Step-by-step derivation
    1. associate-/r/3.9%

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

      \[\leadsto \left|\color{blue}{\left(\frac{ew \cdot ew}{eh} \cdot t\right) \cdot t}\right| \]
  15. Applied egg-rr4.5%

    \[\leadsto \left|\color{blue}{\left(\frac{ew \cdot ew}{eh} \cdot t\right) \cdot t}\right| \]
  16. Final simplification4.5%

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

Reproduce

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