Example 2 from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 16.3s
Alternatives: 13
Speedup: N/A×

Specification

?
\[\begin{array}{l} \\ \begin{array}{l} t_1 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\ \left|\left(ew \cdot \cos t\right) \cdot \cos t\_1 - \left(eh \cdot \sin t\right) \cdot \sin t\_1\right| \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (atan (/ (* (- eh) (tan t)) ew))))
   (fabs (- (* (* ew (cos t)) (cos t_1)) (* (* eh (sin t)) (sin t_1))))))
double code(double eh, double ew, double t) {
	double t_1 = atan(((-eh * tan(t)) / ew));
	return fabs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(eh, ew, t)
use fmin_fmax_functions
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    real(8) :: t_1
    t_1 = atan(((-eh * tan(t)) / ew))
    code = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))))
end function
public static double code(double eh, double ew, double t) {
	double t_1 = Math.atan(((-eh * Math.tan(t)) / ew));
	return Math.abs((((ew * Math.cos(t)) * Math.cos(t_1)) - ((eh * Math.sin(t)) * Math.sin(t_1))));
}
def code(eh, ew, t):
	t_1 = math.atan(((-eh * math.tan(t)) / ew))
	return math.fabs((((ew * math.cos(t)) * math.cos(t_1)) - ((eh * math.sin(t)) * math.sin(t_1))))
function code(eh, ew, t)
	t_1 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew))
	return abs(Float64(Float64(Float64(ew * cos(t)) * cos(t_1)) - Float64(Float64(eh * sin(t)) * sin(t_1))))
end
function tmp = code(eh, ew, t)
	t_1 = atan(((-eh * tan(t)) / ew));
	tmp = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))));
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

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

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 13 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\ \left|\left(ew \cdot \cos t\right) \cdot \cos t\_1 - \left(eh \cdot \sin t\right) \cdot \sin t\_1\right| \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (atan (/ (* (- eh) (tan t)) ew))))
   (fabs (- (* (* ew (cos t)) (cos t_1)) (* (* eh (sin t)) (sin t_1))))))
double code(double eh, double ew, double t) {
	double t_1 = atan(((-eh * tan(t)) / ew));
	return fabs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(eh, ew, t)
use fmin_fmax_functions
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    real(8) :: t_1
    t_1 = atan(((-eh * tan(t)) / ew))
    code = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))))
end function
public static double code(double eh, double ew, double t) {
	double t_1 = Math.atan(((-eh * Math.tan(t)) / ew));
	return Math.abs((((ew * Math.cos(t)) * Math.cos(t_1)) - ((eh * Math.sin(t)) * Math.sin(t_1))));
}
def code(eh, ew, t):
	t_1 = math.atan(((-eh * math.tan(t)) / ew))
	return math.fabs((((ew * math.cos(t)) * math.cos(t_1)) - ((eh * math.sin(t)) * math.sin(t_1))))
function code(eh, ew, t)
	t_1 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew))
	return abs(Float64(Float64(Float64(ew * cos(t)) * cos(t_1)) - Float64(Float64(eh * sin(t)) * sin(t_1))))
end
function tmp = code(eh, ew, t)
	t_1 = atan(((-eh * tan(t)) / ew));
	tmp = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))));
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

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

Alternative 1: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right) - \left(\cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right) \cdot \cos t\right) \cdot ew\right| \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (fabs
  (-
   (* (* eh (sin t)) (sin (atan (/ (* eh (tan t)) (- ew)))))
   (* (* (cos (atan (* (/ (tan t) ew) eh))) (cos t)) ew))))
double code(double eh, double ew, double t) {
	return fabs((((eh * sin(t)) * sin(atan(((eh * tan(t)) / -ew)))) - ((cos(atan(((tan(t) / ew) * eh))) * cos(t)) * ew)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(eh, ew, t)
use fmin_fmax_functions
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    code = abs((((eh * sin(t)) * sin(atan(((eh * tan(t)) / -ew)))) - ((cos(atan(((tan(t) / ew) * eh))) * cos(t)) * ew)))
end function
public static double code(double eh, double ew, double t) {
	return Math.abs((((eh * Math.sin(t)) * Math.sin(Math.atan(((eh * Math.tan(t)) / -ew)))) - ((Math.cos(Math.atan(((Math.tan(t) / ew) * eh))) * Math.cos(t)) * ew)));
}
def code(eh, ew, t):
	return math.fabs((((eh * math.sin(t)) * math.sin(math.atan(((eh * math.tan(t)) / -ew)))) - ((math.cos(math.atan(((math.tan(t) / ew) * eh))) * math.cos(t)) * ew)))
function code(eh, ew, t)
	return abs(Float64(Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(eh * tan(t)) / Float64(-ew))))) - Float64(Float64(cos(atan(Float64(Float64(tan(t) / ew) * eh))) * cos(t)) * ew)))
end
function tmp = code(eh, ew, t)
	tmp = abs((((eh * sin(t)) * sin(atan(((eh * tan(t)) / -ew)))) - ((cos(atan(((tan(t) / ew) * eh))) * cos(t)) * ew)));
end
code[eh_, ew_, t_] := N[Abs[N[(N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / (-ew)), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[(N[Cos[N[ArcTan[N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Cos[t], $MachinePrecision]), $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

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

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

Alternative 2: 99.1% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot t}{ew}\right) - \left(\cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right) \cdot \cos t\right) \cdot ew\right| \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (fabs
  (-
   (* (* eh (sin t)) (sin (atan (/ (* (- eh) t) ew))))
   (* (* (cos (atan (* (/ (tan t) ew) eh))) (cos t)) ew))))
double code(double eh, double ew, double t) {
	return fabs((((eh * sin(t)) * sin(atan(((-eh * t) / ew)))) - ((cos(atan(((tan(t) / ew) * eh))) * cos(t)) * ew)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(eh, ew, t)
use fmin_fmax_functions
    real(8), intent (in) :: eh
    real(8), intent (in) :: ew
    real(8), intent (in) :: t
    code = abs((((eh * sin(t)) * sin(atan(((-eh * t) / ew)))) - ((cos(atan(((tan(t) / ew) * eh))) * cos(t)) * ew)))
end function
public static double code(double eh, double ew, double t) {
	return Math.abs((((eh * Math.sin(t)) * Math.sin(Math.atan(((-eh * t) / ew)))) - ((Math.cos(Math.atan(((Math.tan(t) / ew) * eh))) * Math.cos(t)) * ew)));
}
def code(eh, ew, t):
	return math.fabs((((eh * math.sin(t)) * math.sin(math.atan(((-eh * t) / ew)))) - ((math.cos(math.atan(((math.tan(t) / ew) * eh))) * math.cos(t)) * ew)))
function code(eh, ew, t)
	return abs(Float64(Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(Float64(-eh) * t) / ew)))) - Float64(Float64(cos(atan(Float64(Float64(tan(t) / ew) * eh))) * cos(t)) * ew)))
end
function tmp = code(eh, ew, t)
	tmp = abs((((eh * sin(t)) * sin(atan(((-eh * t) / ew)))) - ((cos(atan(((tan(t) / ew) * eh))) * cos(t)) * ew)));
end
code[eh_, ew_, t_] := N[Abs[N[(N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[((-eh) * t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[(N[Cos[N[ArcTan[N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Cos[t], $MachinePrecision]), $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 98.0% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := eh \cdot \frac{\tan t}{ew}\\ \mathbf{if}\;eh \leq -2.7 \cdot 10^{-36} \lor \neg \left(eh \leq 4.05 \cdot 10^{-16}\right):\\ \;\;\;\;\left|eh \cdot \mathsf{fma}\left(ew, \frac{\cos t \cdot \cos \tan^{-1} t\_1}{eh}, \tanh \left(\frac{eh \cdot t}{ew}\right) \cdot \sin t\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t, ew, \left(t\_1 \cdot eh\right) \cdot \sin t\right)}{\sqrt{1 + {t\_1}^{2}}}\right|\\ \end{array} \end{array} \]
(FPCore (eh ew t)
 :precision binary64
 (let* ((t_1 (* eh (/ (tan t) ew))))
   (if (or (<= eh -2.7e-36) (not (<= eh 4.05e-16)))
     (fabs
      (*
       eh
       (fma
        ew
        (/ (* (cos t) (cos (atan t_1))) eh)
        (* (tanh (/ (* eh t) ew)) (sin t)))))
     (fabs
      (/
       (fma (cos t) ew (* (* t_1 eh) (sin t)))
       (sqrt (+ 1.0 (pow t_1 2.0))))))))
double code(double eh, double ew, double t) {
	double t_1 = eh * (tan(t) / ew);
	double tmp;
	if ((eh <= -2.7e-36) || !(eh <= 4.05e-16)) {
		tmp = fabs((eh * fma(ew, ((cos(t) * cos(atan(t_1))) / eh), (tanh(((eh * t) / ew)) * sin(t)))));
	} else {
		tmp = fabs((fma(cos(t), ew, ((t_1 * eh) * sin(t))) / sqrt((1.0 + pow(t_1, 2.0)))));
	}
	return tmp;
}
function code(eh, ew, t)
	t_1 = Float64(eh * Float64(tan(t) / ew))
	tmp = 0.0
	if ((eh <= -2.7e-36) || !(eh <= 4.05e-16))
		tmp = abs(Float64(eh * fma(ew, Float64(Float64(cos(t) * cos(atan(t_1))) / eh), Float64(tanh(Float64(Float64(eh * t) / ew)) * sin(t)))));
	else
		tmp = abs(Float64(fma(cos(t), ew, Float64(Float64(t_1 * eh) * sin(t))) / sqrt(Float64(1.0 + (t_1 ^ 2.0)))));
	end
	return tmp
end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[eh, -2.7e-36], N[Not[LessEqual[eh, 4.05e-16]], $MachinePrecision]], N[Abs[N[(eh * N[(ew * N[(N[(N[Cos[t], $MachinePrecision] * N[Cos[N[ArcTan[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / eh), $MachinePrecision] + N[(N[Tanh[N[(N[(eh * t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[Cos[t], $MachinePrecision] * ew + N[(N[(t$95$1 * eh), $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(1.0 + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := eh \cdot \frac{\tan t}{ew}\\
\mathbf{if}\;eh \leq -2.7 \cdot 10^{-36} \lor \neg \left(eh \leq 4.05 \cdot 10^{-16}\right):\\
\;\;\;\;\left|eh \cdot \mathsf{fma}\left(ew, \frac{\cos t \cdot \cos \tan^{-1} t\_1}{eh}, \tanh \left(\frac{eh \cdot t}{ew}\right) \cdot \sin t\right)\right|\\

\mathbf{else}:\\
\;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t, ew, \left(t\_1 \cdot eh\right) \cdot \sin t\right)}{\sqrt{1 + {t\_1}^{2}}}\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if eh < -2.70000000000000007e-36 or 4.05000000000000024e-16 < eh

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -2.70000000000000007e-36 < eh < 4.05000000000000024e-16

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 94.6% accurate, 1.3× speedup?

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

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left|\left(\cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right) \cdot \cos t\right) \cdot ew - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right) \cdot t}}{ew}\right)\right| \]
        4. lower-neg.f6498.5

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

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

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

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

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

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

      if -1.54999999999999996e109 < eh < 3.49999999999999977e68

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 93.5% accurate, 1.3× speedup?

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

      1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -0.450000000000000011 < eh < 1.6500000000000001e66

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 6: 84.2% accurate, 1.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := eh \cdot \frac{\tan t}{ew}\\ t_2 := \left(-eh\right) \cdot \sin t\\ \mathbf{if}\;eh \leq -3.8 \cdot 10^{+157} \lor \neg \left(eh \leq 1.45 \cdot 10^{+69}\right):\\ \;\;\;\;\left|t\_2 \cdot \sin \tan^{-1} \left(\frac{\frac{t\_2}{ew}}{\cos t}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t, ew, \left(t\_1 \cdot eh\right) \cdot \sin t\right)}{\sqrt{1 + {t\_1}^{2}}}\right|\\ \end{array} \end{array} \]
    (FPCore (eh ew t)
     :precision binary64
     (let* ((t_1 (* eh (/ (tan t) ew))) (t_2 (* (- eh) (sin t))))
       (if (or (<= eh -3.8e+157) (not (<= eh 1.45e+69)))
         (fabs (* t_2 (sin (atan (/ (/ t_2 ew) (cos t))))))
         (fabs
          (/
           (fma (cos t) ew (* (* t_1 eh) (sin t)))
           (sqrt (+ 1.0 (pow t_1 2.0))))))))
    double code(double eh, double ew, double t) {
    	double t_1 = eh * (tan(t) / ew);
    	double t_2 = -eh * sin(t);
    	double tmp;
    	if ((eh <= -3.8e+157) || !(eh <= 1.45e+69)) {
    		tmp = fabs((t_2 * sin(atan(((t_2 / ew) / cos(t))))));
    	} else {
    		tmp = fabs((fma(cos(t), ew, ((t_1 * eh) * sin(t))) / sqrt((1.0 + pow(t_1, 2.0)))));
    	}
    	return tmp;
    }
    
    function code(eh, ew, t)
    	t_1 = Float64(eh * Float64(tan(t) / ew))
    	t_2 = Float64(Float64(-eh) * sin(t))
    	tmp = 0.0
    	if ((eh <= -3.8e+157) || !(eh <= 1.45e+69))
    		tmp = abs(Float64(t_2 * sin(atan(Float64(Float64(t_2 / ew) / cos(t))))));
    	else
    		tmp = abs(Float64(fma(cos(t), ew, Float64(Float64(t_1 * eh) * sin(t))) / sqrt(Float64(1.0 + (t_1 ^ 2.0)))));
    	end
    	return tmp
    end
    
    code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-eh) * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[eh, -3.8e+157], N[Not[LessEqual[eh, 1.45e+69]], $MachinePrecision]], N[Abs[N[(t$95$2 * N[Sin[N[ArcTan[N[(N[(t$95$2 / ew), $MachinePrecision] / N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[Cos[t], $MachinePrecision] * ew + N[(N[(t$95$1 * eh), $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(1.0 + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := eh \cdot \frac{\tan t}{ew}\\
    t_2 := \left(-eh\right) \cdot \sin t\\
    \mathbf{if}\;eh \leq -3.8 \cdot 10^{+157} \lor \neg \left(eh \leq 1.45 \cdot 10^{+69}\right):\\
    \;\;\;\;\left|t\_2 \cdot \sin \tan^{-1} \left(\frac{\frac{t\_2}{ew}}{\cos t}\right)\right|\\
    
    \mathbf{else}:\\
    \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t, ew, \left(t\_1 \cdot eh\right) \cdot \sin t\right)}{\sqrt{1 + {t\_1}^{2}}}\right|\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if eh < -3.8000000000000001e157 or 1.4499999999999999e69 < eh

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -3.8000000000000001e157 < eh < 1.4499999999999999e69

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 7: 74.8% accurate, 1.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-eh\right) \cdot \sin t\\ \mathbf{if}\;eh \leq -6.8 \cdot 10^{+120} \lor \neg \left(eh \leq 1.45 \cdot 10^{+69}\right):\\ \;\;\;\;\left|t\_1 \cdot \sin \tan^{-1} \left(\frac{\frac{t\_1}{ew}}{\cos t}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t, ew, \left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh\right) \cdot \sin t\right)}{1}\right|\\ \end{array} \end{array} \]
    (FPCore (eh ew t)
     :precision binary64
     (let* ((t_1 (* (- eh) (sin t))))
       (if (or (<= eh -6.8e+120) (not (<= eh 1.45e+69)))
         (fabs (* t_1 (sin (atan (/ (/ t_1 ew) (cos t))))))
         (fabs
          (/ (fma (cos t) ew (* (* (* eh (/ (tan t) ew)) eh) (sin t))) 1.0)))))
    double code(double eh, double ew, double t) {
    	double t_1 = -eh * sin(t);
    	double tmp;
    	if ((eh <= -6.8e+120) || !(eh <= 1.45e+69)) {
    		tmp = fabs((t_1 * sin(atan(((t_1 / ew) / cos(t))))));
    	} else {
    		tmp = fabs((fma(cos(t), ew, (((eh * (tan(t) / ew)) * eh) * sin(t))) / 1.0));
    	}
    	return tmp;
    }
    
    function code(eh, ew, t)
    	t_1 = Float64(Float64(-eh) * sin(t))
    	tmp = 0.0
    	if ((eh <= -6.8e+120) || !(eh <= 1.45e+69))
    		tmp = abs(Float64(t_1 * sin(atan(Float64(Float64(t_1 / ew) / cos(t))))));
    	else
    		tmp = abs(Float64(fma(cos(t), ew, Float64(Float64(Float64(eh * Float64(tan(t) / ew)) * eh) * sin(t))) / 1.0));
    	end
    	return tmp
    end
    
    code[eh_, ew_, t_] := Block[{t$95$1 = N[((-eh) * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[eh, -6.8e+120], N[Not[LessEqual[eh, 1.45e+69]], $MachinePrecision]], N[Abs[N[(t$95$1 * N[Sin[N[ArcTan[N[(N[(t$95$1 / ew), $MachinePrecision] / N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[Cos[t], $MachinePrecision] * ew + N[(N[(N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision] * eh), $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 1.0), $MachinePrecision]], $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(-eh\right) \cdot \sin t\\
    \mathbf{if}\;eh \leq -6.8 \cdot 10^{+120} \lor \neg \left(eh \leq 1.45 \cdot 10^{+69}\right):\\
    \;\;\;\;\left|t\_1 \cdot \sin \tan^{-1} \left(\frac{\frac{t\_1}{ew}}{\cos t}\right)\right|\\
    
    \mathbf{else}:\\
    \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t, ew, \left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh\right) \cdot \sin t\right)}{1}\right|\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if eh < -6.79999999999999998e120 or 1.4499999999999999e69 < eh

      1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -6.79999999999999998e120 < eh < 1.4499999999999999e69

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 8: 74.7% accurate, 1.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := -\sin t\\ \mathbf{if}\;eh \leq -6.8 \cdot 10^{+120} \lor \neg \left(eh \leq 1.45 \cdot 10^{+69}\right):\\ \;\;\;\;\left|\left(t\_1 \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{t\_1}{ew} \cdot \frac{eh}{\cos t}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t, ew, \left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh\right) \cdot \sin t\right)}{1}\right|\\ \end{array} \end{array} \]
      (FPCore (eh ew t)
       :precision binary64
       (let* ((t_1 (- (sin t))))
         (if (or (<= eh -6.8e+120) (not (<= eh 1.45e+69)))
           (fabs (* (* t_1 eh) (sin (atan (* (/ t_1 ew) (/ eh (cos t)))))))
           (fabs
            (/ (fma (cos t) ew (* (* (* eh (/ (tan t) ew)) eh) (sin t))) 1.0)))))
      double code(double eh, double ew, double t) {
      	double t_1 = -sin(t);
      	double tmp;
      	if ((eh <= -6.8e+120) || !(eh <= 1.45e+69)) {
      		tmp = fabs(((t_1 * eh) * sin(atan(((t_1 / ew) * (eh / cos(t)))))));
      	} else {
      		tmp = fabs((fma(cos(t), ew, (((eh * (tan(t) / ew)) * eh) * sin(t))) / 1.0));
      	}
      	return tmp;
      }
      
      function code(eh, ew, t)
      	t_1 = Float64(-sin(t))
      	tmp = 0.0
      	if ((eh <= -6.8e+120) || !(eh <= 1.45e+69))
      		tmp = abs(Float64(Float64(t_1 * eh) * sin(atan(Float64(Float64(t_1 / ew) * Float64(eh / cos(t)))))));
      	else
      		tmp = abs(Float64(fma(cos(t), ew, Float64(Float64(Float64(eh * Float64(tan(t) / ew)) * eh) * sin(t))) / 1.0));
      	end
      	return tmp
      end
      
      code[eh_, ew_, t_] := Block[{t$95$1 = (-N[Sin[t], $MachinePrecision])}, If[Or[LessEqual[eh, -6.8e+120], N[Not[LessEqual[eh, 1.45e+69]], $MachinePrecision]], N[Abs[N[(N[(t$95$1 * eh), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(t$95$1 / ew), $MachinePrecision] * N[(eh / N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[Cos[t], $MachinePrecision] * ew + N[(N[(N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision] * eh), $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 1.0), $MachinePrecision]], $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := -\sin t\\
      \mathbf{if}\;eh \leq -6.8 \cdot 10^{+120} \lor \neg \left(eh \leq 1.45 \cdot 10^{+69}\right):\\
      \;\;\;\;\left|\left(t\_1 \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{t\_1}{ew} \cdot \frac{eh}{\cos t}\right)\right|\\
      
      \mathbf{else}:\\
      \;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t, ew, \left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh\right) \cdot \sin t\right)}{1}\right|\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if eh < -6.79999999999999998e120 or 1.4499999999999999e69 < eh

        1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left|\left(\left(-\sin t\right) \cdot eh\right) \cdot \sin \tan^{-1} \left(\mathsf{neg}\left(\color{blue}{\frac{\sin t}{ew} \cdot \frac{eh}{\cos t}}\right)\right)\right| \]
          15. distribute-lft-neg-inN/A

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

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

        if -6.79999999999999998e120 < eh < 1.4499999999999999e69

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 9: 74.7% accurate, 1.6× speedup?

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

          1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left|\left(\cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right) \cdot \cos t\right) \cdot ew - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(eh\right)\right) \cdot t}}{ew}\right)\right| \]
            4. lower-neg.f6498.5

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

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

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

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

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

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

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

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

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

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

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

          if -6.79999999999999998e120 < eh < 1.4499999999999999e69

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 10: 62.7% accurate, 2.5× speedup?

          \[\begin{array}{l} \\ \left|\frac{\mathsf{fma}\left(\cos t, ew, \left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh\right) \cdot \sin t\right)}{1}\right| \end{array} \]
          (FPCore (eh ew t)
           :precision binary64
           (fabs (/ (fma (cos t) ew (* (* (* eh (/ (tan t) ew)) eh) (sin t))) 1.0)))
          double code(double eh, double ew, double t) {
          	return fabs((fma(cos(t), ew, (((eh * (tan(t) / ew)) * eh) * sin(t))) / 1.0));
          }
          
          function code(eh, ew, t)
          	return abs(Float64(fma(cos(t), ew, Float64(Float64(Float64(eh * Float64(tan(t) / ew)) * eh) * sin(t))) / 1.0))
          end
          
          code[eh_, ew_, t_] := N[Abs[N[(N[(N[Cos[t], $MachinePrecision] * ew + N[(N[(N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision] * eh), $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 1.0), $MachinePrecision]], $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          \left|\frac{\mathsf{fma}\left(\cos t, ew, \left(\left(eh \cdot \frac{\tan t}{ew}\right) \cdot eh\right) \cdot \sin t\right)}{1}\right|
          \end{array}
          
          Derivation
          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 11: 62.3% accurate, 8.0× speedup?

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

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

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

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

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

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

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

            Alternative 12: 39.5% accurate, 45.4× speedup?

            \[\begin{array}{l} \\ \left|\mathsf{fma}\left(\left(-0.5 \cdot ew\right) \cdot t, t, ew\right)\right| \end{array} \]
            (FPCore (eh ew t) :precision binary64 (fabs (fma (* (* -0.5 ew) t) t ew)))
            double code(double eh, double ew, double t) {
            	return fabs(fma(((-0.5 * ew) * t), t, ew));
            }
            
            function code(eh, ew, t)
            	return abs(fma(Float64(Float64(-0.5 * ew) * t), t, ew))
            end
            
            code[eh_, ew_, t_] := N[Abs[N[(N[(N[(-0.5 * ew), $MachinePrecision] * t), $MachinePrecision] * t + ew), $MachinePrecision]], $MachinePrecision]
            
            \begin{array}{l}
            
            \\
            \left|\mathsf{fma}\left(\left(-0.5 \cdot ew\right) \cdot t, t, ew\right)\right|
            \end{array}
            
            Derivation
            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left|\mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(\frac{-1}{2}, ew, \frac{eh \cdot eh}{ew}\right) - \frac{1}{2} \cdot \frac{\color{blue}{eh \cdot eh}}{ew}, ew\right)\right| \]
              13. lower-*.f6430.6

                \[\leadsto \left|\mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(-0.5, ew, \frac{eh \cdot eh}{ew}\right) - 0.5 \cdot \frac{\color{blue}{eh \cdot eh}}{ew}, ew\right)\right| \]
            6. Applied rewrites30.6%

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

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

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

                  \[\leadsto \left|\mathsf{fma}\left(\left(-0.5 \cdot ew\right) \cdot t, \color{blue}{t}, ew\right)\right| \]
                2. Add Preprocessing

                Alternative 13: 39.4% accurate, 45.4× speedup?

                \[\begin{array}{l} \\ \left|\mathsf{fma}\left(t \cdot t, -0.5 \cdot ew, ew\right)\right| \end{array} \]
                (FPCore (eh ew t) :precision binary64 (fabs (fma (* t t) (* -0.5 ew) ew)))
                double code(double eh, double ew, double t) {
                	return fabs(fma((t * t), (-0.5 * ew), ew));
                }
                
                function code(eh, ew, t)
                	return abs(fma(Float64(t * t), Float64(-0.5 * ew), ew))
                end
                
                code[eh_, ew_, t_] := N[Abs[N[(N[(t * t), $MachinePrecision] * N[(-0.5 * ew), $MachinePrecision] + ew), $MachinePrecision]], $MachinePrecision]
                
                \begin{array}{l}
                
                \\
                \left|\mathsf{fma}\left(t \cdot t, -0.5 \cdot ew, ew\right)\right|
                \end{array}
                
                Derivation
                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left|\mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(\frac{-1}{2}, ew, \frac{eh \cdot eh}{ew}\right) - \frac{1}{2} \cdot \frac{\color{blue}{eh \cdot eh}}{ew}, ew\right)\right| \]
                  13. lower-*.f6430.6

                    \[\leadsto \left|\mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(-0.5, ew, \frac{eh \cdot eh}{ew}\right) - 0.5 \cdot \frac{\color{blue}{eh \cdot eh}}{ew}, ew\right)\right| \]
                6. Applied rewrites30.6%

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

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

                    \[\leadsto \left|\mathsf{fma}\left(t \cdot t, -0.5 \cdot \color{blue}{ew}, ew\right)\right| \]
                  2. Add Preprocessing

                  Reproduce

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