Example from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 21.8s
Alternatives: 13
Speedup: 1.0×

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, 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}
Derivation
  1. Initial program 99.8%

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

    \[\leadsto \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| \]

Alternative 2: 99.7% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|\color{blue}{ew \cdot \frac{\sin t}{\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-*r/99.8%

      \[\leadsto \left|\color{blue}{\frac{ew \cdot \sin t}{\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| \]
    4. associate-/l*99.7%

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

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

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

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

Alternative 3: 99.0% accurate, 1.1× speedup?

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

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

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

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

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

Alternative 4: 98.4% accurate, 1.5× speedup?

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

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

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

      \[\leadsto \left|\color{blue}{\mathsf{fma}\left(ew \cdot \sin t, \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| \]
    2. associate-/l/99.8%

      \[\leadsto \left|\mathsf{fma}\left(ew \cdot \sin t, \cos \tan^{-1} \color{blue}{\left(\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)\right| \]
    3. associate-*l*99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 98.4% accurate, 1.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|\color{blue}{ew \cdot \frac{\sin t}{\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-*r/99.8%

      \[\leadsto \left|\color{blue}{\frac{ew \cdot \sin t}{\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| \]
    4. associate-/l*99.7%

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

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

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

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

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

Alternative 6: 98.1% accurate, 1.5× speedup?

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

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

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

      \[\leadsto \left|\color{blue}{\mathsf{fma}\left(ew \cdot \sin t, \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| \]
    2. associate-/l/99.8%

      \[\leadsto \left|\mathsf{fma}\left(ew \cdot \sin t, \cos \tan^{-1} \color{blue}{\left(\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)\right| \]
    3. associate-*l*99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 86.2% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -2.15 \cdot 10^{-80} \lor \neg \left(ew \leq 4200000000000\right):\\ \;\;\;\;\left|\mathsf{fma}\left(ew \cdot \sin t, \frac{1}{\mathsf{hypot}\left(1, \frac{eh}{ew \cdot \tan t}\right)}, eh\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \frac{ew \cdot ew}{\frac{eh}{t \cdot t} + eh \cdot -0.16666666666666666}\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (if (or (<= ew -2.15e-80) (not (<= ew 4200000000000.0)))
   (fabs (fma (* ew (sin t)) (/ 1.0 (hypot 1.0 (/ eh (* ew (tan t))))) eh))
   (fabs
    (+
     (* (* eh (cos t)) (sin (atan (/ (/ eh ew) (tan t)))))
     (/ (* ew ew) (+ (/ eh (* t t)) (* eh -0.16666666666666666)))))))
double code(double eh, double ew, double t) {
	double tmp;
	if ((ew <= -2.15e-80) || !(ew <= 4200000000000.0)) {
		tmp = fabs(fma((ew * sin(t)), (1.0 / hypot(1.0, (eh / (ew * tan(t))))), eh));
	} else {
		tmp = fabs((((eh * cos(t)) * sin(atan(((eh / ew) / tan(t))))) + ((ew * ew) / ((eh / (t * t)) + (eh * -0.16666666666666666)))));
	}
	return tmp;
}
function code(eh, ew, t)
	tmp = 0.0
	if ((ew <= -2.15e-80) || !(ew <= 4200000000000.0))
		tmp = abs(fma(Float64(ew * sin(t)), Float64(1.0 / hypot(1.0, Float64(eh / Float64(ew * tan(t))))), eh));
	else
		tmp = abs(Float64(Float64(Float64(eh * cos(t)) * sin(atan(Float64(Float64(eh / ew) / tan(t))))) + Float64(Float64(ew * ew) / Float64(Float64(eh / Float64(t * t)) + Float64(eh * -0.16666666666666666)))));
	end
	return tmp
end
code[eh_, ew_, t_] := If[Or[LessEqual[ew, -2.15e-80], N[Not[LessEqual[ew, 4200000000000.0]], $MachinePrecision]], N[Abs[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] + eh), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(ew * ew), $MachinePrecision] / N[(N[(eh / N[(t * t), $MachinePrecision]), $MachinePrecision] + N[(eh * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;ew \leq -2.15 \cdot 10^{-80} \lor \neg \left(ew \leq 4200000000000\right):\\
\;\;\;\;\left|\mathsf{fma}\left(ew \cdot \sin t, \frac{1}{\mathsf{hypot}\left(1, \frac{eh}{ew \cdot \tan t}\right)}, eh\right)\right|\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if ew < -2.1500000000000001e-80 or 4.2e12 < 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. fma-def99.8%

        \[\leadsto \left|\color{blue}{\mathsf{fma}\left(ew \cdot \sin t, \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| \]
      2. associate-/l/99.8%

        \[\leadsto \left|\mathsf{fma}\left(ew \cdot \sin t, \cos \tan^{-1} \color{blue}{\left(\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)\right| \]
      3. associate-*l*99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.1500000000000001e-80 < ew < 4.2e12

    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. expm1-log1p-u99.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{ew \cdot \frac{\sin t}{\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-*r/99.8%

        \[\leadsto \left|\color{blue}{\frac{ew \cdot \sin t}{\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| \]
      4. associate-/l*99.8%

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

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

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

      \[\leadsto \left|\frac{ew}{\color{blue}{\left(\frac{eh}{{t}^{2} \cdot ew} + 0.5 \cdot \frac{\left(1 + -0.6666666666666666 \cdot \frac{{eh}^{2}}{{ew}^{2}}\right) \cdot ew}{eh}\right) - -0.16666666666666666 \cdot \frac{eh}{ew}}} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
    7. Step-by-step derivation
      1. associate--l+32.9%

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

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

        \[\leadsto \left|\frac{ew}{\frac{eh}{ew \cdot \color{blue}{\left(t \cdot t\right)}} + \left(0.5 \cdot \frac{\left(1 + -0.6666666666666666 \cdot \frac{{eh}^{2}}{{ew}^{2}}\right) \cdot ew}{eh} - -0.16666666666666666 \cdot \frac{eh}{ew}\right)} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
      4. fma-neg32.9%

        \[\leadsto \left|\frac{ew}{\frac{eh}{ew \cdot \left(t \cdot t\right)} + \color{blue}{\mathsf{fma}\left(0.5, \frac{\left(1 + -0.6666666666666666 \cdot \frac{{eh}^{2}}{{ew}^{2}}\right) \cdot ew}{eh}, --0.16666666666666666 \cdot \frac{eh}{ew}\right)}} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
      5. associate-/l*32.9%

        \[\leadsto \left|\frac{ew}{\frac{eh}{ew \cdot \left(t \cdot t\right)} + \mathsf{fma}\left(0.5, \color{blue}{\frac{1 + -0.6666666666666666 \cdot \frac{{eh}^{2}}{{ew}^{2}}}{\frac{eh}{ew}}}, --0.16666666666666666 \cdot \frac{eh}{ew}\right)} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
      6. associate-*r/32.9%

        \[\leadsto \left|\frac{ew}{\frac{eh}{ew \cdot \left(t \cdot t\right)} + \mathsf{fma}\left(0.5, \frac{1 + \color{blue}{\frac{-0.6666666666666666 \cdot {eh}^{2}}{{ew}^{2}}}}{\frac{eh}{ew}}, --0.16666666666666666 \cdot \frac{eh}{ew}\right)} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
      7. unpow232.9%

        \[\leadsto \left|\frac{ew}{\frac{eh}{ew \cdot \left(t \cdot t\right)} + \mathsf{fma}\left(0.5, \frac{1 + \frac{-0.6666666666666666 \cdot \color{blue}{\left(eh \cdot eh\right)}}{{ew}^{2}}}{\frac{eh}{ew}}, --0.16666666666666666 \cdot \frac{eh}{ew}\right)} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
      8. unpow232.9%

        \[\leadsto \left|\frac{ew}{\frac{eh}{ew \cdot \left(t \cdot t\right)} + \mathsf{fma}\left(0.5, \frac{1 + \frac{-0.6666666666666666 \cdot \left(eh \cdot eh\right)}{\color{blue}{ew \cdot ew}}}{\frac{eh}{ew}}, --0.16666666666666666 \cdot \frac{eh}{ew}\right)} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
      9. *-commutative32.9%

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

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

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

        \[\leadsto \left|\frac{\color{blue}{ew \cdot ew}}{\left(\frac{eh}{{t}^{2}} + -0.3333333333333333 \cdot eh\right) - -0.16666666666666666 \cdot eh} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
      2. associate--l+90.4%

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

        \[\leadsto \left|\frac{ew \cdot ew}{\frac{eh}{\color{blue}{t \cdot t}} + \left(-0.3333333333333333 \cdot eh - -0.16666666666666666 \cdot eh\right)} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
      4. distribute-rgt-out--90.4%

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

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

      \[\leadsto \left|\color{blue}{\frac{ew \cdot ew}{\frac{eh}{t \cdot t} + eh \cdot -0.16666666666666666}} + \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 simplification87.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -2.15 \cdot 10^{-80} \lor \neg \left(ew \leq 4200000000000\right):\\ \;\;\;\;\left|\mathsf{fma}\left(ew \cdot \sin t, \frac{1}{\mathsf{hypot}\left(1, \frac{eh}{ew \cdot \tan t}\right)}, eh\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \frac{ew \cdot ew}{\frac{eh}{t \cdot t} + eh \cdot -0.16666666666666666}\right|\\ \end{array} \]

Alternative 8: 81.4% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -6 \cdot 10^{-83} \lor \neg \left(ew \leq 1.8 \cdot 10^{-241}\right):\\ \;\;\;\;\left|\mathsf{fma}\left(ew \cdot \sin t, \frac{1}{\mathsf{hypot}\left(1, \frac{eh}{ew \cdot \tan t}\right)}, eh\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \frac{\left(ew \cdot t\right) \cdot \left(ew \cdot t\right)}{eh}\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (if (or (<= ew -6e-83) (not (<= ew 1.8e-241)))
   (fabs (fma (* ew (sin t)) (/ 1.0 (hypot 1.0 (/ eh (* ew (tan t))))) eh))
   (fabs
    (+
     (* (* eh (cos t)) (sin (atan (/ (/ eh ew) (tan t)))))
     (/ (* (* ew t) (* ew t)) eh)))))
double code(double eh, double ew, double t) {
	double tmp;
	if ((ew <= -6e-83) || !(ew <= 1.8e-241)) {
		tmp = fabs(fma((ew * sin(t)), (1.0 / hypot(1.0, (eh / (ew * tan(t))))), eh));
	} else {
		tmp = fabs((((eh * cos(t)) * sin(atan(((eh / ew) / tan(t))))) + (((ew * t) * (ew * t)) / eh)));
	}
	return tmp;
}
function code(eh, ew, t)
	tmp = 0.0
	if ((ew <= -6e-83) || !(ew <= 1.8e-241))
		tmp = abs(fma(Float64(ew * sin(t)), Float64(1.0 / hypot(1.0, Float64(eh / Float64(ew * tan(t))))), eh));
	else
		tmp = abs(Float64(Float64(Float64(eh * cos(t)) * sin(atan(Float64(Float64(eh / ew) / tan(t))))) + Float64(Float64(Float64(ew * t) * Float64(ew * t)) / eh)));
	end
	return tmp
end
code[eh_, ew_, t_] := If[Or[LessEqual[ew, -6e-83], N[Not[LessEqual[ew, 1.8e-241]], $MachinePrecision]], N[Abs[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] + eh), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(N[(ew * t), $MachinePrecision] * N[(ew * t), $MachinePrecision]), $MachinePrecision] / eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;ew \leq -6 \cdot 10^{-83} \lor \neg \left(ew \leq 1.8 \cdot 10^{-241}\right):\\
\;\;\;\;\left|\mathsf{fma}\left(ew \cdot \sin t, \frac{1}{\mathsf{hypot}\left(1, \frac{eh}{ew \cdot \tan t}\right)}, eh\right)\right|\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if ew < -6.00000000000000021e-83 or 1.7999999999999999e-241 < 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. fma-def99.8%

        \[\leadsto \left|\color{blue}{\mathsf{fma}\left(ew \cdot \sin t, \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| \]
      2. associate-/l/99.8%

        \[\leadsto \left|\mathsf{fma}\left(ew \cdot \sin t, \cos \tan^{-1} \color{blue}{\left(\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)\right| \]
      3. associate-*l*99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.00000000000000021e-83 < ew < 1.7999999999999999e-241

    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. expm1-log1p-u99.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{ew \cdot \frac{\sin t}{\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-*r/99.7%

        \[\leadsto \left|\color{blue}{\frac{ew \cdot \sin t}{\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| \]
      4. associate-/l*99.7%

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

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

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

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

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

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

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

      \[\leadsto \left|\color{blue}{\frac{\left(t \cdot ew\right) \cdot \left(t \cdot ew\right)}{eh}} + \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 simplification83.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -6 \cdot 10^{-83} \lor \neg \left(ew \leq 1.8 \cdot 10^{-241}\right):\\ \;\;\;\;\left|\mathsf{fma}\left(ew \cdot \sin t, \frac{1}{\mathsf{hypot}\left(1, \frac{eh}{ew \cdot \tan t}\right)}, eh\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \frac{\left(ew \cdot t\right) \cdot \left(ew \cdot t\right)}{eh}\right|\\ \end{array} \]

Alternative 9: 78.5% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -9.9 \cdot 10^{+70}:\\ \;\;\;\;\left|\frac{ew}{\frac{eh}{ew \cdot \left(t \cdot t\right)}} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\mathsf{fma}\left(ew \cdot \sin t, \frac{1}{\mathsf{hypot}\left(1, \frac{eh}{ew \cdot \tan t}\right)}, eh\right)\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (if (<= eh -9.9e+70)
   (fabs
    (+
     (/ ew (/ eh (* ew (* t t))))
     (* (* eh (cos t)) (sin (atan (/ eh (* ew t)))))))
   (fabs (fma (* ew (sin t)) (/ 1.0 (hypot 1.0 (/ eh (* ew (tan t))))) eh))))
double code(double eh, double ew, double t) {
	double tmp;
	if (eh <= -9.9e+70) {
		tmp = fabs(((ew / (eh / (ew * (t * t)))) + ((eh * cos(t)) * sin(atan((eh / (ew * t)))))));
	} else {
		tmp = fabs(fma((ew * sin(t)), (1.0 / hypot(1.0, (eh / (ew * tan(t))))), eh));
	}
	return tmp;
}
function code(eh, ew, t)
	tmp = 0.0
	if (eh <= -9.9e+70)
		tmp = abs(Float64(Float64(ew / Float64(eh / Float64(ew * Float64(t * t)))) + Float64(Float64(eh * cos(t)) * sin(atan(Float64(eh / Float64(ew * t)))))));
	else
		tmp = abs(fma(Float64(ew * sin(t)), Float64(1.0 / hypot(1.0, Float64(eh / Float64(ew * tan(t))))), eh));
	end
	return tmp
end
code[eh_, ew_, t_] := If[LessEqual[eh, -9.9e+70], N[Abs[N[(N[(ew / N[(eh / N[(ew * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(eh / N[(ew * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[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] + eh), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;eh \leq -9.9 \cdot 10^{+70}:\\
\;\;\;\;\left|\frac{ew}{\frac{eh}{ew \cdot \left(t \cdot t\right)}} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right)\right|\\

\mathbf{else}:\\
\;\;\;\;\left|\mathsf{fma}\left(ew \cdot \sin t, \frac{1}{\mathsf{hypot}\left(1, \frac{eh}{ew \cdot \tan t}\right)}, eh\right)\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if eh < -9.8999999999999999e70

    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. expm1-log1p-u81.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{ew \cdot \frac{\sin t}{\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-*r/99.8%

        \[\leadsto \left|\color{blue}{\frac{ew \cdot \sin t}{\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| \]
      4. associate-/l*99.9%

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

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

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

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

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

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

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

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

    if -9.8999999999999999e70 < eh

    1. Initial program 99.8%

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

        \[\leadsto \left|\color{blue}{\mathsf{fma}\left(ew \cdot \sin t, \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| \]
      2. associate-/l/99.8%

        \[\leadsto \left|\mathsf{fma}\left(ew \cdot \sin t, \cos \tan^{-1} \color{blue}{\left(\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)\right| \]
      3. associate-*l*99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|\mathsf{fma}\left(ew \cdot \sin t, \frac{1}{\mathsf{hypot}\left(1, \frac{eh}{\tan t \cdot ew}\right)}, \color{blue}{eh}\right)\right| \]
  3. Recombined 2 regimes into one program.
  4. Final simplification80.8%

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

Alternative 10: 55.9% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{eh}{ew \cdot \left(t \cdot t\right)}\\
t_2 := \frac{eh}{ew \cdot t}\\
t_3 := eh \cdot \cos t\\
\mathbf{if}\;t \leq -1.3 \cdot 10^{+154} \lor \neg \left(t \leq 3.3 \cdot 10^{+134}\right):\\
\;\;\;\;\left|\frac{ew}{t_1 + \left(\left(0.5 \cdot \frac{ew}{eh} + \frac{eh}{ew} \cdot -0.3333333333333333\right) - \frac{eh}{ew} \cdot -0.16666666666666666\right)} + t_3 \cdot \sin \tan^{-1} \left(t_2 + -0.3333333333333333 \cdot \frac{t \cdot eh}{ew}\right)\right|\\

\mathbf{else}:\\
\;\;\;\;\left|\frac{ew}{t_1} + t_3 \cdot \sin \tan^{-1} t_2\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.29999999999999994e154 or 3.3e134 < t

    1. Initial program 99.6%

      \[\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. expm1-log1p-u67.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{ew \cdot \frac{\sin t}{\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-*r/99.6%

        \[\leadsto \left|\color{blue}{\frac{ew \cdot \sin t}{\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| \]
      4. associate-/l*99.5%

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

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

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

      \[\leadsto \left|\frac{ew}{\color{blue}{\left(\frac{eh}{{t}^{2} \cdot ew} + 0.5 \cdot \frac{\left(1 + -0.6666666666666666 \cdot \frac{{eh}^{2}}{{ew}^{2}}\right) \cdot ew}{eh}\right) - -0.16666666666666666 \cdot \frac{eh}{ew}}} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
    7. Step-by-step derivation
      1. associate--l+40.2%

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

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

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

        \[\leadsto \left|\frac{ew}{\frac{eh}{ew \cdot \left(t \cdot t\right)} + \color{blue}{\mathsf{fma}\left(0.5, \frac{\left(1 + -0.6666666666666666 \cdot \frac{{eh}^{2}}{{ew}^{2}}\right) \cdot ew}{eh}, --0.16666666666666666 \cdot \frac{eh}{ew}\right)}} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
      5. associate-/l*40.2%

        \[\leadsto \left|\frac{ew}{\frac{eh}{ew \cdot \left(t \cdot t\right)} + \mathsf{fma}\left(0.5, \color{blue}{\frac{1 + -0.6666666666666666 \cdot \frac{{eh}^{2}}{{ew}^{2}}}{\frac{eh}{ew}}}, --0.16666666666666666 \cdot \frac{eh}{ew}\right)} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
      6. associate-*r/40.2%

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

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

        \[\leadsto \left|\frac{ew}{\frac{eh}{ew \cdot \left(t \cdot t\right)} + \mathsf{fma}\left(0.5, \frac{1 + \frac{-0.6666666666666666 \cdot \left(eh \cdot eh\right)}{\color{blue}{ew \cdot ew}}}{\frac{eh}{ew}}, --0.16666666666666666 \cdot \frac{eh}{ew}\right)} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
      9. *-commutative40.2%

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

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

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

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

    if -1.29999999999999994e154 < t < 3.3e134

    1. Initial program 99.9%

      \[\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. expm1-log1p-u82.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{ew \cdot \frac{\sin t}{\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-*r/99.9%

        \[\leadsto \left|\color{blue}{\frac{ew \cdot \sin t}{\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| \]
      4. associate-/l*99.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{+154} \lor \neg \left(t \leq 3.3 \cdot 10^{+134}\right):\\ \;\;\;\;\left|\frac{ew}{\frac{eh}{ew \cdot \left(t \cdot t\right)} + \left(\left(0.5 \cdot \frac{ew}{eh} + \frac{eh}{ew} \cdot -0.3333333333333333\right) - \frac{eh}{ew} \cdot -0.16666666666666666\right)} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t} + -0.3333333333333333 \cdot \frac{t \cdot eh}{ew}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{ew}{\frac{eh}{ew \cdot \left(t \cdot t\right)}} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right)\right|\\ \end{array} \]

Alternative 11: 45.0% accurate, 2.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|\color{blue}{ew \cdot \frac{\sin t}{\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-*r/99.8%

      \[\leadsto \left|\color{blue}{\frac{ew \cdot \sin t}{\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| \]
    4. associate-/l*99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 46.9% accurate, 2.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|\color{blue}{ew \cdot \frac{\sin t}{\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-*r/99.8%

      \[\leadsto \left|\color{blue}{\frac{ew \cdot \sin t}{\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| \]
    4. associate-/l*99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 47.2% accurate, 2.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|\color{blue}{ew \cdot \frac{\sin t}{\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-*r/99.8%

      \[\leadsto \left|\color{blue}{\frac{ew \cdot \sin t}{\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| \]
    4. associate-/l*99.7%

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

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

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

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

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

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

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

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

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

Reproduce

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