Example from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 20.1s
Alternatives: 14
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 29.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\\ \mathbf{if}\;\left(ew \cdot \sin t\right) \cdot \cos t\_1 + \left(eh \cdot \cos t\right) \cdot \sin t\_1 \leq -5 \cdot 10^{-257}:\\ \;\;\;\;\left|t \cdot \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(-0.0001984126984126984, ew \cdot \left(t \cdot t\right), 0.008333333333333333 \cdot ew\right), -0.16666666666666666 \cdot ew\right), ew\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\sin t \cdot ew\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (atan (/ (/ eh ew) (tan t)))))
   (if (<=
        (+ (* (* ew (sin t)) (cos t_1)) (* (* eh (cos t)) (sin t_1)))
        -5e-257)
     (fabs
      (*
       t
       (fma
        (* t t)
        (fma
         (* t t)
         (fma
          -0.0001984126984126984
          (* ew (* t t))
          (* 0.008333333333333333 ew))
         (* -0.16666666666666666 ew))
        ew)))
     (* (sin t) ew))))
double code(double eh, double ew, double t) {
	double t_1 = atan(((eh / ew) / tan(t)));
	double tmp;
	if ((((ew * sin(t)) * cos(t_1)) + ((eh * cos(t)) * sin(t_1))) <= -5e-257) {
		tmp = fabs((t * fma((t * t), fma((t * t), fma(-0.0001984126984126984, (ew * (t * t)), (0.008333333333333333 * ew)), (-0.16666666666666666 * ew)), ew)));
	} else {
		tmp = sin(t) * ew;
	}
	return tmp;
}
function code(eh, ew, t)
	t_1 = atan(Float64(Float64(eh / ew) / tan(t)))
	tmp = 0.0
	if (Float64(Float64(Float64(ew * sin(t)) * cos(t_1)) + Float64(Float64(eh * cos(t)) * sin(t_1))) <= -5e-257)
		tmp = abs(Float64(t * fma(Float64(t * t), fma(Float64(t * t), fma(-0.0001984126984126984, Float64(ew * Float64(t * t)), Float64(0.008333333333333333 * ew)), Float64(-0.16666666666666666 * ew)), ew)));
	else
		tmp = Float64(sin(t) * ew);
	end
	return tmp
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] + N[(N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -5e-257], N[Abs[N[(t * N[(N[(t * t), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * N[(-0.0001984126984126984 * N[(ew * N[(t * t), $MachinePrecision]), $MachinePrecision] + N[(0.008333333333333333 * ew), $MachinePrecision]), $MachinePrecision] + N[(-0.16666666666666666 * ew), $MachinePrecision]), $MachinePrecision] + ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\\
\mathbf{if}\;\left(ew \cdot \sin t\right) \cdot \cos t\_1 + \left(eh \cdot \cos t\right) \cdot \sin t\_1 \leq -5 \cdot 10^{-257}:\\
\;\;\;\;\left|t \cdot \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(-0.0001984126984126984, ew \cdot \left(t \cdot t\right), 0.008333333333333333 \cdot ew\right), -0.16666666666666666 \cdot ew\right), ew\right)\right|\\

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


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

    1. Initial program 99.8%

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

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

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

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

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

      \[\leadsto \left|\color{blue}{ew \cdot \sin t}\right| \]
    7. Taylor expanded in t around 0

      \[\leadsto \left|t \cdot \color{blue}{\left(ew + {t}^{2} \cdot \left(\frac{-1}{6} \cdot ew + {t}^{2} \cdot \left(\frac{-1}{5040} \cdot \left(ew \cdot {t}^{2}\right) + \frac{1}{120} \cdot ew\right)\right)\right)}\right| \]
    8. Step-by-step derivation
      1. Applied rewrites19.6%

        \[\leadsto \left|t \cdot \color{blue}{\mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(-0.0001984126984126984, ew \cdot \left(t \cdot t\right), 0.008333333333333333 \cdot ew\right), -0.16666666666666666 \cdot ew\right), ew\right)}\right| \]

      if -4.99999999999999989e-257 < (+.f64 (*.f64 (*.f64 ew (sin.f64 t)) (cos.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))) (*.f64 (*.f64 eh (cos.f64 t)) (sin.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))))

      1. Initial program 99.8%

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

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

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

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

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

        \[\leadsto \left|\color{blue}{ew \cdot \sin t}\right| \]
      7. Step-by-step derivation
        1. lift-fabs.f64N/A

          \[\leadsto \color{blue}{\left|ew \cdot \sin t\right|} \]
        2. rem-sqrt-square-revN/A

          \[\leadsto \color{blue}{\sqrt{\left(ew \cdot \sin t\right) \cdot \left(ew \cdot \sin t\right)}} \]
        3. sqrt-prodN/A

          \[\leadsto \color{blue}{\sqrt{ew \cdot \sin t} \cdot \sqrt{ew \cdot \sin t}} \]
        4. rem-square-sqrt49.4

          \[\leadsto \color{blue}{ew \cdot \sin t} \]
      8. Applied rewrites49.4%

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

    Alternative 3: 87.9% accurate, 1.3× speedup?

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

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{eh \cdot \cos t}\right| \]
      7. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \left|\color{blue}{eh \cdot \cos t}\right| \]
        2. lower-cos.f6485.7

          \[\leadsto \left|eh \cdot \color{blue}{\cos t}\right| \]
      8. Applied rewrites85.7%

        \[\leadsto \left|\color{blue}{eh \cdot \cos t}\right| \]

      if -5.4999999999999999e-24 < eh < 4.49999999999999973e64

      1. Initial program 99.8%

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

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

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

    Alternative 4: 79.5% accurate, 1.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \sin t \cdot ew\\ t_2 := \frac{eh}{\tan t}\\ t_3 := \sqrt{1 + {\left(\frac{t\_2}{ew}\right)}^{2}}\\ t_4 := eh \cdot \cos t\\ \mathbf{if}\;ew \leq -4.5 \cdot 10^{+65}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{t\_4}{\tan t \cdot ew}, eh, t\_1\right)}{t\_3}\right|\\ \mathbf{elif}\;ew \leq 4.4 \cdot 10^{-51}:\\ \;\;\;\;\left|\mathsf{fma}\left(ew \cdot ew, 0.5 \cdot \frac{\frac{{\sin t}^{2}}{eh}}{\cos t}, t\_4\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{t\_2 \cdot \cos t}{ew}, eh, t\_1\right)}{t\_3}\right|\\ \end{array} \end{array} \]
    (FPCore (eh ew t)
     :precision binary64
     (let* ((t_1 (* (sin t) ew))
            (t_2 (/ eh (tan t)))
            (t_3 (sqrt (+ 1.0 (pow (/ t_2 ew) 2.0))))
            (t_4 (* eh (cos t))))
       (if (<= ew -4.5e+65)
         (fabs (/ (fma (/ t_4 (* (tan t) ew)) eh t_1) t_3))
         (if (<= ew 4.4e-51)
           (fabs (fma (* ew ew) (* 0.5 (/ (/ (pow (sin t) 2.0) eh) (cos t))) t_4))
           (fabs (/ (fma (/ (* t_2 (cos t)) ew) eh t_1) t_3))))))
    double code(double eh, double ew, double t) {
    	double t_1 = sin(t) * ew;
    	double t_2 = eh / tan(t);
    	double t_3 = sqrt((1.0 + pow((t_2 / ew), 2.0)));
    	double t_4 = eh * cos(t);
    	double tmp;
    	if (ew <= -4.5e+65) {
    		tmp = fabs((fma((t_4 / (tan(t) * ew)), eh, t_1) / t_3));
    	} else if (ew <= 4.4e-51) {
    		tmp = fabs(fma((ew * ew), (0.5 * ((pow(sin(t), 2.0) / eh) / cos(t))), t_4));
    	} else {
    		tmp = fabs((fma(((t_2 * cos(t)) / ew), eh, t_1) / t_3));
    	}
    	return tmp;
    }
    
    function code(eh, ew, t)
    	t_1 = Float64(sin(t) * ew)
    	t_2 = Float64(eh / tan(t))
    	t_3 = sqrt(Float64(1.0 + (Float64(t_2 / ew) ^ 2.0)))
    	t_4 = Float64(eh * cos(t))
    	tmp = 0.0
    	if (ew <= -4.5e+65)
    		tmp = abs(Float64(fma(Float64(t_4 / Float64(tan(t) * ew)), eh, t_1) / t_3));
    	elseif (ew <= 4.4e-51)
    		tmp = abs(fma(Float64(ew * ew), Float64(0.5 * Float64(Float64((sin(t) ^ 2.0) / eh) / cos(t))), t_4));
    	else
    		tmp = abs(Float64(fma(Float64(Float64(t_2 * cos(t)) / ew), eh, t_1) / t_3));
    	end
    	return tmp
    end
    
    code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]}, Block[{t$95$2 = N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(1.0 + N[Power[N[(t$95$2 / ew), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -4.5e+65], N[Abs[N[(N[(N[(t$95$4 / N[(N[Tan[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] * eh + t$95$1), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 4.4e-51], N[Abs[N[(N[(ew * ew), $MachinePrecision] * N[(0.5 * N[(N[(N[Power[N[Sin[t], $MachinePrecision], 2.0], $MachinePrecision] / eh), $MachinePrecision] / N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(N[(t$95$2 * N[Cos[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision] * eh + t$95$1), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \sin t \cdot ew\\
    t_2 := \frac{eh}{\tan t}\\
    t_3 := \sqrt{1 + {\left(\frac{t\_2}{ew}\right)}^{2}}\\
    t_4 := eh \cdot \cos t\\
    \mathbf{if}\;ew \leq -4.5 \cdot 10^{+65}:\\
    \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{t\_4}{\tan t \cdot ew}, eh, t\_1\right)}{t\_3}\right|\\
    
    \mathbf{elif}\;ew \leq 4.4 \cdot 10^{-51}:\\
    \;\;\;\;\left|\mathsf{fma}\left(ew \cdot ew, 0.5 \cdot \frac{\frac{{\sin t}^{2}}{eh}}{\cos t}, t\_4\right)\right|\\
    
    \mathbf{else}:\\
    \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{t\_2 \cdot \cos t}{ew}, eh, t\_1\right)}{t\_3}\right|\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if ew < -4.5e65

      1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -4.5e65 < ew < 4.4e-51

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 4.4e-51 < ew

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 79.5% accurate, 1.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -4.5 \cdot 10^{+65} \lor \neg \left(ew \leq 4.7 \cdot 10^{-51}\right):\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t \cdot \frac{\frac{eh}{\tan t}}{ew}, eh, \sin t \cdot ew\right)}{\sqrt{1 + {\left(\frac{eh}{\tan t \cdot ew}\right)}^{2}}}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\mathsf{fma}\left(ew \cdot ew, 0.5 \cdot \frac{\frac{{\sin t}^{2}}{eh}}{\cos t}, eh \cdot \cos t\right)\right|\\ \end{array} \end{array} \]
    (FPCore (eh ew t)
     :precision binary64
     (if (or (<= ew -4.5e+65) (not (<= ew 4.7e-51)))
       (fabs
        (/
         (fma (* (cos t) (/ (/ eh (tan t)) ew)) eh (* (sin t) ew))
         (sqrt (+ 1.0 (pow (/ eh (* (tan t) ew)) 2.0)))))
       (fabs
        (fma
         (* ew ew)
         (* 0.5 (/ (/ (pow (sin t) 2.0) eh) (cos t)))
         (* eh (cos t))))))
    double code(double eh, double ew, double t) {
    	double tmp;
    	if ((ew <= -4.5e+65) || !(ew <= 4.7e-51)) {
    		tmp = fabs((fma((cos(t) * ((eh / tan(t)) / ew)), eh, (sin(t) * ew)) / sqrt((1.0 + pow((eh / (tan(t) * ew)), 2.0)))));
    	} else {
    		tmp = fabs(fma((ew * ew), (0.5 * ((pow(sin(t), 2.0) / eh) / cos(t))), (eh * cos(t))));
    	}
    	return tmp;
    }
    
    function code(eh, ew, t)
    	tmp = 0.0
    	if ((ew <= -4.5e+65) || !(ew <= 4.7e-51))
    		tmp = abs(Float64(fma(Float64(cos(t) * Float64(Float64(eh / tan(t)) / ew)), eh, Float64(sin(t) * ew)) / sqrt(Float64(1.0 + (Float64(eh / Float64(tan(t) * ew)) ^ 2.0)))));
    	else
    		tmp = abs(fma(Float64(ew * ew), Float64(0.5 * Float64(Float64((sin(t) ^ 2.0) / eh) / cos(t))), Float64(eh * cos(t))));
    	end
    	return tmp
    end
    
    code[eh_, ew_, t_] := If[Or[LessEqual[ew, -4.5e+65], N[Not[LessEqual[ew, 4.7e-51]], $MachinePrecision]], N[Abs[N[(N[(N[(N[Cos[t], $MachinePrecision] * N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision] * eh + N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(1.0 + N[Power[N[(eh / N[(N[Tan[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(ew * ew), $MachinePrecision] * N[(0.5 * N[(N[(N[Power[N[Sin[t], $MachinePrecision], 2.0], $MachinePrecision] / eh), $MachinePrecision] / N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;ew \leq -4.5 \cdot 10^{+65} \lor \neg \left(ew \leq 4.7 \cdot 10^{-51}\right):\\
    \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t \cdot \frac{\frac{eh}{\tan t}}{ew}, eh, \sin t \cdot ew\right)}{\sqrt{1 + {\left(\frac{eh}{\tan t \cdot ew}\right)}^{2}}}\right|\\
    
    \mathbf{else}:\\
    \;\;\;\;\left|\mathsf{fma}\left(ew \cdot ew, 0.5 \cdot \frac{\frac{{\sin t}^{2}}{eh}}{\cos t}, eh \cdot \cos t\right)\right|\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if ew < -4.5e65 or 4.6999999999999997e-51 < ew

      1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -4.5e65 < ew < 4.6999999999999997e-51

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{\mathsf{fma}\left(ew \cdot ew, 0.5 \cdot \frac{\frac{{\sin t}^{2}}{eh}}{\cos t}, eh \cdot \cos t\right)}\right| \]
    3. Recombined 2 regimes into one program.
    4. Final simplification86.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -4.5 \cdot 10^{+65} \lor \neg \left(ew \leq 4.7 \cdot 10^{-51}\right):\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t \cdot \frac{\frac{eh}{\tan t}}{ew}, eh, \sin t \cdot ew\right)}{\sqrt{1 + {\left(\frac{eh}{\tan t \cdot ew}\right)}^{2}}}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\mathsf{fma}\left(ew \cdot ew, 0.5 \cdot \frac{\frac{{\sin t}^{2}}{eh}}{\cos t}, eh \cdot \cos t\right)\right|\\ \end{array} \]
    5. Add Preprocessing

    Alternative 6: 79.5% accurate, 1.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \sin t \cdot ew\\ t_2 := \frac{\frac{eh}{\tan t}}{ew}\\ t_3 := eh \cdot \cos t\\ t_4 := \tan t \cdot ew\\ \mathbf{if}\;ew \leq -4.5 \cdot 10^{+65}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{t\_3}{t\_4}, eh, t\_1\right)}{\sqrt{1 + {t\_2}^{2}}}\right|\\ \mathbf{elif}\;ew \leq 4.7 \cdot 10^{-51}:\\ \;\;\;\;\left|\mathsf{fma}\left(ew \cdot ew, 0.5 \cdot \frac{\frac{{\sin t}^{2}}{eh}}{\cos t}, t\_3\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t \cdot t\_2, eh, t\_1\right)}{\sqrt{1 + {\left(\frac{eh}{t\_4}\right)}^{2}}}\right|\\ \end{array} \end{array} \]
    (FPCore (eh ew t)
     :precision binary64
     (let* ((t_1 (* (sin t) ew))
            (t_2 (/ (/ eh (tan t)) ew))
            (t_3 (* eh (cos t)))
            (t_4 (* (tan t) ew)))
       (if (<= ew -4.5e+65)
         (fabs (/ (fma (/ t_3 t_4) eh t_1) (sqrt (+ 1.0 (pow t_2 2.0)))))
         (if (<= ew 4.7e-51)
           (fabs (fma (* ew ew) (* 0.5 (/ (/ (pow (sin t) 2.0) eh) (cos t))) t_3))
           (fabs
            (/
             (fma (* (cos t) t_2) eh t_1)
             (sqrt (+ 1.0 (pow (/ eh t_4) 2.0)))))))))
    double code(double eh, double ew, double t) {
    	double t_1 = sin(t) * ew;
    	double t_2 = (eh / tan(t)) / ew;
    	double t_3 = eh * cos(t);
    	double t_4 = tan(t) * ew;
    	double tmp;
    	if (ew <= -4.5e+65) {
    		tmp = fabs((fma((t_3 / t_4), eh, t_1) / sqrt((1.0 + pow(t_2, 2.0)))));
    	} else if (ew <= 4.7e-51) {
    		tmp = fabs(fma((ew * ew), (0.5 * ((pow(sin(t), 2.0) / eh) / cos(t))), t_3));
    	} else {
    		tmp = fabs((fma((cos(t) * t_2), eh, t_1) / sqrt((1.0 + pow((eh / t_4), 2.0)))));
    	}
    	return tmp;
    }
    
    function code(eh, ew, t)
    	t_1 = Float64(sin(t) * ew)
    	t_2 = Float64(Float64(eh / tan(t)) / ew)
    	t_3 = Float64(eh * cos(t))
    	t_4 = Float64(tan(t) * ew)
    	tmp = 0.0
    	if (ew <= -4.5e+65)
    		tmp = abs(Float64(fma(Float64(t_3 / t_4), eh, t_1) / sqrt(Float64(1.0 + (t_2 ^ 2.0)))));
    	elseif (ew <= 4.7e-51)
    		tmp = abs(fma(Float64(ew * ew), Float64(0.5 * Float64(Float64((sin(t) ^ 2.0) / eh) / cos(t))), t_3));
    	else
    		tmp = abs(Float64(fma(Float64(cos(t) * t_2), eh, t_1) / sqrt(Float64(1.0 + (Float64(eh / t_4) ^ 2.0)))));
    	end
    	return tmp
    end
    
    code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]}, Block[{t$95$2 = N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]}, Block[{t$95$3 = N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Tan[t], $MachinePrecision] * ew), $MachinePrecision]}, If[LessEqual[ew, -4.5e+65], N[Abs[N[(N[(N[(t$95$3 / t$95$4), $MachinePrecision] * eh + t$95$1), $MachinePrecision] / N[Sqrt[N[(1.0 + N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 4.7e-51], N[Abs[N[(N[(ew * ew), $MachinePrecision] * N[(0.5 * N[(N[(N[Power[N[Sin[t], $MachinePrecision], 2.0], $MachinePrecision] / eh), $MachinePrecision] / N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(N[Cos[t], $MachinePrecision] * t$95$2), $MachinePrecision] * eh + t$95$1), $MachinePrecision] / N[Sqrt[N[(1.0 + N[Power[N[(eh / t$95$4), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \sin t \cdot ew\\
    t_2 := \frac{\frac{eh}{\tan t}}{ew}\\
    t_3 := eh \cdot \cos t\\
    t_4 := \tan t \cdot ew\\
    \mathbf{if}\;ew \leq -4.5 \cdot 10^{+65}:\\
    \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{t\_3}{t\_4}, eh, t\_1\right)}{\sqrt{1 + {t\_2}^{2}}}\right|\\
    
    \mathbf{elif}\;ew \leq 4.7 \cdot 10^{-51}:\\
    \;\;\;\;\left|\mathsf{fma}\left(ew \cdot ew, 0.5 \cdot \frac{\frac{{\sin t}^{2}}{eh}}{\cos t}, t\_3\right)\right|\\
    
    \mathbf{else}:\\
    \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t \cdot t\_2, eh, t\_1\right)}{\sqrt{1 + {\left(\frac{eh}{t\_4}\right)}^{2}}}\right|\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if ew < -4.5e65

      1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -4.5e65 < ew < 4.6999999999999997e-51

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 4.6999999999999997e-51 < ew

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 7: 74.7% accurate, 1.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\frac{eh}{\tan t}}{ew}\\ \mathbf{if}\;ew \leq -1.9 \cdot 10^{+78}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t \cdot t\_1, eh, \sin t \cdot ew\right)}{1}\right|\\ \mathbf{elif}\;ew \leq 8 \cdot 10^{-51}:\\ \;\;\;\;\left|\mathsf{fma}\left(ew \cdot ew, 0.5 \cdot \frac{\frac{{\sin t}^{2}}{eh}}{\cos t}, eh \cdot \cos t\right)\right|\\ \mathbf{elif}\;ew \leq 1.35 \cdot 10^{+140}:\\ \;\;\;\;\left|\frac{\frac{\mathsf{fma}\left(ew \cdot ew, \sin t, \frac{eh \cdot eh}{t}\right)}{ew}}{\cosh \sinh^{-1} t\_1}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \sin t\right|\\ \end{array} \end{array} \]
    (FPCore (eh ew t)
     :precision binary64
     (let* ((t_1 (/ (/ eh (tan t)) ew)))
       (if (<= ew -1.9e+78)
         (fabs (/ (fma (* (cos t) t_1) eh (* (sin t) ew)) 1.0))
         (if (<= ew 8e-51)
           (fabs
            (fma
             (* ew ew)
             (* 0.5 (/ (/ (pow (sin t) 2.0) eh) (cos t)))
             (* eh (cos t))))
           (if (<= ew 1.35e+140)
             (fabs
              (/
               (/ (fma (* ew ew) (sin t) (/ (* eh eh) t)) ew)
               (cosh (asinh t_1))))
             (fabs (* ew (sin t))))))))
    double code(double eh, double ew, double t) {
    	double t_1 = (eh / tan(t)) / ew;
    	double tmp;
    	if (ew <= -1.9e+78) {
    		tmp = fabs((fma((cos(t) * t_1), eh, (sin(t) * ew)) / 1.0));
    	} else if (ew <= 8e-51) {
    		tmp = fabs(fma((ew * ew), (0.5 * ((pow(sin(t), 2.0) / eh) / cos(t))), (eh * cos(t))));
    	} else if (ew <= 1.35e+140) {
    		tmp = fabs(((fma((ew * ew), sin(t), ((eh * eh) / t)) / ew) / cosh(asinh(t_1))));
    	} else {
    		tmp = fabs((ew * sin(t)));
    	}
    	return tmp;
    }
    
    function code(eh, ew, t)
    	t_1 = Float64(Float64(eh / tan(t)) / ew)
    	tmp = 0.0
    	if (ew <= -1.9e+78)
    		tmp = abs(Float64(fma(Float64(cos(t) * t_1), eh, Float64(sin(t) * ew)) / 1.0));
    	elseif (ew <= 8e-51)
    		tmp = abs(fma(Float64(ew * ew), Float64(0.5 * Float64(Float64((sin(t) ^ 2.0) / eh) / cos(t))), Float64(eh * cos(t))));
    	elseif (ew <= 1.35e+140)
    		tmp = abs(Float64(Float64(fma(Float64(ew * ew), sin(t), Float64(Float64(eh * eh) / t)) / ew) / cosh(asinh(t_1))));
    	else
    		tmp = abs(Float64(ew * sin(t)));
    	end
    	return tmp
    end
    
    code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]}, If[LessEqual[ew, -1.9e+78], N[Abs[N[(N[(N[(N[Cos[t], $MachinePrecision] * t$95$1), $MachinePrecision] * eh + N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / 1.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 8e-51], N[Abs[N[(N[(ew * ew), $MachinePrecision] * N[(0.5 * N[(N[(N[Power[N[Sin[t], $MachinePrecision], 2.0], $MachinePrecision] / eh), $MachinePrecision] / N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 1.35e+140], N[Abs[N[(N[(N[(N[(ew * ew), $MachinePrecision] * N[Sin[t], $MachinePrecision] + N[(N[(eh * eh), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision] / N[Cosh[N[ArcSinh[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{\frac{eh}{\tan t}}{ew}\\
    \mathbf{if}\;ew \leq -1.9 \cdot 10^{+78}:\\
    \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t \cdot t\_1, eh, \sin t \cdot ew\right)}{1}\right|\\
    
    \mathbf{elif}\;ew \leq 8 \cdot 10^{-51}:\\
    \;\;\;\;\left|\mathsf{fma}\left(ew \cdot ew, 0.5 \cdot \frac{\frac{{\sin t}^{2}}{eh}}{\cos t}, eh \cdot \cos t\right)\right|\\
    
    \mathbf{elif}\;ew \leq 1.35 \cdot 10^{+140}:\\
    \;\;\;\;\left|\frac{\frac{\mathsf{fma}\left(ew \cdot ew, \sin t, \frac{eh \cdot eh}{t}\right)}{ew}}{\cosh \sinh^{-1} t\_1}\right|\\
    
    \mathbf{else}:\\
    \;\;\;\;\left|ew \cdot \sin t\right|\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if ew < -1.9e78

      1. Initial program 99.6%

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

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

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

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

        if -1.9e78 < ew < 8.0000000000000001e-51

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 8.0000000000000001e-51 < ew < 1.35000000000000009e140

        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 1.35000000000000009e140 < ew

          1. Initial program 99.6%

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

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

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

              \[\leadsto \left|\color{blue}{ew \cdot \sin t}\right| \]
            2. lower-sin.f6484.6

              \[\leadsto \left|ew \cdot \color{blue}{\sin t}\right| \]
          6. Applied rewrites84.6%

            \[\leadsto \left|\color{blue}{ew \cdot \sin t}\right| \]
        9. Recombined 4 regimes into one program.
        10. Add Preprocessing

        Alternative 8: 74.9% accurate, 1.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -1.9 \cdot 10^{+78}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t \cdot \frac{\frac{eh}{\tan t}}{ew}, eh, \sin t \cdot ew\right)}{1}\right|\\ \mathbf{elif}\;ew \leq 6.4 \cdot 10^{+34}:\\ \;\;\;\;\left|\mathsf{fma}\left(ew \cdot ew, 0.5 \cdot \frac{\frac{{\sin t}^{2}}{eh}}{\cos t}, eh \cdot \cos t\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \sin t\right|\\ \end{array} \end{array} \]
        (FPCore (eh ew t)
         :precision binary64
         (if (<= ew -1.9e+78)
           (fabs (/ (fma (* (cos t) (/ (/ eh (tan t)) ew)) eh (* (sin t) ew)) 1.0))
           (if (<= ew 6.4e+34)
             (fabs
              (fma
               (* ew ew)
               (* 0.5 (/ (/ (pow (sin t) 2.0) eh) (cos t)))
               (* eh (cos t))))
             (fabs (* ew (sin t))))))
        double code(double eh, double ew, double t) {
        	double tmp;
        	if (ew <= -1.9e+78) {
        		tmp = fabs((fma((cos(t) * ((eh / tan(t)) / ew)), eh, (sin(t) * ew)) / 1.0));
        	} else if (ew <= 6.4e+34) {
        		tmp = fabs(fma((ew * ew), (0.5 * ((pow(sin(t), 2.0) / eh) / cos(t))), (eh * cos(t))));
        	} else {
        		tmp = fabs((ew * sin(t)));
        	}
        	return tmp;
        }
        
        function code(eh, ew, t)
        	tmp = 0.0
        	if (ew <= -1.9e+78)
        		tmp = abs(Float64(fma(Float64(cos(t) * Float64(Float64(eh / tan(t)) / ew)), eh, Float64(sin(t) * ew)) / 1.0));
        	elseif (ew <= 6.4e+34)
        		tmp = abs(fma(Float64(ew * ew), Float64(0.5 * Float64(Float64((sin(t) ^ 2.0) / eh) / cos(t))), Float64(eh * cos(t))));
        	else
        		tmp = abs(Float64(ew * sin(t)));
        	end
        	return tmp
        end
        
        code[eh_, ew_, t_] := If[LessEqual[ew, -1.9e+78], N[Abs[N[(N[(N[(N[Cos[t], $MachinePrecision] * N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision] * eh + N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / 1.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 6.4e+34], N[Abs[N[(N[(ew * ew), $MachinePrecision] * N[(0.5 * N[(N[(N[Power[N[Sin[t], $MachinePrecision], 2.0], $MachinePrecision] / eh), $MachinePrecision] / N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;ew \leq -1.9 \cdot 10^{+78}:\\
        \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t \cdot \frac{\frac{eh}{\tan t}}{ew}, eh, \sin t \cdot ew\right)}{1}\right|\\
        
        \mathbf{elif}\;ew \leq 6.4 \cdot 10^{+34}:\\
        \;\;\;\;\left|\mathsf{fma}\left(ew \cdot ew, 0.5 \cdot \frac{\frac{{\sin t}^{2}}{eh}}{\cos t}, eh \cdot \cos t\right)\right|\\
        
        \mathbf{else}:\\
        \;\;\;\;\left|ew \cdot \sin t\right|\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if ew < -1.9e78

          1. Initial program 99.6%

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

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

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

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

            if -1.9e78 < ew < 6.3999999999999997e34

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 6.3999999999999997e34 < ew

            1. Initial program 99.7%

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

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

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

                \[\leadsto \left|\color{blue}{ew \cdot \sin t}\right| \]
              2. lower-sin.f6477.2

                \[\leadsto \left|ew \cdot \color{blue}{\sin t}\right| \]
            6. Applied rewrites77.2%

              \[\leadsto \left|\color{blue}{ew \cdot \sin t}\right| \]
          6. Recombined 3 regimes into one program.
          7. Add Preprocessing

          Alternative 9: 74.8% accurate, 2.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -1.9 \cdot 10^{+78}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t \cdot \frac{\frac{eh}{\tan t}}{ew}, eh, \sin t \cdot ew\right)}{1}\right|\\ \mathbf{elif}\;ew \leq 3.7 \cdot 10^{+34}:\\ \;\;\;\;\left|eh \cdot \cos t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \sin t\right|\\ \end{array} \end{array} \]
          (FPCore (eh ew t)
           :precision binary64
           (if (<= ew -1.9e+78)
             (fabs (/ (fma (* (cos t) (/ (/ eh (tan t)) ew)) eh (* (sin t) ew)) 1.0))
             (if (<= ew 3.7e+34) (fabs (* eh (cos t))) (fabs (* ew (sin t))))))
          double code(double eh, double ew, double t) {
          	double tmp;
          	if (ew <= -1.9e+78) {
          		tmp = fabs((fma((cos(t) * ((eh / tan(t)) / ew)), eh, (sin(t) * ew)) / 1.0));
          	} else if (ew <= 3.7e+34) {
          		tmp = fabs((eh * cos(t)));
          	} else {
          		tmp = fabs((ew * sin(t)));
          	}
          	return tmp;
          }
          
          function code(eh, ew, t)
          	tmp = 0.0
          	if (ew <= -1.9e+78)
          		tmp = abs(Float64(fma(Float64(cos(t) * Float64(Float64(eh / tan(t)) / ew)), eh, Float64(sin(t) * ew)) / 1.0));
          	elseif (ew <= 3.7e+34)
          		tmp = abs(Float64(eh * cos(t)));
          	else
          		tmp = abs(Float64(ew * sin(t)));
          	end
          	return tmp
          end
          
          code[eh_, ew_, t_] := If[LessEqual[ew, -1.9e+78], N[Abs[N[(N[(N[(N[Cos[t], $MachinePrecision] * N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision] * eh + N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / 1.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 3.7e+34], N[Abs[N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;ew \leq -1.9 \cdot 10^{+78}:\\
          \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t \cdot \frac{\frac{eh}{\tan t}}{ew}, eh, \sin t \cdot ew\right)}{1}\right|\\
          
          \mathbf{elif}\;ew \leq 3.7 \cdot 10^{+34}:\\
          \;\;\;\;\left|eh \cdot \cos t\right|\\
          
          \mathbf{else}:\\
          \;\;\;\;\left|ew \cdot \sin t\right|\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if ew < -1.9e78

            1. Initial program 99.6%

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

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

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

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

              if -1.9e78 < ew < 3.70000000000000009e34

              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left|\color{blue}{eh \cdot \cos t}\right| \]
              7. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \left|\color{blue}{eh \cdot \cos t}\right| \]
                2. lower-cos.f6479.0

                  \[\leadsto \left|eh \cdot \color{blue}{\cos t}\right| \]
              8. Applied rewrites79.0%

                \[\leadsto \left|\color{blue}{eh \cdot \cos t}\right| \]

              if 3.70000000000000009e34 < ew

              1. Initial program 99.7%

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

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

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

                  \[\leadsto \left|\color{blue}{ew \cdot \sin t}\right| \]
                2. lower-sin.f6477.2

                  \[\leadsto \left|ew \cdot \color{blue}{\sin t}\right| \]
              6. Applied rewrites77.2%

                \[\leadsto \left|\color{blue}{ew \cdot \sin t}\right| \]
            6. Recombined 3 regimes into one program.
            7. Add Preprocessing

            Alternative 10: 74.7% accurate, 7.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -1.9 \cdot 10^{+78} \lor \neg \left(ew \leq 3.7 \cdot 10^{+34}\right):\\ \;\;\;\;\left|ew \cdot \sin t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|eh \cdot \cos t\right|\\ \end{array} \end{array} \]
            (FPCore (eh ew t)
             :precision binary64
             (if (or (<= ew -1.9e+78) (not (<= ew 3.7e+34)))
               (fabs (* ew (sin t)))
               (fabs (* eh (cos t)))))
            double code(double eh, double ew, double t) {
            	double tmp;
            	if ((ew <= -1.9e+78) || !(ew <= 3.7e+34)) {
            		tmp = fabs((ew * sin(t)));
            	} else {
            		tmp = fabs((eh * cos(t)));
            	}
            	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 <= (-1.9d+78)) .or. (.not. (ew <= 3.7d+34))) then
                    tmp = abs((ew * sin(t)))
                else
                    tmp = abs((eh * cos(t)))
                end if
                code = tmp
            end function
            
            public static double code(double eh, double ew, double t) {
            	double tmp;
            	if ((ew <= -1.9e+78) || !(ew <= 3.7e+34)) {
            		tmp = Math.abs((ew * Math.sin(t)));
            	} else {
            		tmp = Math.abs((eh * Math.cos(t)));
            	}
            	return tmp;
            }
            
            def code(eh, ew, t):
            	tmp = 0
            	if (ew <= -1.9e+78) or not (ew <= 3.7e+34):
            		tmp = math.fabs((ew * math.sin(t)))
            	else:
            		tmp = math.fabs((eh * math.cos(t)))
            	return tmp
            
            function code(eh, ew, t)
            	tmp = 0.0
            	if ((ew <= -1.9e+78) || !(ew <= 3.7e+34))
            		tmp = abs(Float64(ew * sin(t)));
            	else
            		tmp = abs(Float64(eh * cos(t)));
            	end
            	return tmp
            end
            
            function tmp_2 = code(eh, ew, t)
            	tmp = 0.0;
            	if ((ew <= -1.9e+78) || ~((ew <= 3.7e+34)))
            		tmp = abs((ew * sin(t)));
            	else
            		tmp = abs((eh * cos(t)));
            	end
            	tmp_2 = tmp;
            end
            
            code[eh_, ew_, t_] := If[Or[LessEqual[ew, -1.9e+78], N[Not[LessEqual[ew, 3.7e+34]], $MachinePrecision]], N[Abs[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;ew \leq -1.9 \cdot 10^{+78} \lor \neg \left(ew \leq 3.7 \cdot 10^{+34}\right):\\
            \;\;\;\;\left|ew \cdot \sin t\right|\\
            
            \mathbf{else}:\\
            \;\;\;\;\left|eh \cdot \cos t\right|\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if ew < -1.9e78 or 3.70000000000000009e34 < ew

              1. Initial program 99.7%

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

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

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

                  \[\leadsto \left|\color{blue}{ew \cdot \sin t}\right| \]
                2. lower-sin.f6483.2

                  \[\leadsto \left|ew \cdot \color{blue}{\sin t}\right| \]
              6. Applied rewrites83.2%

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

              if -1.9e78 < ew < 3.70000000000000009e34

              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left|\color{blue}{eh \cdot \cos t}\right| \]
              7. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \left|\color{blue}{eh \cdot \cos t}\right| \]
                2. lower-cos.f6479.0

                  \[\leadsto \left|eh \cdot \color{blue}{\cos t}\right| \]
              8. Applied rewrites79.0%

                \[\leadsto \left|\color{blue}{eh \cdot \cos t}\right| \]
            3. Recombined 2 regimes into one program.
            4. Final simplification80.6%

              \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -1.9 \cdot 10^{+78} \lor \neg \left(ew \leq 3.7 \cdot 10^{+34}\right):\\ \;\;\;\;\left|ew \cdot \sin t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|eh \cdot \cos t\right|\\ \end{array} \]
            5. Add Preprocessing

            Alternative 11: 43.3% accurate, 7.2× speedup?

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

              1. Initial program 99.7%

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

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

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

                  \[\leadsto \left|\color{blue}{ew \cdot \sin t}\right| \]
                2. lower-sin.f6450.9

                  \[\leadsto \left|ew \cdot \color{blue}{\sin t}\right| \]
              6. Applied rewrites50.9%

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

              if -1.19999999999999993e-223 < t < 1.7000000000000001e-246

              1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left|\color{blue}{\mathsf{fma}\left({t}^{2}, \frac{-1}{2} \cdot \frac{{ew}^{2} \cdot \left(1 - \frac{2}{3} \cdot \frac{{eh}^{2}}{{ew}^{2}}\right)}{eh} + \frac{ew \cdot \left(\left(ew + \frac{-1}{2} \cdot \frac{{eh}^{2}}{ew}\right) - \frac{1}{3} \cdot \frac{{eh}^{2}}{ew}\right)}{eh}, eh\right)}\right| \]
              8. Applied rewrites48.4%

                \[\leadsto \left|\color{blue}{\mathsf{fma}\left(t \cdot t, \frac{\mathsf{fma}\left(-0.5, \left(ew \cdot ew\right) \cdot \mathsf{fma}\left(-0.6666666666666666, \frac{eh \cdot eh}{ew \cdot ew}, 1\right), ew \cdot \left(ew + \frac{eh \cdot eh}{ew} \cdot -0.8333333333333334\right)\right)}{eh}, eh\right)}\right| \]
            3. Recombined 2 regimes into one program.
            4. Final simplification50.6%

              \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.2 \cdot 10^{-223} \lor \neg \left(t \leq 1.7 \cdot 10^{-246}\right):\\ \;\;\;\;\left|ew \cdot \sin t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\mathsf{fma}\left(t \cdot t, \frac{\mathsf{fma}\left(-0.5, \left(ew \cdot ew\right) \cdot \mathsf{fma}\left(-0.6666666666666666, \frac{eh \cdot eh}{ew \cdot ew}, 1\right), ew \cdot \left(ew + \frac{eh \cdot eh}{ew} \cdot -0.8333333333333334\right)\right)}{eh}, eh\right)\right|\\ \end{array} \]
            5. Add Preprocessing

            Alternative 12: 21.3% accurate, 8.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;ew \leq -2.3 \cdot 10^{+69} \lor \neg \left(ew \leq 5.2 \cdot 10^{-12}\right):\\ \;\;\;\;\left|ew \cdot t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\mathsf{fma}\left(t \cdot t, \frac{\mathsf{fma}\left(-0.5, \left(ew \cdot ew\right) \cdot \mathsf{fma}\left(-0.6666666666666666, \frac{eh \cdot eh}{ew \cdot ew}, 1\right), ew \cdot \left(ew + \frac{eh \cdot eh}{ew} \cdot -0.8333333333333334\right)\right)}{eh}, eh\right)\right|\\ \end{array} \end{array} \]
            (FPCore (eh ew t)
             :precision binary64
             (if (or (<= ew -2.3e+69) (not (<= ew 5.2e-12)))
               (fabs (* ew t))
               (fabs
                (fma
                 (* t t)
                 (/
                  (fma
                   -0.5
                   (* (* ew ew) (fma -0.6666666666666666 (/ (* eh eh) (* ew ew)) 1.0))
                   (* ew (+ ew (* (/ (* eh eh) ew) -0.8333333333333334))))
                  eh)
                 eh))))
            double code(double eh, double ew, double t) {
            	double tmp;
            	if ((ew <= -2.3e+69) || !(ew <= 5.2e-12)) {
            		tmp = fabs((ew * t));
            	} else {
            		tmp = fabs(fma((t * t), (fma(-0.5, ((ew * ew) * fma(-0.6666666666666666, ((eh * eh) / (ew * ew)), 1.0)), (ew * (ew + (((eh * eh) / ew) * -0.8333333333333334)))) / eh), eh));
            	}
            	return tmp;
            }
            
            function code(eh, ew, t)
            	tmp = 0.0
            	if ((ew <= -2.3e+69) || !(ew <= 5.2e-12))
            		tmp = abs(Float64(ew * t));
            	else
            		tmp = abs(fma(Float64(t * t), Float64(fma(-0.5, Float64(Float64(ew * ew) * fma(-0.6666666666666666, Float64(Float64(eh * eh) / Float64(ew * ew)), 1.0)), Float64(ew * Float64(ew + Float64(Float64(Float64(eh * eh) / ew) * -0.8333333333333334)))) / eh), eh));
            	end
            	return tmp
            end
            
            code[eh_, ew_, t_] := If[Or[LessEqual[ew, -2.3e+69], N[Not[LessEqual[ew, 5.2e-12]], $MachinePrecision]], N[Abs[N[(ew * t), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(t * t), $MachinePrecision] * N[(N[(-0.5 * N[(N[(ew * ew), $MachinePrecision] * N[(-0.6666666666666666 * N[(N[(eh * eh), $MachinePrecision] / N[(ew * ew), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(ew * N[(ew + N[(N[(N[(eh * eh), $MachinePrecision] / ew), $MachinePrecision] * -0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / eh), $MachinePrecision] + eh), $MachinePrecision]], $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;ew \leq -2.3 \cdot 10^{+69} \lor \neg \left(ew \leq 5.2 \cdot 10^{-12}\right):\\
            \;\;\;\;\left|ew \cdot t\right|\\
            
            \mathbf{else}:\\
            \;\;\;\;\left|\mathsf{fma}\left(t \cdot t, \frac{\mathsf{fma}\left(-0.5, \left(ew \cdot ew\right) \cdot \mathsf{fma}\left(-0.6666666666666666, \frac{eh \cdot eh}{ew \cdot ew}, 1\right), ew \cdot \left(ew + \frac{eh \cdot eh}{ew} \cdot -0.8333333333333334\right)\right)}{eh}, eh\right)\right|\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if ew < -2.30000000000000017e69 or 5.19999999999999965e-12 < ew

              1. Initial program 99.7%

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

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

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

                  \[\leadsto \left|\color{blue}{ew \cdot \sin t}\right| \]
                2. lower-sin.f6478.5

                  \[\leadsto \left|ew \cdot \color{blue}{\sin t}\right| \]
              6. Applied rewrites78.5%

                \[\leadsto \left|\color{blue}{ew \cdot \sin t}\right| \]
              7. Taylor expanded in t around 0

                \[\leadsto \left|ew \cdot \color{blue}{t}\right| \]
              8. Step-by-step derivation
                1. Applied rewrites35.0%

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

                if -2.30000000000000017e69 < ew < 5.19999999999999965e-12

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left|\color{blue}{\mathsf{fma}\left({t}^{2}, \frac{-1}{2} \cdot \frac{{ew}^{2} \cdot \left(1 - \frac{2}{3} \cdot \frac{{eh}^{2}}{{ew}^{2}}\right)}{eh} + \frac{ew \cdot \left(\left(ew + \frac{-1}{2} \cdot \frac{{eh}^{2}}{ew}\right) - \frac{1}{3} \cdot \frac{{eh}^{2}}{ew}\right)}{eh}, eh\right)}\right| \]
                8. Applied rewrites20.6%

                  \[\leadsto \left|\color{blue}{\mathsf{fma}\left(t \cdot t, \frac{\mathsf{fma}\left(-0.5, \left(ew \cdot ew\right) \cdot \mathsf{fma}\left(-0.6666666666666666, \frac{eh \cdot eh}{ew \cdot ew}, 1\right), ew \cdot \left(ew + \frac{eh \cdot eh}{ew} \cdot -0.8333333333333334\right)\right)}{eh}, eh\right)}\right| \]
              9. Recombined 2 regimes into one program.
              10. Final simplification26.7%

                \[\leadsto \begin{array}{l} \mathbf{if}\;ew \leq -2.3 \cdot 10^{+69} \lor \neg \left(ew \leq 5.2 \cdot 10^{-12}\right):\\ \;\;\;\;\left|ew \cdot t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\mathsf{fma}\left(t \cdot t, \frac{\mathsf{fma}\left(-0.5, \left(ew \cdot ew\right) \cdot \mathsf{fma}\left(-0.6666666666666666, \frac{eh \cdot eh}{ew \cdot ew}, 1\right), ew \cdot \left(ew + \frac{eh \cdot eh}{ew} \cdot -0.8333333333333334\right)\right)}{eh}, eh\right)\right|\\ \end{array} \]
              11. Add Preprocessing

              Alternative 13: 18.6% accurate, 108.8× speedup?

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

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

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

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

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

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

                \[\leadsto \left|\color{blue}{ew \cdot \sin t}\right| \]
              7. Taylor expanded in t around 0

                \[\leadsto \left|ew \cdot \color{blue}{t}\right| \]
              8. Step-by-step derivation
                1. Applied rewrites20.7%

                  \[\leadsto \left|ew \cdot \color{blue}{t}\right| \]
                2. Add Preprocessing

                Alternative 14: 10.2% accurate, 145.0× speedup?

                \[\begin{array}{l} \\ ew \cdot t \end{array} \]
                (FPCore (eh ew t) :precision binary64 (* ew t))
                double code(double eh, double ew, double t) {
                	return ew * t;
                }
                
                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 * t
                end function
                
                public static double code(double eh, double ew, double t) {
                	return ew * t;
                }
                
                def code(eh, ew, t):
                	return ew * t
                
                function code(eh, ew, t)
                	return Float64(ew * t)
                end
                
                function tmp = code(eh, ew, t)
                	tmp = ew * t;
                end
                
                code[eh_, ew_, t_] := N[(ew * t), $MachinePrecision]
                
                \begin{array}{l}
                
                \\
                ew \cdot t
                \end{array}
                
                Derivation
                1. Initial program 99.8%

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

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

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

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

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

                  \[\leadsto \left|\color{blue}{ew \cdot \sin t}\right| \]
                7. Taylor expanded in t around 0

                  \[\leadsto \left|ew \cdot \color{blue}{t}\right| \]
                8. Step-by-step derivation
                  1. Applied rewrites20.7%

                    \[\leadsto \left|ew \cdot \color{blue}{t}\right| \]
                  2. Step-by-step derivation
                    1. lift-fabs.f64N/A

                      \[\leadsto \color{blue}{\left|ew \cdot t\right|} \]
                    2. rem-sqrt-square-revN/A

                      \[\leadsto \color{blue}{\sqrt{\left(ew \cdot t\right) \cdot \left(ew \cdot t\right)}} \]
                    3. sqrt-prodN/A

                      \[\leadsto \color{blue}{\sqrt{ew \cdot t} \cdot \sqrt{ew \cdot t}} \]
                    4. rem-square-sqrt12.3

                      \[\leadsto \color{blue}{ew \cdot t} \]
                  3. Applied rewrites12.3%

                    \[\leadsto \color{blue}{ew \cdot t} \]
                  4. Add Preprocessing

                  Reproduce

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