Example 2 from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 8.3s
Alternatives: 16
Speedup: 1.0×

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}

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

\\
\left|\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|
\end{array}
Derivation
  1. Initial program 99.8%

    \[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right| \]
  2. Step-by-step derivation
    1. 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| \]
  3. 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| \]
  4. Add Preprocessing

Alternative 2: 80.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\tan t}{ew}\\ t_2 := eh \cdot t\_1\\ t_3 := \sinh^{-1} t\_2\\ t_4 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\ t_5 := \left(ew \cdot \cos t\right) \cdot \cos t\_4 - \left(eh \cdot \sin t\right) \cdot \sin t\_4\\ t_6 := \cos t \cdot ew\\ t_7 := \frac{\mathsf{fma}\left(t\_2, \sin t \cdot eh, t\_6\right)}{\cosh \sinh^{-1} \left(t\_1 \cdot eh\right)}\\ \mathbf{if}\;t\_5 \leq -2 \cdot 10^{-269}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t\_2 \cdot eh, \sin t, t\_6\right)}{-\cosh t\_3}\\ \mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+82}:\\ \;\;\;\;t\_7\\ \mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+202}:\\ \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh t\_3 \cdot \sin t, eh, ew\right)}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;t\_7\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (/ (tan t) ew))
        (t_2 (* eh t_1))
        (t_3 (asinh t_2))
        (t_4 (atan (/ (* (- eh) (tan t)) ew)))
        (t_5 (- (* (* ew (cos t)) (cos t_4)) (* (* eh (sin t)) (sin t_4))))
        (t_6 (* (cos t) ew))
        (t_7 (/ (fma t_2 (* (sin t) eh) t_6) (cosh (asinh (* t_1 eh))))))
   (if (<= t_5 -2e-269)
     (/ (fma (* t_2 eh) (sin t) t_6) (- (cosh t_3)))
     (if (<= t_5 5e+82)
       t_7
       (if (<= t_5 5e+202)
         (pow (sqrt (fma (* (tanh t_3) (sin t)) eh ew)) 2.0)
         t_7)))))
double code(double eh, double ew, double t) {
	double t_1 = tan(t) / ew;
	double t_2 = eh * t_1;
	double t_3 = asinh(t_2);
	double t_4 = atan(((-eh * tan(t)) / ew));
	double t_5 = ((ew * cos(t)) * cos(t_4)) - ((eh * sin(t)) * sin(t_4));
	double t_6 = cos(t) * ew;
	double t_7 = fma(t_2, (sin(t) * eh), t_6) / cosh(asinh((t_1 * eh)));
	double tmp;
	if (t_5 <= -2e-269) {
		tmp = fma((t_2 * eh), sin(t), t_6) / -cosh(t_3);
	} else if (t_5 <= 5e+82) {
		tmp = t_7;
	} else if (t_5 <= 5e+202) {
		tmp = pow(sqrt(fma((tanh(t_3) * sin(t)), eh, ew)), 2.0);
	} else {
		tmp = t_7;
	}
	return tmp;
}
function code(eh, ew, t)
	t_1 = Float64(tan(t) / ew)
	t_2 = Float64(eh * t_1)
	t_3 = asinh(t_2)
	t_4 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew))
	t_5 = Float64(Float64(Float64(ew * cos(t)) * cos(t_4)) - Float64(Float64(eh * sin(t)) * sin(t_4)))
	t_6 = Float64(cos(t) * ew)
	t_7 = Float64(fma(t_2, Float64(sin(t) * eh), t_6) / cosh(asinh(Float64(t_1 * eh))))
	tmp = 0.0
	if (t_5 <= -2e-269)
		tmp = Float64(fma(Float64(t_2 * eh), sin(t), t_6) / Float64(-cosh(t_3)));
	elseif (t_5 <= 5e+82)
		tmp = t_7;
	elseif (t_5 <= 5e+202)
		tmp = sqrt(fma(Float64(tanh(t_3) * sin(t)), eh, ew)) ^ 2.0;
	else
		tmp = t_7;
	end
	return tmp
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]}, Block[{t$95$2 = N[(eh * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[ArcSinh[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$4], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$4], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]}, Block[{t$95$7 = N[(N[(t$95$2 * N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision] + t$95$6), $MachinePrecision] / N[Cosh[N[ArcSinh[N[(t$95$1 * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, -2e-269], N[(N[(N[(t$95$2 * eh), $MachinePrecision] * N[Sin[t], $MachinePrecision] + t$95$6), $MachinePrecision] / (-N[Cosh[t$95$3], $MachinePrecision])), $MachinePrecision], If[LessEqual[t$95$5, 5e+82], t$95$7, If[LessEqual[t$95$5, 5e+202], N[Power[N[Sqrt[N[(N[(N[Tanh[t$95$3], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision] * eh + ew), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision], t$95$7]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{\tan t}{ew}\\
t_2 := eh \cdot t\_1\\
t_3 := \sinh^{-1} t\_2\\
t_4 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
t_5 := \left(ew \cdot \cos t\right) \cdot \cos t\_4 - \left(eh \cdot \sin t\right) \cdot \sin t\_4\\
t_6 := \cos t \cdot ew\\
t_7 := \frac{\mathsf{fma}\left(t\_2, \sin t \cdot eh, t\_6\right)}{\cosh \sinh^{-1} \left(t\_1 \cdot eh\right)}\\
\mathbf{if}\;t\_5 \leq -2 \cdot 10^{-269}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_2 \cdot eh, \sin t, t\_6\right)}{-\cosh t\_3}\\

\mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+82}:\\
\;\;\;\;t\_7\\

\mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+202}:\\
\;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh t\_3 \cdot \sin t, eh, ew\right)}\right)}^{2}\\

\mathbf{else}:\\
\;\;\;\;t\_7\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 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))))) < -1.9999999999999999e-269

    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. Applied rewrites1.2%

      \[\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)}} \]
    3. Step-by-step derivation
      1. rem-square-sqrtN/A

        \[\leadsto \color{blue}{\sqrt{\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)}} \cdot \sqrt{\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)}}} \]
      2. sqrt-unprodN/A

        \[\leadsto \color{blue}{\sqrt{\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)} \cdot \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)}}} \]
      3. sqr-negN/A

        \[\leadsto \sqrt{\color{blue}{\left(\mathsf{neg}\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)\right) \cdot \left(\mathsf{neg}\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)\right)}} \]
      4. lift-neg.f64N/A

        \[\leadsto \sqrt{\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)} \cdot \left(\mathsf{neg}\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)\right)} \]
      5. lift-neg.f64N/A

        \[\leadsto \sqrt{\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) \cdot \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)}} \]
    4. Applied rewrites80.1%

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

    if -1.9999999999999999e-269 < (-.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))))) < 5.00000000000000015e82 or 4.9999999999999999e202 < (-.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.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. Applied rewrites70.1%

      \[\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)}} \]
    3. Step-by-step derivation
      1. lift-fma.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(\frac{\tan t}{ew} \cdot eh\right) \cdot \color{blue}{\left(\sin t \cdot eh\right)} + \cos t \cdot ew}{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)} \]
      10. lower-fma.f6483.2

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{\tan t}{ew} \cdot eh, \sin t \cdot eh, \cos t \cdot ew\right)}}{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)} \]
      11. lift-*.f64N/A

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

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{eh \cdot \frac{\tan t}{ew}}, \sin t \cdot eh, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)} \]
      13. lower-*.f6483.2

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

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

    if 5.00000000000000015e82 < (-.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))))) < 4.9999999999999999e202

    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. Applied rewrites63.5%

      \[\leadsto \color{blue}{{\left(\sqrt{\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)}^{2}} \]
    3. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto {\left(\sqrt{\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)}}}\right)}^{2} \]
      2. lift-fma.f64N/A

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

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

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

      \[\leadsto {\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \sin t, eh, \color{blue}{ew}\right)}\right)}^{2} \]
    6. Step-by-step derivation
      1. Applied rewrites77.0%

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \sin t, eh, \color{blue}{ew}\right)}\right)}^{2} \]
    7. Recombined 3 regimes into one program.
    8. Add Preprocessing

    Alternative 3: 73.6% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\tan t}{ew}\\ t_2 := eh \cdot t\_1\\ t_3 := eh \cdot \sin t\\ t_4 := ew \cdot \cos t\\ t_5 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\ t_6 := t\_4 \cdot \cos t\_5 - t\_3 \cdot \sin t\_5\\ t_7 := \frac{\mathsf{fma}\left(t\_2, \sin t \cdot eh, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(t\_1 \cdot eh\right)}\\ \mathbf{if}\;t\_6 \leq -2 \cdot 10^{-269}:\\ \;\;\;\;\left|\frac{t\_4}{\cos \tan^{-1} \left(\frac{t\_3}{t\_4}\right)}\right|\\ \mathbf{elif}\;t\_6 \leq 5 \cdot 10^{+82}:\\ \;\;\;\;t\_7\\ \mathbf{elif}\;t\_6 \leq 5 \cdot 10^{+202}:\\ \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} t\_2 \cdot \sin t, eh, ew\right)}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;t\_7\\ \end{array} \end{array} \]
    (FPCore (eh ew t)
     :precision binary64
     (let* ((t_1 (/ (tan t) ew))
            (t_2 (* eh t_1))
            (t_3 (* eh (sin t)))
            (t_4 (* ew (cos t)))
            (t_5 (atan (/ (* (- eh) (tan t)) ew)))
            (t_6 (- (* t_4 (cos t_5)) (* t_3 (sin t_5))))
            (t_7
             (/
              (fma t_2 (* (sin t) eh) (* (cos t) ew))
              (cosh (asinh (* t_1 eh))))))
       (if (<= t_6 -2e-269)
         (fabs (/ t_4 (cos (atan (/ t_3 t_4)))))
         (if (<= t_6 5e+82)
           t_7
           (if (<= t_6 5e+202)
             (pow (sqrt (fma (* (tanh (asinh t_2)) (sin t)) eh ew)) 2.0)
             t_7)))))
    double code(double eh, double ew, double t) {
    	double t_1 = tan(t) / ew;
    	double t_2 = eh * t_1;
    	double t_3 = eh * sin(t);
    	double t_4 = ew * cos(t);
    	double t_5 = atan(((-eh * tan(t)) / ew));
    	double t_6 = (t_4 * cos(t_5)) - (t_3 * sin(t_5));
    	double t_7 = fma(t_2, (sin(t) * eh), (cos(t) * ew)) / cosh(asinh((t_1 * eh)));
    	double tmp;
    	if (t_6 <= -2e-269) {
    		tmp = fabs((t_4 / cos(atan((t_3 / t_4)))));
    	} else if (t_6 <= 5e+82) {
    		tmp = t_7;
    	} else if (t_6 <= 5e+202) {
    		tmp = pow(sqrt(fma((tanh(asinh(t_2)) * sin(t)), eh, ew)), 2.0);
    	} else {
    		tmp = t_7;
    	}
    	return tmp;
    }
    
    function code(eh, ew, t)
    	t_1 = Float64(tan(t) / ew)
    	t_2 = Float64(eh * t_1)
    	t_3 = Float64(eh * sin(t))
    	t_4 = Float64(ew * cos(t))
    	t_5 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew))
    	t_6 = Float64(Float64(t_4 * cos(t_5)) - Float64(t_3 * sin(t_5)))
    	t_7 = Float64(fma(t_2, Float64(sin(t) * eh), Float64(cos(t) * ew)) / cosh(asinh(Float64(t_1 * eh))))
    	tmp = 0.0
    	if (t_6 <= -2e-269)
    		tmp = abs(Float64(t_4 / cos(atan(Float64(t_3 / t_4)))));
    	elseif (t_6 <= 5e+82)
    		tmp = t_7;
    	elseif (t_6 <= 5e+202)
    		tmp = sqrt(fma(Float64(tanh(asinh(t_2)) * sin(t)), eh, ew)) ^ 2.0;
    	else
    		tmp = t_7;
    	end
    	return tmp
    end
    
    code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]}, Block[{t$95$2 = N[(eh * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$6 = N[(N[(t$95$4 * N[Cos[t$95$5], $MachinePrecision]), $MachinePrecision] - N[(t$95$3 * N[Sin[t$95$5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(N[(t$95$2 * N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision] + N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / N[Cosh[N[ArcSinh[N[(t$95$1 * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$6, -2e-269], N[Abs[N[(t$95$4 / N[Cos[N[ArcTan[N[(t$95$3 / t$95$4), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$6, 5e+82], t$95$7, If[LessEqual[t$95$6, 5e+202], N[Power[N[Sqrt[N[(N[(N[Tanh[N[ArcSinh[t$95$2], $MachinePrecision]], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision] * eh + ew), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision], t$95$7]]]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{\tan t}{ew}\\
    t_2 := eh \cdot t\_1\\
    t_3 := eh \cdot \sin t\\
    t_4 := ew \cdot \cos t\\
    t_5 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
    t_6 := t\_4 \cdot \cos t\_5 - t\_3 \cdot \sin t\_5\\
    t_7 := \frac{\mathsf{fma}\left(t\_2, \sin t \cdot eh, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(t\_1 \cdot eh\right)}\\
    \mathbf{if}\;t\_6 \leq -2 \cdot 10^{-269}:\\
    \;\;\;\;\left|\frac{t\_4}{\cos \tan^{-1} \left(\frac{t\_3}{t\_4}\right)}\right|\\
    
    \mathbf{elif}\;t\_6 \leq 5 \cdot 10^{+82}:\\
    \;\;\;\;t\_7\\
    
    \mathbf{elif}\;t\_6 \leq 5 \cdot 10^{+202}:\\
    \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} t\_2 \cdot \sin t, eh, ew\right)}\right)}^{2}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_7\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 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))))) < -1.9999999999999999e-269

      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. Applied rewrites99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.9999999999999999e-269 < (-.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))))) < 5.00000000000000015e82 or 4.9999999999999999e202 < (-.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.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. Applied rewrites70.1%

        \[\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)}} \]
      3. Step-by-step derivation
        1. lift-fma.f64N/A

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\left(\frac{\tan t}{ew} \cdot eh\right) \cdot \color{blue}{\left(\sin t \cdot eh\right)} + \cos t \cdot ew}{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)} \]
        10. lower-fma.f6483.2

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{\tan t}{ew} \cdot eh, \sin t \cdot eh, \cos t \cdot ew\right)}}{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)} \]
        11. lift-*.f64N/A

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

          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{eh \cdot \frac{\tan t}{ew}}, \sin t \cdot eh, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)} \]
        13. lower-*.f6483.2

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

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

      if 5.00000000000000015e82 < (-.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))))) < 4.9999999999999999e202

      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. Applied rewrites63.5%

        \[\leadsto \color{blue}{{\left(\sqrt{\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)}^{2}} \]
      3. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto {\left(\sqrt{\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)}}}\right)}^{2} \]
        2. lift-fma.f64N/A

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

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

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

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \sin t, eh, \color{blue}{ew}\right)}\right)}^{2} \]
      6. Step-by-step derivation
        1. Applied rewrites77.0%

          \[\leadsto {\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \sin t, eh, \color{blue}{ew}\right)}\right)}^{2} \]
      7. Recombined 3 regimes into one program.
      8. Add Preprocessing

      Alternative 4: 72.5% accurate, 0.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\tan t}{ew}\\ t_2 := ew \cdot \cos t\\ t_3 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\ t_4 := eh \cdot \sin t\\ t_5 := t\_2 \cdot \cos t\_3 - t\_4 \cdot \sin t\_3\\ t_6 := eh \cdot t\_1\\ t_7 := \frac{\mathsf{fma}\left(\cos t, ew, \left(t\_6 \cdot eh\right) \cdot \sin t\right)}{\cosh \sinh^{-1} \left(t\_1 \cdot eh\right)}\\ \mathbf{if}\;t\_5 \leq -2 \cdot 10^{-269}:\\ \;\;\;\;\left|\frac{t\_2}{\cos \tan^{-1} \left(\frac{t\_4}{t\_2}\right)}\right|\\ \mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+82}:\\ \;\;\;\;t\_7\\ \mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+202}:\\ \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} t\_6 \cdot \sin t, eh, ew\right)}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;t\_7\\ \end{array} \end{array} \]
      (FPCore (eh ew t)
       :precision binary64
       (let* ((t_1 (/ (tan t) ew))
              (t_2 (* ew (cos t)))
              (t_3 (atan (/ (* (- eh) (tan t)) ew)))
              (t_4 (* eh (sin t)))
              (t_5 (- (* t_2 (cos t_3)) (* t_4 (sin t_3))))
              (t_6 (* eh t_1))
              (t_7
               (/
                (fma (cos t) ew (* (* t_6 eh) (sin t)))
                (cosh (asinh (* t_1 eh))))))
         (if (<= t_5 -2e-269)
           (fabs (/ t_2 (cos (atan (/ t_4 t_2)))))
           (if (<= t_5 5e+82)
             t_7
             (if (<= t_5 5e+202)
               (pow (sqrt (fma (* (tanh (asinh t_6)) (sin t)) eh ew)) 2.0)
               t_7)))))
      double code(double eh, double ew, double t) {
      	double t_1 = tan(t) / ew;
      	double t_2 = ew * cos(t);
      	double t_3 = atan(((-eh * tan(t)) / ew));
      	double t_4 = eh * sin(t);
      	double t_5 = (t_2 * cos(t_3)) - (t_4 * sin(t_3));
      	double t_6 = eh * t_1;
      	double t_7 = fma(cos(t), ew, ((t_6 * eh) * sin(t))) / cosh(asinh((t_1 * eh)));
      	double tmp;
      	if (t_5 <= -2e-269) {
      		tmp = fabs((t_2 / cos(atan((t_4 / t_2)))));
      	} else if (t_5 <= 5e+82) {
      		tmp = t_7;
      	} else if (t_5 <= 5e+202) {
      		tmp = pow(sqrt(fma((tanh(asinh(t_6)) * sin(t)), eh, ew)), 2.0);
      	} else {
      		tmp = t_7;
      	}
      	return tmp;
      }
      
      function code(eh, ew, t)
      	t_1 = Float64(tan(t) / ew)
      	t_2 = Float64(ew * cos(t))
      	t_3 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew))
      	t_4 = Float64(eh * sin(t))
      	t_5 = Float64(Float64(t_2 * cos(t_3)) - Float64(t_4 * sin(t_3)))
      	t_6 = Float64(eh * t_1)
      	t_7 = Float64(fma(cos(t), ew, Float64(Float64(t_6 * eh) * sin(t))) / cosh(asinh(Float64(t_1 * eh))))
      	tmp = 0.0
      	if (t_5 <= -2e-269)
      		tmp = abs(Float64(t_2 / cos(atan(Float64(t_4 / t_2)))));
      	elseif (t_5 <= 5e+82)
      		tmp = t_7;
      	elseif (t_5 <= 5e+202)
      		tmp = sqrt(fma(Float64(tanh(asinh(t_6)) * sin(t)), eh, ew)) ^ 2.0;
      	else
      		tmp = t_7;
      	end
      	return tmp
      end
      
      code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]}, Block[{t$95$2 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$2 * N[Cos[t$95$3], $MachinePrecision]), $MachinePrecision] - N[(t$95$4 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(eh * t$95$1), $MachinePrecision]}, Block[{t$95$7 = N[(N[(N[Cos[t], $MachinePrecision] * ew + N[(N[(t$95$6 * eh), $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Cosh[N[ArcSinh[N[(t$95$1 * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, -2e-269], N[Abs[N[(t$95$2 / N[Cos[N[ArcTan[N[(t$95$4 / t$95$2), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$5, 5e+82], t$95$7, If[LessEqual[t$95$5, 5e+202], N[Power[N[Sqrt[N[(N[(N[Tanh[N[ArcSinh[t$95$6], $MachinePrecision]], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision] * eh + ew), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision], t$95$7]]]]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \frac{\tan t}{ew}\\
      t_2 := ew \cdot \cos t\\
      t_3 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
      t_4 := eh \cdot \sin t\\
      t_5 := t\_2 \cdot \cos t\_3 - t\_4 \cdot \sin t\_3\\
      t_6 := eh \cdot t\_1\\
      t_7 := \frac{\mathsf{fma}\left(\cos t, ew, \left(t\_6 \cdot eh\right) \cdot \sin t\right)}{\cosh \sinh^{-1} \left(t\_1 \cdot eh\right)}\\
      \mathbf{if}\;t\_5 \leq -2 \cdot 10^{-269}:\\
      \;\;\;\;\left|\frac{t\_2}{\cos \tan^{-1} \left(\frac{t\_4}{t\_2}\right)}\right|\\
      
      \mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+82}:\\
      \;\;\;\;t\_7\\
      
      \mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+202}:\\
      \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} t\_6 \cdot \sin t, eh, ew\right)}\right)}^{2}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_7\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 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))))) < -1.9999999999999999e-269

        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. Applied rewrites99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -1.9999999999999999e-269 < (-.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))))) < 5.00000000000000015e82 or 4.9999999999999999e202 < (-.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.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. Applied rewrites70.1%

          \[\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)}} \]
        3. Step-by-step derivation
          1. lift-fma.f64N/A

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

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(\cos t, ew, \color{blue}{\left(\frac{\tan t}{ew} \cdot \left(eh \cdot eh\right)\right) \cdot \sin t}\right)}{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)} \]
          6. lower-*.f6470.1

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

            \[\leadsto \frac{\mathsf{fma}\left(\cos t, ew, \color{blue}{\left(\frac{\tan t}{ew} \cdot \left(eh \cdot eh\right)\right)} \cdot \sin t\right)}{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)} \]
          8. lift-*.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(\cos t, ew, \left(\frac{\tan t}{ew} \cdot \color{blue}{\left(eh \cdot eh\right)}\right) \cdot \sin t\right)}{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)} \]
          9. associate-*r*N/A

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

            \[\leadsto \frac{\mathsf{fma}\left(\cos t, ew, \left(\color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)} \cdot eh\right) \cdot \sin t\right)}{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)} \]
          11. lower-*.f6480.4

            \[\leadsto \frac{\mathsf{fma}\left(\cos t, ew, \color{blue}{\left(\left(\frac{\tan t}{ew} \cdot eh\right) \cdot eh\right)} \cdot \sin t\right)}{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)} \]
          12. lift-*.f64N/A

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

            \[\leadsto \frac{\mathsf{fma}\left(\cos t, ew, \left(\color{blue}{\left(eh \cdot \frac{\tan t}{ew}\right)} \cdot eh\right) \cdot \sin t\right)}{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)} \]
          14. lower-*.f6480.4

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

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

        if 5.00000000000000015e82 < (-.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))))) < 4.9999999999999999e202

        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. Applied rewrites63.5%

          \[\leadsto \color{blue}{{\left(\sqrt{\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)}^{2}} \]
        3. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto {\left(\sqrt{\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)}}}\right)}^{2} \]
          2. lift-fma.f64N/A

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

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

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

          \[\leadsto {\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \sin t, eh, \color{blue}{ew}\right)}\right)}^{2} \]
        6. Step-by-step derivation
          1. Applied rewrites77.0%

            \[\leadsto {\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \sin t, eh, \color{blue}{ew}\right)}\right)}^{2} \]
        7. Recombined 3 regimes into one program.
        8. Add Preprocessing

        Alternative 5: 71.1% accurate, 0.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\tan t}{ew}\\ t_2 := eh \cdot \sin t\\ t_3 := eh \cdot t\_1\\ t_4 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\ t_5 := ew \cdot \cos t\\ t_6 := t\_5 \cdot \cos t\_4 - t\_2 \cdot \sin t\_4\\ t_7 := \left|\frac{t\_5}{\cos \tan^{-1} \left(\frac{t\_2}{t\_5}\right)}\right|\\ \mathbf{if}\;t\_6 \leq -2 \cdot 10^{-269}:\\ \;\;\;\;t\_7\\ \mathbf{elif}\;t\_6 \leq 2 \cdot 10^{+83}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t\_1 \cdot eh, \sin t \cdot eh, \cos t \cdot ew\right)}{\sqrt{1 + {t\_3}^{2}}}\\ \mathbf{elif}\;t\_6 \leq 5 \cdot 10^{+202}:\\ \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} t\_3 \cdot \sin t, eh, ew\right)}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;t\_7\\ \end{array} \end{array} \]
        (FPCore (eh ew t)
         :precision binary64
         (let* ((t_1 (/ (tan t) ew))
                (t_2 (* eh (sin t)))
                (t_3 (* eh t_1))
                (t_4 (atan (/ (* (- eh) (tan t)) ew)))
                (t_5 (* ew (cos t)))
                (t_6 (- (* t_5 (cos t_4)) (* t_2 (sin t_4))))
                (t_7 (fabs (/ t_5 (cos (atan (/ t_2 t_5)))))))
           (if (<= t_6 -2e-269)
             t_7
             (if (<= t_6 2e+83)
               (/
                (fma (* t_1 eh) (* (sin t) eh) (* (cos t) ew))
                (sqrt (+ 1.0 (pow t_3 2.0))))
               (if (<= t_6 5e+202)
                 (pow (sqrt (fma (* (tanh (asinh t_3)) (sin t)) eh ew)) 2.0)
                 t_7)))))
        double code(double eh, double ew, double t) {
        	double t_1 = tan(t) / ew;
        	double t_2 = eh * sin(t);
        	double t_3 = eh * t_1;
        	double t_4 = atan(((-eh * tan(t)) / ew));
        	double t_5 = ew * cos(t);
        	double t_6 = (t_5 * cos(t_4)) - (t_2 * sin(t_4));
        	double t_7 = fabs((t_5 / cos(atan((t_2 / t_5)))));
        	double tmp;
        	if (t_6 <= -2e-269) {
        		tmp = t_7;
        	} else if (t_6 <= 2e+83) {
        		tmp = fma((t_1 * eh), (sin(t) * eh), (cos(t) * ew)) / sqrt((1.0 + pow(t_3, 2.0)));
        	} else if (t_6 <= 5e+202) {
        		tmp = pow(sqrt(fma((tanh(asinh(t_3)) * sin(t)), eh, ew)), 2.0);
        	} else {
        		tmp = t_7;
        	}
        	return tmp;
        }
        
        function code(eh, ew, t)
        	t_1 = Float64(tan(t) / ew)
        	t_2 = Float64(eh * sin(t))
        	t_3 = Float64(eh * t_1)
        	t_4 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew))
        	t_5 = Float64(ew * cos(t))
        	t_6 = Float64(Float64(t_5 * cos(t_4)) - Float64(t_2 * sin(t_4)))
        	t_7 = abs(Float64(t_5 / cos(atan(Float64(t_2 / t_5)))))
        	tmp = 0.0
        	if (t_6 <= -2e-269)
        		tmp = t_7;
        	elseif (t_6 <= 2e+83)
        		tmp = Float64(fma(Float64(t_1 * eh), Float64(sin(t) * eh), Float64(cos(t) * ew)) / sqrt(Float64(1.0 + (t_3 ^ 2.0))));
        	elseif (t_6 <= 5e+202)
        		tmp = sqrt(fma(Float64(tanh(asinh(t_3)) * sin(t)), eh, ew)) ^ 2.0;
        	else
        		tmp = t_7;
        	end
        	return tmp
        end
        
        code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]}, Block[{t$95$2 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(eh * t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(t$95$5 * N[Cos[t$95$4], $MachinePrecision]), $MachinePrecision] - N[(t$95$2 * N[Sin[t$95$4], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[Abs[N[(t$95$5 / N[Cos[N[ArcTan[N[(t$95$2 / t$95$5), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$6, -2e-269], t$95$7, If[LessEqual[t$95$6, 2e+83], N[(N[(N[(t$95$1 * eh), $MachinePrecision] * N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision] + N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(1.0 + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$6, 5e+202], N[Power[N[Sqrt[N[(N[(N[Tanh[N[ArcSinh[t$95$3], $MachinePrecision]], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision] * eh + ew), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision], t$95$7]]]]]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \frac{\tan t}{ew}\\
        t_2 := eh \cdot \sin t\\
        t_3 := eh \cdot t\_1\\
        t_4 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
        t_5 := ew \cdot \cos t\\
        t_6 := t\_5 \cdot \cos t\_4 - t\_2 \cdot \sin t\_4\\
        t_7 := \left|\frac{t\_5}{\cos \tan^{-1} \left(\frac{t\_2}{t\_5}\right)}\right|\\
        \mathbf{if}\;t\_6 \leq -2 \cdot 10^{-269}:\\
        \;\;\;\;t\_7\\
        
        \mathbf{elif}\;t\_6 \leq 2 \cdot 10^{+83}:\\
        \;\;\;\;\frac{\mathsf{fma}\left(t\_1 \cdot eh, \sin t \cdot eh, \cos t \cdot ew\right)}{\sqrt{1 + {t\_3}^{2}}}\\
        
        \mathbf{elif}\;t\_6 \leq 5 \cdot 10^{+202}:\\
        \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} t\_3 \cdot \sin t, eh, ew\right)}\right)}^{2}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_7\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 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))))) < -1.9999999999999999e-269 or 4.9999999999999999e202 < (-.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.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. Applied rewrites99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -1.9999999999999999e-269 < (-.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))))) < 2.00000000000000006e83

          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. Applied rewrites79.7%

            \[\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)}} \]
          3. Step-by-step derivation
            1. lift-cosh.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\color{blue}{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}} \]
            2. lift-asinh.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\cosh \color{blue}{\sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}} \]
            3. cosh-asinhN/A

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

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

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

              \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{\color{blue}{1 + \left(\frac{\tan t}{ew} \cdot eh\right) \cdot \left(\frac{\tan t}{ew} \cdot eh\right)}}} \]
            7. pow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{1 + \color{blue}{{\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}} \]
            8. lower-pow.f6473.5

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

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

              \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{1 + {\color{blue}{\left(eh \cdot \frac{\tan t}{ew}\right)}}^{2}}} \]
            11. lower-*.f6473.5

              \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{1 + {\color{blue}{\left(eh \cdot \frac{\tan t}{ew}\right)}}^{2}}} \]
          4. Applied rewrites73.5%

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\left(eh \cdot \frac{\tan t}{ew}\right) \cdot \color{blue}{\left(eh \cdot \sin t\right)} + \cos t \cdot ew}{\sqrt{1 + {\left(eh \cdot \frac{\tan t}{ew}\right)}^{2}}} \]
            10. lower-fma.f6482.6

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

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

              \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{\tan t}{ew} \cdot eh}, eh \cdot \sin t, \cos t \cdot ew\right)}{\sqrt{1 + {\left(eh \cdot \frac{\tan t}{ew}\right)}^{2}}} \]
            13. lift-*.f6482.6

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

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

              \[\leadsto \frac{\mathsf{fma}\left(\frac{\tan t}{ew} \cdot eh, \color{blue}{\sin t \cdot eh}, \cos t \cdot ew\right)}{\sqrt{1 + {\left(eh \cdot \frac{\tan t}{ew}\right)}^{2}}} \]
            16. lower-*.f6482.6

              \[\leadsto \frac{\mathsf{fma}\left(\frac{\tan t}{ew} \cdot eh, \color{blue}{\sin t \cdot eh}, \cos t \cdot ew\right)}{\sqrt{1 + {\left(eh \cdot \frac{\tan t}{ew}\right)}^{2}}} \]
          6. Applied rewrites82.6%

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{\tan t}{ew} \cdot eh, \sin t \cdot eh, \cos t \cdot ew\right)}}{\sqrt{1 + {\left(eh \cdot \frac{\tan t}{ew}\right)}^{2}}} \]

          if 2.00000000000000006e83 < (-.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))))) < 4.9999999999999999e202

          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. Applied rewrites63.3%

            \[\leadsto \color{blue}{{\left(\sqrt{\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)}^{2}} \]
          3. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto {\left(\sqrt{\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)}}}\right)}^{2} \]
            2. lift-fma.f64N/A

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

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

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

            \[\leadsto {\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \sin t, eh, \color{blue}{ew}\right)}\right)}^{2} \]
          6. Step-by-step derivation
            1. Applied rewrites77.1%

              \[\leadsto {\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \sin t, eh, \color{blue}{ew}\right)}\right)}^{2} \]
          7. Recombined 3 regimes into one program.
          8. Add Preprocessing

          Alternative 6: 70.7% accurate, 0.3× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := eh \cdot \sin t\\ t_2 := \frac{\tan t}{ew}\\ t_3 := eh \cdot t\_2\\ t_4 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\ t_5 := ew \cdot \cos t\\ t_6 := t\_5 \cdot \cos t\_4 - t\_1 \cdot \sin t\_4\\ t_7 := \left|\frac{t\_5}{\cos \tan^{-1} \left(\frac{t\_1}{t\_5}\right)}\right|\\ \mathbf{if}\;t\_6 \leq -2 \cdot 10^{-269}:\\ \;\;\;\;t\_7\\ \mathbf{elif}\;t\_6 \leq 2 \cdot 10^{+83}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\cos t, ew, \left(\left(t\_2 \cdot eh\right) \cdot eh\right) \cdot \sin t\right)}{\sqrt{1 + {t\_3}^{2}}}\\ \mathbf{elif}\;t\_6 \leq 5 \cdot 10^{+202}:\\ \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} t\_3 \cdot \sin t, eh, ew\right)}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;t\_7\\ \end{array} \end{array} \]
          (FPCore (eh ew t)
           :precision binary64
           (let* ((t_1 (* eh (sin t)))
                  (t_2 (/ (tan t) ew))
                  (t_3 (* eh t_2))
                  (t_4 (atan (/ (* (- eh) (tan t)) ew)))
                  (t_5 (* ew (cos t)))
                  (t_6 (- (* t_5 (cos t_4)) (* t_1 (sin t_4))))
                  (t_7 (fabs (/ t_5 (cos (atan (/ t_1 t_5)))))))
             (if (<= t_6 -2e-269)
               t_7
               (if (<= t_6 2e+83)
                 (/
                  (fma (cos t) ew (* (* (* t_2 eh) eh) (sin t)))
                  (sqrt (+ 1.0 (pow t_3 2.0))))
                 (if (<= t_6 5e+202)
                   (pow (sqrt (fma (* (tanh (asinh t_3)) (sin t)) eh ew)) 2.0)
                   t_7)))))
          double code(double eh, double ew, double t) {
          	double t_1 = eh * sin(t);
          	double t_2 = tan(t) / ew;
          	double t_3 = eh * t_2;
          	double t_4 = atan(((-eh * tan(t)) / ew));
          	double t_5 = ew * cos(t);
          	double t_6 = (t_5 * cos(t_4)) - (t_1 * sin(t_4));
          	double t_7 = fabs((t_5 / cos(atan((t_1 / t_5)))));
          	double tmp;
          	if (t_6 <= -2e-269) {
          		tmp = t_7;
          	} else if (t_6 <= 2e+83) {
          		tmp = fma(cos(t), ew, (((t_2 * eh) * eh) * sin(t))) / sqrt((1.0 + pow(t_3, 2.0)));
          	} else if (t_6 <= 5e+202) {
          		tmp = pow(sqrt(fma((tanh(asinh(t_3)) * sin(t)), eh, ew)), 2.0);
          	} else {
          		tmp = t_7;
          	}
          	return tmp;
          }
          
          function code(eh, ew, t)
          	t_1 = Float64(eh * sin(t))
          	t_2 = Float64(tan(t) / ew)
          	t_3 = Float64(eh * t_2)
          	t_4 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew))
          	t_5 = Float64(ew * cos(t))
          	t_6 = Float64(Float64(t_5 * cos(t_4)) - Float64(t_1 * sin(t_4)))
          	t_7 = abs(Float64(t_5 / cos(atan(Float64(t_1 / t_5)))))
          	tmp = 0.0
          	if (t_6 <= -2e-269)
          		tmp = t_7;
          	elseif (t_6 <= 2e+83)
          		tmp = Float64(fma(cos(t), ew, Float64(Float64(Float64(t_2 * eh) * eh) * sin(t))) / sqrt(Float64(1.0 + (t_3 ^ 2.0))));
          	elseif (t_6 <= 5e+202)
          		tmp = sqrt(fma(Float64(tanh(asinh(t_3)) * sin(t)), eh, ew)) ^ 2.0;
          	else
          		tmp = t_7;
          	end
          	return tmp
          end
          
          code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]}, Block[{t$95$3 = N[(eh * t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(t$95$5 * N[Cos[t$95$4], $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * N[Sin[t$95$4], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[Abs[N[(t$95$5 / N[Cos[N[ArcTan[N[(t$95$1 / t$95$5), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$6, -2e-269], t$95$7, If[LessEqual[t$95$6, 2e+83], N[(N[(N[Cos[t], $MachinePrecision] * ew + N[(N[(N[(t$95$2 * eh), $MachinePrecision] * eh), $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(1.0 + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$6, 5e+202], N[Power[N[Sqrt[N[(N[(N[Tanh[N[ArcSinh[t$95$3], $MachinePrecision]], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision] * eh + ew), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision], t$95$7]]]]]]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := eh \cdot \sin t\\
          t_2 := \frac{\tan t}{ew}\\
          t_3 := eh \cdot t\_2\\
          t_4 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
          t_5 := ew \cdot \cos t\\
          t_6 := t\_5 \cdot \cos t\_4 - t\_1 \cdot \sin t\_4\\
          t_7 := \left|\frac{t\_5}{\cos \tan^{-1} \left(\frac{t\_1}{t\_5}\right)}\right|\\
          \mathbf{if}\;t\_6 \leq -2 \cdot 10^{-269}:\\
          \;\;\;\;t\_7\\
          
          \mathbf{elif}\;t\_6 \leq 2 \cdot 10^{+83}:\\
          \;\;\;\;\frac{\mathsf{fma}\left(\cos t, ew, \left(\left(t\_2 \cdot eh\right) \cdot eh\right) \cdot \sin t\right)}{\sqrt{1 + {t\_3}^{2}}}\\
          
          \mathbf{elif}\;t\_6 \leq 5 \cdot 10^{+202}:\\
          \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} t\_3 \cdot \sin t, eh, ew\right)}\right)}^{2}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_7\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 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))))) < -1.9999999999999999e-269 or 4.9999999999999999e202 < (-.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.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. Applied rewrites99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -1.9999999999999999e-269 < (-.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))))) < 2.00000000000000006e83

            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. Applied rewrites79.7%

              \[\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)}} \]
            3. Step-by-step derivation
              1. lift-cosh.f64N/A

                \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\color{blue}{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}} \]
              2. lift-asinh.f64N/A

                \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\cosh \color{blue}{\sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}} \]
              3. cosh-asinhN/A

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

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

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

                \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{\color{blue}{1 + \left(\frac{\tan t}{ew} \cdot eh\right) \cdot \left(\frac{\tan t}{ew} \cdot eh\right)}}} \]
              7. pow2N/A

                \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{1 + \color{blue}{{\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}} \]
              8. lower-pow.f6473.5

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

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

                \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{1 + {\color{blue}{\left(eh \cdot \frac{\tan t}{ew}\right)}}^{2}}} \]
              11. lower-*.f6473.5

                \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{1 + {\color{blue}{\left(eh \cdot \frac{\tan t}{ew}\right)}}^{2}}} \]
            4. Applied rewrites73.5%

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\cos t, ew, \left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh\right) \cdot \sin t\right)}}{\sqrt{1 + {\left(eh \cdot \frac{\tan t}{ew}\right)}^{2}}} \]
              12. lower-*.f6481.0

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

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

                \[\leadsto \frac{\mathsf{fma}\left(\cos t, ew, \left(\color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)} \cdot eh\right) \cdot \sin t\right)}{\sqrt{1 + {\left(eh \cdot \frac{\tan t}{ew}\right)}^{2}}} \]
              15. lift-*.f6481.0

                \[\leadsto \frac{\mathsf{fma}\left(\cos t, ew, \left(\color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)} \cdot eh\right) \cdot \sin t\right)}{\sqrt{1 + {\left(eh \cdot \frac{\tan t}{ew}\right)}^{2}}} \]
            6. Applied rewrites81.0%

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\cos t, ew, \left(\left(\frac{\tan t}{ew} \cdot eh\right) \cdot eh\right) \cdot \sin t\right)}}{\sqrt{1 + {\left(eh \cdot \frac{\tan t}{ew}\right)}^{2}}} \]

            if 2.00000000000000006e83 < (-.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))))) < 4.9999999999999999e202

            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. Applied rewrites63.3%

              \[\leadsto \color{blue}{{\left(\sqrt{\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)}^{2}} \]
            3. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto {\left(\sqrt{\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)}}}\right)}^{2} \]
              2. lift-fma.f64N/A

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

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

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

              \[\leadsto {\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \sin t, eh, \color{blue}{ew}\right)}\right)}^{2} \]
            6. Step-by-step derivation
              1. Applied rewrites77.1%

                \[\leadsto {\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \sin t, eh, \color{blue}{ew}\right)}\right)}^{2} \]
            7. Recombined 3 regimes into one program.
            8. Add Preprocessing

            Alternative 7: 84.0% accurate, 0.3× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\tan t}{ew}\\ t_2 := eh \cdot t\_1\\ t_3 := \cosh \sinh^{-1} t\_2\\ t_4 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\ t_5 := \left(ew \cdot \cos t\right) \cdot \cos t\_4 - \left(eh \cdot \sin t\right) \cdot \sin t\_4\\ t_6 := \cos t \cdot ew\\ \mathbf{if}\;t\_5 \leq -2 \cdot 10^{-269}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t\_2 \cdot eh, \sin t, t\_6\right)}{-t\_3}\\ \mathbf{elif}\;t\_5 \leq 10^{+25}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\left(\left(-eh\right) \cdot \sin t\right) \cdot t\_1, -eh, t\_6\right)}{\cosh \sinh^{-1} \left(t\_1 \cdot eh\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh \left(\frac{eh \cdot t}{ew}\right) \cdot \sin t, eh, \frac{t\_6}{t\_3}\right)}\right)}^{2}\\ \end{array} \end{array} \]
            (FPCore (eh ew t)
             :precision binary64
             (let* ((t_1 (/ (tan t) ew))
                    (t_2 (* eh t_1))
                    (t_3 (cosh (asinh t_2)))
                    (t_4 (atan (/ (* (- eh) (tan t)) ew)))
                    (t_5 (- (* (* ew (cos t)) (cos t_4)) (* (* eh (sin t)) (sin t_4))))
                    (t_6 (* (cos t) ew)))
               (if (<= t_5 -2e-269)
                 (/ (fma (* t_2 eh) (sin t) t_6) (- t_3))
                 (if (<= t_5 1e+25)
                   (/
                    (fma (* (* (- eh) (sin t)) t_1) (- eh) t_6)
                    (cosh (asinh (* t_1 eh))))
                   (pow
                    (sqrt (fma (* (tanh (/ (* eh t) ew)) (sin t)) eh (/ t_6 t_3)))
                    2.0)))))
            double code(double eh, double ew, double t) {
            	double t_1 = tan(t) / ew;
            	double t_2 = eh * t_1;
            	double t_3 = cosh(asinh(t_2));
            	double t_4 = atan(((-eh * tan(t)) / ew));
            	double t_5 = ((ew * cos(t)) * cos(t_4)) - ((eh * sin(t)) * sin(t_4));
            	double t_6 = cos(t) * ew;
            	double tmp;
            	if (t_5 <= -2e-269) {
            		tmp = fma((t_2 * eh), sin(t), t_6) / -t_3;
            	} else if (t_5 <= 1e+25) {
            		tmp = fma(((-eh * sin(t)) * t_1), -eh, t_6) / cosh(asinh((t_1 * eh)));
            	} else {
            		tmp = pow(sqrt(fma((tanh(((eh * t) / ew)) * sin(t)), eh, (t_6 / t_3))), 2.0);
            	}
            	return tmp;
            }
            
            function code(eh, ew, t)
            	t_1 = Float64(tan(t) / ew)
            	t_2 = Float64(eh * t_1)
            	t_3 = cosh(asinh(t_2))
            	t_4 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew))
            	t_5 = Float64(Float64(Float64(ew * cos(t)) * cos(t_4)) - Float64(Float64(eh * sin(t)) * sin(t_4)))
            	t_6 = Float64(cos(t) * ew)
            	tmp = 0.0
            	if (t_5 <= -2e-269)
            		tmp = Float64(fma(Float64(t_2 * eh), sin(t), t_6) / Float64(-t_3));
            	elseif (t_5 <= 1e+25)
            		tmp = Float64(fma(Float64(Float64(Float64(-eh) * sin(t)) * t_1), Float64(-eh), t_6) / cosh(asinh(Float64(t_1 * eh))));
            	else
            		tmp = sqrt(fma(Float64(tanh(Float64(Float64(eh * t) / ew)) * sin(t)), eh, Float64(t_6 / t_3))) ^ 2.0;
            	end
            	return tmp
            end
            
            code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]}, Block[{t$95$2 = N[(eh * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[Cosh[N[ArcSinh[t$95$2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$4], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$4], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]}, If[LessEqual[t$95$5, -2e-269], N[(N[(N[(t$95$2 * eh), $MachinePrecision] * N[Sin[t], $MachinePrecision] + t$95$6), $MachinePrecision] / (-t$95$3)), $MachinePrecision], If[LessEqual[t$95$5, 1e+25], N[(N[(N[(N[((-eh) * N[Sin[t], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] * (-eh) + t$95$6), $MachinePrecision] / N[Cosh[N[ArcSinh[N[(t$95$1 * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Power[N[Sqrt[N[(N[(N[Tanh[N[(N[(eh * t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision] * eh + N[(t$95$6 / t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]]]]]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \frac{\tan t}{ew}\\
            t_2 := eh \cdot t\_1\\
            t_3 := \cosh \sinh^{-1} t\_2\\
            t_4 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
            t_5 := \left(ew \cdot \cos t\right) \cdot \cos t\_4 - \left(eh \cdot \sin t\right) \cdot \sin t\_4\\
            t_6 := \cos t \cdot ew\\
            \mathbf{if}\;t\_5 \leq -2 \cdot 10^{-269}:\\
            \;\;\;\;\frac{\mathsf{fma}\left(t\_2 \cdot eh, \sin t, t\_6\right)}{-t\_3}\\
            
            \mathbf{elif}\;t\_5 \leq 10^{+25}:\\
            \;\;\;\;\frac{\mathsf{fma}\left(\left(\left(-eh\right) \cdot \sin t\right) \cdot t\_1, -eh, t\_6\right)}{\cosh \sinh^{-1} \left(t\_1 \cdot eh\right)}\\
            
            \mathbf{else}:\\
            \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh \left(\frac{eh \cdot t}{ew}\right) \cdot \sin t, eh, \frac{t\_6}{t\_3}\right)}\right)}^{2}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 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))))) < -1.9999999999999999e-269

              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. Applied rewrites1.2%

                \[\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)}} \]
              3. Step-by-step derivation
                1. rem-square-sqrtN/A

                  \[\leadsto \color{blue}{\sqrt{\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)}} \cdot \sqrt{\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)}}} \]
                2. sqrt-unprodN/A

                  \[\leadsto \color{blue}{\sqrt{\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)} \cdot \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)}}} \]
                3. sqr-negN/A

                  \[\leadsto \sqrt{\color{blue}{\left(\mathsf{neg}\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)\right) \cdot \left(\mathsf{neg}\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)\right)}} \]
                4. lift-neg.f64N/A

                  \[\leadsto \sqrt{\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)} \cdot \left(\mathsf{neg}\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)\right)} \]
                5. lift-neg.f64N/A

                  \[\leadsto \sqrt{\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) \cdot \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)}} \]
              4. Applied rewrites80.1%

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

              if -1.9999999999999999e-269 < (-.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.00000000000000009e25

              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. Applied rewrites82.7%

                \[\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)}} \]
              3. Step-by-step derivation
                1. lift-fma.f64N/A

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

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

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

                  \[\leadsto \frac{\left(\sin t \cdot \frac{\tan t}{ew}\right) \cdot \color{blue}{\left(eh \cdot eh\right)} + \cos t \cdot ew}{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)} \]
                5. sqr-neg-revN/A

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{\color{blue}{\left(\left(\sin t \cdot \left(-eh\right)\right) \cdot \frac{\tan t}{ew}\right)} \cdot \left(-eh\right) + \cos t \cdot ew}{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)} \]
                14. lower-fma.f6493.1

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

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

              if 1.00000000000000009e25 < (-.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.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. Applied rewrites59.7%

                \[\leadsto \color{blue}{{\left(\sqrt{\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)}^{2}} \]
              3. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto {\left(\sqrt{\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)}}}\right)}^{2} \]
                2. lift-fma.f64N/A

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

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

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

                \[\leadsto {\left(\sqrt{\mathsf{fma}\left(\tanh \color{blue}{\left(\frac{eh \cdot t}{ew}\right)} \cdot \sin t, eh, \frac{\cos t \cdot ew}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}\right)}\right)}^{2} \]
              6. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto {\left(\sqrt{\mathsf{fma}\left(\tanh \left(\frac{eh \cdot t}{\color{blue}{ew}}\right) \cdot \sin t, eh, \frac{\cos t \cdot ew}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}\right)}\right)}^{2} \]
                2. lower-*.f6484.7

                  \[\leadsto {\left(\sqrt{\mathsf{fma}\left(\tanh \left(\frac{eh \cdot t}{ew}\right) \cdot \sin t, eh, \frac{\cos t \cdot ew}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}\right)}\right)}^{2} \]
              7. Applied rewrites84.7%

                \[\leadsto {\left(\sqrt{\mathsf{fma}\left(\tanh \color{blue}{\left(\frac{eh \cdot t}{ew}\right)} \cdot \sin t, eh, \frac{\cos t \cdot ew}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}\right)}\right)}^{2} \]
            3. Recombined 3 regimes into one program.
            4. Add Preprocessing

            Alternative 8: 70.0% accurate, 0.4× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := eh \cdot \sin t\\ t_2 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\ t_3 := ew \cdot \cos t\\ t_4 := t\_3 \cdot \cos t\_2 - t\_1 \cdot \sin t\_2\\ t_5 := \left|\frac{t\_3}{\cos \tan^{-1} \left(\frac{t\_1}{t\_3}\right)}\right|\\ \mathbf{if}\;t\_4 \leq 10^{-175}:\\ \;\;\;\;t\_5\\ \mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+202}:\\ \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \sin t, eh, ew\right)}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;t\_5\\ \end{array} \end{array} \]
            (FPCore (eh ew t)
             :precision binary64
             (let* ((t_1 (* eh (sin t)))
                    (t_2 (atan (/ (* (- eh) (tan t)) ew)))
                    (t_3 (* ew (cos t)))
                    (t_4 (- (* t_3 (cos t_2)) (* t_1 (sin t_2))))
                    (t_5 (fabs (/ t_3 (cos (atan (/ t_1 t_3)))))))
               (if (<= t_4 1e-175)
                 t_5
                 (if (<= t_4 5e+202)
                   (pow
                    (sqrt (fma (* (tanh (asinh (* eh (/ (tan t) ew)))) (sin t)) eh ew))
                    2.0)
                   t_5))))
            double code(double eh, double ew, double t) {
            	double t_1 = eh * sin(t);
            	double t_2 = atan(((-eh * tan(t)) / ew));
            	double t_3 = ew * cos(t);
            	double t_4 = (t_3 * cos(t_2)) - (t_1 * sin(t_2));
            	double t_5 = fabs((t_3 / cos(atan((t_1 / t_3)))));
            	double tmp;
            	if (t_4 <= 1e-175) {
            		tmp = t_5;
            	} else if (t_4 <= 5e+202) {
            		tmp = pow(sqrt(fma((tanh(asinh((eh * (tan(t) / ew)))) * sin(t)), eh, ew)), 2.0);
            	} else {
            		tmp = t_5;
            	}
            	return tmp;
            }
            
            function code(eh, ew, t)
            	t_1 = Float64(eh * sin(t))
            	t_2 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew))
            	t_3 = Float64(ew * cos(t))
            	t_4 = Float64(Float64(t_3 * cos(t_2)) - Float64(t_1 * sin(t_2)))
            	t_5 = abs(Float64(t_3 / cos(atan(Float64(t_1 / t_3)))))
            	tmp = 0.0
            	if (t_4 <= 1e-175)
            		tmp = t_5;
            	elseif (t_4 <= 5e+202)
            		tmp = sqrt(fma(Float64(tanh(asinh(Float64(eh * Float64(tan(t) / ew)))) * sin(t)), eh, ew)) ^ 2.0;
            	else
            		tmp = t_5;
            	end
            	return tmp
            end
            
            code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Abs[N[(t$95$3 / N[Cos[N[ArcTan[N[(t$95$1 / t$95$3), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 1e-175], t$95$5, If[LessEqual[t$95$4, 5e+202], N[Power[N[Sqrt[N[(N[(N[Tanh[N[ArcSinh[N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision] * eh + ew), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision], t$95$5]]]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := eh \cdot \sin t\\
            t_2 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
            t_3 := ew \cdot \cos t\\
            t_4 := t\_3 \cdot \cos t\_2 - t\_1 \cdot \sin t\_2\\
            t_5 := \left|\frac{t\_3}{\cos \tan^{-1} \left(\frac{t\_1}{t\_3}\right)}\right|\\
            \mathbf{if}\;t\_4 \leq 10^{-175}:\\
            \;\;\;\;t\_5\\
            
            \mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+202}:\\
            \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \sin t, eh, ew\right)}\right)}^{2}\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_5\\
            
            
            \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))))) < 1e-175 or 4.9999999999999999e202 < (-.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.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. Applied rewrites99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 1e-175 < (-.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))))) < 4.9999999999999999e202

              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. Applied rewrites74.7%

                \[\leadsto \color{blue}{{\left(\sqrt{\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)}^{2}} \]
              3. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto {\left(\sqrt{\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)}}}\right)}^{2} \]
                2. lift-fma.f64N/A

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

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

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

                \[\leadsto {\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \sin t, eh, \color{blue}{ew}\right)}\right)}^{2} \]
              6. Step-by-step derivation
                1. Applied rewrites78.0%

                  \[\leadsto {\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \sin t, eh, \color{blue}{ew}\right)}\right)}^{2} \]
              7. Recombined 2 regimes into one program.
              8. Add Preprocessing

              Alternative 9: 59.6% accurate, 0.4× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := eh \cdot \sin t\\ t_2 := ew \cdot \cos t\\ t_3 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\ t_4 := t\_2 \cdot \cos t\_3 - t\_1 \cdot \sin t\_3\\ \mathbf{if}\;t\_4 \leq 5 \cdot 10^{-255}:\\ \;\;\;\;\left|\frac{ew}{\cos \tan^{-1} \left(\frac{t\_1}{t\_2}\right)}\right|\\ \mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+202}:\\ \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \sin t, eh, ew\right)}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
              (FPCore (eh ew t)
               :precision binary64
               (let* ((t_1 (* eh (sin t)))
                      (t_2 (* ew (cos t)))
                      (t_3 (atan (/ (* (- eh) (tan t)) ew)))
                      (t_4 (- (* t_2 (cos t_3)) (* t_1 (sin t_3)))))
                 (if (<= t_4 5e-255)
                   (fabs (/ ew (cos (atan (/ t_1 t_2)))))
                   (if (<= t_4 5e+202)
                     (pow
                      (sqrt (fma (* (tanh (asinh (* eh (/ (tan t) ew)))) (sin t)) eh ew))
                      2.0)
                     t_2))))
              double code(double eh, double ew, double t) {
              	double t_1 = eh * sin(t);
              	double t_2 = ew * cos(t);
              	double t_3 = atan(((-eh * tan(t)) / ew));
              	double t_4 = (t_2 * cos(t_3)) - (t_1 * sin(t_3));
              	double tmp;
              	if (t_4 <= 5e-255) {
              		tmp = fabs((ew / cos(atan((t_1 / t_2)))));
              	} else if (t_4 <= 5e+202) {
              		tmp = pow(sqrt(fma((tanh(asinh((eh * (tan(t) / ew)))) * sin(t)), eh, ew)), 2.0);
              	} else {
              		tmp = t_2;
              	}
              	return tmp;
              }
              
              function code(eh, ew, t)
              	t_1 = Float64(eh * sin(t))
              	t_2 = Float64(ew * cos(t))
              	t_3 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew))
              	t_4 = Float64(Float64(t_2 * cos(t_3)) - Float64(t_1 * sin(t_3)))
              	tmp = 0.0
              	if (t_4 <= 5e-255)
              		tmp = abs(Float64(ew / cos(atan(Float64(t_1 / t_2)))));
              	elseif (t_4 <= 5e+202)
              		tmp = sqrt(fma(Float64(tanh(asinh(Float64(eh * Float64(tan(t) / ew)))) * sin(t)), eh, ew)) ^ 2.0;
              	else
              		tmp = t_2;
              	end
              	return tmp
              end
              
              code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$2 * N[Cos[t$95$3], $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, 5e-255], N[Abs[N[(ew / N[Cos[N[ArcTan[N[(t$95$1 / t$95$2), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, 5e+202], N[Power[N[Sqrt[N[(N[(N[Tanh[N[ArcSinh[N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision] * eh + ew), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision], t$95$2]]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := eh \cdot \sin t\\
              t_2 := ew \cdot \cos t\\
              t_3 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
              t_4 := t\_2 \cdot \cos t\_3 - t\_1 \cdot \sin t\_3\\
              \mathbf{if}\;t\_4 \leq 5 \cdot 10^{-255}:\\
              \;\;\;\;\left|\frac{ew}{\cos \tan^{-1} \left(\frac{t\_1}{t\_2}\right)}\right|\\
              
              \mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+202}:\\
              \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \sin t, eh, ew\right)}\right)}^{2}\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_2\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 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))))) < 4.9999999999999996e-255

                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. Applied rewrites99.8%

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

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

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

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

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

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

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

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

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

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

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

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

                if 4.9999999999999996e-255 < (-.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))))) < 4.9999999999999999e202

                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. Applied rewrites75.1%

                  \[\leadsto \color{blue}{{\left(\sqrt{\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)}^{2}} \]
                3. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto {\left(\sqrt{\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)}}}\right)}^{2} \]
                  2. lift-fma.f64N/A

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

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

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

                  \[\leadsto {\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \sin t, eh, \color{blue}{ew}\right)}\right)}^{2} \]
                6. Step-by-step derivation
                  1. Applied rewrites78.1%

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

                  if 4.9999999999999999e202 < (-.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.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. Applied rewrites50.7%

                    \[\leadsto \color{blue}{{\left(\sqrt{\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)}^{2}} \]
                  3. Step-by-step derivation
                    1. lift-sqrt.f64N/A

                      \[\leadsto {\color{blue}{\left(\sqrt{\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)}}^{2} \]
                    2. lift-/.f64N/A

                      \[\leadsto {\left(\sqrt{\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)}}}\right)}^{2} \]
                    3. sqrt-divN/A

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

                      \[\leadsto {\color{blue}{\left(\frac{\sqrt{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}}{\sqrt{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}}\right)}}^{2} \]
                  4. Applied rewrites66.8%

                    \[\leadsto {\color{blue}{\left(\frac{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}}^{2} \]
                  5. Step-by-step derivation
                    1. lift-/.f64N/A

                      \[\leadsto {\color{blue}{\left(\frac{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}}^{2} \]
                    2. lift-sqrt.f64N/A

                      \[\leadsto {\left(\frac{\color{blue}{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}^{2} \]
                    3. lift-sqrt.f64N/A

                      \[\leadsto {\left(\frac{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}{\color{blue}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}}\right)}^{2} \]
                    4. sqrt-undivN/A

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

                      \[\leadsto {\left(\sqrt{\color{blue}{\frac{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}}\right)}^{2} \]
                    6. lower-sqrt.f6466.8

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

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

                      \[\leadsto {\left(\sqrt{\frac{\mathsf{fma}\left(\color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)} \cdot eh, \sin t, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}^{2} \]
                    9. lift-*.f6466.8

                      \[\leadsto {\left(\sqrt{\frac{\mathsf{fma}\left(\color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)} \cdot eh, \sin t, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}^{2} \]
                  6. Applied rewrites66.8%

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

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

                      \[\leadsto ew \cdot \color{blue}{\cos t} \]
                    2. lift-cos.f6463.8

                      \[\leadsto ew \cdot \cos t \]
                  9. Applied rewrites63.8%

                    \[\leadsto \color{blue}{ew \cdot \cos t} \]
                7. Recombined 3 regimes into one program.
                8. Add Preprocessing

                Alternative 10: 89.5% accurate, 0.5× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\tan t}{ew}\\ t_2 := \tan^{-1} \left(t\_1 \cdot eh\right)\\ t_3 := eh \cdot t\_1\\ t_4 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\ \mathbf{if}\;\left(ew \cdot \cos t\right) \cdot \cos t\_4 - \left(eh \cdot \sin t\right) \cdot \sin t\_4 \leq -2 \cdot 10^{-269}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t\_3 \cdot eh, \sin t, \cos t \cdot ew\right)}{-\cosh \sinh^{-1} t\_3}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\cos t\_2 \cdot \cos t, ew, \sin t\_2 \cdot \left(\sin t \cdot eh\right)\right)\\ \end{array} \end{array} \]
                (FPCore (eh ew t)
                 :precision binary64
                 (let* ((t_1 (/ (tan t) ew))
                        (t_2 (atan (* t_1 eh)))
                        (t_3 (* eh t_1))
                        (t_4 (atan (/ (* (- eh) (tan t)) ew))))
                   (if (<=
                        (- (* (* ew (cos t)) (cos t_4)) (* (* eh (sin t)) (sin t_4)))
                        -2e-269)
                     (/ (fma (* t_3 eh) (sin t) (* (cos t) ew)) (- (cosh (asinh t_3))))
                     (fma (* (cos t_2) (cos t)) ew (* (sin t_2) (* (sin t) eh))))))
                double code(double eh, double ew, double t) {
                	double t_1 = tan(t) / ew;
                	double t_2 = atan((t_1 * eh));
                	double t_3 = eh * t_1;
                	double t_4 = atan(((-eh * tan(t)) / ew));
                	double tmp;
                	if ((((ew * cos(t)) * cos(t_4)) - ((eh * sin(t)) * sin(t_4))) <= -2e-269) {
                		tmp = fma((t_3 * eh), sin(t), (cos(t) * ew)) / -cosh(asinh(t_3));
                	} else {
                		tmp = fma((cos(t_2) * cos(t)), ew, (sin(t_2) * (sin(t) * eh)));
                	}
                	return tmp;
                }
                
                function code(eh, ew, t)
                	t_1 = Float64(tan(t) / ew)
                	t_2 = atan(Float64(t_1 * eh))
                	t_3 = Float64(eh * t_1)
                	t_4 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew))
                	tmp = 0.0
                	if (Float64(Float64(Float64(ew * cos(t)) * cos(t_4)) - Float64(Float64(eh * sin(t)) * sin(t_4))) <= -2e-269)
                		tmp = Float64(fma(Float64(t_3 * eh), sin(t), Float64(cos(t) * ew)) / Float64(-cosh(asinh(t_3))));
                	else
                		tmp = fma(Float64(cos(t_2) * cos(t)), ew, Float64(sin(t_2) * Float64(sin(t) * eh)));
                	end
                	return tmp
                end
                
                code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]}, Block[{t$95$2 = N[ArcTan[N[(t$95$1 * eh), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(eh * t$95$1), $MachinePrecision]}, Block[{t$95$4 = 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$4], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$4], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e-269], N[(N[(N[(t$95$3 * eh), $MachinePrecision] * N[Sin[t], $MachinePrecision] + N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / (-N[Cosh[N[ArcSinh[t$95$3], $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(N[(N[Cos[t$95$2], $MachinePrecision] * N[Cos[t], $MachinePrecision]), $MachinePrecision] * ew + N[(N[Sin[t$95$2], $MachinePrecision] * N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \frac{\tan t}{ew}\\
                t_2 := \tan^{-1} \left(t\_1 \cdot eh\right)\\
                t_3 := eh \cdot t\_1\\
                t_4 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
                \mathbf{if}\;\left(ew \cdot \cos t\right) \cdot \cos t\_4 - \left(eh \cdot \sin t\right) \cdot \sin t\_4 \leq -2 \cdot 10^{-269}:\\
                \;\;\;\;\frac{\mathsf{fma}\left(t\_3 \cdot eh, \sin t, \cos t \cdot ew\right)}{-\cosh \sinh^{-1} t\_3}\\
                
                \mathbf{else}:\\
                \;\;\;\;\mathsf{fma}\left(\cos t\_2 \cdot \cos t, ew, \sin t\_2 \cdot \left(\sin t \cdot eh\right)\right)\\
                
                
                \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))))) < -1.9999999999999999e-269

                  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. Applied rewrites1.2%

                    \[\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)}} \]
                  3. Step-by-step derivation
                    1. rem-square-sqrtN/A

                      \[\leadsto \color{blue}{\sqrt{\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)}} \cdot \sqrt{\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)}}} \]
                    2. sqrt-unprodN/A

                      \[\leadsto \color{blue}{\sqrt{\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)} \cdot \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)}}} \]
                    3. sqr-negN/A

                      \[\leadsto \sqrt{\color{blue}{\left(\mathsf{neg}\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)\right) \cdot \left(\mathsf{neg}\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)\right)}} \]
                    4. lift-neg.f64N/A

                      \[\leadsto \sqrt{\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)} \cdot \left(\mathsf{neg}\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)\right)} \]
                    5. lift-neg.f64N/A

                      \[\leadsto \sqrt{\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) \cdot \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)}} \]
                  4. Applied rewrites80.1%

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

                  if -1.9999999999999999e-269 < (-.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.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. Applied rewrites98.7%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right) \cdot \cos t, ew, \sin \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right) \cdot \left(\sin t \cdot eh\right)\right)} \]
                3. Recombined 2 regimes into one program.
                4. Add Preprocessing

                Alternative 11: 52.7% accurate, 0.7× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := eh \cdot \sin t\\ t_2 := ew \cdot \cos t\\ t_3 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\ \mathbf{if}\;t\_2 \cdot \cos t\_3 - t\_1 \cdot \sin t\_3 \leq -2 \cdot 10^{-269}:\\ \;\;\;\;\left|\frac{ew}{\cos \tan^{-1} \left(\frac{t\_1}{t\_2}\right)}\right|\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                (FPCore (eh ew t)
                 :precision binary64
                 (let* ((t_1 (* eh (sin t)))
                        (t_2 (* ew (cos t)))
                        (t_3 (atan (/ (* (- eh) (tan t)) ew))))
                   (if (<= (- (* t_2 (cos t_3)) (* t_1 (sin t_3))) -2e-269)
                     (fabs (/ ew (cos (atan (/ t_1 t_2)))))
                     t_2)))
                double code(double eh, double ew, double t) {
                	double t_1 = eh * sin(t);
                	double t_2 = ew * cos(t);
                	double t_3 = atan(((-eh * tan(t)) / ew));
                	double tmp;
                	if (((t_2 * cos(t_3)) - (t_1 * sin(t_3))) <= -2e-269) {
                		tmp = fabs((ew / cos(atan((t_1 / t_2)))));
                	} else {
                		tmp = 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) :: t_3
                    real(8) :: tmp
                    t_1 = eh * sin(t)
                    t_2 = ew * cos(t)
                    t_3 = atan(((-eh * tan(t)) / ew))
                    if (((t_2 * cos(t_3)) - (t_1 * sin(t_3))) <= (-2d-269)) then
                        tmp = abs((ew / cos(atan((t_1 / t_2)))))
                    else
                        tmp = t_2
                    end if
                    code = tmp
                end function
                
                public static double code(double eh, double ew, double t) {
                	double t_1 = eh * Math.sin(t);
                	double t_2 = ew * Math.cos(t);
                	double t_3 = Math.atan(((-eh * Math.tan(t)) / ew));
                	double tmp;
                	if (((t_2 * Math.cos(t_3)) - (t_1 * Math.sin(t_3))) <= -2e-269) {
                		tmp = Math.abs((ew / Math.cos(Math.atan((t_1 / t_2)))));
                	} else {
                		tmp = t_2;
                	}
                	return tmp;
                }
                
                def code(eh, ew, t):
                	t_1 = eh * math.sin(t)
                	t_2 = ew * math.cos(t)
                	t_3 = math.atan(((-eh * math.tan(t)) / ew))
                	tmp = 0
                	if ((t_2 * math.cos(t_3)) - (t_1 * math.sin(t_3))) <= -2e-269:
                		tmp = math.fabs((ew / math.cos(math.atan((t_1 / t_2)))))
                	else:
                		tmp = t_2
                	return tmp
                
                function code(eh, ew, t)
                	t_1 = Float64(eh * sin(t))
                	t_2 = Float64(ew * cos(t))
                	t_3 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew))
                	tmp = 0.0
                	if (Float64(Float64(t_2 * cos(t_3)) - Float64(t_1 * sin(t_3))) <= -2e-269)
                		tmp = abs(Float64(ew / cos(atan(Float64(t_1 / t_2)))));
                	else
                		tmp = t_2;
                	end
                	return tmp
                end
                
                function tmp_2 = code(eh, ew, t)
                	t_1 = eh * sin(t);
                	t_2 = ew * cos(t);
                	t_3 = atan(((-eh * tan(t)) / ew));
                	tmp = 0.0;
                	if (((t_2 * cos(t_3)) - (t_1 * sin(t_3))) <= -2e-269)
                		tmp = abs((ew / cos(atan((t_1 / t_2)))));
                	else
                		tmp = t_2;
                	end
                	tmp_2 = tmp;
                end
                
                code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(t$95$2 * N[Cos[t$95$3], $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e-269], N[Abs[N[(ew / N[Cos[N[ArcTan[N[(t$95$1 / t$95$2), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$2]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := eh \cdot \sin t\\
                t_2 := ew \cdot \cos t\\
                t_3 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
                \mathbf{if}\;t\_2 \cdot \cos t\_3 - t\_1 \cdot \sin t\_3 \leq -2 \cdot 10^{-269}:\\
                \;\;\;\;\left|\frac{ew}{\cos \tan^{-1} \left(\frac{t\_1}{t\_2}\right)}\right|\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_2\\
                
                
                \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))))) < -1.9999999999999999e-269

                  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. Applied rewrites99.8%

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

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

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

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

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

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

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

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

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

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

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

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

                  if -1.9999999999999999e-269 < (-.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.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. Applied rewrites68.1%

                    \[\leadsto \color{blue}{{\left(\sqrt{\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)}^{2}} \]
                  3. Step-by-step derivation
                    1. lift-sqrt.f64N/A

                      \[\leadsto {\color{blue}{\left(\sqrt{\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)}}^{2} \]
                    2. lift-/.f64N/A

                      \[\leadsto {\left(\sqrt{\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)}}}\right)}^{2} \]
                    3. sqrt-divN/A

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

                      \[\leadsto {\color{blue}{\left(\frac{\sqrt{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}}{\sqrt{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}}\right)}}^{2} \]
                  4. Applied rewrites78.0%

                    \[\leadsto {\color{blue}{\left(\frac{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}}^{2} \]
                  5. Step-by-step derivation
                    1. lift-/.f64N/A

                      \[\leadsto {\color{blue}{\left(\frac{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}}^{2} \]
                    2. lift-sqrt.f64N/A

                      \[\leadsto {\left(\frac{\color{blue}{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}^{2} \]
                    3. lift-sqrt.f64N/A

                      \[\leadsto {\left(\frac{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}{\color{blue}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}}\right)}^{2} \]
                    4. sqrt-undivN/A

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

                      \[\leadsto {\left(\sqrt{\color{blue}{\frac{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}}\right)}^{2} \]
                    6. lower-sqrt.f6478.0

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

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

                      \[\leadsto {\left(\sqrt{\frac{\mathsf{fma}\left(\color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)} \cdot eh, \sin t, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}^{2} \]
                    9. lift-*.f6478.0

                      \[\leadsto {\left(\sqrt{\frac{\mathsf{fma}\left(\color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)} \cdot eh, \sin t, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}^{2} \]
                  6. Applied rewrites78.0%

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

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

                      \[\leadsto ew \cdot \color{blue}{\cos t} \]
                    2. lift-cos.f6460.8

                      \[\leadsto ew \cdot \cos t \]
                  9. Applied rewrites60.8%

                    \[\leadsto \color{blue}{ew \cdot \cos t} \]
                3. Recombined 2 regimes into one program.
                4. Add Preprocessing

                Alternative 12: 40.8% accurate, 0.9× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := eh \cdot \sin t\\ t_2 := ew \cdot \cos t\\ t_3 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\ \mathbf{if}\;t\_2 \cdot \cos t\_3 - t\_1 \cdot \sin t\_3 \leq -1 \cdot 10^{-226}:\\ \;\;\;\;-1 \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                (FPCore (eh ew t)
                 :precision binary64
                 (let* ((t_1 (* eh (sin t)))
                        (t_2 (* ew (cos t)))
                        (t_3 (atan (/ (* (- eh) (tan t)) ew))))
                   (if (<= (- (* t_2 (cos t_3)) (* t_1 (sin t_3))) -1e-226) (* -1.0 t_1) t_2)))
                double code(double eh, double ew, double t) {
                	double t_1 = eh * sin(t);
                	double t_2 = ew * cos(t);
                	double t_3 = atan(((-eh * tan(t)) / ew));
                	double tmp;
                	if (((t_2 * cos(t_3)) - (t_1 * sin(t_3))) <= -1e-226) {
                		tmp = -1.0 * t_1;
                	} else {
                		tmp = 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) :: t_3
                    real(8) :: tmp
                    t_1 = eh * sin(t)
                    t_2 = ew * cos(t)
                    t_3 = atan(((-eh * tan(t)) / ew))
                    if (((t_2 * cos(t_3)) - (t_1 * sin(t_3))) <= (-1d-226)) then
                        tmp = (-1.0d0) * t_1
                    else
                        tmp = t_2
                    end if
                    code = tmp
                end function
                
                public static double code(double eh, double ew, double t) {
                	double t_1 = eh * Math.sin(t);
                	double t_2 = ew * Math.cos(t);
                	double t_3 = Math.atan(((-eh * Math.tan(t)) / ew));
                	double tmp;
                	if (((t_2 * Math.cos(t_3)) - (t_1 * Math.sin(t_3))) <= -1e-226) {
                		tmp = -1.0 * t_1;
                	} else {
                		tmp = t_2;
                	}
                	return tmp;
                }
                
                def code(eh, ew, t):
                	t_1 = eh * math.sin(t)
                	t_2 = ew * math.cos(t)
                	t_3 = math.atan(((-eh * math.tan(t)) / ew))
                	tmp = 0
                	if ((t_2 * math.cos(t_3)) - (t_1 * math.sin(t_3))) <= -1e-226:
                		tmp = -1.0 * t_1
                	else:
                		tmp = t_2
                	return tmp
                
                function code(eh, ew, t)
                	t_1 = Float64(eh * sin(t))
                	t_2 = Float64(ew * cos(t))
                	t_3 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew))
                	tmp = 0.0
                	if (Float64(Float64(t_2 * cos(t_3)) - Float64(t_1 * sin(t_3))) <= -1e-226)
                		tmp = Float64(-1.0 * t_1);
                	else
                		tmp = t_2;
                	end
                	return tmp
                end
                
                function tmp_2 = code(eh, ew, t)
                	t_1 = eh * sin(t);
                	t_2 = ew * cos(t);
                	t_3 = atan(((-eh * tan(t)) / ew));
                	tmp = 0.0;
                	if (((t_2 * cos(t_3)) - (t_1 * sin(t_3))) <= -1e-226)
                		tmp = -1.0 * t_1;
                	else
                		tmp = t_2;
                	end
                	tmp_2 = tmp;
                end
                
                code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(t$95$2 * N[Cos[t$95$3], $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e-226], N[(-1.0 * t$95$1), $MachinePrecision], t$95$2]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := eh \cdot \sin t\\
                t_2 := ew \cdot \cos t\\
                t_3 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
                \mathbf{if}\;t\_2 \cdot \cos t\_3 - t\_1 \cdot \sin t\_3 \leq -1 \cdot 10^{-226}:\\
                \;\;\;\;-1 \cdot t\_1\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_2\\
                
                
                \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))))) < -9.99999999999999921e-227

                  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. Applied rewrites1.1%

                    \[\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)}} \]
                  3. Step-by-step derivation
                    1. lift-cosh.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\color{blue}{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}} \]
                    2. lift-asinh.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\cosh \color{blue}{\sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}} \]
                    3. cosh-asinhN/A

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

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

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

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{\color{blue}{1 + \left(\frac{\tan t}{ew} \cdot eh\right) \cdot \left(\frac{\tan t}{ew} \cdot eh\right)}}} \]
                    7. pow2N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{1 + \color{blue}{{\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}} \]
                    8. lower-pow.f641.1

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

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

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{1 + {\color{blue}{\left(eh \cdot \frac{\tan t}{ew}\right)}}^{2}}} \]
                    11. lower-*.f641.1

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{1 + {\color{blue}{\left(eh \cdot \frac{\tan t}{ew}\right)}}^{2}}} \]
                  4. Applied rewrites1.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{\mathsf{fma}\left(\cos t, ew, \left(\color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)} \cdot eh\right) \cdot \sin t\right)}{\sqrt{1 + {\left(eh \cdot \frac{\tan t}{ew}\right)}^{2}}} \]
                    15. lift-*.f641.1

                      \[\leadsto \frac{\mathsf{fma}\left(\cos t, ew, \left(\color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)} \cdot eh\right) \cdot \sin t\right)}{\sqrt{1 + {\left(eh \cdot \frac{\tan t}{ew}\right)}^{2}}} \]
                  6. Applied rewrites1.1%

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

                    \[\leadsto \color{blue}{-1 \cdot \left(eh \cdot \sin t\right)} \]
                  8. Step-by-step derivation
                    1. lower-*.f64N/A

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

                      \[\leadsto -1 \cdot \left(eh \cdot \color{blue}{\sin t}\right) \]
                    3. lift-sin.f6420.5

                      \[\leadsto -1 \cdot \left(eh \cdot \sin t\right) \]
                  9. Applied rewrites20.5%

                    \[\leadsto \color{blue}{-1 \cdot \left(eh \cdot \sin t\right)} \]

                  if -9.99999999999999921e-227 < (-.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.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. Applied rewrites66.1%

                    \[\leadsto \color{blue}{{\left(\sqrt{\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)}^{2}} \]
                  3. Step-by-step derivation
                    1. lift-sqrt.f64N/A

                      \[\leadsto {\color{blue}{\left(\sqrt{\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)}}^{2} \]
                    2. lift-/.f64N/A

                      \[\leadsto {\left(\sqrt{\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)}}}\right)}^{2} \]
                    3. sqrt-divN/A

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

                      \[\leadsto {\color{blue}{\left(\frac{\sqrt{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}}{\sqrt{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}}\right)}}^{2} \]
                  4. Applied rewrites75.8%

                    \[\leadsto {\color{blue}{\left(\frac{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}}^{2} \]
                  5. Step-by-step derivation
                    1. lift-/.f64N/A

                      \[\leadsto {\color{blue}{\left(\frac{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}}^{2} \]
                    2. lift-sqrt.f64N/A

                      \[\leadsto {\left(\frac{\color{blue}{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}^{2} \]
                    3. lift-sqrt.f64N/A

                      \[\leadsto {\left(\frac{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}{\color{blue}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}}\right)}^{2} \]
                    4. sqrt-undivN/A

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

                      \[\leadsto {\left(\sqrt{\color{blue}{\frac{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}}\right)}^{2} \]
                    6. lower-sqrt.f6475.8

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

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

                      \[\leadsto {\left(\sqrt{\frac{\mathsf{fma}\left(\color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)} \cdot eh, \sin t, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}^{2} \]
                    9. lift-*.f6475.8

                      \[\leadsto {\left(\sqrt{\frac{\mathsf{fma}\left(\color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)} \cdot eh, \sin t, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}^{2} \]
                  6. Applied rewrites75.8%

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

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

                      \[\leadsto ew \cdot \color{blue}{\cos t} \]
                    2. lift-cos.f6459.3

                      \[\leadsto ew \cdot \cos t \]
                  9. Applied rewrites59.3%

                    \[\leadsto \color{blue}{ew \cdot \cos t} \]
                3. Recombined 2 regimes into one program.
                4. Add Preprocessing

                Alternative 13: 41.5% accurate, 0.9× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := eh \cdot \sin t\\ t_2 := ew \cdot \cos t\\ t_3 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\ \mathbf{if}\;t\_2 \cdot \cos t\_3 - t\_1 \cdot \sin t\_3 \leq -2 \cdot 10^{-269}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                (FPCore (eh ew t)
                 :precision binary64
                 (let* ((t_1 (* eh (sin t)))
                        (t_2 (* ew (cos t)))
                        (t_3 (atan (/ (* (- eh) (tan t)) ew))))
                   (if (<= (- (* t_2 (cos t_3)) (* t_1 (sin t_3))) -2e-269) t_1 t_2)))
                double code(double eh, double ew, double t) {
                	double t_1 = eh * sin(t);
                	double t_2 = ew * cos(t);
                	double t_3 = atan(((-eh * tan(t)) / ew));
                	double tmp;
                	if (((t_2 * cos(t_3)) - (t_1 * sin(t_3))) <= -2e-269) {
                		tmp = t_1;
                	} else {
                		tmp = 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) :: t_3
                    real(8) :: tmp
                    t_1 = eh * sin(t)
                    t_2 = ew * cos(t)
                    t_3 = atan(((-eh * tan(t)) / ew))
                    if (((t_2 * cos(t_3)) - (t_1 * sin(t_3))) <= (-2d-269)) then
                        tmp = t_1
                    else
                        tmp = t_2
                    end if
                    code = tmp
                end function
                
                public static double code(double eh, double ew, double t) {
                	double t_1 = eh * Math.sin(t);
                	double t_2 = ew * Math.cos(t);
                	double t_3 = Math.atan(((-eh * Math.tan(t)) / ew));
                	double tmp;
                	if (((t_2 * Math.cos(t_3)) - (t_1 * Math.sin(t_3))) <= -2e-269) {
                		tmp = t_1;
                	} else {
                		tmp = t_2;
                	}
                	return tmp;
                }
                
                def code(eh, ew, t):
                	t_1 = eh * math.sin(t)
                	t_2 = ew * math.cos(t)
                	t_3 = math.atan(((-eh * math.tan(t)) / ew))
                	tmp = 0
                	if ((t_2 * math.cos(t_3)) - (t_1 * math.sin(t_3))) <= -2e-269:
                		tmp = t_1
                	else:
                		tmp = t_2
                	return tmp
                
                function code(eh, ew, t)
                	t_1 = Float64(eh * sin(t))
                	t_2 = Float64(ew * cos(t))
                	t_3 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew))
                	tmp = 0.0
                	if (Float64(Float64(t_2 * cos(t_3)) - Float64(t_1 * sin(t_3))) <= -2e-269)
                		tmp = t_1;
                	else
                		tmp = t_2;
                	end
                	return tmp
                end
                
                function tmp_2 = code(eh, ew, t)
                	t_1 = eh * sin(t);
                	t_2 = ew * cos(t);
                	t_3 = atan(((-eh * tan(t)) / ew));
                	tmp = 0.0;
                	if (((t_2 * cos(t_3)) - (t_1 * sin(t_3))) <= -2e-269)
                		tmp = t_1;
                	else
                		tmp = t_2;
                	end
                	tmp_2 = tmp;
                end
                
                code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(t$95$2 * N[Cos[t$95$3], $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e-269], t$95$1, t$95$2]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := eh \cdot \sin t\\
                t_2 := ew \cdot \cos t\\
                t_3 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
                \mathbf{if}\;t\_2 \cdot \cos t\_3 - t\_1 \cdot \sin t\_3 \leq -2 \cdot 10^{-269}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_2\\
                
                
                \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))))) < -1.9999999999999999e-269

                  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. Applied rewrites1.2%

                    \[\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)}} \]
                  3. Step-by-step derivation
                    1. lift-cosh.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\color{blue}{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}} \]
                    2. lift-asinh.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\cosh \color{blue}{\sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}} \]
                    3. cosh-asinhN/A

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

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

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

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{\color{blue}{1 + \left(\frac{\tan t}{ew} \cdot eh\right) \cdot \left(\frac{\tan t}{ew} \cdot eh\right)}}} \]
                    7. pow2N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{1 + \color{blue}{{\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}} \]
                    8. lower-pow.f641.2

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

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

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{1 + {\color{blue}{\left(eh \cdot \frac{\tan t}{ew}\right)}}^{2}}} \]
                    11. lower-*.f641.2

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{1 + {\color{blue}{\left(eh \cdot \frac{\tan t}{ew}\right)}}^{2}}} \]
                  4. Applied rewrites1.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{\mathsf{fma}\left(\cos t, ew, \left(\color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)} \cdot eh\right) \cdot \sin t\right)}{\sqrt{1 + {\left(eh \cdot \frac{\tan t}{ew}\right)}^{2}}} \]
                    15. lift-*.f641.2

                      \[\leadsto \frac{\mathsf{fma}\left(\cos t, ew, \left(\color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)} \cdot eh\right) \cdot \sin t\right)}{\sqrt{1 + {\left(eh \cdot \frac{\tan t}{ew}\right)}^{2}}} \]
                  6. Applied rewrites1.2%

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

                    \[\leadsto \color{blue}{eh \cdot \sin t} \]
                  8. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto eh \cdot \color{blue}{\sin t} \]
                    2. lift-sin.f6421.4

                      \[\leadsto eh \cdot \sin t \]
                  9. Applied rewrites21.4%

                    \[\leadsto \color{blue}{eh \cdot \sin t} \]

                  if -1.9999999999999999e-269 < (-.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.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. Applied rewrites68.1%

                    \[\leadsto \color{blue}{{\left(\sqrt{\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)}^{2}} \]
                  3. Step-by-step derivation
                    1. lift-sqrt.f64N/A

                      \[\leadsto {\color{blue}{\left(\sqrt{\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)}}^{2} \]
                    2. lift-/.f64N/A

                      \[\leadsto {\left(\sqrt{\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)}}}\right)}^{2} \]
                    3. sqrt-divN/A

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

                      \[\leadsto {\color{blue}{\left(\frac{\sqrt{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}}{\sqrt{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}}\right)}}^{2} \]
                  4. Applied rewrites78.0%

                    \[\leadsto {\color{blue}{\left(\frac{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}}^{2} \]
                  5. Step-by-step derivation
                    1. lift-/.f64N/A

                      \[\leadsto {\color{blue}{\left(\frac{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}}^{2} \]
                    2. lift-sqrt.f64N/A

                      \[\leadsto {\left(\frac{\color{blue}{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}^{2} \]
                    3. lift-sqrt.f64N/A

                      \[\leadsto {\left(\frac{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}{\color{blue}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}}\right)}^{2} \]
                    4. sqrt-undivN/A

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

                      \[\leadsto {\left(\sqrt{\color{blue}{\frac{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}}\right)}^{2} \]
                    6. lower-sqrt.f6478.0

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

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

                      \[\leadsto {\left(\sqrt{\frac{\mathsf{fma}\left(\color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)} \cdot eh, \sin t, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}^{2} \]
                    9. lift-*.f6478.0

                      \[\leadsto {\left(\sqrt{\frac{\mathsf{fma}\left(\color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)} \cdot eh, \sin t, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}^{2} \]
                  6. Applied rewrites78.0%

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

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

                      \[\leadsto ew \cdot \color{blue}{\cos t} \]
                    2. lift-cos.f6460.8

                      \[\leadsto ew \cdot \cos t \]
                  9. Applied rewrites60.8%

                    \[\leadsto \color{blue}{ew \cdot \cos t} \]
                3. Recombined 2 regimes into one program.
                4. Add Preprocessing

                Alternative 14: 77.7% accurate, 1.3× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\tan t}{ew}\\ t_2 := -1 \cdot \left(eh \cdot \sin t\right)\\ \mathbf{if}\;eh \leq -2.8 \cdot 10^{+147}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;eh \leq 2.75 \cdot 10^{+144}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\sin t, t\_1 \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(t\_1 \cdot eh\right)}\right|\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                (FPCore (eh ew t)
                 :precision binary64
                 (let* ((t_1 (/ (tan t) ew)) (t_2 (* -1.0 (* eh (sin t)))))
                   (if (<= eh -2.8e+147)
                     t_2
                     (if (<= eh 2.75e+144)
                       (fabs
                        (/
                         (fma (sin t) (* t_1 (* eh eh)) (* (cos t) ew))
                         (cosh (asinh (* t_1 eh)))))
                       t_2))))
                double code(double eh, double ew, double t) {
                	double t_1 = tan(t) / ew;
                	double t_2 = -1.0 * (eh * sin(t));
                	double tmp;
                	if (eh <= -2.8e+147) {
                		tmp = t_2;
                	} else if (eh <= 2.75e+144) {
                		tmp = fabs((fma(sin(t), (t_1 * (eh * eh)), (cos(t) * ew)) / cosh(asinh((t_1 * eh)))));
                	} else {
                		tmp = t_2;
                	}
                	return tmp;
                }
                
                function code(eh, ew, t)
                	t_1 = Float64(tan(t) / ew)
                	t_2 = Float64(-1.0 * Float64(eh * sin(t)))
                	tmp = 0.0
                	if (eh <= -2.8e+147)
                		tmp = t_2;
                	elseif (eh <= 2.75e+144)
                		tmp = abs(Float64(fma(sin(t), Float64(t_1 * Float64(eh * eh)), Float64(cos(t) * ew)) / cosh(asinh(Float64(t_1 * eh)))));
                	else
                		tmp = t_2;
                	end
                	return tmp
                end
                
                code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 * N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[eh, -2.8e+147], t$95$2, If[LessEqual[eh, 2.75e+144], N[Abs[N[(N[(N[Sin[t], $MachinePrecision] * N[(t$95$1 * N[(eh * eh), $MachinePrecision]), $MachinePrecision] + N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / N[Cosh[N[ArcSinh[N[(t$95$1 * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$2]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \frac{\tan t}{ew}\\
                t_2 := -1 \cdot \left(eh \cdot \sin t\right)\\
                \mathbf{if}\;eh \leq -2.8 \cdot 10^{+147}:\\
                \;\;\;\;t\_2\\
                
                \mathbf{elif}\;eh \leq 2.75 \cdot 10^{+144}:\\
                \;\;\;\;\left|\frac{\mathsf{fma}\left(\sin t, t\_1 \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(t\_1 \cdot eh\right)}\right|\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_2\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if eh < -2.8000000000000001e147 or 2.75000000000000011e144 < 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. Applied rewrites3.2%

                    \[\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)}} \]
                  3. Step-by-step derivation
                    1. lift-cosh.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\color{blue}{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}} \]
                    2. lift-asinh.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\cosh \color{blue}{\sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}} \]
                    3. cosh-asinhN/A

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

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

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

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{\color{blue}{1 + \left(\frac{\tan t}{ew} \cdot eh\right) \cdot \left(\frac{\tan t}{ew} \cdot eh\right)}}} \]
                    7. pow2N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{1 + \color{blue}{{\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}} \]
                    8. lower-pow.f642.5

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

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

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{1 + {\color{blue}{\left(eh \cdot \frac{\tan t}{ew}\right)}}^{2}}} \]
                    11. lower-*.f642.5

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{1 + {\color{blue}{\left(eh \cdot \frac{\tan t}{ew}\right)}}^{2}}} \]
                  4. Applied rewrites2.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{\mathsf{fma}\left(\cos t, ew, \left(\color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)} \cdot eh\right) \cdot \sin t\right)}{\sqrt{1 + {\left(eh \cdot \frac{\tan t}{ew}\right)}^{2}}} \]
                    15. lift-*.f6419.8

                      \[\leadsto \frac{\mathsf{fma}\left(\cos t, ew, \left(\color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)} \cdot eh\right) \cdot \sin t\right)}{\sqrt{1 + {\left(eh \cdot \frac{\tan t}{ew}\right)}^{2}}} \]
                  6. Applied rewrites19.8%

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

                    \[\leadsto \color{blue}{-1 \cdot \left(eh \cdot \sin t\right)} \]
                  8. Step-by-step derivation
                    1. lower-*.f64N/A

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

                      \[\leadsto -1 \cdot \left(eh \cdot \color{blue}{\sin t}\right) \]
                    3. lift-sin.f6437.3

                      \[\leadsto -1 \cdot \left(eh \cdot \sin t\right) \]
                  9. Applied rewrites37.3%

                    \[\leadsto \color{blue}{-1 \cdot \left(eh \cdot \sin t\right)} \]

                  if -2.8000000000000001e147 < eh < 2.75000000000000011e144

                  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. Applied rewrites91.2%

                    \[\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|} \]
                3. Recombined 2 regimes into one program.
                4. Add Preprocessing

                Alternative 15: 34.5% accurate, 7.7× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq 3.7 \cdot 10^{-163}:\\ \;\;\;\;eh \cdot \sin t\\ \mathbf{else}:\\ \;\;\;\;ew\\ \end{array} \end{array} \]
                (FPCore (eh ew t) :precision binary64 (if (<= ew 3.7e-163) (* eh (sin t)) ew))
                double code(double eh, double ew, double t) {
                	double tmp;
                	if (ew <= 3.7e-163) {
                		tmp = eh * sin(t);
                	} else {
                		tmp = 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) :: tmp
                    if (ew <= 3.7d-163) then
                        tmp = eh * sin(t)
                    else
                        tmp = ew
                    end if
                    code = tmp
                end function
                
                public static double code(double eh, double ew, double t) {
                	double tmp;
                	if (ew <= 3.7e-163) {
                		tmp = eh * Math.sin(t);
                	} else {
                		tmp = ew;
                	}
                	return tmp;
                }
                
                def code(eh, ew, t):
                	tmp = 0
                	if ew <= 3.7e-163:
                		tmp = eh * math.sin(t)
                	else:
                		tmp = ew
                	return tmp
                
                function code(eh, ew, t)
                	tmp = 0.0
                	if (ew <= 3.7e-163)
                		tmp = Float64(eh * sin(t));
                	else
                		tmp = ew;
                	end
                	return tmp
                end
                
                function tmp_2 = code(eh, ew, t)
                	tmp = 0.0;
                	if (ew <= 3.7e-163)
                		tmp = eh * sin(t);
                	else
                		tmp = ew;
                	end
                	tmp_2 = tmp;
                end
                
                code[eh_, ew_, t_] := If[LessEqual[ew, 3.7e-163], N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision], ew]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;ew \leq 3.7 \cdot 10^{-163}:\\
                \;\;\;\;eh \cdot \sin t\\
                
                \mathbf{else}:\\
                \;\;\;\;ew\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if ew < 3.6999999999999999e-163

                  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. Applied rewrites22.2%

                    \[\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)}} \]
                  3. Step-by-step derivation
                    1. lift-cosh.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\color{blue}{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}} \]
                    2. lift-asinh.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\cosh \color{blue}{\sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}} \]
                    3. cosh-asinhN/A

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

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

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

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{\color{blue}{1 + \left(\frac{\tan t}{ew} \cdot eh\right) \cdot \left(\frac{\tan t}{ew} \cdot eh\right)}}} \]
                    7. pow2N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{1 + \color{blue}{{\left(\frac{\tan t}{ew} \cdot eh\right)}^{2}}}} \]
                    8. lower-pow.f6419.6

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

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

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{1 + {\color{blue}{\left(eh \cdot \frac{\tan t}{ew}\right)}}^{2}}} \]
                    11. lower-*.f6419.6

                      \[\leadsto \frac{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\sqrt{1 + {\color{blue}{\left(eh \cdot \frac{\tan t}{ew}\right)}}^{2}}} \]
                  4. Applied rewrites19.6%

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\cos t, ew, \left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh\right) \cdot \sin t\right)}}{\sqrt{1 + {\left(eh \cdot \frac{\tan t}{ew}\right)}^{2}}} \]
                    12. lower-*.f6422.5

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

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

                      \[\leadsto \frac{\mathsf{fma}\left(\cos t, ew, \left(\color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)} \cdot eh\right) \cdot \sin t\right)}{\sqrt{1 + {\left(eh \cdot \frac{\tan t}{ew}\right)}^{2}}} \]
                    15. lift-*.f6422.5

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

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

                    \[\leadsto \color{blue}{eh \cdot \sin t} \]
                  8. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto eh \cdot \color{blue}{\sin t} \]
                    2. lift-sin.f6425.4

                      \[\leadsto eh \cdot \sin t \]
                  9. Applied rewrites25.4%

                    \[\leadsto \color{blue}{eh \cdot \sin t} \]

                  if 3.6999999999999999e-163 < 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. Applied rewrites56.9%

                    \[\leadsto \color{blue}{{\left(\sqrt{\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)}^{2}} \]
                  3. Step-by-step derivation
                    1. lift-sqrt.f64N/A

                      \[\leadsto {\color{blue}{\left(\sqrt{\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)}}^{2} \]
                    2. lift-/.f64N/A

                      \[\leadsto {\left(\sqrt{\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)}}}\right)}^{2} \]
                    3. sqrt-divN/A

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

                      \[\leadsto {\color{blue}{\left(\frac{\sqrt{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}}{\sqrt{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}}\right)}}^{2} \]
                  4. Applied rewrites65.9%

                    \[\leadsto {\color{blue}{\left(\frac{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}}^{2} \]
                  5. Step-by-step derivation
                    1. lift-/.f64N/A

                      \[\leadsto {\color{blue}{\left(\frac{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}}^{2} \]
                    2. lift-sqrt.f64N/A

                      \[\leadsto {\left(\frac{\color{blue}{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}^{2} \]
                    3. lift-sqrt.f64N/A

                      \[\leadsto {\left(\frac{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}{\color{blue}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}}\right)}^{2} \]
                    4. sqrt-undivN/A

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

                      \[\leadsto {\left(\sqrt{\color{blue}{\frac{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}}\right)}^{2} \]
                    6. lower-sqrt.f6465.9

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

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

                      \[\leadsto {\left(\sqrt{\frac{\mathsf{fma}\left(\color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)} \cdot eh, \sin t, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}^{2} \]
                    9. lift-*.f6465.9

                      \[\leadsto {\left(\sqrt{\frac{\mathsf{fma}\left(\color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)} \cdot eh, \sin t, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}^{2} \]
                  6. Applied rewrites65.9%

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

                    \[\leadsto \color{blue}{ew} \]
                  8. Step-by-step derivation
                    1. Applied rewrites49.6%

                      \[\leadsto \color{blue}{ew} \]
                  9. Recombined 2 regimes into one program.
                  10. Add Preprocessing

                  Alternative 16: 22.1% accurate, 862.0× speedup?

                  \[\begin{array}{l} \\ ew \end{array} \]
                  (FPCore (eh ew t) :precision binary64 ew)
                  double code(double eh, double ew, double t) {
                  	return 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 = ew
                  end function
                  
                  public static double code(double eh, double ew, double t) {
                  	return ew;
                  }
                  
                  def code(eh, ew, t):
                  	return ew
                  
                  function code(eh, ew, t)
                  	return ew
                  end
                  
                  function tmp = code(eh, ew, t)
                  	tmp = ew;
                  end
                  
                  code[eh_, ew_, t_] := ew
                  
                  \begin{array}{l}
                  
                  \\
                  ew
                  \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. Applied rewrites34.7%

                    \[\leadsto \color{blue}{{\left(\sqrt{\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)}^{2}} \]
                  3. Step-by-step derivation
                    1. lift-sqrt.f64N/A

                      \[\leadsto {\color{blue}{\left(\sqrt{\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)}}^{2} \]
                    2. lift-/.f64N/A

                      \[\leadsto {\left(\sqrt{\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)}}}\right)}^{2} \]
                    3. sqrt-divN/A

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

                      \[\leadsto {\color{blue}{\left(\frac{\sqrt{\mathsf{fma}\left(\sin t, \frac{\tan t}{ew} \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}}{\sqrt{\cosh \sinh^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)}}\right)}}^{2} \]
                  4. Applied rewrites39.8%

                    \[\leadsto {\color{blue}{\left(\frac{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}}^{2} \]
                  5. Step-by-step derivation
                    1. lift-/.f64N/A

                      \[\leadsto {\color{blue}{\left(\frac{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}}^{2} \]
                    2. lift-sqrt.f64N/A

                      \[\leadsto {\left(\frac{\color{blue}{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}^{2} \]
                    3. lift-sqrt.f64N/A

                      \[\leadsto {\left(\frac{\sqrt{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}}{\color{blue}{\sqrt{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}}\right)}^{2} \]
                    4. sqrt-undivN/A

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

                      \[\leadsto {\left(\sqrt{\color{blue}{\frac{\mathsf{fma}\left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh, \sin t, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}}\right)}^{2} \]
                    6. lower-sqrt.f6439.8

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

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

                      \[\leadsto {\left(\sqrt{\frac{\mathsf{fma}\left(\color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)} \cdot eh, \sin t, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}^{2} \]
                    9. lift-*.f6439.8

                      \[\leadsto {\left(\sqrt{\frac{\mathsf{fma}\left(\color{blue}{\left(\frac{\tan t}{ew} \cdot eh\right)} \cdot eh, \sin t, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}}\right)}^{2} \]
                  6. Applied rewrites39.8%

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

                    \[\leadsto \color{blue}{ew} \]
                  8. Step-by-step derivation
                    1. Applied rewrites22.1%

                      \[\leadsto \color{blue}{ew} \]
                    2. Add Preprocessing

                    Reproduce

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