Example from Robby

Percentage Accurate: 99.8% → 99.8%
Time: 22.1s
Alternatives: 10
Speedup: N/A×

Specification

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

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

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

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

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

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

Alternative 1: 99.8% accurate, 1.1× speedup?

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

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

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

    Alternative 2: 98.5% accurate, 1.6× speedup?

    \[\left|ew \cdot \sin t + \tanh \sinh^{-1} \left(\frac{eh}{\tan t \cdot ew}\right) \cdot \left(\cos t \cdot eh\right)\right| \]
    (FPCore (eh ew t)
      :precision binary64
      (fabs
     (+
      (* ew (sin t))
      (* (tanh (asinh (/ eh (* (tan t) ew)))) (* (cos t) eh)))))
    double code(double eh, double ew, double t) {
    	return fabs(((ew * sin(t)) + (tanh(asinh((eh / (tan(t) * ew)))) * (cos(t) * eh))));
    }
    
    def code(eh, ew, t):
    	return math.fabs(((ew * math.sin(t)) + (math.tanh(math.asinh((eh / (math.tan(t) * ew)))) * (math.cos(t) * eh))))
    
    function code(eh, ew, t)
    	return abs(Float64(Float64(ew * sin(t)) + Float64(tanh(asinh(Float64(eh / Float64(tan(t) * ew)))) * Float64(cos(t) * eh))))
    end
    
    function tmp = code(eh, ew, t)
    	tmp = abs(((ew * sin(t)) + (tanh(asinh((eh / (tan(t) * ew)))) * (cos(t) * eh))));
    end
    
    code[eh_, ew_, t_] := N[Abs[N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] + N[(N[Tanh[N[ArcSinh[N[(eh / N[(N[Tan[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
    
    \left|ew \cdot \sin t + \tanh \sinh^{-1} \left(\frac{eh}{\tan t \cdot ew}\right) \cdot \left(\cos t \cdot eh\right)\right|
    
    Derivation
    1. Initial program 99.8%

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

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

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

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

          \[\leadsto \left|ew \cdot \sin t + \tanh \sinh^{-1} \left(\frac{eh}{\tan t \cdot ew}\right) \cdot \left(\cos t \cdot eh\right)\right| \]
      4. Applied rewrites98.5%

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

      Alternative 3: 89.2% accurate, 2.0× speedup?

      \[\left|ew \cdot \sin t + \tanh \sinh^{-1} \left(\frac{eh}{ew \cdot t}\right) \cdot \left(\cos t \cdot eh\right)\right| \]
      (FPCore (eh ew t)
        :precision binary64
        (fabs
       (+ (* ew (sin t)) (* (tanh (asinh (/ eh (* ew t)))) (* (cos t) eh)))))
      double code(double eh, double ew, double t) {
      	return fabs(((ew * sin(t)) + (tanh(asinh((eh / (ew * t)))) * (cos(t) * eh))));
      }
      
      def code(eh, ew, t):
      	return math.fabs(((ew * math.sin(t)) + (math.tanh(math.asinh((eh / (ew * t)))) * (math.cos(t) * eh))))
      
      function code(eh, ew, t)
      	return abs(Float64(Float64(ew * sin(t)) + Float64(tanh(asinh(Float64(eh / Float64(ew * t)))) * Float64(cos(t) * eh))))
      end
      
      function tmp = code(eh, ew, t)
      	tmp = abs(((ew * sin(t)) + (tanh(asinh((eh / (ew * t)))) * (cos(t) * eh))));
      end
      
      code[eh_, ew_, t_] := N[Abs[N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] + N[(N[Tanh[N[ArcSinh[N[(eh / N[(ew * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
      
      \left|ew \cdot \sin t + \tanh \sinh^{-1} \left(\frac{eh}{ew \cdot t}\right) \cdot \left(\cos t \cdot eh\right)\right|
      
      Derivation
      1. Initial program 99.8%

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

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

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

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

            \[\leadsto \left|ew \cdot \sin t + \tanh \sinh^{-1} \left(\frac{eh}{\tan t \cdot ew}\right) \cdot \left(\cos t \cdot eh\right)\right| \]
        4. Applied rewrites98.5%

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

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

            \[\leadsto \left|ew \cdot \sin t + \tanh \sinh^{-1} \left(\frac{eh}{\color{blue}{ew \cdot t}}\right) \cdot \left(\cos t \cdot eh\right)\right| \]
          2. lower-*.f6489.2%

            \[\leadsto \left|ew \cdot \sin t + \tanh \sinh^{-1} \left(\frac{eh}{ew \cdot \color{blue}{t}}\right) \cdot \left(\cos t \cdot eh\right)\right| \]
        7. Applied rewrites89.2%

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

        Alternative 4: 67.4% accurate, 2.2× speedup?

        \[\begin{array}{l} t_1 := \frac{eh}{ew \cdot t}\\ t_2 := \left|\frac{t\_1 \cdot \left(\cos t \cdot eh\right) + \sin t \cdot ew}{\sqrt{{t\_1}^{2} - -1}}\right|\\ \mathbf{if}\;t \leq -31:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq \frac{4530655075725799}{730750818665451459101842416358141509827966271488}:\\ \;\;\;\;\left|eh \cdot \frac{\frac{eh}{\left|eh\right|} \cdot \left|ew\right|}{ew}\right|\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \]
        (FPCore (eh ew t)
          :precision binary64
          (let* ((t_1 (/ eh (* ew t)))
               (t_2
                (fabs
                 (/
                  (+ (* t_1 (* (cos t) eh)) (* (sin t) ew))
                  (sqrt (- (pow t_1 2) -1))))))
          (if (<= t -31)
            t_2
            (if (<=
                 t
                 4530655075725799/730750818665451459101842416358141509827966271488)
              (fabs (* eh (/ (* (/ eh (fabs eh)) (fabs ew)) ew)))
              t_2))))
        double code(double eh, double ew, double t) {
        	double t_1 = eh / (ew * t);
        	double t_2 = fabs((((t_1 * (cos(t) * eh)) + (sin(t) * ew)) / sqrt((pow(t_1, 2.0) - -1.0))));
        	double tmp;
        	if (t <= -31.0) {
        		tmp = t_2;
        	} else if (t <= 6.2e-33) {
        		tmp = fabs((eh * (((eh / fabs(eh)) * fabs(ew)) / ew)));
        	} else {
        		tmp = t_2;
        	}
        	return tmp;
        }
        
        module fmin_fmax_functions
            implicit none
            private
            public fmax
            public fmin
        
            interface fmax
                module procedure fmax88
                module procedure fmax44
                module procedure fmax84
                module procedure fmax48
            end interface
            interface fmin
                module procedure fmin88
                module procedure fmin44
                module procedure fmin84
                module procedure fmin48
            end interface
        contains
            real(8) function fmax88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(4) function fmax44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(8) function fmax84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmax48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
            end function
            real(8) function fmin88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(4) function fmin44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(8) function fmin84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmin48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
            end function
        end module
        
        real(8) function code(eh, ew, t)
        use fmin_fmax_functions
            real(8), intent (in) :: eh
            real(8), intent (in) :: ew
            real(8), intent (in) :: t
            real(8) :: t_1
            real(8) :: t_2
            real(8) :: tmp
            t_1 = eh / (ew * t)
            t_2 = abs((((t_1 * (cos(t) * eh)) + (sin(t) * ew)) / sqrt(((t_1 ** 2.0d0) - (-1.0d0)))))
            if (t <= (-31.0d0)) then
                tmp = t_2
            else if (t <= 6.2d-33) then
                tmp = abs((eh * (((eh / abs(eh)) * abs(ew)) / ew)))
            else
                tmp = t_2
            end if
            code = tmp
        end function
        
        public static double code(double eh, double ew, double t) {
        	double t_1 = eh / (ew * t);
        	double t_2 = Math.abs((((t_1 * (Math.cos(t) * eh)) + (Math.sin(t) * ew)) / Math.sqrt((Math.pow(t_1, 2.0) - -1.0))));
        	double tmp;
        	if (t <= -31.0) {
        		tmp = t_2;
        	} else if (t <= 6.2e-33) {
        		tmp = Math.abs((eh * (((eh / Math.abs(eh)) * Math.abs(ew)) / ew)));
        	} else {
        		tmp = t_2;
        	}
        	return tmp;
        }
        
        def code(eh, ew, t):
        	t_1 = eh / (ew * t)
        	t_2 = math.fabs((((t_1 * (math.cos(t) * eh)) + (math.sin(t) * ew)) / math.sqrt((math.pow(t_1, 2.0) - -1.0))))
        	tmp = 0
        	if t <= -31.0:
        		tmp = t_2
        	elif t <= 6.2e-33:
        		tmp = math.fabs((eh * (((eh / math.fabs(eh)) * math.fabs(ew)) / ew)))
        	else:
        		tmp = t_2
        	return tmp
        
        function code(eh, ew, t)
        	t_1 = Float64(eh / Float64(ew * t))
        	t_2 = abs(Float64(Float64(Float64(t_1 * Float64(cos(t) * eh)) + Float64(sin(t) * ew)) / sqrt(Float64((t_1 ^ 2.0) - -1.0))))
        	tmp = 0.0
        	if (t <= -31.0)
        		tmp = t_2;
        	elseif (t <= 6.2e-33)
        		tmp = abs(Float64(eh * Float64(Float64(Float64(eh / abs(eh)) * abs(ew)) / ew)));
        	else
        		tmp = t_2;
        	end
        	return tmp
        end
        
        function tmp_2 = code(eh, ew, t)
        	t_1 = eh / (ew * t);
        	t_2 = abs((((t_1 * (cos(t) * eh)) + (sin(t) * ew)) / sqrt(((t_1 ^ 2.0) - -1.0))));
        	tmp = 0.0;
        	if (t <= -31.0)
        		tmp = t_2;
        	elseif (t <= 6.2e-33)
        		tmp = abs((eh * (((eh / abs(eh)) * abs(ew)) / ew)));
        	else
        		tmp = t_2;
        	end
        	tmp_2 = tmp;
        end
        
        code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh / N[(ew * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Abs[N[(N[(N[(t$95$1 * N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision]), $MachinePrecision] + N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[Power[t$95$1, 2], $MachinePrecision] - -1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -31], t$95$2, If[LessEqual[t, 4530655075725799/730750818665451459101842416358141509827966271488], N[Abs[N[(eh * N[(N[(N[(eh / N[Abs[eh], $MachinePrecision]), $MachinePrecision] * N[Abs[ew], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$2]]]]
        
        \begin{array}{l}
        t_1 := \frac{eh}{ew \cdot t}\\
        t_2 := \left|\frac{t\_1 \cdot \left(\cos t \cdot eh\right) + \sin t \cdot ew}{\sqrt{{t\_1}^{2} - -1}}\right|\\
        \mathbf{if}\;t \leq -31:\\
        \;\;\;\;t\_2\\
        
        \mathbf{elif}\;t \leq \frac{4530655075725799}{730750818665451459101842416358141509827966271488}:\\
        \;\;\;\;\left|eh \cdot \frac{\frac{eh}{\left|eh\right|} \cdot \left|ew\right|}{ew}\right|\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_2\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if t < -31 or 6.1999999999999999e-33 < t

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left|\frac{\frac{eh}{ew \cdot t} \cdot \left(\cos t \cdot eh\right) + \sin t \cdot ew}{\sqrt{{\left(\frac{eh}{\color{blue}{ew \cdot t}}\right)}^{2} - -1}}\right| \]
            2. lower-*.f6454.9%

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

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

          if -31 < t < 6.1999999999999999e-33

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left|\color{blue}{\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
          5. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            2. lower-pow.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            3. lower-*.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \color{blue}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            4. lower-sqrt.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            5. lower-/.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            6. lower-pow.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            7. lower-pow.f6411.5%

              \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
          6. Applied rewrites11.5%

            \[\leadsto \left|\color{blue}{\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
          7. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            2. lift-pow.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            3. pow2N/A

              \[\leadsto \left|\frac{eh \cdot eh}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            4. associate-/l*N/A

              \[\leadsto \left|eh \cdot \color{blue}{\frac{eh}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            5. lower-*.f64N/A

              \[\leadsto \left|eh \cdot \color{blue}{\frac{eh}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            6. lower-/.f6412.5%

              \[\leadsto \left|eh \cdot \frac{eh}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            7. lift-*.f64N/A

              \[\leadsto \left|eh \cdot \frac{eh}{ew \cdot \color{blue}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            8. *-commutativeN/A

              \[\leadsto \left|eh \cdot \frac{eh}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}} \cdot \color{blue}{ew}}\right| \]
            9. lower-*.f6412.5%

              \[\leadsto \left|eh \cdot \frac{eh}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}} \cdot \color{blue}{ew}}\right| \]
          8. Applied rewrites35.3%

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

              \[\leadsto \left|eh \cdot \frac{eh}{\color{blue}{\frac{\left|eh\right|}{\left|ew\right|} \cdot ew}}\right| \]
            2. lift-*.f64N/A

              \[\leadsto \left|eh \cdot \frac{eh}{\frac{\left|eh\right|}{\left|ew\right|} \cdot \color{blue}{ew}}\right| \]
            3. associate-/r*N/A

              \[\leadsto \left|eh \cdot \frac{\frac{eh}{\frac{\left|eh\right|}{\left|ew\right|}}}{\color{blue}{ew}}\right| \]
            4. lower-/.f64N/A

              \[\leadsto \left|eh \cdot \frac{\frac{eh}{\frac{\left|eh\right|}{\left|ew\right|}}}{\color{blue}{ew}}\right| \]
            5. lift-/.f64N/A

              \[\leadsto \left|eh \cdot \frac{\frac{eh}{\frac{\left|eh\right|}{\left|ew\right|}}}{ew}\right| \]
            6. associate-/r/N/A

              \[\leadsto \left|eh \cdot \frac{\frac{eh}{\left|eh\right|} \cdot \left|ew\right|}{ew}\right| \]
            7. lower-*.f64N/A

              \[\leadsto \left|eh \cdot \frac{\frac{eh}{\left|eh\right|} \cdot \left|ew\right|}{ew}\right| \]
            8. lower-/.f6442.2%

              \[\leadsto \left|eh \cdot \frac{\frac{eh}{\left|eh\right|} \cdot \left|ew\right|}{ew}\right| \]
          10. Applied rewrites42.2%

            \[\leadsto \left|eh \cdot \frac{\frac{eh}{\left|eh\right|} \cdot \left|ew\right|}{\color{blue}{ew}}\right| \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 5: 61.3% accurate, 2.4× speedup?

        \[\begin{array}{l} t_1 := \left|\frac{\frac{eh}{\tan t \cdot ew} \cdot \left(\cos t \cdot eh\right) + \sin t \cdot ew}{\sqrt{1}}\right|\\ \mathbf{if}\;t \leq -31:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq \frac{4637973545043259}{220855883097298041197912187592864814478435487109452369765200775161577472}:\\ \;\;\;\;\left|eh \cdot \frac{\frac{eh}{\left|eh\right|} \cdot \left|ew\right|}{ew}\right|\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
        (FPCore (eh ew t)
          :precision binary64
          (let* ((t_1
                (fabs
                 (/
                  (+ (* (/ eh (* (tan t) ew)) (* (cos t) eh)) (* (sin t) ew))
                  (sqrt 1)))))
          (if (<= t -31)
            t_1
            (if (<=
                 t
                 4637973545043259/220855883097298041197912187592864814478435487109452369765200775161577472)
              (fabs (* eh (/ (* (/ eh (fabs eh)) (fabs ew)) ew)))
              t_1))))
        double code(double eh, double ew, double t) {
        	double t_1 = fabs(((((eh / (tan(t) * ew)) * (cos(t) * eh)) + (sin(t) * ew)) / sqrt(1.0)));
        	double tmp;
        	if (t <= -31.0) {
        		tmp = t_1;
        	} else if (t <= 2.1e-56) {
        		tmp = fabs((eh * (((eh / fabs(eh)) * fabs(ew)) / ew)));
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        module fmin_fmax_functions
            implicit none
            private
            public fmax
            public fmin
        
            interface fmax
                module procedure fmax88
                module procedure fmax44
                module procedure fmax84
                module procedure fmax48
            end interface
            interface fmin
                module procedure fmin88
                module procedure fmin44
                module procedure fmin84
                module procedure fmin48
            end interface
        contains
            real(8) function fmax88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(4) function fmax44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(8) function fmax84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmax48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
            end function
            real(8) function fmin88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(4) function fmin44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(8) function fmin84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmin48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
            end function
        end module
        
        real(8) function code(eh, ew, t)
        use fmin_fmax_functions
            real(8), intent (in) :: eh
            real(8), intent (in) :: ew
            real(8), intent (in) :: t
            real(8) :: t_1
            real(8) :: tmp
            t_1 = abs(((((eh / (tan(t) * ew)) * (cos(t) * eh)) + (sin(t) * ew)) / sqrt(1.0d0)))
            if (t <= (-31.0d0)) then
                tmp = t_1
            else if (t <= 2.1d-56) then
                tmp = abs((eh * (((eh / abs(eh)) * abs(ew)) / ew)))
            else
                tmp = t_1
            end if
            code = tmp
        end function
        
        public static double code(double eh, double ew, double t) {
        	double t_1 = Math.abs(((((eh / (Math.tan(t) * ew)) * (Math.cos(t) * eh)) + (Math.sin(t) * ew)) / Math.sqrt(1.0)));
        	double tmp;
        	if (t <= -31.0) {
        		tmp = t_1;
        	} else if (t <= 2.1e-56) {
        		tmp = Math.abs((eh * (((eh / Math.abs(eh)) * Math.abs(ew)) / ew)));
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(eh, ew, t):
        	t_1 = math.fabs(((((eh / (math.tan(t) * ew)) * (math.cos(t) * eh)) + (math.sin(t) * ew)) / math.sqrt(1.0)))
        	tmp = 0
        	if t <= -31.0:
        		tmp = t_1
        	elif t <= 2.1e-56:
        		tmp = math.fabs((eh * (((eh / math.fabs(eh)) * math.fabs(ew)) / ew)))
        	else:
        		tmp = t_1
        	return tmp
        
        function code(eh, ew, t)
        	t_1 = abs(Float64(Float64(Float64(Float64(eh / Float64(tan(t) * ew)) * Float64(cos(t) * eh)) + Float64(sin(t) * ew)) / sqrt(1.0)))
        	tmp = 0.0
        	if (t <= -31.0)
        		tmp = t_1;
        	elseif (t <= 2.1e-56)
        		tmp = abs(Float64(eh * Float64(Float64(Float64(eh / abs(eh)) * abs(ew)) / ew)));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(eh, ew, t)
        	t_1 = abs(((((eh / (tan(t) * ew)) * (cos(t) * eh)) + (sin(t) * ew)) / sqrt(1.0)));
        	tmp = 0.0;
        	if (t <= -31.0)
        		tmp = t_1;
        	elseif (t <= 2.1e-56)
        		tmp = abs((eh * (((eh / abs(eh)) * abs(ew)) / ew)));
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(N[(N[(N[(eh / N[(N[Tan[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision]), $MachinePrecision] + N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / N[Sqrt[1], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -31], t$95$1, If[LessEqual[t, 4637973545043259/220855883097298041197912187592864814478435487109452369765200775161577472], N[Abs[N[(eh * N[(N[(N[(eh / N[Abs[eh], $MachinePrecision]), $MachinePrecision] * N[Abs[ew], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        t_1 := \left|\frac{\frac{eh}{\tan t \cdot ew} \cdot \left(\cos t \cdot eh\right) + \sin t \cdot ew}{\sqrt{1}}\right|\\
        \mathbf{if}\;t \leq -31:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t \leq \frac{4637973545043259}{220855883097298041197912187592864814478435487109452369765200775161577472}:\\
        \;\;\;\;\left|eh \cdot \frac{\frac{eh}{\left|eh\right|} \cdot \left|ew\right|}{ew}\right|\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if t < -31 or 2.1000000000000001e-56 < t

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -31 < t < 2.1000000000000001e-56

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left|\color{blue}{\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            5. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              2. lower-pow.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              3. lower-*.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \color{blue}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              4. lower-sqrt.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              5. lower-/.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              6. lower-pow.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              7. lower-pow.f6411.5%

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            6. Applied rewrites11.5%

              \[\leadsto \left|\color{blue}{\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            7. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              2. lift-pow.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              3. pow2N/A

                \[\leadsto \left|\frac{eh \cdot eh}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              4. associate-/l*N/A

                \[\leadsto \left|eh \cdot \color{blue}{\frac{eh}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              5. lower-*.f64N/A

                \[\leadsto \left|eh \cdot \color{blue}{\frac{eh}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              6. lower-/.f6412.5%

                \[\leadsto \left|eh \cdot \frac{eh}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              7. lift-*.f64N/A

                \[\leadsto \left|eh \cdot \frac{eh}{ew \cdot \color{blue}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              8. *-commutativeN/A

                \[\leadsto \left|eh \cdot \frac{eh}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}} \cdot \color{blue}{ew}}\right| \]
              9. lower-*.f6412.5%

                \[\leadsto \left|eh \cdot \frac{eh}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}} \cdot \color{blue}{ew}}\right| \]
            8. Applied rewrites35.3%

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

                \[\leadsto \left|eh \cdot \frac{eh}{\color{blue}{\frac{\left|eh\right|}{\left|ew\right|} \cdot ew}}\right| \]
              2. lift-*.f64N/A

                \[\leadsto \left|eh \cdot \frac{eh}{\frac{\left|eh\right|}{\left|ew\right|} \cdot \color{blue}{ew}}\right| \]
              3. associate-/r*N/A

                \[\leadsto \left|eh \cdot \frac{\frac{eh}{\frac{\left|eh\right|}{\left|ew\right|}}}{\color{blue}{ew}}\right| \]
              4. lower-/.f64N/A

                \[\leadsto \left|eh \cdot \frac{\frac{eh}{\frac{\left|eh\right|}{\left|ew\right|}}}{\color{blue}{ew}}\right| \]
              5. lift-/.f64N/A

                \[\leadsto \left|eh \cdot \frac{\frac{eh}{\frac{\left|eh\right|}{\left|ew\right|}}}{ew}\right| \]
              6. associate-/r/N/A

                \[\leadsto \left|eh \cdot \frac{\frac{eh}{\left|eh\right|} \cdot \left|ew\right|}{ew}\right| \]
              7. lower-*.f64N/A

                \[\leadsto \left|eh \cdot \frac{\frac{eh}{\left|eh\right|} \cdot \left|ew\right|}{ew}\right| \]
              8. lower-/.f6442.2%

                \[\leadsto \left|eh \cdot \frac{\frac{eh}{\left|eh\right|} \cdot \left|ew\right|}{ew}\right| \]
            10. Applied rewrites42.2%

              \[\leadsto \left|eh \cdot \frac{\frac{eh}{\left|eh\right|} \cdot \left|ew\right|}{\color{blue}{ew}}\right| \]
          6. Recombined 2 regimes into one program.
          7. Add Preprocessing

          Alternative 6: 60.8% accurate, 7.2× speedup?

          \[\begin{array}{l} t_1 := \left|ew \cdot \sin t\right|\\ \mathbf{if}\;t \leq -31:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 70000000000:\\ \;\;\;\;\left|eh \cdot \frac{\frac{eh}{\left|eh\right|} \cdot \left|ew\right|}{ew}\right|\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
          (FPCore (eh ew t)
            :precision binary64
            (let* ((t_1 (fabs (* ew (sin t)))))
            (if (<= t -31)
              t_1
              (if (<= t 70000000000)
                (fabs (* eh (/ (* (/ eh (fabs eh)) (fabs ew)) ew)))
                t_1))))
          double code(double eh, double ew, double t) {
          	double t_1 = fabs((ew * sin(t)));
          	double tmp;
          	if (t <= -31.0) {
          		tmp = t_1;
          	} else if (t <= 70000000000.0) {
          		tmp = fabs((eh * (((eh / fabs(eh)) * fabs(ew)) / ew)));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(eh, ew, t)
          use fmin_fmax_functions
              real(8), intent (in) :: eh
              real(8), intent (in) :: ew
              real(8), intent (in) :: t
              real(8) :: t_1
              real(8) :: tmp
              t_1 = abs((ew * sin(t)))
              if (t <= (-31.0d0)) then
                  tmp = t_1
              else if (t <= 70000000000.0d0) then
                  tmp = abs((eh * (((eh / abs(eh)) * abs(ew)) / ew)))
              else
                  tmp = t_1
              end if
              code = tmp
          end function
          
          public static double code(double eh, double ew, double t) {
          	double t_1 = Math.abs((ew * Math.sin(t)));
          	double tmp;
          	if (t <= -31.0) {
          		tmp = t_1;
          	} else if (t <= 70000000000.0) {
          		tmp = Math.abs((eh * (((eh / Math.abs(eh)) * Math.abs(ew)) / ew)));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(eh, ew, t):
          	t_1 = math.fabs((ew * math.sin(t)))
          	tmp = 0
          	if t <= -31.0:
          		tmp = t_1
          	elif t <= 70000000000.0:
          		tmp = math.fabs((eh * (((eh / math.fabs(eh)) * math.fabs(ew)) / ew)))
          	else:
          		tmp = t_1
          	return tmp
          
          function code(eh, ew, t)
          	t_1 = abs(Float64(ew * sin(t)))
          	tmp = 0.0
          	if (t <= -31.0)
          		tmp = t_1;
          	elseif (t <= 70000000000.0)
          		tmp = abs(Float64(eh * Float64(Float64(Float64(eh / abs(eh)) * abs(ew)) / ew)));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(eh, ew, t)
          	t_1 = abs((ew * sin(t)));
          	tmp = 0.0;
          	if (t <= -31.0)
          		tmp = t_1;
          	elseif (t <= 70000000000.0)
          		tmp = abs((eh * (((eh / abs(eh)) * abs(ew)) / ew)));
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -31], t$95$1, If[LessEqual[t, 70000000000], N[Abs[N[(eh * N[(N[(N[(eh / N[Abs[eh], $MachinePrecision]), $MachinePrecision] * N[Abs[ew], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          t_1 := \left|ew \cdot \sin t\right|\\
          \mathbf{if}\;t \leq -31:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t \leq 70000000000:\\
          \;\;\;\;\left|eh \cdot \frac{\frac{eh}{\left|eh\right|} \cdot \left|ew\right|}{ew}\right|\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if t < -31 or 7e10 < t

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left|\color{blue}{\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            5. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              2. lower-pow.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              3. lower-*.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \color{blue}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              4. lower-sqrt.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              5. lower-/.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              6. lower-pow.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              7. lower-pow.f6411.5%

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            6. Applied rewrites11.5%

              \[\leadsto \left|\color{blue}{\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            7. Taylor expanded in eh around 0

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

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

                \[\leadsto \left|ew \cdot \sin t\right| \]
            9. Applied rewrites41.6%

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

            if -31 < t < 7e10

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left|\color{blue}{\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            5. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              2. lower-pow.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              3. lower-*.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \color{blue}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              4. lower-sqrt.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              5. lower-/.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              6. lower-pow.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              7. lower-pow.f6411.5%

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            6. Applied rewrites11.5%

              \[\leadsto \left|\color{blue}{\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            7. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              2. lift-pow.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              3. pow2N/A

                \[\leadsto \left|\frac{eh \cdot eh}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              4. associate-/l*N/A

                \[\leadsto \left|eh \cdot \color{blue}{\frac{eh}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              5. lower-*.f64N/A

                \[\leadsto \left|eh \cdot \color{blue}{\frac{eh}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              6. lower-/.f6412.5%

                \[\leadsto \left|eh \cdot \frac{eh}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              7. lift-*.f64N/A

                \[\leadsto \left|eh \cdot \frac{eh}{ew \cdot \color{blue}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              8. *-commutativeN/A

                \[\leadsto \left|eh \cdot \frac{eh}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}} \cdot \color{blue}{ew}}\right| \]
              9. lower-*.f6412.5%

                \[\leadsto \left|eh \cdot \frac{eh}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}} \cdot \color{blue}{ew}}\right| \]
            8. Applied rewrites35.3%

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

                \[\leadsto \left|eh \cdot \frac{eh}{\color{blue}{\frac{\left|eh\right|}{\left|ew\right|} \cdot ew}}\right| \]
              2. lift-*.f64N/A

                \[\leadsto \left|eh \cdot \frac{eh}{\frac{\left|eh\right|}{\left|ew\right|} \cdot \color{blue}{ew}}\right| \]
              3. associate-/r*N/A

                \[\leadsto \left|eh \cdot \frac{\frac{eh}{\frac{\left|eh\right|}{\left|ew\right|}}}{\color{blue}{ew}}\right| \]
              4. lower-/.f64N/A

                \[\leadsto \left|eh \cdot \frac{\frac{eh}{\frac{\left|eh\right|}{\left|ew\right|}}}{\color{blue}{ew}}\right| \]
              5. lift-/.f64N/A

                \[\leadsto \left|eh \cdot \frac{\frac{eh}{\frac{\left|eh\right|}{\left|ew\right|}}}{ew}\right| \]
              6. associate-/r/N/A

                \[\leadsto \left|eh \cdot \frac{\frac{eh}{\left|eh\right|} \cdot \left|ew\right|}{ew}\right| \]
              7. lower-*.f64N/A

                \[\leadsto \left|eh \cdot \frac{\frac{eh}{\left|eh\right|} \cdot \left|ew\right|}{ew}\right| \]
              8. lower-/.f6442.2%

                \[\leadsto \left|eh \cdot \frac{\frac{eh}{\left|eh\right|} \cdot \left|ew\right|}{ew}\right| \]
            10. Applied rewrites42.2%

              \[\leadsto \left|eh \cdot \frac{\frac{eh}{\left|eh\right|} \cdot \left|ew\right|}{\color{blue}{ew}}\right| \]
          3. Recombined 2 regimes into one program.
          4. Add Preprocessing

          Alternative 7: 42.2% accurate, 22.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left|\color{blue}{\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
          5. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            2. lower-pow.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            3. lower-*.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \color{blue}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            4. lower-sqrt.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            5. lower-/.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            6. lower-pow.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            7. lower-pow.f6411.5%

              \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
          6. Applied rewrites11.5%

            \[\leadsto \left|\color{blue}{\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
          7. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            2. lift-pow.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            3. pow2N/A

              \[\leadsto \left|\frac{eh \cdot eh}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            4. associate-/l*N/A

              \[\leadsto \left|eh \cdot \color{blue}{\frac{eh}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            5. lower-*.f64N/A

              \[\leadsto \left|eh \cdot \color{blue}{\frac{eh}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            6. lower-/.f6412.5%

              \[\leadsto \left|eh \cdot \frac{eh}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            7. lift-*.f64N/A

              \[\leadsto \left|eh \cdot \frac{eh}{ew \cdot \color{blue}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            8. *-commutativeN/A

              \[\leadsto \left|eh \cdot \frac{eh}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}} \cdot \color{blue}{ew}}\right| \]
            9. lower-*.f6412.5%

              \[\leadsto \left|eh \cdot \frac{eh}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}} \cdot \color{blue}{ew}}\right| \]
          8. Applied rewrites35.3%

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

              \[\leadsto \left|eh \cdot \frac{eh}{\color{blue}{\frac{\left|eh\right|}{\left|ew\right|} \cdot ew}}\right| \]
            2. lift-*.f64N/A

              \[\leadsto \left|eh \cdot \frac{eh}{\frac{\left|eh\right|}{\left|ew\right|} \cdot \color{blue}{ew}}\right| \]
            3. associate-/r*N/A

              \[\leadsto \left|eh \cdot \frac{\frac{eh}{\frac{\left|eh\right|}{\left|ew\right|}}}{\color{blue}{ew}}\right| \]
            4. lower-/.f64N/A

              \[\leadsto \left|eh \cdot \frac{\frac{eh}{\frac{\left|eh\right|}{\left|ew\right|}}}{\color{blue}{ew}}\right| \]
            5. lift-/.f64N/A

              \[\leadsto \left|eh \cdot \frac{\frac{eh}{\frac{\left|eh\right|}{\left|ew\right|}}}{ew}\right| \]
            6. associate-/r/N/A

              \[\leadsto \left|eh \cdot \frac{\frac{eh}{\left|eh\right|} \cdot \left|ew\right|}{ew}\right| \]
            7. lower-*.f64N/A

              \[\leadsto \left|eh \cdot \frac{\frac{eh}{\left|eh\right|} \cdot \left|ew\right|}{ew}\right| \]
            8. lower-/.f6442.2%

              \[\leadsto \left|eh \cdot \frac{\frac{eh}{\left|eh\right|} \cdot \left|ew\right|}{ew}\right| \]
          10. Applied rewrites42.2%

            \[\leadsto \left|eh \cdot \frac{\frac{eh}{\left|eh\right|} \cdot \left|ew\right|}{\color{blue}{ew}}\right| \]
          11. Add Preprocessing

          Alternative 8: 35.8% accurate, 19.3× speedup?

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

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left|\color{blue}{\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            5. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              2. lower-pow.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              3. lower-*.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \color{blue}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              4. lower-sqrt.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              5. lower-/.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              6. lower-pow.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              7. lower-pow.f6411.5%

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            6. Applied rewrites11.5%

              \[\leadsto \left|\color{blue}{\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            7. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              2. lift-pow.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              3. pow2N/A

                \[\leadsto \left|\frac{eh \cdot eh}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              4. associate-/l*N/A

                \[\leadsto \left|eh \cdot \color{blue}{\frac{eh}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              5. lower-*.f64N/A

                \[\leadsto \left|eh \cdot \color{blue}{\frac{eh}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              6. lower-/.f6412.5%

                \[\leadsto \left|eh \cdot \frac{eh}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              7. lift-*.f64N/A

                \[\leadsto \left|eh \cdot \frac{eh}{ew \cdot \color{blue}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              8. *-commutativeN/A

                \[\leadsto \left|eh \cdot \frac{eh}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}} \cdot \color{blue}{ew}}\right| \]
              9. lower-*.f6412.5%

                \[\leadsto \left|eh \cdot \frac{eh}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}} \cdot \color{blue}{ew}}\right| \]
            8. Applied rewrites35.3%

              \[\leadsto \left|eh \cdot \color{blue}{\frac{eh}{\frac{\left|eh\right|}{\left|ew\right|} \cdot ew}}\right| \]
            9. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \left|eh \cdot \frac{eh}{\frac{\left|eh\right|}{\left|ew\right|} \cdot \color{blue}{ew}}\right| \]
              2. lift-/.f64N/A

                \[\leadsto \left|eh \cdot \frac{eh}{\frac{\left|eh\right|}{\left|ew\right|} \cdot ew}\right| \]
              3. associate-*l/N/A

                \[\leadsto \left|eh \cdot \frac{eh}{\frac{\left|eh\right| \cdot ew}{\color{blue}{\left|ew\right|}}}\right| \]
              4. lower-/.f64N/A

                \[\leadsto \left|eh \cdot \frac{eh}{\frac{\left|eh\right| \cdot ew}{\color{blue}{\left|ew\right|}}}\right| \]
              5. lower-*.f6430.9%

                \[\leadsto \left|eh \cdot \frac{eh}{\frac{\left|eh\right| \cdot ew}{\left|\color{blue}{ew}\right|}}\right| \]
            10. Applied rewrites30.9%

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

            if -4.0000000000000003e54 < eh

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left|\color{blue}{\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            5. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              2. lower-pow.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              3. lower-*.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \color{blue}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              4. lower-sqrt.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              5. lower-/.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              6. lower-pow.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              7. lower-pow.f6411.5%

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            6. Applied rewrites11.5%

              \[\leadsto \left|\color{blue}{\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            7. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              2. lift-pow.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              3. pow2N/A

                \[\leadsto \left|\frac{eh \cdot eh}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              4. associate-/l*N/A

                \[\leadsto \left|eh \cdot \color{blue}{\frac{eh}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              5. lower-*.f64N/A

                \[\leadsto \left|eh \cdot \color{blue}{\frac{eh}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              6. lower-/.f6412.5%

                \[\leadsto \left|eh \cdot \frac{eh}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              7. lift-*.f64N/A

                \[\leadsto \left|eh \cdot \frac{eh}{ew \cdot \color{blue}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              8. *-commutativeN/A

                \[\leadsto \left|eh \cdot \frac{eh}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}} \cdot \color{blue}{ew}}\right| \]
              9. lower-*.f6412.5%

                \[\leadsto \left|eh \cdot \frac{eh}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}} \cdot \color{blue}{ew}}\right| \]
            8. Applied rewrites35.3%

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

                \[\leadsto \left|eh \cdot \frac{eh}{\frac{\left|eh\right|}{\left|ew\right|} \cdot ew}\right| \]
              2. lift-fabs.f64N/A

                \[\leadsto \left|eh \cdot \frac{eh}{\frac{\left|eh\right|}{\left|ew\right|} \cdot ew}\right| \]
              3. lift-fabs.f64N/A

                \[\leadsto \left|eh \cdot \frac{eh}{\frac{\left|eh\right|}{\left|ew\right|} \cdot ew}\right| \]
              4. div-fabsN/A

                \[\leadsto \left|eh \cdot \frac{eh}{\left|\frac{eh}{ew}\right| \cdot ew}\right| \]
              5. lower-fabs.f64N/A

                \[\leadsto \left|eh \cdot \frac{eh}{\left|\frac{eh}{ew}\right| \cdot ew}\right| \]
              6. lower-/.f6435.3%

                \[\leadsto \left|eh \cdot \frac{eh}{\left|\frac{eh}{ew}\right| \cdot ew}\right| \]
            10. Applied rewrites35.3%

              \[\leadsto \left|eh \cdot \frac{eh}{\left|\frac{eh}{ew}\right| \cdot ew}\right| \]
          3. Recombined 2 regimes into one program.
          4. Add Preprocessing

          Alternative 9: 35.8% accurate, 20.2× speedup?

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

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left|\color{blue}{\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            5. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              2. lower-pow.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              3. lower-*.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \color{blue}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              4. lower-sqrt.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              5. lower-/.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              6. lower-pow.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              7. lower-pow.f6411.5%

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            6. Applied rewrites11.5%

              \[\leadsto \left|\color{blue}{\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            7. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              2. lift-pow.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              3. pow2N/A

                \[\leadsto \left|\frac{eh \cdot eh}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              4. associate-/l*N/A

                \[\leadsto \left|eh \cdot \color{blue}{\frac{eh}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              5. lower-*.f64N/A

                \[\leadsto \left|eh \cdot \color{blue}{\frac{eh}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              6. lower-/.f6412.5%

                \[\leadsto \left|eh \cdot \frac{eh}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              7. lift-*.f64N/A

                \[\leadsto \left|eh \cdot \frac{eh}{ew \cdot \color{blue}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              8. *-commutativeN/A

                \[\leadsto \left|eh \cdot \frac{eh}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}} \cdot \color{blue}{ew}}\right| \]
              9. lower-*.f6412.5%

                \[\leadsto \left|eh \cdot \frac{eh}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}} \cdot \color{blue}{ew}}\right| \]
            8. Applied rewrites35.3%

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

                \[\leadsto \left|eh \cdot \frac{eh}{\color{blue}{\frac{\left|eh\right|}{\left|ew\right|} \cdot ew}}\right| \]
              2. mult-flipN/A

                \[\leadsto \left|eh \cdot \left(eh \cdot \color{blue}{\frac{1}{\frac{\left|eh\right|}{\left|ew\right|} \cdot ew}}\right)\right| \]
              3. *-commutativeN/A

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

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

                \[\leadsto \left|eh \cdot \left(\frac{1}{\frac{\left|eh\right|}{\left|ew\right|} \cdot ew} \cdot eh\right)\right| \]
              6. lift-/.f64N/A

                \[\leadsto \left|eh \cdot \left(\frac{1}{\frac{\left|eh\right|}{\left|ew\right|} \cdot ew} \cdot eh\right)\right| \]
              7. associate-*l/N/A

                \[\leadsto \left|eh \cdot \left(\frac{1}{\frac{\left|eh\right| \cdot ew}{\left|ew\right|}} \cdot eh\right)\right| \]
              8. div-flip-revN/A

                \[\leadsto \left|eh \cdot \left(\frac{\left|ew\right|}{\left|eh\right| \cdot ew} \cdot eh\right)\right| \]
              9. lower-/.f64N/A

                \[\leadsto \left|eh \cdot \left(\frac{\left|ew\right|}{\left|eh\right| \cdot ew} \cdot eh\right)\right| \]
              10. lower-*.f6430.9%

                \[\leadsto \left|eh \cdot \left(\frac{\left|ew\right|}{\left|eh\right| \cdot ew} \cdot eh\right)\right| \]
            10. Applied rewrites30.9%

              \[\leadsto \left|eh \cdot \left(\frac{\left|ew\right|}{\left|eh\right| \cdot ew} \cdot \color{blue}{eh}\right)\right| \]

            if -4.0000000000000003e54 < eh

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left|\color{blue}{\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            5. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              2. lower-pow.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              3. lower-*.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \color{blue}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              4. lower-sqrt.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              5. lower-/.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              6. lower-pow.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              7. lower-pow.f6411.5%

                \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            6. Applied rewrites11.5%

              \[\leadsto \left|\color{blue}{\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            7. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              2. lift-pow.f64N/A

                \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              3. pow2N/A

                \[\leadsto \left|\frac{eh \cdot eh}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
              4. associate-/l*N/A

                \[\leadsto \left|eh \cdot \color{blue}{\frac{eh}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              5. lower-*.f64N/A

                \[\leadsto \left|eh \cdot \color{blue}{\frac{eh}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              6. lower-/.f6412.5%

                \[\leadsto \left|eh \cdot \frac{eh}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              7. lift-*.f64N/A

                \[\leadsto \left|eh \cdot \frac{eh}{ew \cdot \color{blue}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
              8. *-commutativeN/A

                \[\leadsto \left|eh \cdot \frac{eh}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}} \cdot \color{blue}{ew}}\right| \]
              9. lower-*.f6412.5%

                \[\leadsto \left|eh \cdot \frac{eh}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}} \cdot \color{blue}{ew}}\right| \]
            8. Applied rewrites35.3%

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

                \[\leadsto \left|eh \cdot \frac{eh}{\frac{\left|eh\right|}{\left|ew\right|} \cdot ew}\right| \]
              2. lift-fabs.f64N/A

                \[\leadsto \left|eh \cdot \frac{eh}{\frac{\left|eh\right|}{\left|ew\right|} \cdot ew}\right| \]
              3. lift-fabs.f64N/A

                \[\leadsto \left|eh \cdot \frac{eh}{\frac{\left|eh\right|}{\left|ew\right|} \cdot ew}\right| \]
              4. div-fabsN/A

                \[\leadsto \left|eh \cdot \frac{eh}{\left|\frac{eh}{ew}\right| \cdot ew}\right| \]
              5. lower-fabs.f64N/A

                \[\leadsto \left|eh \cdot \frac{eh}{\left|\frac{eh}{ew}\right| \cdot ew}\right| \]
              6. lower-/.f6435.3%

                \[\leadsto \left|eh \cdot \frac{eh}{\left|\frac{eh}{ew}\right| \cdot ew}\right| \]
            10. Applied rewrites35.3%

              \[\leadsto \left|eh \cdot \frac{eh}{\left|\frac{eh}{ew}\right| \cdot ew}\right| \]
          3. Recombined 2 regimes into one program.
          4. Add Preprocessing

          Alternative 10: 30.8% accurate, 26.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left|\color{blue}{\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
          5. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            2. lower-pow.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            3. lower-*.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \color{blue}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            4. lower-sqrt.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            5. lower-/.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            6. lower-pow.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            7. lower-pow.f6411.5%

              \[\leadsto \left|\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
          6. Applied rewrites11.5%

            \[\leadsto \left|\color{blue}{\frac{{eh}^{2}}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
          7. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            2. lift-pow.f64N/A

              \[\leadsto \left|\frac{{eh}^{2}}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            3. pow2N/A

              \[\leadsto \left|\frac{eh \cdot eh}{\color{blue}{ew} \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}\right| \]
            4. associate-/l*N/A

              \[\leadsto \left|eh \cdot \color{blue}{\frac{eh}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            5. lower-*.f64N/A

              \[\leadsto \left|eh \cdot \color{blue}{\frac{eh}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            6. lower-/.f6412.5%

              \[\leadsto \left|eh \cdot \frac{eh}{\color{blue}{ew \cdot \sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            7. lift-*.f64N/A

              \[\leadsto \left|eh \cdot \frac{eh}{ew \cdot \color{blue}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}}}}\right| \]
            8. *-commutativeN/A

              \[\leadsto \left|eh \cdot \frac{eh}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}} \cdot \color{blue}{ew}}\right| \]
            9. lower-*.f6412.5%

              \[\leadsto \left|eh \cdot \frac{eh}{\sqrt{\frac{{eh}^{2}}{{ew}^{2}}} \cdot \color{blue}{ew}}\right| \]
          8. Applied rewrites35.3%

            \[\leadsto \left|eh \cdot \color{blue}{\frac{eh}{\frac{\left|eh\right|}{\left|ew\right|} \cdot ew}}\right| \]
          9. Taylor expanded in eh around 0

            \[\leadsto \left|eh \cdot \frac{eh \cdot \left|ew\right|}{\color{blue}{ew \cdot \left|eh\right|}}\right| \]
          10. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \left|eh \cdot \frac{eh \cdot \left|ew\right|}{ew \cdot \color{blue}{\left|eh\right|}}\right| \]
            2. lower-*.f64N/A

              \[\leadsto \left|eh \cdot \frac{eh \cdot \left|ew\right|}{ew \cdot \left|\color{blue}{eh}\right|}\right| \]
            3. lower-fabs.f64N/A

              \[\leadsto \left|eh \cdot \frac{eh \cdot \left|ew\right|}{ew \cdot \left|eh\right|}\right| \]
            4. lower-*.f64N/A

              \[\leadsto \left|eh \cdot \frac{eh \cdot \left|ew\right|}{ew \cdot \left|eh\right|}\right| \]
            5. lower-fabs.f6430.8%

              \[\leadsto \left|eh \cdot \frac{eh \cdot \left|ew\right|}{ew \cdot \left|eh\right|}\right| \]
          11. Applied rewrites30.8%

            \[\leadsto \left|eh \cdot \frac{eh \cdot \left|ew\right|}{\color{blue}{ew \cdot \left|eh\right|}}\right| \]
          12. Add Preprocessing

          Reproduce

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