Example 2 from Robby

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

Specification

?
\[\begin{array}{l} \\ \begin{array}{l} t_1 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\ \left|\left(ew \cdot \cos t\right) \cdot \cos t\_1 - \left(eh \cdot \sin t\right) \cdot \sin t\_1\right| \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (atan (/ (* (- eh) (tan t)) ew))))
   (fabs (- (* (* ew (cos t)) (cos t_1)) (* (* eh (sin t)) (sin t_1))))))
double code(double eh, double ew, double t) {
	double t_1 = atan(((-eh * tan(t)) / ew));
	return fabs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\ \left|\left(ew \cdot \cos t\right) \cdot \cos t\_1 - \left(eh \cdot \sin t\right) \cdot \sin t\_1\right| \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (atan (/ (* (- eh) (tan t)) ew))))
   (fabs (- (* (* ew (cos t)) (cos t_1)) (* (* eh (sin t)) (sin t_1))))))
double code(double eh, double ew, double t) {
	double t_1 = atan(((-eh * tan(t)) / ew));
	return fabs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

    \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 52.1% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right)\\ \mathbf{if}\;\left(ew \cdot \cos t\right) \cdot \cos t\_1 - \left(eh \cdot \sin t\right) \cdot \sin t\_1 \leq -2 \cdot 10^{-296}:\\ \;\;\;\;\left|\frac{ew}{1}\right|\\ \mathbf{else}:\\ \;\;\;\;\cos t \cdot ew\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (atan (/ (* eh (tan t)) (- ew)))))
   (if (<=
        (- (* (* ew (cos t)) (cos t_1)) (* (* eh (sin t)) (sin t_1)))
        -2e-296)
     (fabs (/ ew 1.0))
     (* (cos t) ew))))
double code(double eh, double ew, double t) {
	double t_1 = atan(((eh * tan(t)) / -ew));
	double tmp;
	if ((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))) <= -2e-296) {
		tmp = fabs((ew / 1.0));
	} else {
		tmp = cos(t) * ew;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(eh, ew, t)
use fmin_fmax_functions
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = atan(((eh * tan(t)) / -ew))
    if ((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))) <= (-2d-296)) then
        tmp = abs((ew / 1.0d0))
    else
        tmp = cos(t) * ew
    end if
    code = tmp
end function
public static double code(double eh, double ew, double t) {
	double t_1 = Math.atan(((eh * Math.tan(t)) / -ew));
	double tmp;
	if ((((ew * Math.cos(t)) * Math.cos(t_1)) - ((eh * Math.sin(t)) * Math.sin(t_1))) <= -2e-296) {
		tmp = Math.abs((ew / 1.0));
	} else {
		tmp = Math.cos(t) * ew;
	}
	return tmp;
}
def code(eh, ew, t):
	t_1 = math.atan(((eh * math.tan(t)) / -ew))
	tmp = 0
	if (((ew * math.cos(t)) * math.cos(t_1)) - ((eh * math.sin(t)) * math.sin(t_1))) <= -2e-296:
		tmp = math.fabs((ew / 1.0))
	else:
		tmp = math.cos(t) * ew
	return tmp
function code(eh, ew, t)
	t_1 = atan(Float64(Float64(eh * tan(t)) / Float64(-ew)))
	tmp = 0.0
	if (Float64(Float64(Float64(ew * cos(t)) * cos(t_1)) - Float64(Float64(eh * sin(t)) * sin(t_1))) <= -2e-296)
		tmp = abs(Float64(ew / 1.0));
	else
		tmp = Float64(cos(t) * ew);
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	t_1 = atan(((eh * tan(t)) / -ew));
	tmp = 0.0;
	if ((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))) <= -2e-296)
		tmp = abs((ew / 1.0));
	else
		tmp = cos(t) * ew;
	end
	tmp_2 = tmp;
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / (-ew)), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e-296], N[Abs[N[(ew / 1.0), $MachinePrecision]], $MachinePrecision], N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\cos t \cdot ew\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < -2e-296

    1. Initial program 99.8%

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

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

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

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

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

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

        \[\leadsto \left|\frac{ew \cdot 1}{1}\right| \]
      3. Step-by-step derivation
        1. Applied rewrites41.3%

          \[\leadsto \left|\frac{ew \cdot 1}{1}\right| \]

        if -2e-296 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))))

        1. Initial program 99.7%

          \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
        2. Add Preprocessing
        3. Applied rewrites68.8%

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

          \[\leadsto \color{blue}{ew \cdot \cos t} \]
        5. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{\cos t \cdot ew} \]
          2. lower-*.f64N/A

            \[\leadsto \color{blue}{\cos t \cdot ew} \]
          3. lower-cos.f6461.7

            \[\leadsto \color{blue}{\cos t} \cdot ew \]
        6. Applied rewrites61.7%

          \[\leadsto \color{blue}{\cos t \cdot ew} \]
      4. Recombined 2 regimes into one program.
      5. Final simplification52.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right) \leq -2 \cdot 10^{-296}:\\ \;\;\;\;\left|\frac{ew}{1}\right|\\ \mathbf{else}:\\ \;\;\;\;\cos t \cdot ew\\ \end{array} \]
      6. Add Preprocessing

      Alternative 3: 95.2% accurate, 1.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := eh \cdot \frac{\tan t}{ew}\\ \mathbf{if}\;eh \leq -1.1 \cdot 10^{-44} \lor \neg \left(eh \leq 8.2 \cdot 10^{+60}\right):\\ \;\;\;\;\left|\mathsf{fma}\left(\sin t \cdot \tanh \sinh^{-1} \left(\tan t \cdot \frac{-eh}{ew}\right), eh, \left(\cos \tan^{-1} \left(\frac{eh \cdot t}{ew}\right) \cdot \left(-\cos t\right)\right) \cdot ew\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\cos t \cdot ew + t\_1 \cdot \left(\sin t \cdot eh\right)}{\cosh \sinh^{-1} t\_1}\right|\\ \end{array} \end{array} \]
      (FPCore (eh ew t)
       :precision binary64
       (let* ((t_1 (* eh (/ (tan t) ew))))
         (if (or (<= eh -1.1e-44) (not (<= eh 8.2e+60)))
           (fabs
            (fma
             (* (sin t) (tanh (asinh (* (tan t) (/ (- eh) ew)))))
             eh
             (* (* (cos (atan (/ (* eh t) ew))) (- (cos t))) ew)))
           (fabs (/ (+ (* (cos t) ew) (* t_1 (* (sin t) eh))) (cosh (asinh t_1)))))))
      double code(double eh, double ew, double t) {
      	double t_1 = eh * (tan(t) / ew);
      	double tmp;
      	if ((eh <= -1.1e-44) || !(eh <= 8.2e+60)) {
      		tmp = fabs(fma((sin(t) * tanh(asinh((tan(t) * (-eh / ew))))), eh, ((cos(atan(((eh * t) / ew))) * -cos(t)) * ew)));
      	} else {
      		tmp = fabs((((cos(t) * ew) + (t_1 * (sin(t) * eh))) / cosh(asinh(t_1))));
      	}
      	return tmp;
      }
      
      function code(eh, ew, t)
      	t_1 = Float64(eh * Float64(tan(t) / ew))
      	tmp = 0.0
      	if ((eh <= -1.1e-44) || !(eh <= 8.2e+60))
      		tmp = abs(fma(Float64(sin(t) * tanh(asinh(Float64(tan(t) * Float64(Float64(-eh) / ew))))), eh, Float64(Float64(cos(atan(Float64(Float64(eh * t) / ew))) * Float64(-cos(t))) * ew)));
      	else
      		tmp = abs(Float64(Float64(Float64(cos(t) * ew) + Float64(t_1 * Float64(sin(t) * eh))) / cosh(asinh(t_1))));
      	end
      	return tmp
      end
      
      code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[eh, -1.1e-44], N[Not[LessEqual[eh, 8.2e+60]], $MachinePrecision]], N[Abs[N[(N[(N[Sin[t], $MachinePrecision] * N[Tanh[N[ArcSinh[N[(N[Tan[t], $MachinePrecision] * N[((-eh) / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * eh + N[(N[(N[Cos[N[ArcTan[N[(N[(eh * t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * (-N[Cos[t], $MachinePrecision])), $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision] + N[(t$95$1 * N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Cosh[N[ArcSinh[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := eh \cdot \frac{\tan t}{ew}\\
      \mathbf{if}\;eh \leq -1.1 \cdot 10^{-44} \lor \neg \left(eh \leq 8.2 \cdot 10^{+60}\right):\\
      \;\;\;\;\left|\mathsf{fma}\left(\sin t \cdot \tanh \sinh^{-1} \left(\tan t \cdot \frac{-eh}{ew}\right), eh, \left(\cos \tan^{-1} \left(\frac{eh \cdot t}{ew}\right) \cdot \left(-\cos t\right)\right) \cdot ew\right)\right|\\
      
      \mathbf{else}:\\
      \;\;\;\;\left|\frac{\cos t \cdot ew + t\_1 \cdot \left(\sin t \cdot eh\right)}{\cosh \sinh^{-1} t\_1}\right|\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if eh < -1.10000000000000006e-44 or 8.2e60 < eh

        1. Initial program 99.8%

          \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left|\mathsf{fma}\left(\sin t \cdot \tanh \sinh^{-1} \left(\tan t \cdot \frac{-eh}{ew}\right), eh, \left(-\cos \tan^{-1} \left(\frac{eh \cdot t}{ew}\right) \cdot \cos t\right) \cdot ew\right)\right| \]
        10. Step-by-step derivation
          1. Applied rewrites96.6%

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

          if -1.10000000000000006e-44 < eh < 8.2e60

          1. Initial program 99.8%

            \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. lift-*.f64N/A

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

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

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

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

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

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

            \[\leadsto \color{blue}{\left|\frac{\left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right) \cdot \left(\sin t \cdot eh\right) - 1 \cdot \left(\cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}\right|} \]
        11. Recombined 2 regimes into one program.
        12. Final simplification97.5%

          \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -1.1 \cdot 10^{-44} \lor \neg \left(eh \leq 8.2 \cdot 10^{+60}\right):\\ \;\;\;\;\left|\mathsf{fma}\left(\sin t \cdot \tanh \sinh^{-1} \left(\tan t \cdot \frac{-eh}{ew}\right), eh, \left(\cos \tan^{-1} \left(\frac{eh \cdot t}{ew}\right) \cdot \left(-\cos t\right)\right) \cdot ew\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\cos t \cdot ew + \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \left(\sin t \cdot eh\right)}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}\right|\\ \end{array} \]
        13. Add Preprocessing

        Alternative 4: 99.0% accurate, 1.1× speedup?

        \[\begin{array}{l} \\ \left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{-t}{ew} \cdot eh\right) - \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right)\right| \end{array} \]
        (FPCore (eh ew t)
         :precision binary64
         (fabs
          (-
           (* (* eh (sin t)) (sin (atan (* (/ (- t) ew) eh))))
           (* (* ew (cos t)) (cos (atan (/ (* eh (tan t)) (- ew))))))))
        double code(double eh, double ew, double t) {
        	return fabs((((eh * sin(t)) * sin(atan(((-t / ew) * eh)))) - ((ew * cos(t)) * cos(atan(((eh * tan(t)) / -ew))))));
        }
        
        module fmin_fmax_functions
            implicit none
            private
            public fmax
            public fmin
        
            interface fmax
                module procedure fmax88
                module procedure fmax44
                module procedure fmax84
                module procedure fmax48
            end interface
            interface fmin
                module procedure fmin88
                module procedure fmin44
                module procedure fmin84
                module procedure fmin48
            end interface
        contains
            real(8) function fmax88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(4) function fmax44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(8) function fmax84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmax48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
            end function
            real(8) function fmin88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(4) function fmin44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(8) function fmin84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmin48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
            end function
        end module
        
        real(8) function code(eh, ew, t)
        use fmin_fmax_functions
            real(8), intent (in) :: eh
            real(8), intent (in) :: ew
            real(8), intent (in) :: t
            code = abs((((eh * sin(t)) * sin(atan(((-t / ew) * eh)))) - ((ew * cos(t)) * cos(atan(((eh * tan(t)) / -ew))))))
        end function
        
        public static double code(double eh, double ew, double t) {
        	return Math.abs((((eh * Math.sin(t)) * Math.sin(Math.atan(((-t / ew) * eh)))) - ((ew * Math.cos(t)) * Math.cos(Math.atan(((eh * Math.tan(t)) / -ew))))));
        }
        
        def code(eh, ew, t):
        	return math.fabs((((eh * math.sin(t)) * math.sin(math.atan(((-t / ew) * eh)))) - ((ew * math.cos(t)) * math.cos(math.atan(((eh * math.tan(t)) / -ew))))))
        
        function code(eh, ew, t)
        	return abs(Float64(Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(Float64(-t) / ew) * eh)))) - Float64(Float64(ew * cos(t)) * cos(atan(Float64(Float64(eh * tan(t)) / Float64(-ew)))))))
        end
        
        function tmp = code(eh, ew, t)
        	tmp = abs((((eh * sin(t)) * sin(atan(((-t / ew) * eh)))) - ((ew * cos(t)) * cos(atan(((eh * tan(t)) / -ew))))));
        end
        
        code[eh_, ew_, t_] := N[Abs[N[(N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[((-t) / ew), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / (-ew)), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
        
        \begin{array}{l}
        
        \\
        \left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{-t}{ew} \cdot eh\right) - \left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right)\right|
        \end{array}
        
        Derivation
        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 5: 88.5% accurate, 1.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \cos t \cdot ew\\ t_2 := eh \cdot \frac{\tan t}{ew}\\ t_3 := \sin t \cdot eh\\ \mathbf{if}\;eh \leq -2.6 \cdot 10^{+171} \lor \neg \left(eh \leq 3.2 \cdot 10^{+108}\right):\\ \;\;\;\;\left|t\_3 \cdot \sin \tan^{-1} \left(\frac{\sin t \cdot \left(-eh\right)}{t\_1}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{t\_1 + t\_2 \cdot t\_3}{\cosh \sinh^{-1} t\_2}\right|\\ \end{array} \end{array} \]
        (FPCore (eh ew t)
         :precision binary64
         (let* ((t_1 (* (cos t) ew)) (t_2 (* eh (/ (tan t) ew))) (t_3 (* (sin t) eh)))
           (if (or (<= eh -2.6e+171) (not (<= eh 3.2e+108)))
             (fabs (* t_3 (sin (atan (/ (* (sin t) (- eh)) t_1)))))
             (fabs (/ (+ t_1 (* t_2 t_3)) (cosh (asinh t_2)))))))
        double code(double eh, double ew, double t) {
        	double t_1 = cos(t) * ew;
        	double t_2 = eh * (tan(t) / ew);
        	double t_3 = sin(t) * eh;
        	double tmp;
        	if ((eh <= -2.6e+171) || !(eh <= 3.2e+108)) {
        		tmp = fabs((t_3 * sin(atan(((sin(t) * -eh) / t_1)))));
        	} else {
        		tmp = fabs(((t_1 + (t_2 * t_3)) / cosh(asinh(t_2))));
        	}
        	return tmp;
        }
        
        def code(eh, ew, t):
        	t_1 = math.cos(t) * ew
        	t_2 = eh * (math.tan(t) / ew)
        	t_3 = math.sin(t) * eh
        	tmp = 0
        	if (eh <= -2.6e+171) or not (eh <= 3.2e+108):
        		tmp = math.fabs((t_3 * math.sin(math.atan(((math.sin(t) * -eh) / t_1)))))
        	else:
        		tmp = math.fabs(((t_1 + (t_2 * t_3)) / math.cosh(math.asinh(t_2))))
        	return tmp
        
        function code(eh, ew, t)
        	t_1 = Float64(cos(t) * ew)
        	t_2 = Float64(eh * Float64(tan(t) / ew))
        	t_3 = Float64(sin(t) * eh)
        	tmp = 0.0
        	if ((eh <= -2.6e+171) || !(eh <= 3.2e+108))
        		tmp = abs(Float64(t_3 * sin(atan(Float64(Float64(sin(t) * Float64(-eh)) / t_1)))));
        	else
        		tmp = abs(Float64(Float64(t_1 + Float64(t_2 * t_3)) / cosh(asinh(t_2))));
        	end
        	return tmp
        end
        
        function tmp_2 = code(eh, ew, t)
        	t_1 = cos(t) * ew;
        	t_2 = eh * (tan(t) / ew);
        	t_3 = sin(t) * eh;
        	tmp = 0.0;
        	if ((eh <= -2.6e+171) || ~((eh <= 3.2e+108)))
        		tmp = abs((t_3 * sin(atan(((sin(t) * -eh) / t_1)))));
        	else
        		tmp = abs(((t_1 + (t_2 * t_3)) / cosh(asinh(t_2))));
        	end
        	tmp_2 = tmp;
        end
        
        code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]}, Block[{t$95$2 = N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision]}, If[Or[LessEqual[eh, -2.6e+171], N[Not[LessEqual[eh, 3.2e+108]], $MachinePrecision]], N[Abs[N[(t$95$3 * N[Sin[N[ArcTan[N[(N[(N[Sin[t], $MachinePrecision] * (-eh)), $MachinePrecision] / t$95$1), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(t$95$1 + N[(t$95$2 * t$95$3), $MachinePrecision]), $MachinePrecision] / N[Cosh[N[ArcSinh[t$95$2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \cos t \cdot ew\\
        t_2 := eh \cdot \frac{\tan t}{ew}\\
        t_3 := \sin t \cdot eh\\
        \mathbf{if}\;eh \leq -2.6 \cdot 10^{+171} \lor \neg \left(eh \leq 3.2 \cdot 10^{+108}\right):\\
        \;\;\;\;\left|t\_3 \cdot \sin \tan^{-1} \left(\frac{\sin t \cdot \left(-eh\right)}{t\_1}\right)\right|\\
        
        \mathbf{else}:\\
        \;\;\;\;\left|\frac{t\_1 + t\_2 \cdot t\_3}{\cosh \sinh^{-1} t\_2}\right|\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if eh < -2.6e171 or 3.1999999999999999e108 < eh

          1. Initial program 99.8%

            \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\mathsf{neg}\left(\frac{eh \cdot \sin t}{ew \cdot \cos t}\right)\right)\right)\right| \]
          9. Step-by-step derivation
            1. Applied rewrites79.9%

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

            if -2.6e171 < eh < 3.1999999999999999e108

            1. Initial program 99.8%

              \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. lift-*.f64N/A

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

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

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

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

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -2.6 \cdot 10^{+171} \lor \neg \left(eh \leq 3.2 \cdot 10^{+108}\right):\\ \;\;\;\;\left|\left(\sin t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\sin t \cdot \left(-eh\right)}{\cos t \cdot ew}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\cos t \cdot ew + \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \left(\sin t \cdot eh\right)}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}\right|\\ \end{array} \]
          12. Add Preprocessing

          Alternative 6: 86.7% accurate, 1.3× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \cos t \cdot ew\\ t_2 := \frac{\tan t}{ew}\\ \mathbf{if}\;eh \leq -2.1 \cdot 10^{+151} \lor \neg \left(eh \leq 3.2 \cdot 10^{+108}\right):\\ \;\;\;\;\left|\left(\sin t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\sin t \cdot \left(-eh\right)}{t\_1}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\sin t, t\_2 \cdot \left(eh \cdot eh\right), t\_1\right)}{\cosh \sinh^{-1} \left(t\_2 \cdot eh\right)}\right|\\ \end{array} \end{array} \]
          (FPCore (eh ew t)
           :precision binary64
           (let* ((t_1 (* (cos t) ew)) (t_2 (/ (tan t) ew)))
             (if (or (<= eh -2.1e+151) (not (<= eh 3.2e+108)))
               (fabs (* (* (sin t) eh) (sin (atan (/ (* (sin t) (- eh)) t_1)))))
               (fabs
                (/ (fma (sin t) (* t_2 (* eh eh)) t_1) (cosh (asinh (* t_2 eh))))))))
          double code(double eh, double ew, double t) {
          	double t_1 = cos(t) * ew;
          	double t_2 = tan(t) / ew;
          	double tmp;
          	if ((eh <= -2.1e+151) || !(eh <= 3.2e+108)) {
          		tmp = fabs(((sin(t) * eh) * sin(atan(((sin(t) * -eh) / t_1)))));
          	} else {
          		tmp = fabs((fma(sin(t), (t_2 * (eh * eh)), t_1) / cosh(asinh((t_2 * eh)))));
          	}
          	return tmp;
          }
          
          function code(eh, ew, t)
          	t_1 = Float64(cos(t) * ew)
          	t_2 = Float64(tan(t) / ew)
          	tmp = 0.0
          	if ((eh <= -2.1e+151) || !(eh <= 3.2e+108))
          		tmp = abs(Float64(Float64(sin(t) * eh) * sin(atan(Float64(Float64(sin(t) * Float64(-eh)) / t_1)))));
          	else
          		tmp = abs(Float64(fma(sin(t), Float64(t_2 * Float64(eh * eh)), t_1) / cosh(asinh(Float64(t_2 * eh)))));
          	end
          	return tmp
          end
          
          code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]}, Block[{t$95$2 = N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]}, If[Or[LessEqual[eh, -2.1e+151], N[Not[LessEqual[eh, 3.2e+108]], $MachinePrecision]], N[Abs[N[(N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(N[Sin[t], $MachinePrecision] * (-eh)), $MachinePrecision] / t$95$1), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[Sin[t], $MachinePrecision] * N[(t$95$2 * N[(eh * eh), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] / N[Cosh[N[ArcSinh[N[(t$95$2 * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \cos t \cdot ew\\
          t_2 := \frac{\tan t}{ew}\\
          \mathbf{if}\;eh \leq -2.1 \cdot 10^{+151} \lor \neg \left(eh \leq 3.2 \cdot 10^{+108}\right):\\
          \;\;\;\;\left|\left(\sin t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\sin t \cdot \left(-eh\right)}{t\_1}\right)\right|\\
          
          \mathbf{else}:\\
          \;\;\;\;\left|\frac{\mathsf{fma}\left(\sin t, t\_2 \cdot \left(eh \cdot eh\right), t\_1\right)}{\cosh \sinh^{-1} \left(t\_2 \cdot eh\right)}\right|\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if eh < -2.1000000000000001e151 or 3.1999999999999999e108 < eh

            1. Initial program 99.7%

              \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\mathsf{neg}\left(\frac{eh \cdot \sin t}{ew \cdot \cos t}\right)\right)\right)\right| \]
            9. Step-by-step derivation
              1. Applied rewrites78.4%

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

              if -2.1000000000000001e151 < eh < 3.1999999999999999e108

              1. Initial program 99.8%

                \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
              2. Add Preprocessing
              3. Applied rewrites91.9%

                \[\leadsto \color{blue}{\left|\frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}\right|} \]
            10. Recombined 2 regimes into one program.
            11. Final simplification88.1%

              \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -2.1 \cdot 10^{+151} \lor \neg \left(eh \leq 3.2 \cdot 10^{+108}\right):\\ \;\;\;\;\left|\left(\sin t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\sin t \cdot \left(-eh\right)}{\cos t \cdot ew}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}\right|\\ \end{array} \]
            12. Add Preprocessing

            Alternative 7: 74.9% accurate, 1.3× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|\left(\sin t \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-t\right) \cdot \mathsf{fma}\left(t \cdot t, \frac{eh}{ew} \cdot 0.3333333333333333, \frac{eh}{ew}\right)\right)\right|\\ t_2 := \cos t \cdot ew\\ \mathbf{if}\;t \leq -4.3 \cdot 10^{+123}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+45}:\\ \;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right) - \left(eh \cdot t\right) \cdot \sin \tan^{-1} \left(\frac{-t}{ew} \cdot eh\right)\right|\\ \mathbf{elif}\;t \leq 1.22 \cdot 10^{+148}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\left|t\_2 \cdot \cos \tan^{-1} \left(\frac{\sin t \cdot \left(-eh\right)}{t\_2}\right)\right|\\ \end{array} \end{array} \]
            (FPCore (eh ew t)
             :precision binary64
             (let* ((t_1
                     (fabs
                      (*
                       (* (sin t) eh)
                       (sin
                        (atan
                         (*
                          (- t)
                          (fma (* t t) (* (/ eh ew) 0.3333333333333333) (/ eh ew))))))))
                    (t_2 (* (cos t) ew)))
               (if (<= t -4.3e+123)
                 t_1
                 (if (<= t 3.1e+45)
                   (fabs
                    (-
                     (* (* ew (cos t)) (cos (atan (/ (* eh (tan t)) (- ew)))))
                     (* (* eh t) (sin (atan (* (/ (- t) ew) eh))))))
                   (if (<= t 1.22e+148)
                     t_1
                     (fabs (* t_2 (cos (atan (/ (* (sin t) (- eh)) t_2))))))))))
            double code(double eh, double ew, double t) {
            	double t_1 = fabs(((sin(t) * eh) * sin(atan((-t * fma((t * t), ((eh / ew) * 0.3333333333333333), (eh / ew)))))));
            	double t_2 = cos(t) * ew;
            	double tmp;
            	if (t <= -4.3e+123) {
            		tmp = t_1;
            	} else if (t <= 3.1e+45) {
            		tmp = fabs((((ew * cos(t)) * cos(atan(((eh * tan(t)) / -ew)))) - ((eh * t) * sin(atan(((-t / ew) * eh))))));
            	} else if (t <= 1.22e+148) {
            		tmp = t_1;
            	} else {
            		tmp = fabs((t_2 * cos(atan(((sin(t) * -eh) / t_2)))));
            	}
            	return tmp;
            }
            
            function code(eh, ew, t)
            	t_1 = abs(Float64(Float64(sin(t) * eh) * sin(atan(Float64(Float64(-t) * fma(Float64(t * t), Float64(Float64(eh / ew) * 0.3333333333333333), Float64(eh / ew)))))))
            	t_2 = Float64(cos(t) * ew)
            	tmp = 0.0
            	if (t <= -4.3e+123)
            		tmp = t_1;
            	elseif (t <= 3.1e+45)
            		tmp = abs(Float64(Float64(Float64(ew * cos(t)) * cos(atan(Float64(Float64(eh * tan(t)) / Float64(-ew))))) - Float64(Float64(eh * t) * sin(atan(Float64(Float64(Float64(-t) / ew) * eh))))));
            	elseif (t <= 1.22e+148)
            		tmp = t_1;
            	else
            		tmp = abs(Float64(t_2 * cos(atan(Float64(Float64(sin(t) * Float64(-eh)) / t_2)))));
            	end
            	return tmp
            end
            
            code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision] * N[Sin[N[ArcTan[N[((-t) * N[(N[(t * t), $MachinePrecision] * N[(N[(eh / ew), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] + N[(eh / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]}, If[LessEqual[t, -4.3e+123], t$95$1, If[LessEqual[t, 3.1e+45], N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / (-ew)), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * t), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[((-t) / ew), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.22e+148], t$95$1, N[Abs[N[(t$95$2 * N[Cos[N[ArcTan[N[(N[(N[Sin[t], $MachinePrecision] * (-eh)), $MachinePrecision] / t$95$2), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \left|\left(\sin t \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-t\right) \cdot \mathsf{fma}\left(t \cdot t, \frac{eh}{ew} \cdot 0.3333333333333333, \frac{eh}{ew}\right)\right)\right|\\
            t_2 := \cos t \cdot ew\\
            \mathbf{if}\;t \leq -4.3 \cdot 10^{+123}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;t \leq 3.1 \cdot 10^{+45}:\\
            \;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right) - \left(eh \cdot t\right) \cdot \sin \tan^{-1} \left(\frac{-t}{ew} \cdot eh\right)\right|\\
            
            \mathbf{elif}\;t \leq 1.22 \cdot 10^{+148}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{else}:\\
            \;\;\;\;\left|t\_2 \cdot \cos \tan^{-1} \left(\frac{\sin t \cdot \left(-eh\right)}{t\_2}\right)\right|\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if t < -4.29999999999999986e123 or 3.09999999999999988e45 < t < 1.22000000000000007e148

              1. Initial program 99.6%

                \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
              2. Add Preprocessing
              3. Step-by-step derivation
                1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\mathsf{neg}\left(\frac{eh \cdot \sin t}{ew \cdot \cos t}\right)\right)\right)\right| \]
              9. Step-by-step derivation
                1. Applied rewrites68.5%

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

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

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

                  if -4.29999999999999986e123 < t < 3.09999999999999988e45

                  1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 1.22000000000000007e148 < t

                  1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.3 \cdot 10^{+123}:\\ \;\;\;\;\left|\left(\sin t \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-t\right) \cdot \mathsf{fma}\left(t \cdot t, \frac{eh}{ew} \cdot 0.3333333333333333, \frac{eh}{ew}\right)\right)\right|\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+45}:\\ \;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right) - \left(eh \cdot t\right) \cdot \sin \tan^{-1} \left(\frac{-t}{ew} \cdot eh\right)\right|\\ \mathbf{elif}\;t \leq 1.22 \cdot 10^{+148}:\\ \;\;\;\;\left|\left(\sin t \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-t\right) \cdot \mathsf{fma}\left(t \cdot t, \frac{eh}{ew} \cdot 0.3333333333333333, \frac{eh}{ew}\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(\cos t \cdot ew\right) \cdot \cos \tan^{-1} \left(\frac{\sin t \cdot \left(-eh\right)}{\cos t \cdot ew}\right)\right|\\ \end{array} \]
                  9. Add Preprocessing

                  Alternative 8: 74.0% accurate, 1.4× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \cos t \cdot ew\\ \mathbf{if}\;t \leq -7.5 \cdot 10^{+128}:\\ \;\;\;\;\left|\left(\sin t \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-t\right) \cdot \mathsf{fma}\left(t \cdot t, \frac{eh}{ew} \cdot 0.3333333333333333, \frac{eh}{ew}\right)\right)\right|\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{+15} \lor \neg \left(t \leq 1.35 \cdot 10^{-17}\right):\\ \;\;\;\;\left|t\_1 \cdot \cos \tan^{-1} \left(\frac{\sin t \cdot \left(-eh\right)}{t\_1}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\mathsf{fma}\left(\mathsf{fma}\left(0.041666666666666664, \left(t \cdot t\right) \cdot ew, -0.5 \cdot ew\right), t \cdot t, ew\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right) - \left(eh \cdot t\right) \cdot \sin \tan^{-1} \left(\frac{-t}{ew} \cdot eh\right)\right|\\ \end{array} \end{array} \]
                  (FPCore (eh ew t)
                   :precision binary64
                   (let* ((t_1 (* (cos t) ew)))
                     (if (<= t -7.5e+128)
                       (fabs
                        (*
                         (* (sin t) eh)
                         (sin
                          (atan
                           (* (- t) (fma (* t t) (* (/ eh ew) 0.3333333333333333) (/ eh ew)))))))
                       (if (or (<= t -2.6e+15) (not (<= t 1.35e-17)))
                         (fabs (* t_1 (cos (atan (/ (* (sin t) (- eh)) t_1)))))
                         (fabs
                          (-
                           (*
                            (fma
                             (fma 0.041666666666666664 (* (* t t) ew) (* -0.5 ew))
                             (* t t)
                             ew)
                            (cos (atan (/ (* eh (tan t)) (- ew)))))
                           (* (* eh t) (sin (atan (* (/ (- t) ew) eh))))))))))
                  double code(double eh, double ew, double t) {
                  	double t_1 = cos(t) * ew;
                  	double tmp;
                  	if (t <= -7.5e+128) {
                  		tmp = fabs(((sin(t) * eh) * sin(atan((-t * fma((t * t), ((eh / ew) * 0.3333333333333333), (eh / ew)))))));
                  	} else if ((t <= -2.6e+15) || !(t <= 1.35e-17)) {
                  		tmp = fabs((t_1 * cos(atan(((sin(t) * -eh) / t_1)))));
                  	} else {
                  		tmp = fabs(((fma(fma(0.041666666666666664, ((t * t) * ew), (-0.5 * ew)), (t * t), ew) * cos(atan(((eh * tan(t)) / -ew)))) - ((eh * t) * sin(atan(((-t / ew) * eh))))));
                  	}
                  	return tmp;
                  }
                  
                  function code(eh, ew, t)
                  	t_1 = Float64(cos(t) * ew)
                  	tmp = 0.0
                  	if (t <= -7.5e+128)
                  		tmp = abs(Float64(Float64(sin(t) * eh) * sin(atan(Float64(Float64(-t) * fma(Float64(t * t), Float64(Float64(eh / ew) * 0.3333333333333333), Float64(eh / ew)))))));
                  	elseif ((t <= -2.6e+15) || !(t <= 1.35e-17))
                  		tmp = abs(Float64(t_1 * cos(atan(Float64(Float64(sin(t) * Float64(-eh)) / t_1)))));
                  	else
                  		tmp = abs(Float64(Float64(fma(fma(0.041666666666666664, Float64(Float64(t * t) * ew), Float64(-0.5 * ew)), Float64(t * t), ew) * cos(atan(Float64(Float64(eh * tan(t)) / Float64(-ew))))) - Float64(Float64(eh * t) * sin(atan(Float64(Float64(Float64(-t) / ew) * eh))))));
                  	end
                  	return tmp
                  end
                  
                  code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]}, If[LessEqual[t, -7.5e+128], N[Abs[N[(N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision] * N[Sin[N[ArcTan[N[((-t) * N[(N[(t * t), $MachinePrecision] * N[(N[(eh / ew), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] + N[(eh / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[t, -2.6e+15], N[Not[LessEqual[t, 1.35e-17]], $MachinePrecision]], N[Abs[N[(t$95$1 * N[Cos[N[ArcTan[N[(N[(N[Sin[t], $MachinePrecision] * (-eh)), $MachinePrecision] / t$95$1), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(N[(0.041666666666666664 * N[(N[(t * t), $MachinePrecision] * ew), $MachinePrecision] + N[(-0.5 * ew), $MachinePrecision]), $MachinePrecision] * N[(t * t), $MachinePrecision] + ew), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / (-ew)), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * t), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[((-t) / ew), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := \cos t \cdot ew\\
                  \mathbf{if}\;t \leq -7.5 \cdot 10^{+128}:\\
                  \;\;\;\;\left|\left(\sin t \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-t\right) \cdot \mathsf{fma}\left(t \cdot t, \frac{eh}{ew} \cdot 0.3333333333333333, \frac{eh}{ew}\right)\right)\right|\\
                  
                  \mathbf{elif}\;t \leq -2.6 \cdot 10^{+15} \lor \neg \left(t \leq 1.35 \cdot 10^{-17}\right):\\
                  \;\;\;\;\left|t\_1 \cdot \cos \tan^{-1} \left(\frac{\sin t \cdot \left(-eh\right)}{t\_1}\right)\right|\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\left|\mathsf{fma}\left(\mathsf{fma}\left(0.041666666666666664, \left(t \cdot t\right) \cdot ew, -0.5 \cdot ew\right), t \cdot t, ew\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right) - \left(eh \cdot t\right) \cdot \sin \tan^{-1} \left(\frac{-t}{ew} \cdot eh\right)\right|\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if t < -7.50000000000000076e128

                    1. Initial program 99.5%

                      \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
                    2. Add Preprocessing
                    3. Step-by-step derivation
                      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\mathsf{neg}\left(\frac{eh \cdot \sin t}{ew \cdot \cos t}\right)\right)\right)\right| \]
                    9. Step-by-step derivation
                      1. Applied rewrites74.1%

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

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

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

                        if -7.50000000000000076e128 < t < -2.6e15 or 1.3500000000000001e-17 < t

                        1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -2.6e15 < t < 1.3500000000000001e-17

                          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \left|\mathsf{fma}\left(\mathsf{fma}\left(\frac{1}{24}, \left(t \cdot t\right) \cdot ew, \frac{-1}{2} \cdot ew\right), \color{blue}{t \cdot t}, ew\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot t\right) \cdot \sin \tan^{-1} \left(\frac{-t}{ew} \cdot eh\right)\right| \]
                            12. lower-*.f6497.8

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

                            \[\leadsto \left|\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(0.041666666666666664, \left(t \cdot t\right) \cdot ew, -0.5 \cdot ew\right), t \cdot t, ew\right)} \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot t\right) \cdot \sin \tan^{-1} \left(\frac{-t}{ew} \cdot eh\right)\right| \]
                        7. Recombined 3 regimes into one program.
                        8. Final simplification80.7%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+128}:\\ \;\;\;\;\left|\left(\sin t \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-t\right) \cdot \mathsf{fma}\left(t \cdot t, \frac{eh}{ew} \cdot 0.3333333333333333, \frac{eh}{ew}\right)\right)\right|\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{+15} \lor \neg \left(t \leq 1.35 \cdot 10^{-17}\right):\\ \;\;\;\;\left|\left(\cos t \cdot ew\right) \cdot \cos \tan^{-1} \left(\frac{\sin t \cdot \left(-eh\right)}{\cos t \cdot ew}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\mathsf{fma}\left(\mathsf{fma}\left(0.041666666666666664, \left(t \cdot t\right) \cdot ew, -0.5 \cdot ew\right), t \cdot t, ew\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right) - \left(eh \cdot t\right) \cdot \sin \tan^{-1} \left(\frac{-t}{ew} \cdot eh\right)\right|\\ \end{array} \]
                        9. Add Preprocessing

                        Alternative 9: 75.6% accurate, 1.6× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \cos t \cdot ew\\ t_2 := \tan^{-1} \left(\frac{\sin t \cdot \left(-eh\right)}{t\_1}\right)\\ \mathbf{if}\;eh \leq -9.5 \cdot 10^{+57} \lor \neg \left(eh \leq 5 \cdot 10^{+90}\right):\\ \;\;\;\;\left|\left(\sin t \cdot eh\right) \cdot \sin t\_2\right|\\ \mathbf{else}:\\ \;\;\;\;\left|t\_1 \cdot \cos t\_2\right|\\ \end{array} \end{array} \]
                        (FPCore (eh ew t)
                         :precision binary64
                         (let* ((t_1 (* (cos t) ew)) (t_2 (atan (/ (* (sin t) (- eh)) t_1))))
                           (if (or (<= eh -9.5e+57) (not (<= eh 5e+90)))
                             (fabs (* (* (sin t) eh) (sin t_2)))
                             (fabs (* t_1 (cos t_2))))))
                        double code(double eh, double ew, double t) {
                        	double t_1 = cos(t) * ew;
                        	double t_2 = atan(((sin(t) * -eh) / t_1));
                        	double tmp;
                        	if ((eh <= -9.5e+57) || !(eh <= 5e+90)) {
                        		tmp = fabs(((sin(t) * eh) * sin(t_2)));
                        	} else {
                        		tmp = fabs((t_1 * cos(t_2)));
                        	}
                        	return tmp;
                        }
                        
                        module fmin_fmax_functions
                            implicit none
                            private
                            public fmax
                            public fmin
                        
                            interface fmax
                                module procedure fmax88
                                module procedure fmax44
                                module procedure fmax84
                                module procedure fmax48
                            end interface
                            interface fmin
                                module procedure fmin88
                                module procedure fmin44
                                module procedure fmin84
                                module procedure fmin48
                            end interface
                        contains
                            real(8) function fmax88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmax44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmax84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmax48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                            end function
                            real(8) function fmin88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmin44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmin84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmin48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                            end function
                        end module
                        
                        real(8) function code(eh, ew, t)
                        use fmin_fmax_functions
                            real(8), intent (in) :: eh
                            real(8), intent (in) :: ew
                            real(8), intent (in) :: t
                            real(8) :: t_1
                            real(8) :: t_2
                            real(8) :: tmp
                            t_1 = cos(t) * ew
                            t_2 = atan(((sin(t) * -eh) / t_1))
                            if ((eh <= (-9.5d+57)) .or. (.not. (eh <= 5d+90))) then
                                tmp = abs(((sin(t) * eh) * sin(t_2)))
                            else
                                tmp = abs((t_1 * cos(t_2)))
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double eh, double ew, double t) {
                        	double t_1 = Math.cos(t) * ew;
                        	double t_2 = Math.atan(((Math.sin(t) * -eh) / t_1));
                        	double tmp;
                        	if ((eh <= -9.5e+57) || !(eh <= 5e+90)) {
                        		tmp = Math.abs(((Math.sin(t) * eh) * Math.sin(t_2)));
                        	} else {
                        		tmp = Math.abs((t_1 * Math.cos(t_2)));
                        	}
                        	return tmp;
                        }
                        
                        def code(eh, ew, t):
                        	t_1 = math.cos(t) * ew
                        	t_2 = math.atan(((math.sin(t) * -eh) / t_1))
                        	tmp = 0
                        	if (eh <= -9.5e+57) or not (eh <= 5e+90):
                        		tmp = math.fabs(((math.sin(t) * eh) * math.sin(t_2)))
                        	else:
                        		tmp = math.fabs((t_1 * math.cos(t_2)))
                        	return tmp
                        
                        function code(eh, ew, t)
                        	t_1 = Float64(cos(t) * ew)
                        	t_2 = atan(Float64(Float64(sin(t) * Float64(-eh)) / t_1))
                        	tmp = 0.0
                        	if ((eh <= -9.5e+57) || !(eh <= 5e+90))
                        		tmp = abs(Float64(Float64(sin(t) * eh) * sin(t_2)));
                        	else
                        		tmp = abs(Float64(t_1 * cos(t_2)));
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(eh, ew, t)
                        	t_1 = cos(t) * ew;
                        	t_2 = atan(((sin(t) * -eh) / t_1));
                        	tmp = 0.0;
                        	if ((eh <= -9.5e+57) || ~((eh <= 5e+90)))
                        		tmp = abs(((sin(t) * eh) * sin(t_2)));
                        	else
                        		tmp = abs((t_1 * cos(t_2)));
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]}, Block[{t$95$2 = N[ArcTan[N[(N[(N[Sin[t], $MachinePrecision] * (-eh)), $MachinePrecision] / t$95$1), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[eh, -9.5e+57], N[Not[LessEqual[eh, 5e+90]], $MachinePrecision]], N[Abs[N[(N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(t$95$1 * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_1 := \cos t \cdot ew\\
                        t_2 := \tan^{-1} \left(\frac{\sin t \cdot \left(-eh\right)}{t\_1}\right)\\
                        \mathbf{if}\;eh \leq -9.5 \cdot 10^{+57} \lor \neg \left(eh \leq 5 \cdot 10^{+90}\right):\\
                        \;\;\;\;\left|\left(\sin t \cdot eh\right) \cdot \sin t\_2\right|\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\left|t\_1 \cdot \cos t\_2\right|\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if eh < -9.4999999999999997e57 or 5.0000000000000004e90 < eh

                          1. Initial program 99.7%

                            \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
                          2. Add Preprocessing
                          3. Step-by-step derivation
                            1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\mathsf{neg}\left(\frac{eh \cdot \sin t}{ew \cdot \cos t}\right)\right)\right)\right| \]
                          9. Step-by-step derivation
                            1. Applied rewrites73.5%

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

                            if -9.4999999999999997e57 < eh < 5.0000000000000004e90

                            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 10: 64.1% accurate, 1.8× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -2.6 \cdot 10^{-28} \lor \neg \left(ew \leq 3.6 \cdot 10^{-25}\right):\\ \;\;\;\;\left|\mathsf{fma}\left(\left(-eh\right) \cdot \frac{t \cdot t}{ew}, eh, \left(\cos \tan^{-1} \left(\frac{eh}{ew} \cdot \tan t\right) \cdot \left(-\cos t\right)\right) \cdot ew\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(\tanh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right) \cdot eh\right) \cdot \sin t\right|\\ \end{array} \end{array} \]
                            (FPCore (eh ew t)
                             :precision binary64
                             (if (or (<= ew -2.6e-28) (not (<= ew 3.6e-25)))
                               (fabs
                                (fma
                                 (* (- eh) (/ (* t t) ew))
                                 eh
                                 (* (* (cos (atan (* (/ eh ew) (tan t)))) (- (cos t))) ew)))
                               (fabs (* (* (tanh (asinh (* (/ (tan t) ew) (- eh)))) eh) (sin t)))))
                            double code(double eh, double ew, double t) {
                            	double tmp;
                            	if ((ew <= -2.6e-28) || !(ew <= 3.6e-25)) {
                            		tmp = fabs(fma((-eh * ((t * t) / ew)), eh, ((cos(atan(((eh / ew) * tan(t)))) * -cos(t)) * ew)));
                            	} else {
                            		tmp = fabs(((tanh(asinh(((tan(t) / ew) * -eh))) * eh) * sin(t)));
                            	}
                            	return tmp;
                            }
                            
                            function code(eh, ew, t)
                            	tmp = 0.0
                            	if ((ew <= -2.6e-28) || !(ew <= 3.6e-25))
                            		tmp = abs(fma(Float64(Float64(-eh) * Float64(Float64(t * t) / ew)), eh, Float64(Float64(cos(atan(Float64(Float64(eh / ew) * tan(t)))) * Float64(-cos(t))) * ew)));
                            	else
                            		tmp = abs(Float64(Float64(tanh(asinh(Float64(Float64(tan(t) / ew) * Float64(-eh)))) * eh) * sin(t)));
                            	end
                            	return tmp
                            end
                            
                            code[eh_, ew_, t_] := If[Or[LessEqual[ew, -2.6e-28], N[Not[LessEqual[ew, 3.6e-25]], $MachinePrecision]], N[Abs[N[(N[((-eh) * N[(N[(t * t), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision] * eh + N[(N[(N[Cos[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] * N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * (-N[Cos[t], $MachinePrecision])), $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[Tanh[N[ArcSinh[N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * (-eh)), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;ew \leq -2.6 \cdot 10^{-28} \lor \neg \left(ew \leq 3.6 \cdot 10^{-25}\right):\\
                            \;\;\;\;\left|\mathsf{fma}\left(\left(-eh\right) \cdot \frac{t \cdot t}{ew}, eh, \left(\cos \tan^{-1} \left(\frac{eh}{ew} \cdot \tan t\right) \cdot \left(-\cos t\right)\right) \cdot ew\right)\right|\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\left|\left(\tanh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right) \cdot eh\right) \cdot \sin t\right|\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if ew < -2.6e-28 or 3.5999999999999999e-25 < ew

                              1. Initial program 99.8%

                                \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
                              2. Add Preprocessing
                              3. Step-by-step derivation
                                1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if -2.6e-28 < ew < 3.5999999999999999e-25

                                1. Initial program 99.8%

                                  \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
                                2. Add Preprocessing
                                3. Step-by-step derivation
                                  1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \left|\left(\tanh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right) \cdot eh\right) \cdot \sin t\right| \]
                                10. Recombined 2 regimes into one program.
                                11. Final simplification66.4%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -2.6 \cdot 10^{-28} \lor \neg \left(ew \leq 3.6 \cdot 10^{-25}\right):\\ \;\;\;\;\left|\mathsf{fma}\left(\left(-eh\right) \cdot \frac{t \cdot t}{ew}, eh, \left(\cos \tan^{-1} \left(\frac{eh}{ew} \cdot \tan t\right) \cdot \left(-\cos t\right)\right) \cdot ew\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(\tanh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot \left(-eh\right)\right) \cdot eh\right) \cdot \sin t\right|\\ \end{array} \]
                                12. Add Preprocessing

                                Alternative 11: 61.1% accurate, 2.3× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.3 \cdot 10^{-40} \lor \neg \left(t \leq 245000\right):\\ \;\;\;\;\left|\left(\sin t \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-t\right) \cdot \mathsf{fma}\left(t \cdot t, \frac{eh}{ew} \cdot 0.3333333333333333, \frac{eh}{ew}\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{ew}{1}\right|\\ \end{array} \end{array} \]
                                (FPCore (eh ew t)
                                 :precision binary64
                                 (if (or (<= t -4.3e-40) (not (<= t 245000.0)))
                                   (fabs
                                    (*
                                     (* (sin t) eh)
                                     (sin
                                      (atan
                                       (* (- t) (fma (* t t) (* (/ eh ew) 0.3333333333333333) (/ eh ew)))))))
                                   (fabs (/ ew 1.0))))
                                double code(double eh, double ew, double t) {
                                	double tmp;
                                	if ((t <= -4.3e-40) || !(t <= 245000.0)) {
                                		tmp = fabs(((sin(t) * eh) * sin(atan((-t * fma((t * t), ((eh / ew) * 0.3333333333333333), (eh / ew)))))));
                                	} else {
                                		tmp = fabs((ew / 1.0));
                                	}
                                	return tmp;
                                }
                                
                                function code(eh, ew, t)
                                	tmp = 0.0
                                	if ((t <= -4.3e-40) || !(t <= 245000.0))
                                		tmp = abs(Float64(Float64(sin(t) * eh) * sin(atan(Float64(Float64(-t) * fma(Float64(t * t), Float64(Float64(eh / ew) * 0.3333333333333333), Float64(eh / ew)))))));
                                	else
                                		tmp = abs(Float64(ew / 1.0));
                                	end
                                	return tmp
                                end
                                
                                code[eh_, ew_, t_] := If[Or[LessEqual[t, -4.3e-40], N[Not[LessEqual[t, 245000.0]], $MachinePrecision]], N[Abs[N[(N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision] * N[Sin[N[ArcTan[N[((-t) * N[(N[(t * t), $MachinePrecision] * N[(N[(eh / ew), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] + N[(eh / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew / 1.0), $MachinePrecision]], $MachinePrecision]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;t \leq -4.3 \cdot 10^{-40} \lor \neg \left(t \leq 245000\right):\\
                                \;\;\;\;\left|\left(\sin t \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-t\right) \cdot \mathsf{fma}\left(t \cdot t, \frac{eh}{ew} \cdot 0.3333333333333333, \frac{eh}{ew}\right)\right)\right|\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\left|\frac{ew}{1}\right|\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if t < -4.3000000000000003e-40 or 245000 < t

                                  1. Initial program 99.6%

                                    \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
                                  2. Add Preprocessing
                                  3. Step-by-step derivation
                                    1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\mathsf{neg}\left(\frac{eh \cdot \sin t}{ew \cdot \cos t}\right)\right)\right)\right| \]
                                  9. Step-by-step derivation
                                    1. Applied rewrites54.7%

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

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

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

                                      if -4.3000000000000003e-40 < t < 245000

                                      1. Initial program 100.0%

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

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

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

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

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

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

                                          \[\leadsto \left|\frac{ew \cdot 1}{1}\right| \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites73.9%

                                            \[\leadsto \left|\frac{ew \cdot 1}{1}\right| \]
                                        4. Recombined 2 regimes into one program.
                                        5. Final simplification63.9%

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.3 \cdot 10^{-40} \lor \neg \left(t \leq 245000\right):\\ \;\;\;\;\left|\left(\sin t \cdot eh\right) \cdot \sin \tan^{-1} \left(\left(-t\right) \cdot \mathsf{fma}\left(t \cdot t, \frac{eh}{ew} \cdot 0.3333333333333333, \frac{eh}{ew}\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{ew}{1}\right|\\ \end{array} \]
                                        6. Add Preprocessing

                                        Alternative 12: 19.8% accurate, 50.7× speedup?

                                        \[\begin{array}{l} \\ \mathsf{fma}\left(\left(-0.5 \cdot ew\right) \cdot t, t, ew\right) \end{array} \]
                                        (FPCore (eh ew t) :precision binary64 (fma (* (* -0.5 ew) t) t ew))
                                        double code(double eh, double ew, double t) {
                                        	return fma(((-0.5 * ew) * t), t, ew);
                                        }
                                        
                                        function code(eh, ew, t)
                                        	return fma(Float64(Float64(-0.5 * ew) * t), t, ew)
                                        end
                                        
                                        code[eh_, ew_, t_] := N[(N[(N[(-0.5 * ew), $MachinePrecision] * t), $MachinePrecision] * t + ew), $MachinePrecision]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \mathsf{fma}\left(\left(-0.5 \cdot ew\right) \cdot t, t, ew\right)
                                        \end{array}
                                        
                                        Derivation
                                        1. Initial program 99.8%

                                          \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
                                        2. Add Preprocessing
                                        3. Applied rewrites39.0%

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

                                          \[\leadsto \color{blue}{ew + {t}^{2} \cdot \left(\left(\frac{-1}{2} \cdot ew + \frac{{eh}^{2}}{ew}\right) - \frac{1}{2} \cdot \frac{{eh}^{2}}{ew}\right)} \]
                                        5. Step-by-step derivation
                                          1. +-commutativeN/A

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

                                            \[\leadsto \color{blue}{\left(\left(\frac{-1}{2} \cdot ew + \frac{{eh}^{2}}{ew}\right) - \frac{1}{2} \cdot \frac{{eh}^{2}}{ew}\right) \cdot {t}^{2}} + ew \]
                                          3. lower-fma.f64N/A

                                            \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\frac{-1}{2} \cdot ew + \frac{{eh}^{2}}{ew}\right) - \frac{1}{2} \cdot \frac{{eh}^{2}}{ew}, {t}^{2}, ew\right)} \]
                                          4. lower--.f64N/A

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

                                            \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\frac{-1}{2}, ew, \frac{{eh}^{2}}{ew}\right)} - \frac{1}{2} \cdot \frac{{eh}^{2}}{ew}, {t}^{2}, ew\right) \]
                                          6. lower-/.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{2}, ew, \color{blue}{\frac{{eh}^{2}}{ew}}\right) - \frac{1}{2} \cdot \frac{{eh}^{2}}{ew}, {t}^{2}, ew\right) \]
                                          7. unpow2N/A

                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{2}, ew, \frac{\color{blue}{eh \cdot eh}}{ew}\right) - \frac{1}{2} \cdot \frac{{eh}^{2}}{ew}, {t}^{2}, ew\right) \]
                                          8. lower-*.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{2}, ew, \frac{\color{blue}{eh \cdot eh}}{ew}\right) - \frac{1}{2} \cdot \frac{{eh}^{2}}{ew}, {t}^{2}, ew\right) \]
                                          9. *-commutativeN/A

                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{2}, ew, \frac{eh \cdot eh}{ew}\right) - \color{blue}{\frac{{eh}^{2}}{ew} \cdot \frac{1}{2}}, {t}^{2}, ew\right) \]
                                          10. lower-*.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{2}, ew, \frac{eh \cdot eh}{ew}\right) - \color{blue}{\frac{{eh}^{2}}{ew} \cdot \frac{1}{2}}, {t}^{2}, ew\right) \]
                                          11. lower-/.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{2}, ew, \frac{eh \cdot eh}{ew}\right) - \color{blue}{\frac{{eh}^{2}}{ew}} \cdot \frac{1}{2}, {t}^{2}, ew\right) \]
                                          12. unpow2N/A

                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{2}, ew, \frac{eh \cdot eh}{ew}\right) - \frac{\color{blue}{eh \cdot eh}}{ew} \cdot \frac{1}{2}, {t}^{2}, ew\right) \]
                                          13. lower-*.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{2}, ew, \frac{eh \cdot eh}{ew}\right) - \frac{\color{blue}{eh \cdot eh}}{ew} \cdot \frac{1}{2}, {t}^{2}, ew\right) \]
                                          14. unpow2N/A

                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{2}, ew, \frac{eh \cdot eh}{ew}\right) - \frac{eh \cdot eh}{ew} \cdot \frac{1}{2}, \color{blue}{t \cdot t}, ew\right) \]
                                          15. lower-*.f6418.2

                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-0.5, ew, \frac{eh \cdot eh}{ew}\right) - \frac{eh \cdot eh}{ew} \cdot 0.5, \color{blue}{t \cdot t}, ew\right) \]
                                        6. Applied rewrites18.2%

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-0.5, ew, \frac{eh \cdot eh}{ew}\right) - \frac{eh \cdot eh}{ew} \cdot 0.5, t \cdot t, ew\right)} \]
                                        7. Taylor expanded in eh around 0

                                          \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot ew, \color{blue}{t} \cdot t, ew\right) \]
                                        8. Step-by-step derivation
                                          1. Applied rewrites21.6%

                                            \[\leadsto \mathsf{fma}\left(-0.5 \cdot ew, \color{blue}{t} \cdot t, ew\right) \]
                                          2. Step-by-step derivation
                                            1. Applied rewrites21.7%

                                              \[\leadsto \mathsf{fma}\left(\left(-0.5 \cdot ew\right) \cdot t, \color{blue}{t}, ew\right) \]
                                            2. Add Preprocessing

                                            Alternative 13: 19.8% accurate, 50.7× speedup?

                                            \[\begin{array}{l} \\ \mathsf{fma}\left(-0.5 \cdot ew, t \cdot t, ew\right) \end{array} \]
                                            (FPCore (eh ew t) :precision binary64 (fma (* -0.5 ew) (* t t) ew))
                                            double code(double eh, double ew, double t) {
                                            	return fma((-0.5 * ew), (t * t), ew);
                                            }
                                            
                                            function code(eh, ew, t)
                                            	return fma(Float64(-0.5 * ew), Float64(t * t), ew)
                                            end
                                            
                                            code[eh_, ew_, t_] := N[(N[(-0.5 * ew), $MachinePrecision] * N[(t * t), $MachinePrecision] + ew), $MachinePrecision]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \mathsf{fma}\left(-0.5 \cdot ew, t \cdot t, ew\right)
                                            \end{array}
                                            
                                            Derivation
                                            1. Initial program 99.8%

                                              \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
                                            2. Add Preprocessing
                                            3. Applied rewrites39.0%

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

                                              \[\leadsto \color{blue}{ew + {t}^{2} \cdot \left(\left(\frac{-1}{2} \cdot ew + \frac{{eh}^{2}}{ew}\right) - \frac{1}{2} \cdot \frac{{eh}^{2}}{ew}\right)} \]
                                            5. Step-by-step derivation
                                              1. +-commutativeN/A

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

                                                \[\leadsto \color{blue}{\left(\left(\frac{-1}{2} \cdot ew + \frac{{eh}^{2}}{ew}\right) - \frac{1}{2} \cdot \frac{{eh}^{2}}{ew}\right) \cdot {t}^{2}} + ew \]
                                              3. lower-fma.f64N/A

                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\frac{-1}{2} \cdot ew + \frac{{eh}^{2}}{ew}\right) - \frac{1}{2} \cdot \frac{{eh}^{2}}{ew}, {t}^{2}, ew\right)} \]
                                              4. lower--.f64N/A

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

                                                \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\frac{-1}{2}, ew, \frac{{eh}^{2}}{ew}\right)} - \frac{1}{2} \cdot \frac{{eh}^{2}}{ew}, {t}^{2}, ew\right) \]
                                              6. lower-/.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{2}, ew, \color{blue}{\frac{{eh}^{2}}{ew}}\right) - \frac{1}{2} \cdot \frac{{eh}^{2}}{ew}, {t}^{2}, ew\right) \]
                                              7. unpow2N/A

                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{2}, ew, \frac{\color{blue}{eh \cdot eh}}{ew}\right) - \frac{1}{2} \cdot \frac{{eh}^{2}}{ew}, {t}^{2}, ew\right) \]
                                              8. lower-*.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{2}, ew, \frac{\color{blue}{eh \cdot eh}}{ew}\right) - \frac{1}{2} \cdot \frac{{eh}^{2}}{ew}, {t}^{2}, ew\right) \]
                                              9. *-commutativeN/A

                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{2}, ew, \frac{eh \cdot eh}{ew}\right) - \color{blue}{\frac{{eh}^{2}}{ew} \cdot \frac{1}{2}}, {t}^{2}, ew\right) \]
                                              10. lower-*.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{2}, ew, \frac{eh \cdot eh}{ew}\right) - \color{blue}{\frac{{eh}^{2}}{ew} \cdot \frac{1}{2}}, {t}^{2}, ew\right) \]
                                              11. lower-/.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{2}, ew, \frac{eh \cdot eh}{ew}\right) - \color{blue}{\frac{{eh}^{2}}{ew}} \cdot \frac{1}{2}, {t}^{2}, ew\right) \]
                                              12. unpow2N/A

                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{2}, ew, \frac{eh \cdot eh}{ew}\right) - \frac{\color{blue}{eh \cdot eh}}{ew} \cdot \frac{1}{2}, {t}^{2}, ew\right) \]
                                              13. lower-*.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{2}, ew, \frac{eh \cdot eh}{ew}\right) - \frac{\color{blue}{eh \cdot eh}}{ew} \cdot \frac{1}{2}, {t}^{2}, ew\right) \]
                                              14. unpow2N/A

                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{2}, ew, \frac{eh \cdot eh}{ew}\right) - \frac{eh \cdot eh}{ew} \cdot \frac{1}{2}, \color{blue}{t \cdot t}, ew\right) \]
                                              15. lower-*.f6418.2

                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-0.5, ew, \frac{eh \cdot eh}{ew}\right) - \frac{eh \cdot eh}{ew} \cdot 0.5, \color{blue}{t \cdot t}, ew\right) \]
                                            6. Applied rewrites18.2%

                                              \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-0.5, ew, \frac{eh \cdot eh}{ew}\right) - \frac{eh \cdot eh}{ew} \cdot 0.5, t \cdot t, ew\right)} \]
                                            7. Taylor expanded in eh around 0

                                              \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot ew, \color{blue}{t} \cdot t, ew\right) \]
                                            8. Step-by-step derivation
                                              1. Applied rewrites21.6%

                                                \[\leadsto \mathsf{fma}\left(-0.5 \cdot ew, \color{blue}{t} \cdot t, ew\right) \]
                                              2. Add Preprocessing

                                              Alternative 14: 42.2% accurate, 61.6× speedup?

                                              \[\begin{array}{l} \\ \left|\frac{ew}{1}\right| \end{array} \]
                                              (FPCore (eh ew t) :precision binary64 (fabs (/ ew 1.0)))
                                              double code(double eh, double ew, double t) {
                                              	return fabs((ew / 1.0));
                                              }
                                              
                                              module fmin_fmax_functions
                                                  implicit none
                                                  private
                                                  public fmax
                                                  public fmin
                                              
                                                  interface fmax
                                                      module procedure fmax88
                                                      module procedure fmax44
                                                      module procedure fmax84
                                                      module procedure fmax48
                                                  end interface
                                                  interface fmin
                                                      module procedure fmin88
                                                      module procedure fmin44
                                                      module procedure fmin84
                                                      module procedure fmin48
                                                  end interface
                                              contains
                                                  real(8) function fmax88(x, y) result (res)
                                                      real(8), intent (in) :: x
                                                      real(8), intent (in) :: y
                                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                  end function
                                                  real(4) function fmax44(x, y) result (res)
                                                      real(4), intent (in) :: x
                                                      real(4), intent (in) :: y
                                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                  end function
                                                  real(8) function fmax84(x, y) result(res)
                                                      real(8), intent (in) :: x
                                                      real(4), intent (in) :: y
                                                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                  end function
                                                  real(8) function fmax48(x, y) result(res)
                                                      real(4), intent (in) :: x
                                                      real(8), intent (in) :: y
                                                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                  end function
                                                  real(8) function fmin88(x, y) result (res)
                                                      real(8), intent (in) :: x
                                                      real(8), intent (in) :: y
                                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                  end function
                                                  real(4) function fmin44(x, y) result (res)
                                                      real(4), intent (in) :: x
                                                      real(4), intent (in) :: y
                                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                  end function
                                                  real(8) function fmin84(x, y) result(res)
                                                      real(8), intent (in) :: x
                                                      real(4), intent (in) :: y
                                                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                  end function
                                                  real(8) function fmin48(x, y) result(res)
                                                      real(4), intent (in) :: x
                                                      real(8), intent (in) :: y
                                                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                  end function
                                              end module
                                              
                                              real(8) function code(eh, ew, t)
                                              use fmin_fmax_functions
                                                  real(8), intent (in) :: eh
                                                  real(8), intent (in) :: ew
                                                  real(8), intent (in) :: t
                                                  code = abs((ew / 1.0d0))
                                              end function
                                              
                                              public static double code(double eh, double ew, double t) {
                                              	return Math.abs((ew / 1.0));
                                              }
                                              
                                              def code(eh, ew, t):
                                              	return math.fabs((ew / 1.0))
                                              
                                              function code(eh, ew, t)
                                              	return abs(Float64(ew / 1.0))
                                              end
                                              
                                              function tmp = code(eh, ew, t)
                                              	tmp = abs((ew / 1.0));
                                              end
                                              
                                              code[eh_, ew_, t_] := N[Abs[N[(ew / 1.0), $MachinePrecision]], $MachinePrecision]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \left|\frac{ew}{1}\right|
                                              \end{array}
                                              
                                              Derivation
                                              1. Initial program 99.8%

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

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

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

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

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

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

                                                  \[\leadsto \left|\frac{ew \cdot 1}{1}\right| \]
                                                3. Step-by-step derivation
                                                  1. Applied rewrites41.5%

                                                    \[\leadsto \left|\frac{ew \cdot 1}{1}\right| \]
                                                  2. Final simplification41.5%

                                                    \[\leadsto \left|\frac{ew}{1}\right| \]
                                                  3. Add Preprocessing

                                                  Reproduce

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