Example from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 17.3s
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.1× speedup?

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

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

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

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

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

Alternative 2: 99.1% accurate, 1.3× speedup?

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

\\
\left|\mathsf{fma}\left(\tanh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right) \cdot \cos t, eh, \frac{\sin t}{\mathsf{hypot}\left(-1, \frac{eh}{ew \cdot t}\right)} \cdot ew\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. Applied rewrites99.8%

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

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

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

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

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

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

Alternative 3: 98.4% accurate, 1.6× speedup?

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

\\
\left|\mathsf{fma}\left(\tanh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right) \cdot \cos t, eh, ew \cdot \sin 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. Applied rewrites99.8%

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

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

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

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

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

Alternative 4: 77.8% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -1.02 \cdot 10^{-72} \lor \neg \left(eh \leq 1.22 \cdot 10^{+64}\right):\\ \;\;\;\;\left|eh \cdot \cos t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\sin t, ew, \frac{\frac{eh}{ew} \cdot eh}{\tan t} \cdot \cos t\right)}{\mathsf{hypot}\left(-1, \frac{eh}{ew \cdot t}\right)}\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (if (or (<= eh -1.02e-72) (not (<= eh 1.22e+64)))
   (fabs (* eh (cos t)))
   (fabs
    (/
     (fma (sin t) ew (* (/ (* (/ eh ew) eh) (tan t)) (cos t)))
     (hypot -1.0 (/ eh (* ew t)))))))
double code(double eh, double ew, double t) {
	double tmp;
	if ((eh <= -1.02e-72) || !(eh <= 1.22e+64)) {
		tmp = fabs((eh * cos(t)));
	} else {
		tmp = fabs((fma(sin(t), ew, ((((eh / ew) * eh) / tan(t)) * cos(t))) / hypot(-1.0, (eh / (ew * t)))));
	}
	return tmp;
}
function code(eh, ew, t)
	tmp = 0.0
	if ((eh <= -1.02e-72) || !(eh <= 1.22e+64))
		tmp = abs(Float64(eh * cos(t)));
	else
		tmp = abs(Float64(fma(sin(t), ew, Float64(Float64(Float64(Float64(eh / ew) * eh) / tan(t)) * cos(t))) / hypot(-1.0, Float64(eh / Float64(ew * t)))));
	end
	return tmp
end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -1.02e-72], N[Not[LessEqual[eh, 1.22e+64]], $MachinePrecision]], N[Abs[N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[Sin[t], $MachinePrecision] * ew + N[(N[(N[(N[(eh / ew), $MachinePrecision] * eh), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[-1.0 ^ 2 + N[(eh / N[(ew * t), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;eh \leq -1.02 \cdot 10^{-72} \lor \neg \left(eh \leq 1.22 \cdot 10^{+64}\right):\\
\;\;\;\;\left|eh \cdot \cos t\right|\\

\mathbf{else}:\\
\;\;\;\;\left|\frac{\mathsf{fma}\left(\sin t, ew, \frac{\frac{eh}{ew} \cdot eh}{\tan t} \cdot \cos t\right)}{\mathsf{hypot}\left(-1, \frac{eh}{ew \cdot t}\right)}\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if eh < -1.02e-72 or 1.21999999999999994e64 < eh

    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|\color{blue}{\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. lift-*.f64N/A

        \[\leadsto \left|\color{blue}{\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| \]
      3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.02e-72 < eh < 1.21999999999999994e64

    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|\color{blue}{\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. lift-*.f64N/A

        \[\leadsto \left|\color{blue}{\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| \]
      3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 72.8% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := eh \cdot \cos t\\ t_2 := \left|t\_1\right|\\ \mathbf{if}\;eh \leq -4.1 \cdot 10^{-74}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;eh \leq 3.5 \cdot 10^{-85}:\\ \;\;\;\;\left|\mathsf{fma}\left(ew, \sin t, eh \cdot \left(eh \cdot \frac{0.5 \cdot {\cos t}^{2}}{ew \cdot \sin t}\right)\right)\right|\\ \mathbf{elif}\;eh \leq 1.25 \cdot 10^{-27}:\\ \;\;\;\;\left|\mathsf{fma}\left(eh, \cos t, \left(ew \cdot ew\right) \cdot \left(0.5 \cdot \frac{{\sin t}^{2}}{t\_1}\right)\right)\right|\\ \mathbf{elif}\;eh \leq 5.9 \cdot 10^{+63}:\\ \;\;\;\;\left|\mathsf{fma}\left(ew, \sin t, \left(eh \cdot eh\right) \cdot \left(0.5 \cdot \frac{{ew}^{-1}}{t}\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (* eh (cos t))) (t_2 (fabs t_1)))
   (if (<= eh -4.1e-74)
     t_2
     (if (<= eh 3.5e-85)
       (fabs
        (fma
         ew
         (sin t)
         (* eh (* eh (/ (* 0.5 (pow (cos t) 2.0)) (* ew (sin t)))))))
       (if (<= eh 1.25e-27)
         (fabs
          (fma eh (cos t) (* (* ew ew) (* 0.5 (/ (pow (sin t) 2.0) t_1)))))
         (if (<= eh 5.9e+63)
           (fabs (fma ew (sin t) (* (* eh eh) (* 0.5 (/ (pow ew -1.0) t)))))
           t_2))))))
double code(double eh, double ew, double t) {
	double t_1 = eh * cos(t);
	double t_2 = fabs(t_1);
	double tmp;
	if (eh <= -4.1e-74) {
		tmp = t_2;
	} else if (eh <= 3.5e-85) {
		tmp = fabs(fma(ew, sin(t), (eh * (eh * ((0.5 * pow(cos(t), 2.0)) / (ew * sin(t)))))));
	} else if (eh <= 1.25e-27) {
		tmp = fabs(fma(eh, cos(t), ((ew * ew) * (0.5 * (pow(sin(t), 2.0) / t_1)))));
	} else if (eh <= 5.9e+63) {
		tmp = fabs(fma(ew, sin(t), ((eh * eh) * (0.5 * (pow(ew, -1.0) / t)))));
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(eh, ew, t)
	t_1 = Float64(eh * cos(t))
	t_2 = abs(t_1)
	tmp = 0.0
	if (eh <= -4.1e-74)
		tmp = t_2;
	elseif (eh <= 3.5e-85)
		tmp = abs(fma(ew, sin(t), Float64(eh * Float64(eh * Float64(Float64(0.5 * (cos(t) ^ 2.0)) / Float64(ew * sin(t)))))));
	elseif (eh <= 1.25e-27)
		tmp = abs(fma(eh, cos(t), Float64(Float64(ew * ew) * Float64(0.5 * Float64((sin(t) ^ 2.0) / t_1)))));
	elseif (eh <= 5.9e+63)
		tmp = abs(fma(ew, sin(t), Float64(Float64(eh * eh) * Float64(0.5 * Float64((ew ^ -1.0) / t)))));
	else
		tmp = t_2;
	end
	return tmp
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Abs[t$95$1], $MachinePrecision]}, If[LessEqual[eh, -4.1e-74], t$95$2, If[LessEqual[eh, 3.5e-85], N[Abs[N[(ew * N[Sin[t], $MachinePrecision] + N[(eh * N[(eh * N[(N[(0.5 * N[Power[N[Cos[t], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[eh, 1.25e-27], N[Abs[N[(eh * N[Cos[t], $MachinePrecision] + N[(N[(ew * ew), $MachinePrecision] * N[(0.5 * N[(N[Power[N[Sin[t], $MachinePrecision], 2.0], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[eh, 5.9e+63], N[Abs[N[(ew * N[Sin[t], $MachinePrecision] + N[(N[(eh * eh), $MachinePrecision] * N[(0.5 * N[(N[Power[ew, -1.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := eh \cdot \cos t\\
t_2 := \left|t\_1\right|\\
\mathbf{if}\;eh \leq -4.1 \cdot 10^{-74}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;eh \leq 3.5 \cdot 10^{-85}:\\
\;\;\;\;\left|\mathsf{fma}\left(ew, \sin t, eh \cdot \left(eh \cdot \frac{0.5 \cdot {\cos t}^{2}}{ew \cdot \sin t}\right)\right)\right|\\

\mathbf{elif}\;eh \leq 1.25 \cdot 10^{-27}:\\
\;\;\;\;\left|\mathsf{fma}\left(eh, \cos t, \left(ew \cdot ew\right) \cdot \left(0.5 \cdot \frac{{\sin t}^{2}}{t\_1}\right)\right)\right|\\

\mathbf{elif}\;eh \leq 5.9 \cdot 10^{+63}:\\
\;\;\;\;\left|\mathsf{fma}\left(ew, \sin t, \left(eh \cdot eh\right) \cdot \left(0.5 \cdot \frac{{ew}^{-1}}{t}\right)\right)\right|\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if eh < -4.10000000000000032e-74 or 5.90000000000000029e63 < eh

    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|\color{blue}{\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. lift-*.f64N/A

        \[\leadsto \left|\color{blue}{\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| \]
      3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.10000000000000032e-74 < eh < 3.49999999999999978e-85

    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|\color{blue}{\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. lift-*.f64N/A

        \[\leadsto \left|\color{blue}{\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| \]
      3. *-commutativeN/A

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

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

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

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

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

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

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

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

        \[\leadsto \left|\frac{1 \cdot \left(ew \cdot \sin t\right)}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(eh \cdot \cos t\right) \cdot \color{blue}{\frac{\frac{\frac{eh}{ew}}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}}\right| \]
    4. Applied rewrites96.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.49999999999999978e-85 < eh < 1.25e-27

      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|\color{blue}{\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. lift-*.f64N/A

          \[\leadsto \left|\color{blue}{\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| \]
        3. *-commutativeN/A

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

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

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

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

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

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

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

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

          \[\leadsto \left|\frac{1 \cdot \left(ew \cdot \sin t\right)}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(eh \cdot \cos t\right) \cdot \color{blue}{\frac{\frac{\frac{eh}{ew}}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}}\right| \]
      4. Applied rewrites88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.25e-27 < eh < 5.90000000000000029e63

      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. Step-by-step derivation
        1. lift-+.f64N/A

          \[\leadsto \left|\color{blue}{\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. lift-*.f64N/A

          \[\leadsto \left|\color{blue}{\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| \]
        3. *-commutativeN/A

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

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

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

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

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

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

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

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

          \[\leadsto \left|\frac{1 \cdot \left(ew \cdot \sin t\right)}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(eh \cdot \cos t\right) \cdot \color{blue}{\frac{\frac{\frac{eh}{ew}}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}}\right| \]
      4. Applied rewrites95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\mathsf{fma}\left(ew, \sin t, \left(eh \cdot eh\right) \cdot \left(\frac{1}{2} \cdot \frac{1}{ew \cdot t}\right)\right)\right| \]
      9. Step-by-step derivation
        1. Applied rewrites70.3%

          \[\leadsto \left|\mathsf{fma}\left(ew, \sin t, \left(eh \cdot eh\right) \cdot \left(0.5 \cdot \frac{\frac{1}{ew}}{t}\right)\right)\right| \]
      10. Recombined 4 regimes into one program.
      11. Final simplification83.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -4.1 \cdot 10^{-74}:\\ \;\;\;\;\left|eh \cdot \cos t\right|\\ \mathbf{elif}\;eh \leq 3.5 \cdot 10^{-85}:\\ \;\;\;\;\left|\mathsf{fma}\left(ew, \sin t, eh \cdot \left(eh \cdot \frac{0.5 \cdot {\cos t}^{2}}{ew \cdot \sin t}\right)\right)\right|\\ \mathbf{elif}\;eh \leq 1.25 \cdot 10^{-27}:\\ \;\;\;\;\left|\mathsf{fma}\left(eh, \cos t, \left(ew \cdot ew\right) \cdot \left(0.5 \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right|\\ \mathbf{elif}\;eh \leq 5.9 \cdot 10^{+63}:\\ \;\;\;\;\left|\mathsf{fma}\left(ew, \sin t, \left(eh \cdot eh\right) \cdot \left(0.5 \cdot \frac{{ew}^{-1}}{t}\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|eh \cdot \cos t\right|\\ \end{array} \]
      12. Add Preprocessing

      Alternative 6: 72.7% accurate, 1.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := eh \cdot \cos t\\ t_2 := \left|t\_1\right|\\ t_3 := \left|\mathsf{fma}\left(ew, \sin t, \left(eh \cdot eh\right) \cdot \left(0.5 \cdot \frac{{ew}^{-1}}{t}\right)\right)\right|\\ \mathbf{if}\;eh \leq -4.1 \cdot 10^{-74}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;eh \leq 3.5 \cdot 10^{-85}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;eh \leq 1.25 \cdot 10^{-27}:\\ \;\;\;\;\left|\mathsf{fma}\left(eh, \cos t, \left(ew \cdot ew\right) \cdot \left(0.5 \cdot \frac{{\sin t}^{2}}{t\_1}\right)\right)\right|\\ \mathbf{elif}\;eh \leq 5.9 \cdot 10^{+63}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
      (FPCore (eh ew t)
       :precision binary64
       (let* ((t_1 (* eh (cos t)))
              (t_2 (fabs t_1))
              (t_3
               (fabs (fma ew (sin t) (* (* eh eh) (* 0.5 (/ (pow ew -1.0) t)))))))
         (if (<= eh -4.1e-74)
           t_2
           (if (<= eh 3.5e-85)
             t_3
             (if (<= eh 1.25e-27)
               (fabs
                (fma eh (cos t) (* (* ew ew) (* 0.5 (/ (pow (sin t) 2.0) t_1)))))
               (if (<= eh 5.9e+63) t_3 t_2))))))
      double code(double eh, double ew, double t) {
      	double t_1 = eh * cos(t);
      	double t_2 = fabs(t_1);
      	double t_3 = fabs(fma(ew, sin(t), ((eh * eh) * (0.5 * (pow(ew, -1.0) / t)))));
      	double tmp;
      	if (eh <= -4.1e-74) {
      		tmp = t_2;
      	} else if (eh <= 3.5e-85) {
      		tmp = t_3;
      	} else if (eh <= 1.25e-27) {
      		tmp = fabs(fma(eh, cos(t), ((ew * ew) * (0.5 * (pow(sin(t), 2.0) / t_1)))));
      	} else if (eh <= 5.9e+63) {
      		tmp = t_3;
      	} else {
      		tmp = t_2;
      	}
      	return tmp;
      }
      
      function code(eh, ew, t)
      	t_1 = Float64(eh * cos(t))
      	t_2 = abs(t_1)
      	t_3 = abs(fma(ew, sin(t), Float64(Float64(eh * eh) * Float64(0.5 * Float64((ew ^ -1.0) / t)))))
      	tmp = 0.0
      	if (eh <= -4.1e-74)
      		tmp = t_2;
      	elseif (eh <= 3.5e-85)
      		tmp = t_3;
      	elseif (eh <= 1.25e-27)
      		tmp = abs(fma(eh, cos(t), Float64(Float64(ew * ew) * Float64(0.5 * Float64((sin(t) ^ 2.0) / t_1)))));
      	elseif (eh <= 5.9e+63)
      		tmp = t_3;
      	else
      		tmp = t_2;
      	end
      	return tmp
      end
      
      code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Abs[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Abs[N[(ew * N[Sin[t], $MachinePrecision] + N[(N[(eh * eh), $MachinePrecision] * N[(0.5 * N[(N[Power[ew, -1.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eh, -4.1e-74], t$95$2, If[LessEqual[eh, 3.5e-85], t$95$3, If[LessEqual[eh, 1.25e-27], N[Abs[N[(eh * N[Cos[t], $MachinePrecision] + N[(N[(ew * ew), $MachinePrecision] * N[(0.5 * N[(N[Power[N[Sin[t], $MachinePrecision], 2.0], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[eh, 5.9e+63], t$95$3, t$95$2]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := eh \cdot \cos t\\
      t_2 := \left|t\_1\right|\\
      t_3 := \left|\mathsf{fma}\left(ew, \sin t, \left(eh \cdot eh\right) \cdot \left(0.5 \cdot \frac{{ew}^{-1}}{t}\right)\right)\right|\\
      \mathbf{if}\;eh \leq -4.1 \cdot 10^{-74}:\\
      \;\;\;\;t\_2\\
      
      \mathbf{elif}\;eh \leq 3.5 \cdot 10^{-85}:\\
      \;\;\;\;t\_3\\
      
      \mathbf{elif}\;eh \leq 1.25 \cdot 10^{-27}:\\
      \;\;\;\;\left|\mathsf{fma}\left(eh, \cos t, \left(ew \cdot ew\right) \cdot \left(0.5 \cdot \frac{{\sin t}^{2}}{t\_1}\right)\right)\right|\\
      
      \mathbf{elif}\;eh \leq 5.9 \cdot 10^{+63}:\\
      \;\;\;\;t\_3\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_2\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if eh < -4.10000000000000032e-74 or 5.90000000000000029e63 < eh

        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|\color{blue}{\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. lift-*.f64N/A

            \[\leadsto \left|\color{blue}{\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| \]
          3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -4.10000000000000032e-74 < eh < 3.49999999999999978e-85 or 1.25e-27 < eh < 5.90000000000000029e63

        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|\color{blue}{\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. lift-*.f64N/A

            \[\leadsto \left|\color{blue}{\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| \]
          3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left|\mathsf{fma}\left(ew, \sin t, \left(eh \cdot eh\right) \cdot \left(\frac{1}{2} \cdot \frac{1}{ew \cdot t}\right)\right)\right| \]
        9. Step-by-step derivation
          1. Applied rewrites78.2%

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

          if 3.49999999999999978e-85 < eh < 1.25e-27

          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|\color{blue}{\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. lift-*.f64N/A

              \[\leadsto \left|\color{blue}{\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| \]
            3. *-commutativeN/A

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

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

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

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

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

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

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

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

              \[\leadsto \left|\frac{1 \cdot \left(ew \cdot \sin t\right)}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(eh \cdot \cos t\right) \cdot \color{blue}{\frac{\frac{\frac{eh}{ew}}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}}\right| \]
          4. Applied rewrites88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -4.1 \cdot 10^{-74}:\\ \;\;\;\;\left|eh \cdot \cos t\right|\\ \mathbf{elif}\;eh \leq 3.5 \cdot 10^{-85}:\\ \;\;\;\;\left|\mathsf{fma}\left(ew, \sin t, \left(eh \cdot eh\right) \cdot \left(0.5 \cdot \frac{{ew}^{-1}}{t}\right)\right)\right|\\ \mathbf{elif}\;eh \leq 1.25 \cdot 10^{-27}:\\ \;\;\;\;\left|\mathsf{fma}\left(eh, \cos t, \left(ew \cdot ew\right) \cdot \left(0.5 \cdot \frac{{\sin t}^{2}}{eh \cdot \cos t}\right)\right)\right|\\ \mathbf{elif}\;eh \leq 5.9 \cdot 10^{+63}:\\ \;\;\;\;\left|\mathsf{fma}\left(ew, \sin t, \left(eh \cdot eh\right) \cdot \left(0.5 \cdot \frac{{ew}^{-1}}{t}\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|eh \cdot \cos t\right|\\ \end{array} \]
        12. Add Preprocessing

        Alternative 7: 63.3% accurate, 2.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left|eh \cdot \cos t\right|\\ \mathbf{if}\;eh \leq -6.8 \cdot 10^{-76}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;eh \leq -3.3 \cdot 10^{-200}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{eh}{ew}, eh \cdot 0.5, \left(\mathsf{fma}\left(-0.4166666666666667, \frac{eh}{ew} \cdot eh, ew\right) \cdot t\right) \cdot t\right)}{t}\right|\\ \mathbf{elif}\;eh \leq 2.15 \cdot 10^{-227}:\\ \;\;\;\;{\left({\left(ew \cdot \sin t\right)}^{-1}\right)}^{-1}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (eh ew t)
         :precision binary64
         (let* ((t_1 (fabs (* eh (cos t)))))
           (if (<= eh -6.8e-76)
             t_1
             (if (<= eh -3.3e-200)
               (fabs
                (/
                 (fma
                  (/ eh ew)
                  (* eh 0.5)
                  (* (* (fma -0.4166666666666667 (* (/ eh ew) eh) ew) t) t))
                 t))
               (if (<= eh 2.15e-227) (pow (pow (* ew (sin t)) -1.0) -1.0) t_1)))))
        double code(double eh, double ew, double t) {
        	double t_1 = fabs((eh * cos(t)));
        	double tmp;
        	if (eh <= -6.8e-76) {
        		tmp = t_1;
        	} else if (eh <= -3.3e-200) {
        		tmp = fabs((fma((eh / ew), (eh * 0.5), ((fma(-0.4166666666666667, ((eh / ew) * eh), ew) * t) * t)) / t));
        	} else if (eh <= 2.15e-227) {
        		tmp = pow(pow((ew * sin(t)), -1.0), -1.0);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        function code(eh, ew, t)
        	t_1 = abs(Float64(eh * cos(t)))
        	tmp = 0.0
        	if (eh <= -6.8e-76)
        		tmp = t_1;
        	elseif (eh <= -3.3e-200)
        		tmp = abs(Float64(fma(Float64(eh / ew), Float64(eh * 0.5), Float64(Float64(fma(-0.4166666666666667, Float64(Float64(eh / ew) * eh), ew) * t) * t)) / t));
        	elseif (eh <= 2.15e-227)
        		tmp = (Float64(ew * sin(t)) ^ -1.0) ^ -1.0;
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eh, -6.8e-76], t$95$1, If[LessEqual[eh, -3.3e-200], N[Abs[N[(N[(N[(eh / ew), $MachinePrecision] * N[(eh * 0.5), $MachinePrecision] + N[(N[(N[(-0.4166666666666667 * N[(N[(eh / ew), $MachinePrecision] * eh), $MachinePrecision] + ew), $MachinePrecision] * t), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[eh, 2.15e-227], N[Power[N[Power[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision], -1.0], $MachinePrecision], t$95$1]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \left|eh \cdot \cos t\right|\\
        \mathbf{if}\;eh \leq -6.8 \cdot 10^{-76}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;eh \leq -3.3 \cdot 10^{-200}:\\
        \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{eh}{ew}, eh \cdot 0.5, \left(\mathsf{fma}\left(-0.4166666666666667, \frac{eh}{ew} \cdot eh, ew\right) \cdot t\right) \cdot t\right)}{t}\right|\\
        
        \mathbf{elif}\;eh \leq 2.15 \cdot 10^{-227}:\\
        \;\;\;\;{\left({\left(ew \cdot \sin t\right)}^{-1}\right)}^{-1}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if eh < -6.7999999999999998e-76 or 2.1500000000000001e-227 < 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. Step-by-step derivation
            1. lift-+.f64N/A

              \[\leadsto \left|\color{blue}{\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. lift-*.f64N/A

              \[\leadsto \left|\color{blue}{\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| \]
            3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -6.7999999999999998e-76 < eh < -3.2999999999999998e-200

          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|\color{blue}{\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. lift-*.f64N/A

              \[\leadsto \left|\color{blue}{\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| \]
            3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left|\frac{\frac{1}{2} \cdot \frac{{eh}^{2}}{ew} + {t}^{2} \cdot \left(ew + \frac{1}{2} \cdot \left(-1 \cdot \frac{{eh}^{2}}{ew} - \frac{-1}{6} \cdot \frac{{eh}^{2}}{ew}\right)\right)}{\color{blue}{t}}\right| \]
          9. Step-by-step derivation
            1. Applied rewrites50.5%

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

                \[\leadsto \left|\frac{\mathsf{fma}\left(\frac{eh}{ew}, eh \cdot 0.5, \left(\mathsf{fma}\left(-0.4166666666666667, \frac{eh}{ew} \cdot eh, ew\right) \cdot t\right) \cdot t\right)}{t}\right| \]

              if -3.2999999999999998e-200 < eh < 2.1500000000000001e-227

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

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

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

                \[\leadsto \frac{1}{\color{blue}{\frac{1}{ew \cdot \sin t}}} \]
              6. Step-by-step derivation
                1. lower-/.f64N/A

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

                  \[\leadsto \frac{1}{\frac{1}{\color{blue}{ew \cdot \sin t}}} \]
                3. lower-sin.f6449.6

                  \[\leadsto \frac{1}{\frac{1}{ew \cdot \color{blue}{\sin t}}} \]
              7. Applied rewrites49.6%

                \[\leadsto \frac{1}{\color{blue}{\frac{1}{ew \cdot \sin t}}} \]
            3. Recombined 3 regimes into one program.
            4. Final simplification69.4%

              \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -6.8 \cdot 10^{-76}:\\ \;\;\;\;\left|eh \cdot \cos t\right|\\ \mathbf{elif}\;eh \leq -3.3 \cdot 10^{-200}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{eh}{ew}, eh \cdot 0.5, \left(\mathsf{fma}\left(-0.4166666666666667, \frac{eh}{ew} \cdot eh, ew\right) \cdot t\right) \cdot t\right)}{t}\right|\\ \mathbf{elif}\;eh \leq 2.15 \cdot 10^{-227}:\\ \;\;\;\;{\left({\left(ew \cdot \sin t\right)}^{-1}\right)}^{-1}\\ \mathbf{else}:\\ \;\;\;\;\left|eh \cdot \cos t\right|\\ \end{array} \]
            5. Add Preprocessing

            Alternative 8: 72.8% accurate, 3.3× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -4.1 \cdot 10^{-74} \lor \neg \left(eh \leq 3.5 \cdot 10^{-85} \lor \neg \left(eh \leq 1.25 \cdot 10^{-27} \lor \neg \left(eh \leq 5.9 \cdot 10^{+63}\right)\right)\right):\\ \;\;\;\;\left|eh \cdot \cos t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\mathsf{fma}\left(ew, \sin t, \left(eh \cdot eh\right) \cdot \left(0.5 \cdot \frac{{ew}^{-1}}{t}\right)\right)\right|\\ \end{array} \end{array} \]
            (FPCore (eh ew t)
             :precision binary64
             (if (or (<= eh -4.1e-74)
                     (not
                      (or (<= eh 3.5e-85)
                          (not (or (<= eh 1.25e-27) (not (<= eh 5.9e+63)))))))
               (fabs (* eh (cos t)))
               (fabs (fma ew (sin t) (* (* eh eh) (* 0.5 (/ (pow ew -1.0) t)))))))
            double code(double eh, double ew, double t) {
            	double tmp;
            	if ((eh <= -4.1e-74) || !((eh <= 3.5e-85) || !((eh <= 1.25e-27) || !(eh <= 5.9e+63)))) {
            		tmp = fabs((eh * cos(t)));
            	} else {
            		tmp = fabs(fma(ew, sin(t), ((eh * eh) * (0.5 * (pow(ew, -1.0) / t)))));
            	}
            	return tmp;
            }
            
            function code(eh, ew, t)
            	tmp = 0.0
            	if ((eh <= -4.1e-74) || !((eh <= 3.5e-85) || !((eh <= 1.25e-27) || !(eh <= 5.9e+63))))
            		tmp = abs(Float64(eh * cos(t)));
            	else
            		tmp = abs(fma(ew, sin(t), Float64(Float64(eh * eh) * Float64(0.5 * Float64((ew ^ -1.0) / t)))));
            	end
            	return tmp
            end
            
            code[eh_, ew_, t_] := If[Or[LessEqual[eh, -4.1e-74], N[Not[Or[LessEqual[eh, 3.5e-85], N[Not[Or[LessEqual[eh, 1.25e-27], N[Not[LessEqual[eh, 5.9e+63]], $MachinePrecision]]], $MachinePrecision]]], $MachinePrecision]], N[Abs[N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew * N[Sin[t], $MachinePrecision] + N[(N[(eh * eh), $MachinePrecision] * N[(0.5 * N[(N[Power[ew, -1.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;eh \leq -4.1 \cdot 10^{-74} \lor \neg \left(eh \leq 3.5 \cdot 10^{-85} \lor \neg \left(eh \leq 1.25 \cdot 10^{-27} \lor \neg \left(eh \leq 5.9 \cdot 10^{+63}\right)\right)\right):\\
            \;\;\;\;\left|eh \cdot \cos t\right|\\
            
            \mathbf{else}:\\
            \;\;\;\;\left|\mathsf{fma}\left(ew, \sin t, \left(eh \cdot eh\right) \cdot \left(0.5 \cdot \frac{{ew}^{-1}}{t}\right)\right)\right|\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if eh < -4.10000000000000032e-74 or 3.49999999999999978e-85 < eh < 1.25e-27 or 5.90000000000000029e63 < eh

              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|\color{blue}{\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. lift-*.f64N/A

                  \[\leadsto \left|\color{blue}{\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| \]
                3. *-commutativeN/A

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

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

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

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

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

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

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

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

                  \[\leadsto \left|\frac{1 \cdot \left(ew \cdot \sin t\right)}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}} + \left(eh \cdot \cos t\right) \cdot \color{blue}{\frac{\frac{\frac{eh}{ew}}{\tan t}}{\sqrt{1 + \frac{\frac{eh}{ew}}{\tan t} \cdot \frac{\frac{eh}{ew}}{\tan t}}}}\right| \]
              4. Applied rewrites48.0%

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

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

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

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

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

              if -4.10000000000000032e-74 < eh < 3.49999999999999978e-85 or 1.25e-27 < eh < 5.90000000000000029e63

              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|\color{blue}{\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. lift-*.f64N/A

                  \[\leadsto \left|\color{blue}{\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| \]
                3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left|\mathsf{fma}\left(ew, \sin t, \left(eh \cdot eh\right) \cdot \left(\frac{1}{2} \cdot \frac{1}{ew \cdot t}\right)\right)\right| \]
              9. Step-by-step derivation
                1. Applied rewrites78.2%

                  \[\leadsto \left|\mathsf{fma}\left(ew, \sin t, \left(eh \cdot eh\right) \cdot \left(0.5 \cdot \frac{\frac{1}{ew}}{t}\right)\right)\right| \]
              10. Recombined 2 regimes into one program.
              11. Final simplification83.5%

                \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -4.1 \cdot 10^{-74} \lor \neg \left(eh \leq 3.5 \cdot 10^{-85} \lor \neg \left(eh \leq 1.25 \cdot 10^{-27} \lor \neg \left(eh \leq 5.9 \cdot 10^{+63}\right)\right)\right):\\ \;\;\;\;\left|eh \cdot \cos t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\mathsf{fma}\left(ew, \sin t, \left(eh \cdot eh\right) \cdot \left(0.5 \cdot \frac{{ew}^{-1}}{t}\right)\right)\right|\\ \end{array} \]
              12. Add Preprocessing

              Alternative 9: 60.9% accurate, 7.2× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -6.8 \cdot 10^{-76} \lor \neg \left(eh \leq 4 \cdot 10^{-279}\right):\\ \;\;\;\;\left|eh \cdot \cos t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{eh}{ew}, eh \cdot 0.5, \left(\mathsf{fma}\left(-0.4166666666666667, \frac{eh}{ew} \cdot eh, ew\right) \cdot t\right) \cdot t\right)}{t}\right|\\ \end{array} \end{array} \]
              (FPCore (eh ew t)
               :precision binary64
               (if (or (<= eh -6.8e-76) (not (<= eh 4e-279)))
                 (fabs (* eh (cos t)))
                 (fabs
                  (/
                   (fma
                    (/ eh ew)
                    (* eh 0.5)
                    (* (* (fma -0.4166666666666667 (* (/ eh ew) eh) ew) t) t))
                   t))))
              double code(double eh, double ew, double t) {
              	double tmp;
              	if ((eh <= -6.8e-76) || !(eh <= 4e-279)) {
              		tmp = fabs((eh * cos(t)));
              	} else {
              		tmp = fabs((fma((eh / ew), (eh * 0.5), ((fma(-0.4166666666666667, ((eh / ew) * eh), ew) * t) * t)) / t));
              	}
              	return tmp;
              }
              
              function code(eh, ew, t)
              	tmp = 0.0
              	if ((eh <= -6.8e-76) || !(eh <= 4e-279))
              		tmp = abs(Float64(eh * cos(t)));
              	else
              		tmp = abs(Float64(fma(Float64(eh / ew), Float64(eh * 0.5), Float64(Float64(fma(-0.4166666666666667, Float64(Float64(eh / ew) * eh), ew) * t) * t)) / t));
              	end
              	return tmp
              end
              
              code[eh_, ew_, t_] := If[Or[LessEqual[eh, -6.8e-76], N[Not[LessEqual[eh, 4e-279]], $MachinePrecision]], N[Abs[N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(eh / ew), $MachinePrecision] * N[(eh * 0.5), $MachinePrecision] + N[(N[(N[(-0.4166666666666667 * N[(N[(eh / ew), $MachinePrecision] * eh), $MachinePrecision] + ew), $MachinePrecision] * t), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;eh \leq -6.8 \cdot 10^{-76} \lor \neg \left(eh \leq 4 \cdot 10^{-279}\right):\\
              \;\;\;\;\left|eh \cdot \cos t\right|\\
              
              \mathbf{else}:\\
              \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{eh}{ew}, eh \cdot 0.5, \left(\mathsf{fma}\left(-0.4166666666666667, \frac{eh}{ew} \cdot eh, ew\right) \cdot t\right) \cdot t\right)}{t}\right|\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if eh < -6.7999999999999998e-76 or 4.00000000000000022e-279 < 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. Step-by-step derivation
                  1. lift-+.f64N/A

                    \[\leadsto \left|\color{blue}{\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. lift-*.f64N/A

                    \[\leadsto \left|\color{blue}{\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| \]
                  3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -6.7999999999999998e-76 < eh < 4.00000000000000022e-279

                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|\color{blue}{\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. lift-*.f64N/A

                    \[\leadsto \left|\color{blue}{\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| \]
                  3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left|\frac{\mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(0.5, \frac{eh \cdot eh}{ew} \cdot -0.8333333333333334, ew\right), 0.5 \cdot \frac{eh \cdot eh}{ew}\right)}{\color{blue}{t}}\right| \]
                  2. Step-by-step derivation
                    1. Applied rewrites39.3%

                      \[\leadsto \left|\frac{\mathsf{fma}\left(\frac{eh}{ew}, eh \cdot 0.5, \left(\mathsf{fma}\left(-0.4166666666666667, \frac{eh}{ew} \cdot eh, ew\right) \cdot t\right) \cdot t\right)}{t}\right| \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification65.4%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -6.8 \cdot 10^{-76} \lor \neg \left(eh \leq 4 \cdot 10^{-279}\right):\\ \;\;\;\;\left|eh \cdot \cos t\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{eh}{ew}, eh \cdot 0.5, \left(\mathsf{fma}\left(-0.4166666666666667, \frac{eh}{ew} \cdot eh, ew\right) \cdot t\right) \cdot t\right)}{t}\right|\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 10: 42.7% accurate, 10.9× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -1.1 \cdot 10^{-75} \lor \neg \left(eh \leq 4 \cdot 10^{-279}\right):\\ \;\;\;\;\left|eh \cdot 1\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{eh}{ew}, eh \cdot 0.5, \left(\mathsf{fma}\left(-0.4166666666666667, \frac{eh}{ew} \cdot eh, ew\right) \cdot t\right) \cdot t\right)}{t}\right|\\ \end{array} \end{array} \]
                  (FPCore (eh ew t)
                   :precision binary64
                   (if (or (<= eh -1.1e-75) (not (<= eh 4e-279)))
                     (fabs (* eh 1.0))
                     (fabs
                      (/
                       (fma
                        (/ eh ew)
                        (* eh 0.5)
                        (* (* (fma -0.4166666666666667 (* (/ eh ew) eh) ew) t) t))
                       t))))
                  double code(double eh, double ew, double t) {
                  	double tmp;
                  	if ((eh <= -1.1e-75) || !(eh <= 4e-279)) {
                  		tmp = fabs((eh * 1.0));
                  	} else {
                  		tmp = fabs((fma((eh / ew), (eh * 0.5), ((fma(-0.4166666666666667, ((eh / ew) * eh), ew) * t) * t)) / t));
                  	}
                  	return tmp;
                  }
                  
                  function code(eh, ew, t)
                  	tmp = 0.0
                  	if ((eh <= -1.1e-75) || !(eh <= 4e-279))
                  		tmp = abs(Float64(eh * 1.0));
                  	else
                  		tmp = abs(Float64(fma(Float64(eh / ew), Float64(eh * 0.5), Float64(Float64(fma(-0.4166666666666667, Float64(Float64(eh / ew) * eh), ew) * t) * t)) / t));
                  	end
                  	return tmp
                  end
                  
                  code[eh_, ew_, t_] := If[Or[LessEqual[eh, -1.1e-75], N[Not[LessEqual[eh, 4e-279]], $MachinePrecision]], N[Abs[N[(eh * 1.0), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(eh / ew), $MachinePrecision] * N[(eh * 0.5), $MachinePrecision] + N[(N[(N[(-0.4166666666666667 * N[(N[(eh / ew), $MachinePrecision] * eh), $MachinePrecision] + ew), $MachinePrecision] * t), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;eh \leq -1.1 \cdot 10^{-75} \lor \neg \left(eh \leq 4 \cdot 10^{-279}\right):\\
                  \;\;\;\;\left|eh \cdot 1\right|\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{eh}{ew}, eh \cdot 0.5, \left(\mathsf{fma}\left(-0.4166666666666667, \frac{eh}{ew} \cdot eh, ew\right) \cdot t\right) \cdot t\right)}{t}\right|\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if eh < -1.10000000000000003e-75 or 4.00000000000000022e-279 < 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. Step-by-step derivation
                      1. lift-+.f64N/A

                        \[\leadsto \left|\color{blue}{\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. lift-*.f64N/A

                        \[\leadsto \left|\color{blue}{\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| \]
                      3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left|\color{blue}{eh \cdot \cos t}\right| \]
                    8. Taylor expanded in t around 0

                      \[\leadsto \left|eh \cdot 1\right| \]
                    9. Step-by-step derivation
                      1. Applied rewrites46.9%

                        \[\leadsto \left|eh \cdot 1\right| \]

                      if -1.10000000000000003e-75 < eh < 4.00000000000000022e-279

                      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|\color{blue}{\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. lift-*.f64N/A

                          \[\leadsto \left|\color{blue}{\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| \]
                        3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left|\frac{\mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(0.5, \frac{eh \cdot eh}{ew} \cdot -0.8333333333333334, ew\right), 0.5 \cdot \frac{eh \cdot eh}{ew}\right)}{\color{blue}{t}}\right| \]
                        2. Step-by-step derivation
                          1. Applied rewrites39.3%

                            \[\leadsto \left|\frac{\mathsf{fma}\left(\frac{eh}{ew}, eh \cdot 0.5, \left(\mathsf{fma}\left(-0.4166666666666667, \frac{eh}{ew} \cdot eh, ew\right) \cdot t\right) \cdot t\right)}{t}\right| \]
                        3. Recombined 2 regimes into one program.
                        4. Final simplification45.5%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -1.1 \cdot 10^{-75} \lor \neg \left(eh \leq 4 \cdot 10^{-279}\right):\\ \;\;\;\;\left|eh \cdot 1\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{eh}{ew}, eh \cdot 0.5, \left(\mathsf{fma}\left(-0.4166666666666667, \frac{eh}{ew} \cdot eh, ew\right) \cdot t\right) \cdot t\right)}{t}\right|\\ \end{array} \]
                        5. Add Preprocessing

                        Alternative 11: 41.1% accurate, 24.1× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;eh \leq -6.8 \cdot 10^{-76} \lor \neg \left(eh \leq -6.8 \cdot 10^{-230}\right):\\ \;\;\;\;\left|eh \cdot 1\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{ew \cdot \left(t \cdot t\right)}{t}\right|\\ \end{array} \end{array} \]
                        (FPCore (eh ew t)
                         :precision binary64
                         (if (or (<= eh -6.8e-76) (not (<= eh -6.8e-230)))
                           (fabs (* eh 1.0))
                           (fabs (/ (* ew (* t t)) t))))
                        double code(double eh, double ew, double t) {
                        	double tmp;
                        	if ((eh <= -6.8e-76) || !(eh <= -6.8e-230)) {
                        		tmp = fabs((eh * 1.0));
                        	} else {
                        		tmp = fabs(((ew * (t * t)) / 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 <= (-6.8d-76)) .or. (.not. (eh <= (-6.8d-230)))) then
                                tmp = abs((eh * 1.0d0))
                            else
                                tmp = abs(((ew * (t * t)) / t))
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double eh, double ew, double t) {
                        	double tmp;
                        	if ((eh <= -6.8e-76) || !(eh <= -6.8e-230)) {
                        		tmp = Math.abs((eh * 1.0));
                        	} else {
                        		tmp = Math.abs(((ew * (t * t)) / t));
                        	}
                        	return tmp;
                        }
                        
                        def code(eh, ew, t):
                        	tmp = 0
                        	if (eh <= -6.8e-76) or not (eh <= -6.8e-230):
                        		tmp = math.fabs((eh * 1.0))
                        	else:
                        		tmp = math.fabs(((ew * (t * t)) / t))
                        	return tmp
                        
                        function code(eh, ew, t)
                        	tmp = 0.0
                        	if ((eh <= -6.8e-76) || !(eh <= -6.8e-230))
                        		tmp = abs(Float64(eh * 1.0));
                        	else
                        		tmp = abs(Float64(Float64(ew * Float64(t * t)) / t));
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(eh, ew, t)
                        	tmp = 0.0;
                        	if ((eh <= -6.8e-76) || ~((eh <= -6.8e-230)))
                        		tmp = abs((eh * 1.0));
                        	else
                        		tmp = abs(((ew * (t * t)) / t));
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[eh_, ew_, t_] := If[Or[LessEqual[eh, -6.8e-76], N[Not[LessEqual[eh, -6.8e-230]], $MachinePrecision]], N[Abs[N[(eh * 1.0), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(ew * N[(t * t), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;eh \leq -6.8 \cdot 10^{-76} \lor \neg \left(eh \leq -6.8 \cdot 10^{-230}\right):\\
                        \;\;\;\;\left|eh \cdot 1\right|\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\left|\frac{ew \cdot \left(t \cdot t\right)}{t}\right|\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if eh < -6.7999999999999998e-76 or -6.8e-230 < 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. Step-by-step derivation
                            1. lift-+.f64N/A

                              \[\leadsto \left|\color{blue}{\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. lift-*.f64N/A

                              \[\leadsto \left|\color{blue}{\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| \]
                            3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left|\color{blue}{eh \cdot \cos t}\right| \]
                          8. Taylor expanded in t around 0

                            \[\leadsto \left|eh \cdot 1\right| \]
                          9. Step-by-step derivation
                            1. Applied rewrites44.3%

                              \[\leadsto \left|eh \cdot 1\right| \]

                            if -6.7999999999999998e-76 < eh < -6.8e-230

                            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|\color{blue}{\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. lift-*.f64N/A

                                \[\leadsto \left|\color{blue}{\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| \]
                              3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \left|\frac{ew \cdot \left(t \cdot t\right)}{t}\right| \]
                              4. Recombined 2 regimes into one program.
                              5. Final simplification44.3%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;eh \leq -6.8 \cdot 10^{-76} \lor \neg \left(eh \leq -6.8 \cdot 10^{-230}\right):\\ \;\;\;\;\left|eh \cdot 1\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{ew \cdot \left(t \cdot t\right)}{t}\right|\\ \end{array} \]
                              6. Add Preprocessing

                              Alternative 12: 42.9% accurate, 108.8× speedup?

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

                                  \[\leadsto \left|\color{blue}{\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| \]
                                3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \left|\color{blue}{eh \cdot \cos t}\right| \]
                              8. Taylor expanded in t around 0

                                \[\leadsto \left|eh \cdot 1\right| \]
                              9. Step-by-step derivation
                                1. Applied rewrites40.9%

                                  \[\leadsto \left|eh \cdot 1\right| \]
                                2. Add Preprocessing

                                Reproduce

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