Example from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 15.9s
Alternatives: 7
Speedup: N/A×

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 7 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.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{\sin t \cdot ew}{\sqrt{{\left(\frac{eh}{\tan t \cdot ew}\right)}^{2} + 1}}\right| \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (fabs
  (+
   (* (* eh (cos t)) (sin (atan (/ (/ eh ew) (tan t)))))
   (/ (* (sin t) ew) (sqrt (+ (pow (/ eh (* (tan t) ew)) 2.0) 1.0))))))
double code(double eh, double ew, double t) {
	return fabs((((eh * cos(t)) * sin(atan(((eh / ew) / tan(t))))) + ((sin(t) * ew) / sqrt((pow((eh / (tan(t) * ew)), 2.0) + 1.0)))));
}
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))))) + ((sin(t) * ew) / sqrt((((eh / (tan(t) * ew)) ** 2.0d0) + 1.0d0)))))
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))))) + ((Math.sin(t) * ew) / Math.sqrt((Math.pow((eh / (Math.tan(t) * ew)), 2.0) + 1.0)))));
}
def code(eh, ew, t):
	return math.fabs((((eh * math.cos(t)) * math.sin(math.atan(((eh / ew) / math.tan(t))))) + ((math.sin(t) * ew) / math.sqrt((math.pow((eh / (math.tan(t) * ew)), 2.0) + 1.0)))))
function code(eh, ew, t)
	return abs(Float64(Float64(Float64(eh * cos(t)) * sin(atan(Float64(Float64(eh / ew) / tan(t))))) + Float64(Float64(sin(t) * ew) / sqrt(Float64((Float64(eh / Float64(tan(t) * ew)) ^ 2.0) + 1.0)))))
end
function tmp = code(eh, ew, t)
	tmp = abs((((eh * cos(t)) * sin(atan(((eh / ew) / tan(t))))) + ((sin(t) * ew) / sqrt((((eh / (tan(t) * ew)) ^ 2.0) + 1.0)))));
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[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision] / N[Sqrt[N[(N[Power[N[(eh / N[(N[Tan[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $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{\sin t \cdot ew}{\sqrt{{\left(\frac{eh}{\tan t \cdot ew}\right)}^{2} + 1}}\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. Add Preprocessing
  3. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto \left|\color{blue}{\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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left|\left(\cos \tan^{-1} \color{blue}{\left(\frac{eh}{ew \cdot \tan t}\right)} \cdot ew\right) \cdot \sin t + \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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \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| \]
    15. associate-/l/N/A

      \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \color{blue}{\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| \]
    16. lift-/.f64N/A

      \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\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| \]
    17. lift-/.f64N/A

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

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

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

Alternative 2: 99.1% 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}{t \cdot ew}\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 (* t ew))))))))
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 / (t * ew)))))));
}
real(8) function code(eh, ew, t)
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    code = abs((((eh * cos(t)) * sin(atan(((eh / ew) / tan(t))))) + ((ew * sin(t)) * cos(atan((eh / (t * ew)))))))
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 / (t * ew)))))));
}
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 / (t * ew)))))))
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(t * ew)))))))
end
function tmp = code(eh, ew, t)
	tmp = abs((((eh * cos(t)) * sin(atan(((eh / ew) / tan(t))))) + ((ew * sin(t)) * cos(atan((eh / (t * ew)))))));
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[(t * ew), $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}{t \cdot ew}\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. Add Preprocessing
  3. Taylor expanded in t around 0

    \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \color{blue}{\left(\frac{eh}{ew \cdot t}\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. lower-/.f64N/A

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

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

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

    \[\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| \]
  6. Final simplification98.9%

    \[\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}{t \cdot ew}\right)\right| \]
  7. Add Preprocessing

Alternative 3: 98.5% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \frac{\sin t \cdot ew}{1}\right| \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (fabs
  (+
   (* (* eh (cos t)) (sin (atan (/ (/ eh ew) (tan t)))))
   (/ (* (sin t) ew) 1.0))))
double code(double eh, double ew, double t) {
	return fabs((((eh * cos(t)) * sin(atan(((eh / ew) / tan(t))))) + ((sin(t) * ew) / 1.0)));
}
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))))) + ((sin(t) * ew) / 1.0d0)))
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))))) + ((Math.sin(t) * ew) / 1.0)));
}
def code(eh, ew, t):
	return math.fabs((((eh * math.cos(t)) * math.sin(math.atan(((eh / ew) / math.tan(t))))) + ((math.sin(t) * ew) / 1.0)))
function code(eh, ew, t)
	return abs(Float64(Float64(Float64(eh * cos(t)) * sin(atan(Float64(Float64(eh / ew) / tan(t))))) + Float64(Float64(sin(t) * ew) / 1.0)))
end
function tmp = code(eh, ew, t)
	tmp = abs((((eh * cos(t)) * sin(atan(((eh / ew) / tan(t))))) + ((sin(t) * ew) / 1.0)));
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[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision] / 1.0), $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{\sin t \cdot ew}{1}\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. Add Preprocessing
  3. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto \left|\color{blue}{\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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left|\left(\cos \tan^{-1} \color{blue}{\left(\frac{eh}{ew \cdot \tan t}\right)} \cdot ew\right) \cdot \sin t + \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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \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| \]
    15. associate-/l/N/A

      \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \color{blue}{\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| \]
    16. lift-/.f64N/A

      \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\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| \]
    17. lift-/.f64N/A

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

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

    \[\leadsto \left|\frac{\sin t \cdot ew}{\color{blue}{1}} + \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. Applied rewrites98.6%

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

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

    Alternative 4: 74.9% accurate, 1.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -2.25 \cdot 10^{+84} \lor \neg \left(ew \leq 2.65 \cdot 10^{+36}\right):\\ \;\;\;\;\left|\sin t \cdot ew\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\frac{eh}{\sin t}}{ew} \cdot \cos t\right) \cdot \left(\cos t \cdot eh\right)\right|\\ \end{array} \end{array} \]
    (FPCore (eh ew t)
     :precision binary64
     (if (or (<= ew -2.25e+84) (not (<= ew 2.65e+36)))
       (fabs (* (sin t) ew))
       (fabs (* (sin (atan (* (/ (/ eh (sin t)) ew) (cos t)))) (* (cos t) eh)))))
    double code(double eh, double ew, double t) {
    	double tmp;
    	if ((ew <= -2.25e+84) || !(ew <= 2.65e+36)) {
    		tmp = fabs((sin(t) * ew));
    	} else {
    		tmp = fabs((sin(atan((((eh / sin(t)) / ew) * cos(t)))) * (cos(t) * eh)));
    	}
    	return tmp;
    }
    
    real(8) function code(eh, ew, t)
        real(8), intent (in) :: eh
        real(8), intent (in) :: ew
        real(8), intent (in) :: t
        real(8) :: tmp
        if ((ew <= (-2.25d+84)) .or. (.not. (ew <= 2.65d+36))) then
            tmp = abs((sin(t) * ew))
        else
            tmp = abs((sin(atan((((eh / sin(t)) / ew) * cos(t)))) * (cos(t) * eh)))
        end if
        code = tmp
    end function
    
    public static double code(double eh, double ew, double t) {
    	double tmp;
    	if ((ew <= -2.25e+84) || !(ew <= 2.65e+36)) {
    		tmp = Math.abs((Math.sin(t) * ew));
    	} else {
    		tmp = Math.abs((Math.sin(Math.atan((((eh / Math.sin(t)) / ew) * Math.cos(t)))) * (Math.cos(t) * eh)));
    	}
    	return tmp;
    }
    
    def code(eh, ew, t):
    	tmp = 0
    	if (ew <= -2.25e+84) or not (ew <= 2.65e+36):
    		tmp = math.fabs((math.sin(t) * ew))
    	else:
    		tmp = math.fabs((math.sin(math.atan((((eh / math.sin(t)) / ew) * math.cos(t)))) * (math.cos(t) * eh)))
    	return tmp
    
    function code(eh, ew, t)
    	tmp = 0.0
    	if ((ew <= -2.25e+84) || !(ew <= 2.65e+36))
    		tmp = abs(Float64(sin(t) * ew));
    	else
    		tmp = abs(Float64(sin(atan(Float64(Float64(Float64(eh / sin(t)) / ew) * cos(t)))) * Float64(cos(t) * eh)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(eh, ew, t)
    	tmp = 0.0;
    	if ((ew <= -2.25e+84) || ~((ew <= 2.65e+36)))
    		tmp = abs((sin(t) * ew));
    	else
    		tmp = abs((sin(atan((((eh / sin(t)) / ew) * cos(t)))) * (cos(t) * eh)));
    	end
    	tmp_2 = tmp;
    end
    
    code[eh_, ew_, t_] := If[Or[LessEqual[ew, -2.25e+84], N[Not[LessEqual[ew, 2.65e+36]], $MachinePrecision]], N[Abs[N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[Sin[N[ArcTan[N[(N[(N[(eh / N[Sin[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision] * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;ew \leq -2.25 \cdot 10^{+84} \lor \neg \left(ew \leq 2.65 \cdot 10^{+36}\right):\\
    \;\;\;\;\left|\sin t \cdot ew\right|\\
    
    \mathbf{else}:\\
    \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\frac{eh}{\sin t}}{ew} \cdot \cos t\right) \cdot \left(\cos t \cdot eh\right)\right|\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if ew < -2.2499999999999999e84 or 2.65e36 < 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. Add Preprocessing
      3. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \left|\color{blue}{\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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\left(\cos \tan^{-1} \color{blue}{\left(\frac{eh}{ew \cdot \tan t}\right)} \cdot ew\right) \cdot \sin t + \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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \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| \]
        15. associate-/l/N/A

          \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \color{blue}{\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| \]
        16. lift-/.f64N/A

          \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\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| \]
        17. lift-/.f64N/A

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

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

        \[\leadsto \left|\color{blue}{ew \cdot \sin t}\right| \]
      10. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \left|\color{blue}{\sin t \cdot ew}\right| \]
        2. lower-*.f64N/A

          \[\leadsto \left|\color{blue}{\sin t \cdot ew}\right| \]
        3. lower-sin.f6473.1

          \[\leadsto \left|\color{blue}{\sin t} \cdot ew\right| \]
      11. Applied rewrites73.1%

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

      if -2.2499999999999999e84 < ew < 2.65e36

      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. Add Preprocessing
      3. Taylor expanded in eh around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 61.3% accurate, 1.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|\sin t \cdot ew\right|\\ \mathbf{if}\;t \leq -3 \cdot 10^{+125}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.3 \cdot 10^{-9}:\\ \;\;\;\;\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(ew \cdot ew\right) \cdot \frac{t \cdot t}{eh}\right|\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-11}:\\ \;\;\;\;\left|-eh\right|\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (eh ew t)
     :precision binary64
     (let* ((t_1 (fabs (* (sin t) ew))))
       (if (<= t -3e+125)
         t_1
         (if (<= t -2.3e-9)
           (fabs
            (+
             (* (* eh (cos t)) (sin (atan (/ (/ eh ew) (tan t)))))
             (* (* ew ew) (/ (* t t) eh))))
           (if (<= t 3.5e-11) (fabs (- eh)) t_1)))))
    double code(double eh, double ew, double t) {
    	double t_1 = fabs((sin(t) * ew));
    	double tmp;
    	if (t <= -3e+125) {
    		tmp = t_1;
    	} else if (t <= -2.3e-9) {
    		tmp = fabs((((eh * cos(t)) * sin(atan(((eh / ew) / tan(t))))) + ((ew * ew) * ((t * t) / eh))));
    	} else if (t <= 3.5e-11) {
    		tmp = fabs(-eh);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    real(8) function code(eh, ew, t)
        real(8), intent (in) :: eh
        real(8), intent (in) :: ew
        real(8), intent (in) :: t
        real(8) :: t_1
        real(8) :: tmp
        t_1 = abs((sin(t) * ew))
        if (t <= (-3d+125)) then
            tmp = t_1
        else if (t <= (-2.3d-9)) then
            tmp = abs((((eh * cos(t)) * sin(atan(((eh / ew) / tan(t))))) + ((ew * ew) * ((t * t) / eh))))
        else if (t <= 3.5d-11) then
            tmp = abs(-eh)
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double eh, double ew, double t) {
    	double t_1 = Math.abs((Math.sin(t) * ew));
    	double tmp;
    	if (t <= -3e+125) {
    		tmp = t_1;
    	} else if (t <= -2.3e-9) {
    		tmp = Math.abs((((eh * Math.cos(t)) * Math.sin(Math.atan(((eh / ew) / Math.tan(t))))) + ((ew * ew) * ((t * t) / eh))));
    	} else if (t <= 3.5e-11) {
    		tmp = Math.abs(-eh);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(eh, ew, t):
    	t_1 = math.fabs((math.sin(t) * ew))
    	tmp = 0
    	if t <= -3e+125:
    		tmp = t_1
    	elif t <= -2.3e-9:
    		tmp = math.fabs((((eh * math.cos(t)) * math.sin(math.atan(((eh / ew) / math.tan(t))))) + ((ew * ew) * ((t * t) / eh))))
    	elif t <= 3.5e-11:
    		tmp = math.fabs(-eh)
    	else:
    		tmp = t_1
    	return tmp
    
    function code(eh, ew, t)
    	t_1 = abs(Float64(sin(t) * ew))
    	tmp = 0.0
    	if (t <= -3e+125)
    		tmp = t_1;
    	elseif (t <= -2.3e-9)
    		tmp = abs(Float64(Float64(Float64(eh * cos(t)) * sin(atan(Float64(Float64(eh / ew) / tan(t))))) + Float64(Float64(ew * ew) * Float64(Float64(t * t) / eh))));
    	elseif (t <= 3.5e-11)
    		tmp = abs(Float64(-eh));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(eh, ew, t)
    	t_1 = abs((sin(t) * ew));
    	tmp = 0.0;
    	if (t <= -3e+125)
    		tmp = t_1;
    	elseif (t <= -2.3e-9)
    		tmp = abs((((eh * cos(t)) * sin(atan(((eh / ew) / tan(t))))) + ((ew * ew) * ((t * t) / eh))));
    	elseif (t <= 3.5e-11)
    		tmp = abs(-eh);
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -3e+125], t$95$1, If[LessEqual[t, -2.3e-9], 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[(t * t), $MachinePrecision] / eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 3.5e-11], N[Abs[(-eh)], $MachinePrecision], t$95$1]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left|\sin t \cdot ew\right|\\
    \mathbf{if}\;t \leq -3 \cdot 10^{+125}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \leq -2.3 \cdot 10^{-9}:\\
    \;\;\;\;\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(ew \cdot ew\right) \cdot \frac{t \cdot t}{eh}\right|\\
    
    \mathbf{elif}\;t \leq 3.5 \cdot 10^{-11}:\\
    \;\;\;\;\left|-eh\right|\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if t < -3.00000000000000015e125 or 3.50000000000000019e-11 < 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. Add Preprocessing
      3. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \left|\color{blue}{\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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\left(\cos \tan^{-1} \color{blue}{\left(\frac{eh}{ew \cdot \tan t}\right)} \cdot ew\right) \cdot \sin t + \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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \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| \]
        15. associate-/l/N/A

          \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \color{blue}{\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| \]
        16. lift-/.f64N/A

          \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\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| \]
        17. lift-/.f64N/A

          \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \color{blue}{\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| \]
      8. Applied rewrites99.6%

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

        \[\leadsto \left|\color{blue}{ew \cdot \sin t}\right| \]
      10. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \left|\color{blue}{\sin t \cdot ew}\right| \]
        2. lower-*.f64N/A

          \[\leadsto \left|\color{blue}{\sin t \cdot ew}\right| \]
        3. lower-sin.f6460.7

          \[\leadsto \left|\color{blue}{\sin t} \cdot ew\right| \]
      11. Applied rewrites60.7%

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

      if -3.00000000000000015e125 < t < -2.2999999999999999e-9

      1. Initial program 99.5%

        \[\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. Add Preprocessing
      3. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \left|\color{blue}{\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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\left(\cos \tan^{-1} \color{blue}{\left(\frac{eh}{ew \cdot \tan t}\right)} \cdot ew\right) \cdot \sin t + \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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \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| \]
        15. associate-/l/N/A

          \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \color{blue}{\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| \]
        16. lift-/.f64N/A

          \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\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| \]
        17. lift-/.f64N/A

          \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \color{blue}{\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| \]
      8. Applied rewrites99.6%

        \[\leadsto \left|\color{blue}{\frac{\sin t \cdot ew}{\sqrt{{\left(\frac{eh}{\tan t \cdot ew}\right)}^{2} + 1}}} + \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

        \[\leadsto \left|\color{blue}{\frac{{ew}^{2} \cdot {t}^{2}}{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. associate-/l*N/A

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

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

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

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

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

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

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

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

      if -2.2999999999999999e-9 < t < 3.50000000000000019e-11

      1. Initial program 100.0%

        \[\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. Add Preprocessing
      3. Taylor expanded in t around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left|-1 \cdot \color{blue}{eh}\right| \]
          3. Step-by-step derivation
            1. Applied rewrites80.3%

              \[\leadsto \left|-eh\right| \]
          4. Recombined 3 regimes into one program.
          5. Final simplification70.4%

            \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{+125}:\\ \;\;\;\;\left|\sin t \cdot ew\right|\\ \mathbf{elif}\;t \leq -2.3 \cdot 10^{-9}:\\ \;\;\;\;\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(ew \cdot ew\right) \cdot \frac{t \cdot t}{eh}\right|\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-11}:\\ \;\;\;\;\left|-eh\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\sin t \cdot ew\right|\\ \end{array} \]
          6. Add Preprocessing

          Alternative 6: 62.2% accurate, 7.2× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.8 \cdot 10^{-25} \lor \neg \left(t \leq 3.5 \cdot 10^{-11}\right):\\ \;\;\;\;\left|\sin t \cdot ew\right|\\ \mathbf{else}:\\ \;\;\;\;\left|-eh\right|\\ \end{array} \end{array} \]
          (FPCore (eh ew t)
           :precision binary64
           (if (or (<= t -1.8e-25) (not (<= t 3.5e-11)))
             (fabs (* (sin t) ew))
             (fabs (- eh))))
          double code(double eh, double ew, double t) {
          	double tmp;
          	if ((t <= -1.8e-25) || !(t <= 3.5e-11)) {
          		tmp = fabs((sin(t) * ew));
          	} else {
          		tmp = fabs(-eh);
          	}
          	return tmp;
          }
          
          real(8) function code(eh, ew, t)
              real(8), intent (in) :: eh
              real(8), intent (in) :: ew
              real(8), intent (in) :: t
              real(8) :: tmp
              if ((t <= (-1.8d-25)) .or. (.not. (t <= 3.5d-11))) then
                  tmp = abs((sin(t) * ew))
              else
                  tmp = abs(-eh)
              end if
              code = tmp
          end function
          
          public static double code(double eh, double ew, double t) {
          	double tmp;
          	if ((t <= -1.8e-25) || !(t <= 3.5e-11)) {
          		tmp = Math.abs((Math.sin(t) * ew));
          	} else {
          		tmp = Math.abs(-eh);
          	}
          	return tmp;
          }
          
          def code(eh, ew, t):
          	tmp = 0
          	if (t <= -1.8e-25) or not (t <= 3.5e-11):
          		tmp = math.fabs((math.sin(t) * ew))
          	else:
          		tmp = math.fabs(-eh)
          	return tmp
          
          function code(eh, ew, t)
          	tmp = 0.0
          	if ((t <= -1.8e-25) || !(t <= 3.5e-11))
          		tmp = abs(Float64(sin(t) * ew));
          	else
          		tmp = abs(Float64(-eh));
          	end
          	return tmp
          end
          
          function tmp_2 = code(eh, ew, t)
          	tmp = 0.0;
          	if ((t <= -1.8e-25) || ~((t <= 3.5e-11)))
          		tmp = abs((sin(t) * ew));
          	else
          		tmp = abs(-eh);
          	end
          	tmp_2 = tmp;
          end
          
          code[eh_, ew_, t_] := If[Or[LessEqual[t, -1.8e-25], N[Not[LessEqual[t, 3.5e-11]], $MachinePrecision]], N[Abs[N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]], $MachinePrecision], N[Abs[(-eh)], $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;t \leq -1.8 \cdot 10^{-25} \lor \neg \left(t \leq 3.5 \cdot 10^{-11}\right):\\
          \;\;\;\;\left|\sin t \cdot ew\right|\\
          
          \mathbf{else}:\\
          \;\;\;\;\left|-eh\right|\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if t < -1.8e-25 or 3.50000000000000019e-11 < 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. Add Preprocessing
            3. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \left|\color{blue}{\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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left|\left(\cos \tan^{-1} \color{blue}{\left(\frac{eh}{ew \cdot \tan t}\right)} \cdot ew\right) \cdot \sin t + \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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \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| \]
              15. associate-/l/N/A

                \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \color{blue}{\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| \]
              16. lift-/.f64N/A

                \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\color{blue}{\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| \]
              17. lift-/.f64N/A

                \[\leadsto \left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \color{blue}{\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| \]
            8. Applied rewrites99.6%

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

              \[\leadsto \left|\color{blue}{ew \cdot \sin t}\right| \]
            10. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \left|\color{blue}{\sin t \cdot ew}\right| \]
              2. lower-*.f64N/A

                \[\leadsto \left|\color{blue}{\sin t \cdot ew}\right| \]
              3. lower-sin.f6456.4

                \[\leadsto \left|\color{blue}{\sin t} \cdot ew\right| \]
            11. Applied rewrites56.4%

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

            if -1.8e-25 < t < 3.50000000000000019e-11

            1. Initial program 100.0%

              \[\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. Add Preprocessing
            3. Taylor expanded in t around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left|-1 \cdot \color{blue}{eh}\right| \]
                3. Step-by-step derivation
                  1. Applied rewrites81.8%

                    \[\leadsto \left|-eh\right| \]
                4. Recombined 2 regimes into one program.
                5. Final simplification68.3%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.8 \cdot 10^{-25} \lor \neg \left(t \leq 3.5 \cdot 10^{-11}\right):\\ \;\;\;\;\left|\sin t \cdot ew\right|\\ \mathbf{else}:\\ \;\;\;\;\left|-eh\right|\\ \end{array} \]
                6. Add Preprocessing

                Alternative 7: 42.3% accurate, 174.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left|-1 \cdot \color{blue}{eh}\right| \]
                    3. Step-by-step derivation
                      1. Applied rewrites45.6%

                        \[\leadsto \left|-eh\right| \]
                      2. Add Preprocessing

                      Reproduce

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