Example from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 19.9s
Alternatives: 16
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 16 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \tan^{-1} \left(\frac{\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{eh}{\tan t \cdot ew}\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 (* (tan t) ew)))))
   (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 / (tan(t) * ew)));
	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 / (tan(t) * ew)))
    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 / (Math.tan(t) * ew)));
	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 / (math.tan(t) * ew)))
	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(eh / Float64(tan(t) * ew)))
	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 / (tan(t) * ew)));
	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[(eh / N[(N[Tan[t], $MachinePrecision] * ew), $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{eh}{\tan t \cdot ew}\right)\\
\left|\left(ew \cdot \sin t\right) \cdot \cos t\_1 + \left(eh \cdot \cos t\right) \cdot \sin t\_1\right|
\end{array}
\end{array}
Derivation
  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 31.0% 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^{-305}:\\ \;\;\;\;\left|ew \cdot t\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-305)
     (fabs (* ew t))
     (* (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-305) {
		tmp = fabs((ew * t));
	} else {
		tmp = sin(t) * ew;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(eh, ew, t)
use fmin_fmax_functions
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = atan(((eh / ew) / tan(t)))
    if ((((ew * sin(t)) * cos(t_1)) + ((eh * cos(t)) * sin(t_1))) <= (-5d-305)) then
        tmp = abs((ew * t))
    else
        tmp = sin(t) * ew
    end if
    code = tmp
end function
public static double code(double eh, double ew, double t) {
	double t_1 = Math.atan(((eh / ew) / Math.tan(t)));
	double tmp;
	if ((((ew * Math.sin(t)) * Math.cos(t_1)) + ((eh * Math.cos(t)) * Math.sin(t_1))) <= -5e-305) {
		tmp = Math.abs((ew * t));
	} else {
		tmp = Math.sin(t) * ew;
	}
	return tmp;
}
def code(eh, ew, t):
	t_1 = math.atan(((eh / ew) / math.tan(t)))
	tmp = 0
	if (((ew * math.sin(t)) * math.cos(t_1)) + ((eh * math.cos(t)) * math.sin(t_1))) <= -5e-305:
		tmp = math.fabs((ew * t))
	else:
		tmp = math.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-305)
		tmp = abs(Float64(ew * t));
	else
		tmp = Float64(sin(t) * ew);
	end
	return tmp
end
function tmp_2 = code(eh, ew, t)
	t_1 = atan(((eh / ew) / tan(t)));
	tmp = 0.0;
	if ((((ew * sin(t)) * cos(t_1)) + ((eh * cos(t)) * sin(t_1))) <= -5e-305)
		tmp = abs((ew * t));
	else
		tmp = sin(t) * ew;
	end
	tmp_2 = 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-305], N[Abs[N[(ew * t), $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^{-305}:\\
\;\;\;\;\left|ew \cdot t\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.99999999999999985e-305

    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 rewrites69.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.f6442.8

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

      \[\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 rewrites19.5%

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

      if -4.99999999999999985e-305 < (+.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.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 rewrites64.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. 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.f6442.8

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

        \[\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-sqrt42.8

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

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

    Alternative 3: 90.6% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\frac{eh}{\tan t}}{ew}\\ \mathbf{if}\;eh \leq -1.8 \cdot 10^{+120}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh}{\sin t}\right) \cdot \left(\cos t \cdot eh\right)\right|\\ \mathbf{elif}\;eh \leq -50 \lor \neg \left(eh \leq 5.8 \cdot 10^{-33}\right):\\ \;\;\;\;\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{t}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\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 (<= eh -1.8e+120)
         (fabs (* (sin (atan (* (/ (cos t) ew) (/ eh (sin t))))) (* (cos t) eh)))
         (if (or (<= eh -50.0) (not (<= eh 5.8e-33)))
           (fabs
            (+
             (* (* eh (cos t)) (sin (atan (/ (/ eh ew) t))))
             (* (* ew (sin t)) (cos (atan (/ (/ eh ew) (tan 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 <= -1.8e+120) {
    		tmp = fabs((sin(atan(((cos(t) / ew) * (eh / sin(t))))) * (cos(t) * eh)));
    	} else if ((eh <= -50.0) || !(eh <= 5.8e-33)) {
    		tmp = fabs((((eh * cos(t)) * sin(atan(((eh / ew) / t)))) + ((ew * sin(t)) * cos(atan(((eh / ew) / tan(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 <= -1.8e+120)
    		tmp = abs(Float64(sin(atan(Float64(Float64(cos(t) / ew) * Float64(eh / sin(t))))) * Float64(cos(t) * eh)));
    	elseif ((eh <= -50.0) || !(eh <= 5.8e-33))
    		tmp = abs(Float64(Float64(Float64(eh * cos(t)) * sin(atan(Float64(Float64(eh / ew) / t)))) + Float64(Float64(ew * sin(t)) * cos(atan(Float64(Float64(eh / ew) / tan(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[LessEqual[eh, -1.8e+120], N[Abs[N[(N[Sin[N[ArcTan[N[(N[(N[Cos[t], $MachinePrecision] / ew), $MachinePrecision] * N[(eh / N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[eh, -50.0], N[Not[LessEqual[eh, 5.8e-33]], $MachinePrecision]], N[Abs[N[(N[(N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $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 -1.8 \cdot 10^{+120}:\\
    \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh}{\sin t}\right) \cdot \left(\cos t \cdot eh\right)\right|\\
    
    \mathbf{elif}\;eh \leq -50 \lor \neg \left(eh \leq 5.8 \cdot 10^{-33}\right):\\
    \;\;\;\;\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{t}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\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 3 regimes
    2. if eh < -1.80000000000000008e120

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.80000000000000008e120 < eh < -50 or 5.80000000000000005e-33 < 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. Taylor expanded in t around 0

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

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

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

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

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

      if -50 < eh < 5.80000000000000005e-33

      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 rewrites95.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| \]
    3. Recombined 3 regimes into one program.
    4. Final simplification93.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -1.8 \cdot 10^{+120}:\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh}{\sin t}\right) \cdot \left(\cos t \cdot eh\right)\right|\\ \mathbf{elif}\;eh \leq -50 \lor \neg \left(eh \leq 5.8 \cdot 10^{-33}\right):\\ \;\;\;\;\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{t}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\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: 88.1% accurate, 1.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\frac{eh}{\tan t}}{ew}\\ \mathbf{if}\;eh \leq -7.5 \cdot 10^{-18} \lor \neg \left(eh \leq 2.6 \cdot 10^{+16}\right):\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh}{\sin t}\right) \cdot \left(\cos t \cdot eh\right)\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 -7.5e-18) (not (<= eh 2.6e+16)))
         (fabs (* (sin (atan (* (/ (cos t) ew) (/ eh (sin t))))) (* (cos t) eh)))
         (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 <= -7.5e-18) || !(eh <= 2.6e+16)) {
    		tmp = fabs((sin(atan(((cos(t) / ew) * (eh / sin(t))))) * (cos(t) * eh)));
    	} 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 <= -7.5e-18) || !(eh <= 2.6e+16))
    		tmp = abs(Float64(sin(atan(Float64(Float64(cos(t) / ew) * Float64(eh / sin(t))))) * Float64(cos(t) * eh)));
    	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, -7.5e-18], N[Not[LessEqual[eh, 2.6e+16]], $MachinePrecision]], N[Abs[N[(N[Sin[N[ArcTan[N[(N[(N[Cos[t], $MachinePrecision] / ew), $MachinePrecision] * N[(eh / N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Cos[t], $MachinePrecision] * eh), $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 -7.5 \cdot 10^{-18} \lor \neg \left(eh \leq 2.6 \cdot 10^{+16}\right):\\
    \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh}{\sin t}\right) \cdot \left(\cos t \cdot eh\right)\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 < -7.50000000000000015e-18 or 2.6e16 < 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. Taylor expanded in eh around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -7.50000000000000015e-18 < eh < 2.6e16

      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 rewrites94.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| \]
    3. Recombined 2 regimes into one program.
    4. Final simplification90.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -7.5 \cdot 10^{-18} \lor \neg \left(eh \leq 2.6 \cdot 10^{+16}\right):\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh}{\sin t}\right) \cdot \left(\cos t \cdot eh\right)\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 5: 86.3% accurate, 1.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -7.5 \cdot 10^{-18} \lor \neg \left(eh \leq 2.6 \cdot 10^{+16}\right):\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh}{\sin t}\right) \cdot \left(\cos t \cdot eh\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\sin t, ew, \frac{\frac{eh}{ew} \cdot eh}{\tan t} \cdot \cos t\right)}{\cosh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)}\right|\\ \end{array} \end{array} \]
    (FPCore (eh ew t)
     :precision binary64
     (if (or (<= eh -7.5e-18) (not (<= eh 2.6e+16)))
       (fabs (* (sin (atan (* (/ (cos t) ew) (/ eh (sin t))))) (* (cos t) eh)))
       (fabs
        (/
         (fma (sin t) ew (* (/ (* (/ eh ew) eh) (tan t)) (cos t)))
         (cosh (asinh (/ (/ eh (tan t)) ew)))))))
    double code(double eh, double ew, double t) {
    	double tmp;
    	if ((eh <= -7.5e-18) || !(eh <= 2.6e+16)) {
    		tmp = fabs((sin(atan(((cos(t) / ew) * (eh / sin(t))))) * (cos(t) * eh)));
    	} else {
    		tmp = fabs((fma(sin(t), ew, ((((eh / ew) * eh) / tan(t)) * cos(t))) / cosh(asinh(((eh / tan(t)) / ew)))));
    	}
    	return tmp;
    }
    
    function code(eh, ew, t)
    	tmp = 0.0
    	if ((eh <= -7.5e-18) || !(eh <= 2.6e+16))
    		tmp = abs(Float64(sin(atan(Float64(Float64(cos(t) / ew) * Float64(eh / sin(t))))) * Float64(cos(t) * eh)));
    	else
    		tmp = abs(Float64(fma(sin(t), ew, Float64(Float64(Float64(Float64(eh / ew) * eh) / tan(t)) * cos(t))) / cosh(asinh(Float64(Float64(eh / tan(t)) / ew)))));
    	end
    	return tmp
    end
    
    code[eh_, ew_, t_] := If[Or[LessEqual[eh, -7.5e-18], N[Not[LessEqual[eh, 2.6e+16]], $MachinePrecision]], N[Abs[N[(N[Sin[N[ArcTan[N[(N[(N[Cos[t], $MachinePrecision] / ew), $MachinePrecision] * N[(eh / N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[Sin[t], $MachinePrecision] * ew + N[(N[(N[(N[(eh / ew), $MachinePrecision] * eh), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Cosh[N[ArcSinh[N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;eh \leq -7.5 \cdot 10^{-18} \lor \neg \left(eh \leq 2.6 \cdot 10^{+16}\right):\\
    \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh}{\sin t}\right) \cdot \left(\cos t \cdot eh\right)\right|\\
    
    \mathbf{else}:\\
    \;\;\;\;\left|\frac{\mathsf{fma}\left(\sin t, ew, \frac{\frac{eh}{ew} \cdot eh}{\tan t} \cdot \cos t\right)}{\cosh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)}\right|\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if eh < -7.50000000000000015e-18 or 2.6e16 < 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. Taylor expanded in eh around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -7.50000000000000015e-18 < eh < 2.6e16

      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(\sin t, ew, \frac{\frac{eh}{ew} \cdot eh}{\tan t} \cdot \cos t\right)}{\cosh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)}}\right| \]
    3. Recombined 2 regimes into one program.
    4. Final simplification88.4%

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

    Alternative 6: 83.8% accurate, 1.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\frac{eh}{\tan t}}{ew}\\ \mathbf{if}\;eh \leq -5.4 \cdot 10^{-18} \lor \neg \left(eh \leq 1.18 \cdot 10^{-23}\right):\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh}{\sin t}\right) \cdot \left(\cos t \cdot eh\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t \cdot t\_1, eh, \sin t \cdot ew\right)}{\sqrt{1 + {t\_1}^{2}}}\right|\\ \end{array} \end{array} \]
    (FPCore (eh ew t)
     :precision binary64
     (let* ((t_1 (/ (/ eh (tan t)) ew)))
       (if (or (<= eh -5.4e-18) (not (<= eh 1.18e-23)))
         (fabs (* (sin (atan (* (/ (cos t) ew) (/ eh (sin t))))) (* (cos t) eh)))
         (fabs
          (/
           (fma (* (cos t) t_1) eh (* (sin t) ew))
           (sqrt (+ 1.0 (pow t_1 2.0))))))))
    double code(double eh, double ew, double t) {
    	double t_1 = (eh / tan(t)) / ew;
    	double tmp;
    	if ((eh <= -5.4e-18) || !(eh <= 1.18e-23)) {
    		tmp = fabs((sin(atan(((cos(t) / ew) * (eh / sin(t))))) * (cos(t) * eh)));
    	} else {
    		tmp = fabs((fma((cos(t) * t_1), eh, (sin(t) * ew)) / sqrt((1.0 + pow(t_1, 2.0)))));
    	}
    	return tmp;
    }
    
    function code(eh, ew, t)
    	t_1 = Float64(Float64(eh / tan(t)) / ew)
    	tmp = 0.0
    	if ((eh <= -5.4e-18) || !(eh <= 1.18e-23))
    		tmp = abs(Float64(sin(atan(Float64(Float64(cos(t) / ew) * Float64(eh / sin(t))))) * Float64(cos(t) * eh)));
    	else
    		tmp = abs(Float64(fma(Float64(cos(t) * t_1), eh, Float64(sin(t) * ew)) / sqrt(Float64(1.0 + (t_1 ^ 2.0)))));
    	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.4e-18], N[Not[LessEqual[eh, 1.18e-23]], $MachinePrecision]], N[Abs[N[(N[Sin[N[ArcTan[N[(N[(N[Cos[t], $MachinePrecision] / ew), $MachinePrecision] * N[(eh / N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Cos[t], $MachinePrecision] * eh), $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[Sqrt[N[(1.0 + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{\frac{eh}{\tan t}}{ew}\\
    \mathbf{if}\;eh \leq -5.4 \cdot 10^{-18} \lor \neg \left(eh \leq 1.18 \cdot 10^{-23}\right):\\
    \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh}{\sin t}\right) \cdot \left(\cos t \cdot eh\right)\right|\\
    
    \mathbf{else}:\\
    \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t \cdot t\_1, eh, \sin t \cdot ew\right)}{\sqrt{1 + {t\_1}^{2}}}\right|\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if eh < -5.39999999999999977e-18 or 1.18e-23 < 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. Taylor expanded in eh around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -5.39999999999999977e-18 < eh < 1.18e-23

      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 rewrites95.4%

        \[\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. lower-sqrt.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}{\sqrt{1 + \frac{\frac{eh}{\tan t}}{ew} \cdot \frac{\frac{eh}{\tan t}}{ew}}}}\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{\color{blue}{1 + \frac{\frac{eh}{\tan t}}{ew} \cdot \frac{\frac{eh}{\tan t}}{ew}}}}\right| \]
        7. pow2N/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| \]
        8. lower-pow.f6488.2

          \[\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| \]
      5. Applied rewrites88.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| \]
    3. Recombined 2 regimes into one program.
    4. Final simplification86.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -5.4 \cdot 10^{-18} \lor \neg \left(eh \leq 1.18 \cdot 10^{-23}\right):\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh}{\sin t}\right) \cdot \left(\cos t \cdot eh\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\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}{\tan t}}{ew}\right)}^{2}}}\right|\\ \end{array} \]
    5. Add Preprocessing

    Alternative 7: 82.0% accurate, 1.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -5.4 \cdot 10^{-18} \lor \neg \left(eh \leq 1.18 \cdot 10^{-23}\right):\\ \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh}{\sin t}\right) \cdot \left(\cos t \cdot eh\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\sin t, ew, \frac{\frac{eh}{ew} \cdot eh}{\tan t} \cdot \cos t\right)}{\sqrt{1 + {\left(\frac{\frac{eh}{\tan t}}{ew}\right)}^{2}}}\right|\\ \end{array} \end{array} \]
    (FPCore (eh ew t)
     :precision binary64
     (if (or (<= eh -5.4e-18) (not (<= eh 1.18e-23)))
       (fabs (* (sin (atan (* (/ (cos t) ew) (/ eh (sin t))))) (* (cos t) eh)))
       (fabs
        (/
         (fma (sin t) ew (* (/ (* (/ eh ew) eh) (tan t)) (cos t)))
         (sqrt (+ 1.0 (pow (/ (/ eh (tan t)) ew) 2.0)))))))
    double code(double eh, double ew, double t) {
    	double tmp;
    	if ((eh <= -5.4e-18) || !(eh <= 1.18e-23)) {
    		tmp = fabs((sin(atan(((cos(t) / ew) * (eh / sin(t))))) * (cos(t) * eh)));
    	} else {
    		tmp = fabs((fma(sin(t), ew, ((((eh / ew) * eh) / tan(t)) * cos(t))) / sqrt((1.0 + pow(((eh / tan(t)) / ew), 2.0)))));
    	}
    	return tmp;
    }
    
    function code(eh, ew, t)
    	tmp = 0.0
    	if ((eh <= -5.4e-18) || !(eh <= 1.18e-23))
    		tmp = abs(Float64(sin(atan(Float64(Float64(cos(t) / ew) * Float64(eh / sin(t))))) * Float64(cos(t) * eh)));
    	else
    		tmp = abs(Float64(fma(sin(t), ew, Float64(Float64(Float64(Float64(eh / ew) * eh) / tan(t)) * cos(t))) / sqrt(Float64(1.0 + (Float64(Float64(eh / tan(t)) / ew) ^ 2.0)))));
    	end
    	return tmp
    end
    
    code[eh_, ew_, t_] := If[Or[LessEqual[eh, -5.4e-18], N[Not[LessEqual[eh, 1.18e-23]], $MachinePrecision]], N[Abs[N[(N[Sin[N[ArcTan[N[(N[(N[Cos[t], $MachinePrecision] / ew), $MachinePrecision] * N[(eh / N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[Sin[t], $MachinePrecision] * ew + N[(N[(N[(N[(eh / ew), $MachinePrecision] * eh), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(1.0 + N[Power[N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;eh \leq -5.4 \cdot 10^{-18} \lor \neg \left(eh \leq 1.18 \cdot 10^{-23}\right):\\
    \;\;\;\;\left|\sin \tan^{-1} \left(\frac{\cos t}{ew} \cdot \frac{eh}{\sin t}\right) \cdot \left(\cos t \cdot eh\right)\right|\\
    
    \mathbf{else}:\\
    \;\;\;\;\left|\frac{\mathsf{fma}\left(\sin t, ew, \frac{\frac{eh}{ew} \cdot eh}{\tan t} \cdot \cos t\right)}{\sqrt{1 + {\left(\frac{\frac{eh}{\tan t}}{ew}\right)}^{2}}}\right|\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if eh < -5.39999999999999977e-18 or 1.18e-23 < 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. Taylor expanded in eh around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -5.39999999999999977e-18 < eh < 1.18e-23

      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.0%

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

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

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

    Alternative 8: 82.8% accurate, 1.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -5.8e-18 < eh < 1.15e-25

      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 rewrites95.4%

        \[\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 t around 0

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

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

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

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

        \[\leadsto \left|\frac{\mathsf{fma}\left(\color{blue}{\frac{\frac{eh}{ew}}{t}}, 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 simplification82.7%

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

    Alternative 9: 68.2% accurate, 1.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)\\ \mathbf{if}\;eh \leq -7.5 \cdot 10^{-18} \lor \neg \left(eh \leq 2.7 \cdot 10^{+16}\right):\\ \;\;\;\;\left|\tanh t\_1 \cdot eh\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{\frac{eh}{ew}}{t}, eh, \sin t \cdot ew\right)}{\cosh t\_1}\right|\\ \end{array} \end{array} \]
    (FPCore (eh ew t)
     :precision binary64
     (let* ((t_1 (asinh (/ (/ eh (tan t)) ew))))
       (if (or (<= eh -7.5e-18) (not (<= eh 2.7e+16)))
         (fabs (* (tanh t_1) eh))
         (fabs (/ (fma (/ (/ eh ew) t) eh (* (sin t) ew)) (cosh t_1))))))
    double code(double eh, double ew, double t) {
    	double t_1 = asinh(((eh / tan(t)) / ew));
    	double tmp;
    	if ((eh <= -7.5e-18) || !(eh <= 2.7e+16)) {
    		tmp = fabs((tanh(t_1) * eh));
    	} else {
    		tmp = fabs((fma(((eh / ew) / t), eh, (sin(t) * ew)) / cosh(t_1)));
    	}
    	return tmp;
    }
    
    function code(eh, ew, t)
    	t_1 = asinh(Float64(Float64(eh / tan(t)) / ew))
    	tmp = 0.0
    	if ((eh <= -7.5e-18) || !(eh <= 2.7e+16))
    		tmp = abs(Float64(tanh(t_1) * eh));
    	else
    		tmp = abs(Float64(fma(Float64(Float64(eh / ew) / t), eh, Float64(sin(t) * ew)) / cosh(t_1)));
    	end
    	return tmp
    end
    
    code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcSinh[N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[eh, -7.5e-18], N[Not[LessEqual[eh, 2.7e+16]], $MachinePrecision]], N[Abs[N[(N[Tanh[t$95$1], $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(N[(eh / ew), $MachinePrecision] / t), $MachinePrecision] * eh + N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / N[Cosh[t$95$1], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)\\
    \mathbf{if}\;eh \leq -7.5 \cdot 10^{-18} \lor \neg \left(eh \leq 2.7 \cdot 10^{+16}\right):\\
    \;\;\;\;\left|\tanh t\_1 \cdot eh\right|\\
    
    \mathbf{else}:\\
    \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{\frac{eh}{ew}}{t}, eh, \sin t \cdot ew\right)}{\cosh t\_1}\right|\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if eh < -7.50000000000000015e-18 or 2.7e16 < 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. Taylor expanded in t around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -7.50000000000000015e-18 < eh < 2.7e16

        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 rewrites94.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 t around 0

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

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

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

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

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

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

      Alternative 10: 61.7% accurate, 2.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\frac{eh}{\tan t}}{ew}\\ \mathbf{if}\;t \leq -3.7 \cdot 10^{-67} \lor \neg \left(t \leq 0.009\right):\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t \cdot t\_1, eh, \sin t \cdot ew\right)}{1}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\tanh \sinh^{-1} t\_1 \cdot eh\right|\\ \end{array} \end{array} \]
      (FPCore (eh ew t)
       :precision binary64
       (let* ((t_1 (/ (/ eh (tan t)) ew)))
         (if (or (<= t -3.7e-67) (not (<= t 0.009)))
           (fabs (/ (fma (* (cos t) t_1) eh (* (sin t) ew)) 1.0))
           (fabs (* (tanh (asinh t_1)) eh)))))
      double code(double eh, double ew, double t) {
      	double t_1 = (eh / tan(t)) / ew;
      	double tmp;
      	if ((t <= -3.7e-67) || !(t <= 0.009)) {
      		tmp = fabs((fma((cos(t) * t_1), eh, (sin(t) * ew)) / 1.0));
      	} else {
      		tmp = fabs((tanh(asinh(t_1)) * eh));
      	}
      	return tmp;
      }
      
      function code(eh, ew, t)
      	t_1 = Float64(Float64(eh / tan(t)) / ew)
      	tmp = 0.0
      	if ((t <= -3.7e-67) || !(t <= 0.009))
      		tmp = abs(Float64(fma(Float64(cos(t) * t_1), eh, Float64(sin(t) * ew)) / 1.0));
      	else
      		tmp = abs(Float64(tanh(asinh(t_1)) * eh));
      	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[t, -3.7e-67], N[Not[LessEqual[t, 0.009]], $MachinePrecision]], 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], N[Abs[N[(N[Tanh[N[ArcSinh[t$95$1], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \frac{\frac{eh}{\tan t}}{ew}\\
      \mathbf{if}\;t \leq -3.7 \cdot 10^{-67} \lor \neg \left(t \leq 0.009\right):\\
      \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t \cdot t\_1, eh, \sin t \cdot ew\right)}{1}\right|\\
      
      \mathbf{else}:\\
      \;\;\;\;\left|\tanh \sinh^{-1} t\_1 \cdot eh\right|\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < -3.6999999999999999e-67 or 0.00899999999999999932 < t

        1. Initial program 99.6%

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

            \[\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 -3.6999999999999999e-67 < t < 0.00899999999999999932

          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 11: 61.3% accurate, 2.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.7 \cdot 10^{-67} \lor \neg \left(t \leq 0.009\right):\\ \;\;\;\;\left|ew \cdot \sin t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\tanh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right) \cdot eh\right|\\ \end{array} \end{array} \]
          (FPCore (eh ew t)
           :precision binary64
           (if (or (<= t -3.7e-67) (not (<= t 0.009)))
             (fabs (* ew (sin t)))
             (fabs (* (tanh (asinh (/ (/ eh (tan t)) ew))) eh))))
          double code(double eh, double ew, double t) {
          	double tmp;
          	if ((t <= -3.7e-67) || !(t <= 0.009)) {
          		tmp = fabs((ew * sin(t)));
          	} else {
          		tmp = fabs((tanh(asinh(((eh / tan(t)) / ew))) * eh));
          	}
          	return tmp;
          }
          
          def code(eh, ew, t):
          	tmp = 0
          	if (t <= -3.7e-67) or not (t <= 0.009):
          		tmp = math.fabs((ew * math.sin(t)))
          	else:
          		tmp = math.fabs((math.tanh(math.asinh(((eh / math.tan(t)) / ew))) * eh))
          	return tmp
          
          function code(eh, ew, t)
          	tmp = 0.0
          	if ((t <= -3.7e-67) || !(t <= 0.009))
          		tmp = abs(Float64(ew * sin(t)));
          	else
          		tmp = abs(Float64(tanh(asinh(Float64(Float64(eh / tan(t)) / ew))) * eh));
          	end
          	return tmp
          end
          
          function tmp_2 = code(eh, ew, t)
          	tmp = 0.0;
          	if ((t <= -3.7e-67) || ~((t <= 0.009)))
          		tmp = abs((ew * sin(t)));
          	else
          		tmp = abs((tanh(asinh(((eh / tan(t)) / ew))) * eh));
          	end
          	tmp_2 = tmp;
          end
          
          code[eh_, ew_, t_] := If[Or[LessEqual[t, -3.7e-67], N[Not[LessEqual[t, 0.009]], $MachinePrecision]], N[Abs[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[Tanh[N[ArcSinh[N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;t \leq -3.7 \cdot 10^{-67} \lor \neg \left(t \leq 0.009\right):\\
          \;\;\;\;\left|ew \cdot \sin t\right|\\
          
          \mathbf{else}:\\
          \;\;\;\;\left|\tanh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right) \cdot eh\right|\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if t < -3.6999999999999999e-67 or 0.00899999999999999932 < t

            1. Initial program 99.6%

              \[\left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
            2. Add Preprocessing
            3. Applied rewrites75.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.f6452.6

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

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

            if -3.6999999999999999e-67 < t < 0.00899999999999999932

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.7 \cdot 10^{-67} \lor \neg \left(t \leq 0.009\right):\\ \;\;\;\;\left|ew \cdot \sin t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\tanh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right) \cdot eh\right|\\ \end{array} \]
            9. Add Preprocessing

            Alternative 12: 56.1% accurate, 3.2× speedup?

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

              1. Initial program 99.6%

                \[\left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
              2. Add Preprocessing
              3. Applied rewrites75.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.f6452.6

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

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

              if -3.4000000000000001e-67 < t < 8.00000000000000038e-4

              1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left|\sin \tan^{-1} \left(\frac{\mathsf{fma}\left(t \cdot t, \frac{eh}{ew} \cdot -0.3333333333333333, \frac{eh}{ew}\right)}{t}\right) \cdot eh\right| \]
              8. Recombined 2 regimes into one program.
              9. Final simplification57.5%

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

              Alternative 13: 45.6% accurate, 3.4× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -7 \cdot 10^{-18} \lor \neg \left(eh \leq 2.6 \cdot 10^{+22}\right):\\ \;\;\;\;\tanh \sinh^{-1} \left(\frac{\frac{eh + -0.3333333333333333 \cdot \left(eh \cdot \left(t \cdot t\right)\right)}{t}}{ew}\right) \cdot eh\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \sin t\right|\\ \end{array} \end{array} \]
              (FPCore (eh ew t)
               :precision binary64
               (if (or (<= eh -7e-18) (not (<= eh 2.6e+22)))
                 (*
                  (tanh (asinh (/ (/ (+ eh (* -0.3333333333333333 (* eh (* t t)))) t) ew)))
                  eh)
                 (fabs (* ew (sin t)))))
              double code(double eh, double ew, double t) {
              	double tmp;
              	if ((eh <= -7e-18) || !(eh <= 2.6e+22)) {
              		tmp = tanh(asinh((((eh + (-0.3333333333333333 * (eh * (t * t)))) / t) / ew))) * eh;
              	} else {
              		tmp = fabs((ew * sin(t)));
              	}
              	return tmp;
              }
              
              def code(eh, ew, t):
              	tmp = 0
              	if (eh <= -7e-18) or not (eh <= 2.6e+22):
              		tmp = math.tanh(math.asinh((((eh + (-0.3333333333333333 * (eh * (t * t)))) / t) / ew))) * eh
              	else:
              		tmp = math.fabs((ew * math.sin(t)))
              	return tmp
              
              function code(eh, ew, t)
              	tmp = 0.0
              	if ((eh <= -7e-18) || !(eh <= 2.6e+22))
              		tmp = Float64(tanh(asinh(Float64(Float64(Float64(eh + Float64(-0.3333333333333333 * Float64(eh * Float64(t * t)))) / t) / ew))) * eh);
              	else
              		tmp = abs(Float64(ew * sin(t)));
              	end
              	return tmp
              end
              
              function tmp_2 = code(eh, ew, t)
              	tmp = 0.0;
              	if ((eh <= -7e-18) || ~((eh <= 2.6e+22)))
              		tmp = tanh(asinh((((eh + (-0.3333333333333333 * (eh * (t * t)))) / t) / ew))) * eh;
              	else
              		tmp = abs((ew * sin(t)));
              	end
              	tmp_2 = tmp;
              end
              
              code[eh_, ew_, t_] := If[Or[LessEqual[eh, -7e-18], N[Not[LessEqual[eh, 2.6e+22]], $MachinePrecision]], N[(N[Tanh[N[ArcSinh[N[(N[(N[(eh + N[(-0.3333333333333333 * N[(eh * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision], N[Abs[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;eh \leq -7 \cdot 10^{-18} \lor \neg \left(eh \leq 2.6 \cdot 10^{+22}\right):\\
              \;\;\;\;\tanh \sinh^{-1} \left(\frac{\frac{eh + -0.3333333333333333 \cdot \left(eh \cdot \left(t \cdot t\right)\right)}{t}}{ew}\right) \cdot eh\\
              
              \mathbf{else}:\\
              \;\;\;\;\left|ew \cdot \sin t\right|\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if eh < -6.9999999999999997e-18 or 2.6e22 < 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. Taylor expanded in t around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left|\frac{\frac{eh}{\tan t}}{ew \cdot \cosh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)} \cdot eh\right| \]
                  2. Step-by-step derivation
                    1. lift-fabs.f64N/A

                      \[\leadsto \color{blue}{\left|\frac{\frac{eh}{\tan t}}{ew \cdot \cosh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)} \cdot eh\right|} \]
                    2. rem-sqrt-square-revN/A

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

                      \[\leadsto \color{blue}{\sqrt{\frac{\frac{eh}{\tan t}}{ew \cdot \cosh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)} \cdot eh} \cdot \sqrt{\frac{\frac{eh}{\tan t}}{ew \cdot \cosh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)} \cdot eh}} \]
                  3. Applied rewrites27.5%

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

                    \[\leadsto \tanh \sinh^{-1} \left(\frac{\frac{eh + \frac{-1}{3} \cdot \left(eh \cdot {t}^{2}\right)}{t}}{ew}\right) \cdot eh \]
                  5. Step-by-step derivation
                    1. Applied rewrites29.9%

                      \[\leadsto \tanh \sinh^{-1} \left(\frac{\frac{eh + -0.3333333333333333 \cdot \left(eh \cdot \left(t \cdot t\right)\right)}{t}}{ew}\right) \cdot eh \]

                    if -6.9999999999999997e-18 < eh < 2.6e22

                    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 rewrites94.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.f6464.4

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

                      \[\leadsto \left|\color{blue}{ew \cdot \sin t}\right| \]
                  6. Recombined 2 regimes into one program.
                  7. Final simplification48.2%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -7 \cdot 10^{-18} \lor \neg \left(eh \leq 2.6 \cdot 10^{+22}\right):\\ \;\;\;\;\tanh \sinh^{-1} \left(\frac{\frac{eh + -0.3333333333333333 \cdot \left(eh \cdot \left(t \cdot t\right)\right)}{t}}{ew}\right) \cdot eh\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \sin t\right|\\ \end{array} \]
                  8. Add Preprocessing

                  Alternative 14: 44.1% accurate, 3.7× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq 2.6 \cdot 10^{+22}:\\ \;\;\;\;\left|ew \cdot \sin t\right|\\ \mathbf{else}:\\ \;\;\;\;\tanh \sinh^{-1} \left(\frac{\frac{eh}{t}}{ew}\right) \cdot eh\\ \end{array} \end{array} \]
                  (FPCore (eh ew t)
                   :precision binary64
                   (if (<= eh 2.6e+22)
                     (fabs (* ew (sin t)))
                     (* (tanh (asinh (/ (/ eh t) ew))) eh)))
                  double code(double eh, double ew, double t) {
                  	double tmp;
                  	if (eh <= 2.6e+22) {
                  		tmp = fabs((ew * sin(t)));
                  	} else {
                  		tmp = tanh(asinh(((eh / t) / ew))) * eh;
                  	}
                  	return tmp;
                  }
                  
                  def code(eh, ew, t):
                  	tmp = 0
                  	if eh <= 2.6e+22:
                  		tmp = math.fabs((ew * math.sin(t)))
                  	else:
                  		tmp = math.tanh(math.asinh(((eh / t) / ew))) * eh
                  	return tmp
                  
                  function code(eh, ew, t)
                  	tmp = 0.0
                  	if (eh <= 2.6e+22)
                  		tmp = abs(Float64(ew * sin(t)));
                  	else
                  		tmp = Float64(tanh(asinh(Float64(Float64(eh / t) / ew))) * eh);
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(eh, ew, t)
                  	tmp = 0.0;
                  	if (eh <= 2.6e+22)
                  		tmp = abs((ew * sin(t)));
                  	else
                  		tmp = tanh(asinh(((eh / t) / ew))) * eh;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[eh_, ew_, t_] := If[LessEqual[eh, 2.6e+22], N[Abs[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Tanh[N[ArcSinh[N[(N[(eh / t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;eh \leq 2.6 \cdot 10^{+22}:\\
                  \;\;\;\;\left|ew \cdot \sin t\right|\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\tanh \sinh^{-1} \left(\frac{\frac{eh}{t}}{ew}\right) \cdot eh\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if eh < 2.6e22

                    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 rewrites76.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.f6450.0

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

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

                    if 2.6e22 < 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. Taylor expanded in t around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left|\frac{\frac{eh}{\tan t}}{ew \cdot \cosh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)} \cdot eh\right| \]
                      2. Step-by-step derivation
                        1. lift-fabs.f64N/A

                          \[\leadsto \color{blue}{\left|\frac{\frac{eh}{\tan t}}{ew \cdot \cosh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)} \cdot eh\right|} \]
                        2. rem-sqrt-square-revN/A

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

                          \[\leadsto \color{blue}{\sqrt{\frac{\frac{eh}{\tan t}}{ew \cdot \cosh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)} \cdot eh} \cdot \sqrt{\frac{\frac{eh}{\tan t}}{ew \cdot \cosh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)} \cdot eh}} \]
                      3. Applied rewrites30.3%

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

                        \[\leadsto \tanh \sinh^{-1} \left(\frac{\frac{eh}{t}}{ew}\right) \cdot eh \]
                      5. Step-by-step derivation
                        1. Applied rewrites29.8%

                          \[\leadsto \tanh \sinh^{-1} \left(\frac{\frac{eh}{t}}{ew}\right) \cdot eh \]
                      6. Recombined 2 regimes into one program.
                      7. Add Preprocessing

                      Alternative 15: 41.8% accurate, 8.1× speedup?

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

                        \[\left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
                      2. Add Preprocessing
                      3. Applied rewrites67.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.f6442.8

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

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

                      Alternative 16: 19.4% 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 rewrites67.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.f6442.8

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

                        \[\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 rewrites18.2%

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

                        Reproduce

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