Example from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 15.0s
Alternatives: 12
Speedup: N/A×

Specification

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

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

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

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

Alternative 2: 94.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{t}\right)\\
t_2 := ew \cdot \sin t\\
t_3 := eh \cdot \cos t\\
t_4 := \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\\
\mathbf{if}\;\left|t\_3 \cdot \sin t\_4 + t\_2 \cdot \cos t\_4\right| \leq 5 \cdot 10^{+50}:\\
\;\;\;\;\left|\mathsf{fma}\left(\frac{\cos t}{ew} \cdot eh, \tanh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right), t\_1 \cdot \sin t\right) \cdot ew\right|\\

\mathbf{else}:\\
\;\;\;\;\left|t\_3 \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right) + t\_2 \cdot t\_1\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (fabs.f64 (+.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))))))) < 5e50

    1. Initial program 99.9%

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

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

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

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

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

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

          if 5e50 < (fabs.f64 (+.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. 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.7

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

            \[\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. 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} \left(\frac{eh}{\color{blue}{ew \cdot t}}\right)\right| \]
          6. Step-by-step derivation
            1. Applied rewrites93.7%

              \[\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}{ew \cdot t}}\right)\right| \]
            2. Taylor expanded in t around 0

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

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

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

            Alternative 3: 90.3% accurate, 0.6× speedup?

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

              1. Initial program 99.9%

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

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

              if 3.99999999999999994e-45 < (fabs.f64 (+.f64 (*.f64 (*.f64 ew (sin.f64 t)) (cos.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))) (*.f64 (*.f64 eh (cos.f64 t)) (sin.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t)))))))

              1. Initial program 99.8%

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

                  \[\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}{ew \cdot t}}\right)\right| \]
                2. Taylor expanded in t around 0

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \leq 4 \cdot 10^{-45}:\\ \;\;\;\;\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|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{t}\right)\right|\\ \end{array} \]
                6. Add Preprocessing

                Alternative 4: 89.0% accurate, 1.3× speedup?

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

                  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. 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} \left(\frac{eh}{\color{blue}{ew \cdot t}}\right)\right| \]
                  6. Step-by-step derivation
                    1. Applied rewrites92.2%

                      \[\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}{ew \cdot t}}\right)\right| \]
                    2. Taylor expanded in t around 0

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

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

                      if 1.44999999999999993e234 < t

                      1. Initial program 99.4%

                        \[\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 rewrites48.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left|\color{blue}{eh \cdot \cos t}\right| \]
                      7. Step-by-step derivation
                        1. Applied rewrites99.4%

                          \[\leadsto \left|\color{blue}{eh \cdot \cos t}\right| \]
                      8. Recombined 2 regimes into one program.
                      9. Final simplification92.5%

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

                      Alternative 5: 82.3% accurate, 1.4× speedup?

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

                        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 rewrites73.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -8.9999999999999994e28 < t < 8.20000000000000025e45

                        1. Initial program 99.9%

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

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

                          \[\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. 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} \left(\frac{eh}{\color{blue}{ew \cdot t}}\right)\right| \]
                        6. Step-by-step derivation
                          1. Applied rewrites99.9%

                            \[\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}{ew \cdot t}}\right)\right| \]
                          2. Taylor expanded in t around 0

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

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

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

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

                              if 8.20000000000000025e45 < t < 1.44999999999999993e234

                              1. Initial program 99.4%

                                \[\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 rewrites83.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if 1.44999999999999993e234 < t

                              1. Initial program 99.4%

                                \[\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 rewrites48.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \left|\color{blue}{eh \cdot \cos t}\right| \]
                              7. Step-by-step derivation
                                1. Applied rewrites99.4%

                                  \[\leadsto \left|\color{blue}{eh \cdot \cos t}\right| \]
                              8. Recombined 4 regimes into one program.
                              9. Final simplification87.7%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{+28}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{\cos t \cdot eh}{\tan t \cdot ew}, eh, \sin t \cdot ew\right)}{\sqrt{1 + {\left(\frac{eh}{\tan t \cdot ew}\right)}^{2}}}\right|\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+45}:\\ \;\;\;\;\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right) + \left(ew \cdot t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{t}\right)\right|\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{+234}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{\frac{\cos t}{ew} \cdot eh}{\tan t}, eh, \sin t \cdot ew\right)}{\sqrt{1 + {\left(\frac{\frac{eh}{\tan t}}{ew}\right)}^{2}}}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|eh \cdot \cos t\right|\\ \end{array} \]
                              10. Add Preprocessing

                              Alternative 6: 82.3% accurate, 1.5× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \tan t \cdot ew\\ t_2 := \left|\frac{\mathsf{fma}\left(\frac{\cos t \cdot eh}{t\_1}, eh, \sin t \cdot ew\right)}{\sqrt{1 + {\left(\frac{eh}{t\_1}\right)}^{2}}}\right|\\ t_3 := eh \cdot \cos t\\ \mathbf{if}\;t \leq -9 \cdot 10^{+28}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+45}:\\ \;\;\;\;\left|t\_3 \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right) + \left(ew \cdot t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{t}\right)\right|\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{+234}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\left|t\_3\right|\\ \end{array} \end{array} \]
                              (FPCore (eh ew t)
                               :precision binary64
                               (let* ((t_1 (* (tan t) ew))
                                      (t_2
                                       (fabs
                                        (/
                                         (fma (/ (* (cos t) eh) t_1) eh (* (sin t) ew))
                                         (sqrt (+ 1.0 (pow (/ eh t_1) 2.0))))))
                                      (t_3 (* eh (cos t))))
                                 (if (<= t -9e+28)
                                   t_2
                                   (if (<= t 8.2e+45)
                                     (fabs
                                      (+
                                       (* t_3 (sin (atan (/ eh (* ew t)))))
                                       (* (* ew t) (cos (atan (/ (/ eh ew) t))))))
                                     (if (<= t 1.45e+234) t_2 (fabs t_3))))))
                              double code(double eh, double ew, double t) {
                              	double t_1 = tan(t) * ew;
                              	double t_2 = fabs((fma(((cos(t) * eh) / t_1), eh, (sin(t) * ew)) / sqrt((1.0 + pow((eh / t_1), 2.0)))));
                              	double t_3 = eh * cos(t);
                              	double tmp;
                              	if (t <= -9e+28) {
                              		tmp = t_2;
                              	} else if (t <= 8.2e+45) {
                              		tmp = fabs(((t_3 * sin(atan((eh / (ew * t))))) + ((ew * t) * cos(atan(((eh / ew) / t))))));
                              	} else if (t <= 1.45e+234) {
                              		tmp = t_2;
                              	} else {
                              		tmp = fabs(t_3);
                              	}
                              	return tmp;
                              }
                              
                              function code(eh, ew, t)
                              	t_1 = Float64(tan(t) * ew)
                              	t_2 = abs(Float64(fma(Float64(Float64(cos(t) * eh) / t_1), eh, Float64(sin(t) * ew)) / sqrt(Float64(1.0 + (Float64(eh / t_1) ^ 2.0)))))
                              	t_3 = Float64(eh * cos(t))
                              	tmp = 0.0
                              	if (t <= -9e+28)
                              		tmp = t_2;
                              	elseif (t <= 8.2e+45)
                              		tmp = abs(Float64(Float64(t_3 * sin(atan(Float64(eh / Float64(ew * t))))) + Float64(Float64(ew * t) * cos(atan(Float64(Float64(eh / ew) / t))))));
                              	elseif (t <= 1.45e+234)
                              		tmp = t_2;
                              	else
                              		tmp = abs(t_3);
                              	end
                              	return tmp
                              end
                              
                              code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Tan[t], $MachinePrecision] * ew), $MachinePrecision]}, Block[{t$95$2 = N[Abs[N[(N[(N[(N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision] / t$95$1), $MachinePrecision] * eh + N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(1.0 + N[Power[N[(eh / t$95$1), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9e+28], t$95$2, If[LessEqual[t, 8.2e+45], N[Abs[N[(N[(t$95$3 * N[Sin[N[ArcTan[N[(eh / N[(ew * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(ew * t), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.45e+234], t$95$2, N[Abs[t$95$3], $MachinePrecision]]]]]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              t_1 := \tan t \cdot ew\\
                              t_2 := \left|\frac{\mathsf{fma}\left(\frac{\cos t \cdot eh}{t\_1}, eh, \sin t \cdot ew\right)}{\sqrt{1 + {\left(\frac{eh}{t\_1}\right)}^{2}}}\right|\\
                              t_3 := eh \cdot \cos t\\
                              \mathbf{if}\;t \leq -9 \cdot 10^{+28}:\\
                              \;\;\;\;t\_2\\
                              
                              \mathbf{elif}\;t \leq 8.2 \cdot 10^{+45}:\\
                              \;\;\;\;\left|t\_3 \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right) + \left(ew \cdot t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{t}\right)\right|\\
                              
                              \mathbf{elif}\;t \leq 1.45 \cdot 10^{+234}:\\
                              \;\;\;\;t\_2\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\left|t\_3\right|\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 3 regimes
                              2. if t < -8.9999999999999994e28 or 8.20000000000000025e45 < t < 1.44999999999999993e234

                                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 rewrites77.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if -8.9999999999999994e28 < t < 8.20000000000000025e45

                                1. Initial program 99.9%

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

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

                                  \[\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. 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} \left(\frac{eh}{\color{blue}{ew \cdot t}}\right)\right| \]
                                6. Step-by-step derivation
                                  1. Applied rewrites99.9%

                                    \[\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}{ew \cdot t}}\right)\right| \]
                                  2. Taylor expanded in t around 0

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

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

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

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

                                      if 1.44999999999999993e234 < t

                                      1. Initial program 99.4%

                                        \[\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 rewrites48.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \left|\color{blue}{eh \cdot \cos t}\right| \]
                                      7. Step-by-step derivation
                                        1. Applied rewrites99.4%

                                          \[\leadsto \left|\color{blue}{eh \cdot \cos t}\right| \]
                                      8. Recombined 3 regimes into one program.
                                      9. Final simplification87.7%

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{+28}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{\cos t \cdot eh}{\tan t \cdot ew}, eh, \sin t \cdot ew\right)}{\sqrt{1 + {\left(\frac{eh}{\tan t \cdot ew}\right)}^{2}}}\right|\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+45}:\\ \;\;\;\;\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right) + \left(ew \cdot t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{t}\right)\right|\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{+234}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{\cos t \cdot eh}{\tan t \cdot ew}, eh, \sin t \cdot ew\right)}{\sqrt{1 + {\left(\frac{eh}{\tan t \cdot ew}\right)}^{2}}}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|eh \cdot \cos t\right|\\ \end{array} \]
                                      10. Add Preprocessing

                                      Alternative 7: 80.4% accurate, 1.8× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -3.2 \cdot 10^{+45} \lor \neg \left(eh \leq 3.1 \cdot 10^{-129}\right):\\ \;\;\;\;\left|eh \cdot \cos t\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 -3.2e+45) (not (<= eh 3.1e-129)))
                                         (fabs (* eh (cos t)))
                                         (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 <= -3.2e+45) || !(eh <= 3.1e-129)) {
                                      		tmp = fabs((eh * cos(t)));
                                      	} 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 <= -3.2e+45) || !(eh <= 3.1e-129))
                                      		tmp = abs(Float64(eh * cos(t)));
                                      	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, -3.2e+45], N[Not[LessEqual[eh, 3.1e-129]], $MachinePrecision]], N[Abs[N[(eh * N[Cos[t], $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 -3.2 \cdot 10^{+45} \lor \neg \left(eh \leq 3.1 \cdot 10^{-129}\right):\\
                                      \;\;\;\;\left|eh \cdot \cos t\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 < -3.2000000000000003e45 or 3.1e-129 < eh

                                        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \left|\color{blue}{eh \cdot \cos t}\right| \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites83.9%

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

                                          if -3.2000000000000003e45 < eh < 3.1e-129

                                          1. Initial program 99.8%

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

                                            \[\leadsto \left|\color{blue}{\frac{\mathsf{fma}\left(\cos t \cdot \frac{\frac{eh}{\tan t}}{ew}, eh, \sin t \cdot ew\right)}{\cosh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)}}\right| \]
                                          4. 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. Applied rewrites85.9%

                                              \[\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| \]
                                          6. Recombined 2 regimes into one program.
                                          7. Final simplification84.7%

                                            \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -3.2 \cdot 10^{+45} \lor \neg \left(eh \leq 3.1 \cdot 10^{-129}\right):\\ \;\;\;\;\left|eh \cdot \cos t\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} \]
                                          8. Add Preprocessing

                                          Alternative 8: 77.9% accurate, 2.2× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -3.3 \cdot 10^{+44} \lor \neg \left(eh \leq 3.1 \cdot 10^{-129}\right):\\ \;\;\;\;\left|eh \cdot \cos t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{\frac{eh}{ew}}{t}, eh, \sin t \cdot ew\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 -3.3e+44) (not (<= eh 3.1e-129)))
                                             (fabs (* eh (cos t)))
                                             (fabs
                                              (/
                                               (fma (/ (/ eh ew) t) eh (* (sin t) ew))
                                               (sqrt (+ 1.0 (pow (/ (/ eh (tan t)) ew) 2.0)))))))
                                          double code(double eh, double ew, double t) {
                                          	double tmp;
                                          	if ((eh <= -3.3e+44) || !(eh <= 3.1e-129)) {
                                          		tmp = fabs((eh * cos(t)));
                                          	} else {
                                          		tmp = fabs((fma(((eh / ew) / t), eh, (sin(t) * ew)) / sqrt((1.0 + pow(((eh / tan(t)) / ew), 2.0)))));
                                          	}
                                          	return tmp;
                                          }
                                          
                                          function code(eh, ew, t)
                                          	tmp = 0.0
                                          	if ((eh <= -3.3e+44) || !(eh <= 3.1e-129))
                                          		tmp = abs(Float64(eh * cos(t)));
                                          	else
                                          		tmp = abs(Float64(fma(Float64(Float64(eh / ew) / t), eh, Float64(sin(t) * ew)) / sqrt(Float64(1.0 + (Float64(Float64(eh / tan(t)) / ew) ^ 2.0)))));
                                          	end
                                          	return tmp
                                          end
                                          
                                          code[eh_, ew_, t_] := If[Or[LessEqual[eh, -3.3e+44], N[Not[LessEqual[eh, 3.1e-129]], $MachinePrecision]], N[Abs[N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(N[(eh / ew), $MachinePrecision] / t), $MachinePrecision] * eh + N[(N[Sin[t], $MachinePrecision] * ew), $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 -3.3 \cdot 10^{+44} \lor \neg \left(eh \leq 3.1 \cdot 10^{-129}\right):\\
                                          \;\;\;\;\left|eh \cdot \cos t\right|\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{\frac{eh}{ew}}{t}, eh, \sin t \cdot ew\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 < -3.30000000000000013e44 or 3.1e-129 < eh

                                            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \left|\color{blue}{eh \cdot \cos t}\right| \]
                                            7. Step-by-step derivation
                                              1. Applied rewrites83.9%

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

                                              if -3.30000000000000013e44 < eh < 3.1e-129

                                              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \left|\frac{\mathsf{fma}\left(\color{blue}{\frac{eh}{ew \cdot t}}, eh, \sin t \cdot ew\right)}{\sqrt{1 + {\left(\frac{\frac{eh}{\tan t}}{ew}\right)}^{2}}}\right| \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites80.5%

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

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

                                              Alternative 9: 73.3% accurate, 7.2× speedup?

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

                                                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \left|\color{blue}{eh \cdot \cos t}\right| \]
                                                7. Step-by-step derivation
                                                  1. Applied rewrites83.9%

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

                                                  if -4.1e43 < eh < 3.1e-129

                                                  1. Initial program 99.8%

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

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

                                                    \[\leadsto \left|\color{blue}{ew \cdot \sin t}\right| \]
                                                  5. Step-by-step derivation
                                                    1. Applied rewrites71.4%

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

                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -4.1 \cdot 10^{+43} \lor \neg \left(eh \leq 3.1 \cdot 10^{-129}\right):\\ \;\;\;\;\left|eh \cdot \cos t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot \sin t\right|\\ \end{array} \]
                                                  8. Add Preprocessing

                                                  Alternative 10: 61.5% accurate, 7.2× speedup?

                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-42} \lor \neg \left(t \leq 5.5 \cdot 10^{-34}\right):\\ \;\;\;\;\left|ew \cdot \sin t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|eh\right|\\ \end{array} \end{array} \]
                                                  (FPCore (eh ew t)
                                                   :precision binary64
                                                   (if (or (<= t -2e-42) (not (<= t 5.5e-34))) (fabs (* ew (sin t))) (fabs eh)))
                                                  double code(double eh, double ew, double t) {
                                                  	double tmp;
                                                  	if ((t <= -2e-42) || !(t <= 5.5e-34)) {
                                                  		tmp = fabs((ew * sin(t)));
                                                  	} else {
                                                  		tmp = fabs(eh);
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  module fmin_fmax_functions
                                                      implicit none
                                                      private
                                                      public fmax
                                                      public fmin
                                                  
                                                      interface fmax
                                                          module procedure fmax88
                                                          module procedure fmax44
                                                          module procedure fmax84
                                                          module procedure fmax48
                                                      end interface
                                                      interface fmin
                                                          module procedure fmin88
                                                          module procedure fmin44
                                                          module procedure fmin84
                                                          module procedure fmin48
                                                      end interface
                                                  contains
                                                      real(8) function fmax88(x, y) result (res)
                                                          real(8), intent (in) :: x
                                                          real(8), intent (in) :: y
                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                      end function
                                                      real(4) function fmax44(x, y) result (res)
                                                          real(4), intent (in) :: x
                                                          real(4), intent (in) :: y
                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                      end function
                                                      real(8) function fmax84(x, y) result(res)
                                                          real(8), intent (in) :: x
                                                          real(4), intent (in) :: y
                                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                      end function
                                                      real(8) function fmax48(x, y) result(res)
                                                          real(4), intent (in) :: x
                                                          real(8), intent (in) :: y
                                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                      end function
                                                      real(8) function fmin88(x, y) result (res)
                                                          real(8), intent (in) :: x
                                                          real(8), intent (in) :: y
                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                      end function
                                                      real(4) function fmin44(x, y) result (res)
                                                          real(4), intent (in) :: x
                                                          real(4), intent (in) :: y
                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                      end function
                                                      real(8) function fmin84(x, y) result(res)
                                                          real(8), intent (in) :: x
                                                          real(4), intent (in) :: y
                                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                      end function
                                                      real(8) function fmin48(x, y) result(res)
                                                          real(4), intent (in) :: x
                                                          real(8), intent (in) :: y
                                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                      end function
                                                  end module
                                                  
                                                  real(8) function code(eh, ew, t)
                                                  use fmin_fmax_functions
                                                      real(8), intent (in) :: eh
                                                      real(8), intent (in) :: ew
                                                      real(8), intent (in) :: t
                                                      real(8) :: tmp
                                                      if ((t <= (-2d-42)) .or. (.not. (t <= 5.5d-34))) then
                                                          tmp = abs((ew * sin(t)))
                                                      else
                                                          tmp = abs(eh)
                                                      end if
                                                      code = tmp
                                                  end function
                                                  
                                                  public static double code(double eh, double ew, double t) {
                                                  	double tmp;
                                                  	if ((t <= -2e-42) || !(t <= 5.5e-34)) {
                                                  		tmp = Math.abs((ew * Math.sin(t)));
                                                  	} else {
                                                  		tmp = Math.abs(eh);
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  def code(eh, ew, t):
                                                  	tmp = 0
                                                  	if (t <= -2e-42) or not (t <= 5.5e-34):
                                                  		tmp = math.fabs((ew * math.sin(t)))
                                                  	else:
                                                  		tmp = math.fabs(eh)
                                                  	return tmp
                                                  
                                                  function code(eh, ew, t)
                                                  	tmp = 0.0
                                                  	if ((t <= -2e-42) || !(t <= 5.5e-34))
                                                  		tmp = abs(Float64(ew * sin(t)));
                                                  	else
                                                  		tmp = abs(eh);
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  function tmp_2 = code(eh, ew, t)
                                                  	tmp = 0.0;
                                                  	if ((t <= -2e-42) || ~((t <= 5.5e-34)))
                                                  		tmp = abs((ew * sin(t)));
                                                  	else
                                                  		tmp = abs(eh);
                                                  	end
                                                  	tmp_2 = tmp;
                                                  end
                                                  
                                                  code[eh_, ew_, t_] := If[Or[LessEqual[t, -2e-42], N[Not[LessEqual[t, 5.5e-34]], $MachinePrecision]], N[Abs[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[eh], $MachinePrecision]]
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  \begin{array}{l}
                                                  \mathbf{if}\;t \leq -2 \cdot 10^{-42} \lor \neg \left(t \leq 5.5 \cdot 10^{-34}\right):\\
                                                  \;\;\;\;\left|ew \cdot \sin t\right|\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;\left|eh\right|\\
                                                  
                                                  
                                                  \end{array}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 2 regimes
                                                  2. if t < -2.00000000000000008e-42 or 5.50000000000000014e-34 < 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 rewrites74.3%

                                                      \[\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. Applied rewrites54.3%

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

                                                      if -2.00000000000000008e-42 < t < 5.50000000000000014e-34

                                                      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto \left|\color{blue}{eh}\right| \]
                                                      8. Recombined 2 regimes into one program.
                                                      9. Final simplification64.3%

                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-42} \lor \neg \left(t \leq 5.5 \cdot 10^{-34}\right):\\ \;\;\;\;\left|ew \cdot \sin t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|eh\right|\\ \end{array} \]
                                                      10. Add Preprocessing

                                                      Alternative 11: 44.8% accurate, 43.4× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -2.5 \cdot 10^{-70} \lor \neg \left(eh \leq 6.9 \cdot 10^{-130}\right):\\ \;\;\;\;\left|eh\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot t\right|\\ \end{array} \end{array} \]
                                                      (FPCore (eh ew t)
                                                       :precision binary64
                                                       (if (or (<= eh -2.5e-70) (not (<= eh 6.9e-130))) (fabs eh) (fabs (* ew t))))
                                                      double code(double eh, double ew, double t) {
                                                      	double tmp;
                                                      	if ((eh <= -2.5e-70) || !(eh <= 6.9e-130)) {
                                                      		tmp = fabs(eh);
                                                      	} else {
                                                      		tmp = fabs((ew * t));
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      module fmin_fmax_functions
                                                          implicit none
                                                          private
                                                          public fmax
                                                          public fmin
                                                      
                                                          interface fmax
                                                              module procedure fmax88
                                                              module procedure fmax44
                                                              module procedure fmax84
                                                              module procedure fmax48
                                                          end interface
                                                          interface fmin
                                                              module procedure fmin88
                                                              module procedure fmin44
                                                              module procedure fmin84
                                                              module procedure fmin48
                                                          end interface
                                                      contains
                                                          real(8) function fmax88(x, y) result (res)
                                                              real(8), intent (in) :: x
                                                              real(8), intent (in) :: y
                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                          end function
                                                          real(4) function fmax44(x, y) result (res)
                                                              real(4), intent (in) :: x
                                                              real(4), intent (in) :: y
                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                          end function
                                                          real(8) function fmax84(x, y) result(res)
                                                              real(8), intent (in) :: x
                                                              real(4), intent (in) :: y
                                                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                          end function
                                                          real(8) function fmax48(x, y) result(res)
                                                              real(4), intent (in) :: x
                                                              real(8), intent (in) :: y
                                                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                          end function
                                                          real(8) function fmin88(x, y) result (res)
                                                              real(8), intent (in) :: x
                                                              real(8), intent (in) :: y
                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                          end function
                                                          real(4) function fmin44(x, y) result (res)
                                                              real(4), intent (in) :: x
                                                              real(4), intent (in) :: y
                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                          end function
                                                          real(8) function fmin84(x, y) result(res)
                                                              real(8), intent (in) :: x
                                                              real(4), intent (in) :: y
                                                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                          end function
                                                          real(8) function fmin48(x, y) result(res)
                                                              real(4), intent (in) :: x
                                                              real(8), intent (in) :: y
                                                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                          end function
                                                      end module
                                                      
                                                      real(8) function code(eh, ew, t)
                                                      use fmin_fmax_functions
                                                          real(8), intent (in) :: eh
                                                          real(8), intent (in) :: ew
                                                          real(8), intent (in) :: t
                                                          real(8) :: tmp
                                                          if ((eh <= (-2.5d-70)) .or. (.not. (eh <= 6.9d-130))) then
                                                              tmp = abs(eh)
                                                          else
                                                              tmp = abs((ew * t))
                                                          end if
                                                          code = tmp
                                                      end function
                                                      
                                                      public static double code(double eh, double ew, double t) {
                                                      	double tmp;
                                                      	if ((eh <= -2.5e-70) || !(eh <= 6.9e-130)) {
                                                      		tmp = Math.abs(eh);
                                                      	} else {
                                                      		tmp = Math.abs((ew * t));
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      def code(eh, ew, t):
                                                      	tmp = 0
                                                      	if (eh <= -2.5e-70) or not (eh <= 6.9e-130):
                                                      		tmp = math.fabs(eh)
                                                      	else:
                                                      		tmp = math.fabs((ew * t))
                                                      	return tmp
                                                      
                                                      function code(eh, ew, t)
                                                      	tmp = 0.0
                                                      	if ((eh <= -2.5e-70) || !(eh <= 6.9e-130))
                                                      		tmp = abs(eh);
                                                      	else
                                                      		tmp = abs(Float64(ew * t));
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      function tmp_2 = code(eh, ew, t)
                                                      	tmp = 0.0;
                                                      	if ((eh <= -2.5e-70) || ~((eh <= 6.9e-130)))
                                                      		tmp = abs(eh);
                                                      	else
                                                      		tmp = abs((ew * t));
                                                      	end
                                                      	tmp_2 = tmp;
                                                      end
                                                      
                                                      code[eh_, ew_, t_] := If[Or[LessEqual[eh, -2.5e-70], N[Not[LessEqual[eh, 6.9e-130]], $MachinePrecision]], N[Abs[eh], $MachinePrecision], N[Abs[N[(ew * t), $MachinePrecision]], $MachinePrecision]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      \mathbf{if}\;eh \leq -2.5 \cdot 10^{-70} \lor \neg \left(eh \leq 6.9 \cdot 10^{-130}\right):\\
                                                      \;\;\;\;\left|eh\right|\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;\left|ew \cdot t\right|\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 2 regimes
                                                      2. if eh < -2.4999999999999999e-70 or 6.90000000000000035e-130 < eh

                                                        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto \left|\color{blue}{eh}\right| \]
                                                        7. Step-by-step derivation
                                                          1. Applied rewrites54.5%

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

                                                          if -2.4999999999999999e-70 < eh < 6.90000000000000035e-130

                                                          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 rewrites97.6%

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

                                                            \[\leadsto \left|\color{blue}{ew \cdot \sin t}\right| \]
                                                          5. Step-by-step derivation
                                                            1. Applied rewrites75.1%

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

                                                              \[\leadsto \left|ew \cdot t\right| \]
                                                            3. Step-by-step derivation
                                                              1. Applied rewrites40.8%

                                                                \[\leadsto \left|ew \cdot t\right| \]
                                                            4. Recombined 2 regimes into one program.
                                                            5. Final simplification49.7%

                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -2.5 \cdot 10^{-70} \lor \neg \left(eh \leq 6.9 \cdot 10^{-130}\right):\\ \;\;\;\;\left|eh\right|\\ \mathbf{else}:\\ \;\;\;\;\left|ew \cdot t\right|\\ \end{array} \]
                                                            6. Add Preprocessing

                                                            Alternative 12: 42.2% accurate, 290.0× speedup?

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

                                                              \[\left|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right) + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right| \]
                                                            2. Add Preprocessing
                                                            3. Applied rewrites62.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. rem-square-sqrtN/A

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

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto \left|\color{blue}{eh}\right| \]
                                                            7. Step-by-step derivation
                                                              1. Applied rewrites43.2%

                                                                \[\leadsto \left|\color{blue}{eh}\right| \]
                                                              2. Add Preprocessing

                                                              Reproduce

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