(- (/ z0 (+ (/ z3 (* z4 z4)) (/ z1 (* z2 z2)))) (* (* (/ z0 (+ (* (* (/ z3 (* z4 z4)) z2) z2) z1)) (* (- -1/2 (* (- (* 1/4 z0) -3333333333333333/10000000000000000) z0)) z0)) (* z2 z2)))

Percentage Accurate: 51.9% → 73.1%
Time: 5.8s
Alternatives: 18
Speedup: 1.3×

Specification

?
\[\begin{array}{l} t_0 := \frac{z3}{z4 \cdot z4}\\ \frac{z0}{t\_0 + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(t\_0 \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \end{array} \]
(FPCore (z0 z3 z4 z1 z2)
  :precision binary64
  (let* ((t_0 (/ z3 (* z4 z4))))
  (-
   (/ z0 (+ t_0 (/ z1 (* z2 z2))))
   (*
    (*
     (/ z0 (+ (* (* t_0 z2) z2) z1))
     (* (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0)) z0))
    (* z2 z2)))))
double code(double z0, double z3, double z4, double z1, double z2) {
	double t_0 = z3 / (z4 * z4);
	return (z0 / (t_0 + (z1 / (z2 * z2)))) - (((z0 / (((t_0 * z2) * z2) + z1)) * ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0)) * (z2 * z2));
}
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(z0, z3, z4, z1, z2)
use fmin_fmax_functions
    real(8), intent (in) :: z0
    real(8), intent (in) :: z3
    real(8), intent (in) :: z4
    real(8), intent (in) :: z1
    real(8), intent (in) :: z2
    real(8) :: t_0
    t_0 = z3 / (z4 * z4)
    code = (z0 / (t_0 + (z1 / (z2 * z2)))) - (((z0 / (((t_0 * z2) * z2) + z1)) * (((-0.5d0) - (((0.25d0 * z0) - (-0.3333333333333333d0)) * z0)) * z0)) * (z2 * z2))
end function
public static double code(double z0, double z3, double z4, double z1, double z2) {
	double t_0 = z3 / (z4 * z4);
	return (z0 / (t_0 + (z1 / (z2 * z2)))) - (((z0 / (((t_0 * z2) * z2) + z1)) * ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0)) * (z2 * z2));
}
def code(z0, z3, z4, z1, z2):
	t_0 = z3 / (z4 * z4)
	return (z0 / (t_0 + (z1 / (z2 * z2)))) - (((z0 / (((t_0 * z2) * z2) + z1)) * ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0)) * (z2 * z2))
function code(z0, z3, z4, z1, z2)
	t_0 = Float64(z3 / Float64(z4 * z4))
	return Float64(Float64(z0 / Float64(t_0 + Float64(z1 / Float64(z2 * z2)))) - Float64(Float64(Float64(z0 / Float64(Float64(Float64(t_0 * z2) * z2) + z1)) * Float64(Float64(-0.5 - Float64(Float64(Float64(0.25 * z0) - -0.3333333333333333) * z0)) * z0)) * Float64(z2 * z2)))
end
function tmp = code(z0, z3, z4, z1, z2)
	t_0 = z3 / (z4 * z4);
	tmp = (z0 / (t_0 + (z1 / (z2 * z2)))) - (((z0 / (((t_0 * z2) * z2) + z1)) * ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0)) * (z2 * z2));
end
code[z0_, z3_, z4_, z1_, z2_] := Block[{t$95$0 = N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision]}, N[(N[(z0 / N[(t$95$0 + N[(z1 / N[(z2 * z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(z0 / N[(N[(N[(t$95$0 * z2), $MachinePrecision] * z2), $MachinePrecision] + z1), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.5 - N[(N[(N[(0.25 * z0), $MachinePrecision] - -0.3333333333333333), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision] * N[(z2 * z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
t_0 := \frac{z3}{z4 \cdot z4}\\
\frac{z0}{t\_0 + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(t\_0 \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\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 18 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: 51.9% accurate, 1.0× speedup?

\[\begin{array}{l} t_0 := \frac{z3}{z4 \cdot z4}\\ \frac{z0}{t\_0 + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(t\_0 \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \end{array} \]
(FPCore (z0 z3 z4 z1 z2)
  :precision binary64
  (let* ((t_0 (/ z3 (* z4 z4))))
  (-
   (/ z0 (+ t_0 (/ z1 (* z2 z2))))
   (*
    (*
     (/ z0 (+ (* (* t_0 z2) z2) z1))
     (* (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0)) z0))
    (* z2 z2)))))
double code(double z0, double z3, double z4, double z1, double z2) {
	double t_0 = z3 / (z4 * z4);
	return (z0 / (t_0 + (z1 / (z2 * z2)))) - (((z0 / (((t_0 * z2) * z2) + z1)) * ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0)) * (z2 * z2));
}
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(z0, z3, z4, z1, z2)
use fmin_fmax_functions
    real(8), intent (in) :: z0
    real(8), intent (in) :: z3
    real(8), intent (in) :: z4
    real(8), intent (in) :: z1
    real(8), intent (in) :: z2
    real(8) :: t_0
    t_0 = z3 / (z4 * z4)
    code = (z0 / (t_0 + (z1 / (z2 * z2)))) - (((z0 / (((t_0 * z2) * z2) + z1)) * (((-0.5d0) - (((0.25d0 * z0) - (-0.3333333333333333d0)) * z0)) * z0)) * (z2 * z2))
end function
public static double code(double z0, double z3, double z4, double z1, double z2) {
	double t_0 = z3 / (z4 * z4);
	return (z0 / (t_0 + (z1 / (z2 * z2)))) - (((z0 / (((t_0 * z2) * z2) + z1)) * ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0)) * (z2 * z2));
}
def code(z0, z3, z4, z1, z2):
	t_0 = z3 / (z4 * z4)
	return (z0 / (t_0 + (z1 / (z2 * z2)))) - (((z0 / (((t_0 * z2) * z2) + z1)) * ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0)) * (z2 * z2))
function code(z0, z3, z4, z1, z2)
	t_0 = Float64(z3 / Float64(z4 * z4))
	return Float64(Float64(z0 / Float64(t_0 + Float64(z1 / Float64(z2 * z2)))) - Float64(Float64(Float64(z0 / Float64(Float64(Float64(t_0 * z2) * z2) + z1)) * Float64(Float64(-0.5 - Float64(Float64(Float64(0.25 * z0) - -0.3333333333333333) * z0)) * z0)) * Float64(z2 * z2)))
end
function tmp = code(z0, z3, z4, z1, z2)
	t_0 = z3 / (z4 * z4);
	tmp = (z0 / (t_0 + (z1 / (z2 * z2)))) - (((z0 / (((t_0 * z2) * z2) + z1)) * ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0)) * (z2 * z2));
end
code[z0_, z3_, z4_, z1_, z2_] := Block[{t$95$0 = N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision]}, N[(N[(z0 / N[(t$95$0 + N[(z1 / N[(z2 * z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(z0 / N[(N[(N[(t$95$0 * z2), $MachinePrecision] * z2), $MachinePrecision] + z1), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.5 - N[(N[(N[(0.25 * z0), $MachinePrecision] - -0.3333333333333333), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision] * N[(z2 * z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
t_0 := \frac{z3}{z4 \cdot z4}\\
\frac{z0}{t\_0 + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(t\_0 \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)
\end{array}

Alternative 1: 73.1% accurate, 0.4× speedup?

\[\begin{array}{l} t_0 := \frac{z3}{z4 \cdot z4}\\ t_1 := \left(\left|z2\right| \cdot t\_0\right) \cdot \left|z2\right| + z1\\ t_2 := \left|z2\right| \cdot \left|z2\right|\\ t_3 := -0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\\ \mathbf{if}\;\left|z2\right| \leq 8 \cdot 10^{-59}:\\ \;\;\;\;\frac{\frac{t\_2}{t\_1} \cdot z1 - \frac{1}{z0} \cdot \left(z0 \cdot \left(\left(t\_3 \cdot \left|z2\right|\right) \cdot \left(\left|z2\right| \cdot z0\right)\right)\right)}{\frac{1}{z0} \cdot z1}\\ \mathbf{elif}\;\left|z2\right| \leq 1.18 \cdot 10^{+235}:\\ \;\;\;\;\frac{z0}{t\_0 + \frac{\frac{z1}{\left|z2\right|}}{\left|z2\right|}} - \left(\left(t\_3 \cdot \frac{z0}{t\_1}\right) \cdot \left(z0 \cdot \left|z2\right|\right)\right) \cdot \left|z2\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{z0}{t\_0 + \frac{z1}{t\_2}} - -1 \cdot \frac{{z0}^{2} \cdot \left({z4}^{2} \cdot \left(0.5 + z0 \cdot \left(0.3333333333333333 + 0.25 \cdot z0\right)\right)\right)}{z3}\\ \end{array} \]
(FPCore (z0 z3 z4 z1 z2)
  :precision binary64
  (let* ((t_0 (/ z3 (* z4 z4)))
       (t_1 (+ (* (* (fabs z2) t_0) (fabs z2)) z1))
       (t_2 (* (fabs z2) (fabs z2)))
       (t_3 (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0))))
  (if (<= (fabs z2) 8e-59)
    (/
     (-
      (* (/ t_2 t_1) z1)
      (* (/ 1.0 z0) (* z0 (* (* t_3 (fabs z2)) (* (fabs z2) z0)))))
     (* (/ 1.0 z0) z1))
    (if (<= (fabs z2) 1.18e+235)
      (-
       (/ z0 (+ t_0 (/ (/ z1 (fabs z2)) (fabs z2))))
       (* (* (* t_3 (/ z0 t_1)) (* z0 (fabs z2))) (fabs z2)))
      (-
       (/ z0 (+ t_0 (/ z1 t_2)))
       (*
        -1.0
        (/
         (*
          (pow z0 2.0)
          (*
           (pow z4 2.0)
           (+ 0.5 (* z0 (+ 0.3333333333333333 (* 0.25 z0))))))
         z3)))))))
double code(double z0, double z3, double z4, double z1, double z2) {
	double t_0 = z3 / (z4 * z4);
	double t_1 = ((fabs(z2) * t_0) * fabs(z2)) + z1;
	double t_2 = fabs(z2) * fabs(z2);
	double t_3 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
	double tmp;
	if (fabs(z2) <= 8e-59) {
		tmp = (((t_2 / t_1) * z1) - ((1.0 / z0) * (z0 * ((t_3 * fabs(z2)) * (fabs(z2) * z0))))) / ((1.0 / z0) * z1);
	} else if (fabs(z2) <= 1.18e+235) {
		tmp = (z0 / (t_0 + ((z1 / fabs(z2)) / fabs(z2)))) - (((t_3 * (z0 / t_1)) * (z0 * fabs(z2))) * fabs(z2));
	} else {
		tmp = (z0 / (t_0 + (z1 / t_2))) - (-1.0 * ((pow(z0, 2.0) * (pow(z4, 2.0) * (0.5 + (z0 * (0.3333333333333333 + (0.25 * z0)))))) / z3));
	}
	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(z0, z3, z4, z1, z2)
use fmin_fmax_functions
    real(8), intent (in) :: z0
    real(8), intent (in) :: z3
    real(8), intent (in) :: z4
    real(8), intent (in) :: z1
    real(8), intent (in) :: z2
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_0 = z3 / (z4 * z4)
    t_1 = ((abs(z2) * t_0) * abs(z2)) + z1
    t_2 = abs(z2) * abs(z2)
    t_3 = (-0.5d0) - (((0.25d0 * z0) - (-0.3333333333333333d0)) * z0)
    if (abs(z2) <= 8d-59) then
        tmp = (((t_2 / t_1) * z1) - ((1.0d0 / z0) * (z0 * ((t_3 * abs(z2)) * (abs(z2) * z0))))) / ((1.0d0 / z0) * z1)
    else if (abs(z2) <= 1.18d+235) then
        tmp = (z0 / (t_0 + ((z1 / abs(z2)) / abs(z2)))) - (((t_3 * (z0 / t_1)) * (z0 * abs(z2))) * abs(z2))
    else
        tmp = (z0 / (t_0 + (z1 / t_2))) - ((-1.0d0) * (((z0 ** 2.0d0) * ((z4 ** 2.0d0) * (0.5d0 + (z0 * (0.3333333333333333d0 + (0.25d0 * z0)))))) / z3))
    end if
    code = tmp
end function
public static double code(double z0, double z3, double z4, double z1, double z2) {
	double t_0 = z3 / (z4 * z4);
	double t_1 = ((Math.abs(z2) * t_0) * Math.abs(z2)) + z1;
	double t_2 = Math.abs(z2) * Math.abs(z2);
	double t_3 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
	double tmp;
	if (Math.abs(z2) <= 8e-59) {
		tmp = (((t_2 / t_1) * z1) - ((1.0 / z0) * (z0 * ((t_3 * Math.abs(z2)) * (Math.abs(z2) * z0))))) / ((1.0 / z0) * z1);
	} else if (Math.abs(z2) <= 1.18e+235) {
		tmp = (z0 / (t_0 + ((z1 / Math.abs(z2)) / Math.abs(z2)))) - (((t_3 * (z0 / t_1)) * (z0 * Math.abs(z2))) * Math.abs(z2));
	} else {
		tmp = (z0 / (t_0 + (z1 / t_2))) - (-1.0 * ((Math.pow(z0, 2.0) * (Math.pow(z4, 2.0) * (0.5 + (z0 * (0.3333333333333333 + (0.25 * z0)))))) / z3));
	}
	return tmp;
}
def code(z0, z3, z4, z1, z2):
	t_0 = z3 / (z4 * z4)
	t_1 = ((math.fabs(z2) * t_0) * math.fabs(z2)) + z1
	t_2 = math.fabs(z2) * math.fabs(z2)
	t_3 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)
	tmp = 0
	if math.fabs(z2) <= 8e-59:
		tmp = (((t_2 / t_1) * z1) - ((1.0 / z0) * (z0 * ((t_3 * math.fabs(z2)) * (math.fabs(z2) * z0))))) / ((1.0 / z0) * z1)
	elif math.fabs(z2) <= 1.18e+235:
		tmp = (z0 / (t_0 + ((z1 / math.fabs(z2)) / math.fabs(z2)))) - (((t_3 * (z0 / t_1)) * (z0 * math.fabs(z2))) * math.fabs(z2))
	else:
		tmp = (z0 / (t_0 + (z1 / t_2))) - (-1.0 * ((math.pow(z0, 2.0) * (math.pow(z4, 2.0) * (0.5 + (z0 * (0.3333333333333333 + (0.25 * z0)))))) / z3))
	return tmp
function code(z0, z3, z4, z1, z2)
	t_0 = Float64(z3 / Float64(z4 * z4))
	t_1 = Float64(Float64(Float64(abs(z2) * t_0) * abs(z2)) + z1)
	t_2 = Float64(abs(z2) * abs(z2))
	t_3 = Float64(-0.5 - Float64(Float64(Float64(0.25 * z0) - -0.3333333333333333) * z0))
	tmp = 0.0
	if (abs(z2) <= 8e-59)
		tmp = Float64(Float64(Float64(Float64(t_2 / t_1) * z1) - Float64(Float64(1.0 / z0) * Float64(z0 * Float64(Float64(t_3 * abs(z2)) * Float64(abs(z2) * z0))))) / Float64(Float64(1.0 / z0) * z1));
	elseif (abs(z2) <= 1.18e+235)
		tmp = Float64(Float64(z0 / Float64(t_0 + Float64(Float64(z1 / abs(z2)) / abs(z2)))) - Float64(Float64(Float64(t_3 * Float64(z0 / t_1)) * Float64(z0 * abs(z2))) * abs(z2)));
	else
		tmp = Float64(Float64(z0 / Float64(t_0 + Float64(z1 / t_2))) - Float64(-1.0 * Float64(Float64((z0 ^ 2.0) * Float64((z4 ^ 2.0) * Float64(0.5 + Float64(z0 * Float64(0.3333333333333333 + Float64(0.25 * z0)))))) / z3)));
	end
	return tmp
end
function tmp_2 = code(z0, z3, z4, z1, z2)
	t_0 = z3 / (z4 * z4);
	t_1 = ((abs(z2) * t_0) * abs(z2)) + z1;
	t_2 = abs(z2) * abs(z2);
	t_3 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
	tmp = 0.0;
	if (abs(z2) <= 8e-59)
		tmp = (((t_2 / t_1) * z1) - ((1.0 / z0) * (z0 * ((t_3 * abs(z2)) * (abs(z2) * z0))))) / ((1.0 / z0) * z1);
	elseif (abs(z2) <= 1.18e+235)
		tmp = (z0 / (t_0 + ((z1 / abs(z2)) / abs(z2)))) - (((t_3 * (z0 / t_1)) * (z0 * abs(z2))) * abs(z2));
	else
		tmp = (z0 / (t_0 + (z1 / t_2))) - (-1.0 * (((z0 ^ 2.0) * ((z4 ^ 2.0) * (0.5 + (z0 * (0.3333333333333333 + (0.25 * z0)))))) / z3));
	end
	tmp_2 = tmp;
end
code[z0_, z3_, z4_, z1_, z2_] := Block[{t$95$0 = N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(N[Abs[z2], $MachinePrecision] * t$95$0), $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision] + z1), $MachinePrecision]}, Block[{t$95$2 = N[(N[Abs[z2], $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-0.5 - N[(N[(N[(0.25 * z0), $MachinePrecision] - -0.3333333333333333), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[z2], $MachinePrecision], 8e-59], N[(N[(N[(N[(t$95$2 / t$95$1), $MachinePrecision] * z1), $MachinePrecision] - N[(N[(1.0 / z0), $MachinePrecision] * N[(z0 * N[(N[(t$95$3 * N[Abs[z2], $MachinePrecision]), $MachinePrecision] * N[(N[Abs[z2], $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 / z0), $MachinePrecision] * z1), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[z2], $MachinePrecision], 1.18e+235], N[(N[(z0 / N[(t$95$0 + N[(N[(z1 / N[Abs[z2], $MachinePrecision]), $MachinePrecision] / N[Abs[z2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t$95$3 * N[(z0 / t$95$1), $MachinePrecision]), $MachinePrecision] * N[(z0 * N[Abs[z2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z0 / N[(t$95$0 + N[(z1 / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-1.0 * N[(N[(N[Power[z0, 2.0], $MachinePrecision] * N[(N[Power[z4, 2.0], $MachinePrecision] * N[(0.5 + N[(z0 * N[(0.3333333333333333 + N[(0.25 * z0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
t_0 := \frac{z3}{z4 \cdot z4}\\
t_1 := \left(\left|z2\right| \cdot t\_0\right) \cdot \left|z2\right| + z1\\
t_2 := \left|z2\right| \cdot \left|z2\right|\\
t_3 := -0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\\
\mathbf{if}\;\left|z2\right| \leq 8 \cdot 10^{-59}:\\
\;\;\;\;\frac{\frac{t\_2}{t\_1} \cdot z1 - \frac{1}{z0} \cdot \left(z0 \cdot \left(\left(t\_3 \cdot \left|z2\right|\right) \cdot \left(\left|z2\right| \cdot z0\right)\right)\right)}{\frac{1}{z0} \cdot z1}\\

\mathbf{elif}\;\left|z2\right| \leq 1.18 \cdot 10^{+235}:\\
\;\;\;\;\frac{z0}{t\_0 + \frac{\frac{z1}{\left|z2\right|}}{\left|z2\right|}} - \left(\left(t\_3 \cdot \frac{z0}{t\_1}\right) \cdot \left(z0 \cdot \left|z2\right|\right)\right) \cdot \left|z2\right|\\

\mathbf{else}:\\
\;\;\;\;\frac{z0}{t\_0 + \frac{z1}{t\_2}} - -1 \cdot \frac{{z0}^{2} \cdot \left({z4}^{2} \cdot \left(0.5 + z0 \cdot \left(0.3333333333333333 + 0.25 \cdot z0\right)\right)\right)}{z3}\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z2 < 8.0000000000000002e-59

    1. Initial program 51.9%

      \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
    2. Taylor expanded in z3 around 0

      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
    3. Step-by-step derivation
      1. Applied rewrites47.3%

        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
      2. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right)} \cdot \left(z2 \cdot z2\right) \]
        3. lift-*.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \color{blue}{\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)}\right) \cdot \left(z2 \cdot z2\right) \]
        4. associate-*r*N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot z0\right)} \cdot \left(z2 \cdot z2\right) \]
        5. associate-*l*N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(z0 \cdot \left(z2 \cdot z2\right)\right)} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(z0 \cdot \left(z2 \cdot z2\right)\right)} \]
        7. lower-*.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right)} \cdot \left(z0 \cdot \left(z2 \cdot z2\right)\right) \]
        8. lift-*.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(z0 \cdot \color{blue}{\left(z2 \cdot z2\right)}\right) \]
        9. associate-*l*N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z0 \cdot z2\right) \cdot z2\right)} \]
        10. lift-*.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\color{blue}{\left(z0 \cdot z2\right)} \cdot z2\right) \]
        11. lower-*.f6452.8%

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z0 \cdot z2\right) \cdot z2\right)} \]
        12. lift-*.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\color{blue}{\left(z0 \cdot z2\right)} \cdot z2\right) \]
        13. *-commutativeN/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\color{blue}{\left(z2 \cdot z0\right)} \cdot z2\right) \]
        14. lower-*.f6452.8%

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\color{blue}{\left(z2 \cdot z0\right)} \cdot z2\right) \]
      3. Applied rewrites52.8%

        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right)} \]
      4. Applied rewrites54.2%

        \[\leadsto \color{blue}{\frac{\frac{z2 \cdot z2}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot z1 - \frac{1}{z0} \cdot \left(z0 \cdot \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z2\right) \cdot \left(z2 \cdot z0\right)\right)\right)}{\frac{1}{z0} \cdot z1}} \]

      if 8.0000000000000002e-59 < z2 < 1.18e235

      1. Initial program 51.9%

        \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
      2. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
        3. associate-*r*N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
        4. lower-*.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
      3. Applied rewrites65.8%

        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2} \]
      4. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{z1}{z2 \cdot z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
        2. lift-*.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{\color{blue}{z2 \cdot z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
        3. associate-/r*N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
        4. lower-/.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
        5. lower-/.f6468.3%

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{\color{blue}{\frac{z1}{z2}}}{z2}} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
      5. Applied rewrites68.3%

        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]

      if 1.18e235 < z2

      1. Initial program 51.9%

        \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
      2. Taylor expanded in z3 around inf

        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{-1 \cdot \frac{{z0}^{2} \cdot \left({z4}^{2} \cdot \left(\frac{1}{2} + z0 \cdot \left(\frac{3333333333333333}{10000000000000000} + \frac{1}{4} \cdot z0\right)\right)\right)}{z3}} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - -1 \cdot \color{blue}{\frac{{z0}^{2} \cdot \left({z4}^{2} \cdot \left(\frac{1}{2} + z0 \cdot \left(\frac{3333333333333333}{10000000000000000} + \frac{1}{4} \cdot z0\right)\right)\right)}{z3}} \]
        2. lower-/.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - -1 \cdot \frac{{z0}^{2} \cdot \left({z4}^{2} \cdot \left(\frac{1}{2} + z0 \cdot \left(\frac{3333333333333333}{10000000000000000} + \frac{1}{4} \cdot z0\right)\right)\right)}{\color{blue}{z3}} \]
        3. lower-*.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - -1 \cdot \frac{{z0}^{2} \cdot \left({z4}^{2} \cdot \left(\frac{1}{2} + z0 \cdot \left(\frac{3333333333333333}{10000000000000000} + \frac{1}{4} \cdot z0\right)\right)\right)}{z3} \]
        4. lower-pow.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - -1 \cdot \frac{{z0}^{2} \cdot \left({z4}^{2} \cdot \left(\frac{1}{2} + z0 \cdot \left(\frac{3333333333333333}{10000000000000000} + \frac{1}{4} \cdot z0\right)\right)\right)}{z3} \]
        5. lower-*.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - -1 \cdot \frac{{z0}^{2} \cdot \left({z4}^{2} \cdot \left(\frac{1}{2} + z0 \cdot \left(\frac{3333333333333333}{10000000000000000} + \frac{1}{4} \cdot z0\right)\right)\right)}{z3} \]
        6. lower-pow.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - -1 \cdot \frac{{z0}^{2} \cdot \left({z4}^{2} \cdot \left(\frac{1}{2} + z0 \cdot \left(\frac{3333333333333333}{10000000000000000} + \frac{1}{4} \cdot z0\right)\right)\right)}{z3} \]
        7. lower-+.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - -1 \cdot \frac{{z0}^{2} \cdot \left({z4}^{2} \cdot \left(\frac{1}{2} + z0 \cdot \left(\frac{3333333333333333}{10000000000000000} + \frac{1}{4} \cdot z0\right)\right)\right)}{z3} \]
        8. lower-*.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - -1 \cdot \frac{{z0}^{2} \cdot \left({z4}^{2} \cdot \left(\frac{1}{2} + z0 \cdot \left(\frac{3333333333333333}{10000000000000000} + \frac{1}{4} \cdot z0\right)\right)\right)}{z3} \]
        9. lower-+.f64N/A

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - -1 \cdot \frac{{z0}^{2} \cdot \left({z4}^{2} \cdot \left(\frac{1}{2} + z0 \cdot \left(\frac{3333333333333333}{10000000000000000} + \frac{1}{4} \cdot z0\right)\right)\right)}{z3} \]
        10. lower-*.f6448.1%

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - -1 \cdot \frac{{z0}^{2} \cdot \left({z4}^{2} \cdot \left(0.5 + z0 \cdot \left(0.3333333333333333 + 0.25 \cdot z0\right)\right)\right)}{z3} \]
      4. Applied rewrites48.1%

        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{-1 \cdot \frac{{z0}^{2} \cdot \left({z4}^{2} \cdot \left(0.5 + z0 \cdot \left(0.3333333333333333 + 0.25 \cdot z0\right)\right)\right)}{z3}} \]
    4. Recombined 3 regimes into one program.
    5. Add Preprocessing

    Alternative 2: 72.9% accurate, 0.8× speedup?

    \[\begin{array}{l} t_0 := \frac{z3}{z4 \cdot z4}\\ t_1 := \left(\left|z2\right| \cdot t\_0\right) \cdot \left|z2\right| + z1\\ t_2 := \left|z2\right| \cdot \left|z2\right|\\ t_3 := \frac{z1}{t\_2}\\ t_4 := -0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\\ \mathbf{if}\;\left|z2\right| \leq 8 \cdot 10^{-59}:\\ \;\;\;\;\frac{\frac{t\_2}{t\_1} \cdot z1 - \frac{1}{z0} \cdot \left(z0 \cdot \left(\left(t\_4 \cdot \left|z2\right|\right) \cdot \left(\left|z2\right| \cdot z0\right)\right)\right)}{\frac{1}{z0} \cdot z1}\\ \mathbf{elif}\;\left|z2\right| \leq 6.5 \cdot 10^{+234}:\\ \;\;\;\;\frac{z0}{t\_0 + \frac{\frac{z1}{\left|z2\right|}}{\left|z2\right|}} - \left(\left(t\_4 \cdot \frac{z0}{t\_1}\right) \cdot \left(z0 \cdot \left|z2\right|\right)\right) \cdot \left|z2\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{z0}{t\_0 + t\_3} - \left(t\_4 \cdot z0\right) \cdot \frac{z0}{t\_3 + t\_0}\\ \end{array} \]
    (FPCore (z0 z3 z4 z1 z2)
      :precision binary64
      (let* ((t_0 (/ z3 (* z4 z4)))
           (t_1 (+ (* (* (fabs z2) t_0) (fabs z2)) z1))
           (t_2 (* (fabs z2) (fabs z2)))
           (t_3 (/ z1 t_2))
           (t_4 (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0))))
      (if (<= (fabs z2) 8e-59)
        (/
         (-
          (* (/ t_2 t_1) z1)
          (* (/ 1.0 z0) (* z0 (* (* t_4 (fabs z2)) (* (fabs z2) z0)))))
         (* (/ 1.0 z0) z1))
        (if (<= (fabs z2) 6.5e+234)
          (-
           (/ z0 (+ t_0 (/ (/ z1 (fabs z2)) (fabs z2))))
           (* (* (* t_4 (/ z0 t_1)) (* z0 (fabs z2))) (fabs z2)))
          (- (/ z0 (+ t_0 t_3)) (* (* t_4 z0) (/ z0 (+ t_3 t_0))))))))
    double code(double z0, double z3, double z4, double z1, double z2) {
    	double t_0 = z3 / (z4 * z4);
    	double t_1 = ((fabs(z2) * t_0) * fabs(z2)) + z1;
    	double t_2 = fabs(z2) * fabs(z2);
    	double t_3 = z1 / t_2;
    	double t_4 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
    	double tmp;
    	if (fabs(z2) <= 8e-59) {
    		tmp = (((t_2 / t_1) * z1) - ((1.0 / z0) * (z0 * ((t_4 * fabs(z2)) * (fabs(z2) * z0))))) / ((1.0 / z0) * z1);
    	} else if (fabs(z2) <= 6.5e+234) {
    		tmp = (z0 / (t_0 + ((z1 / fabs(z2)) / fabs(z2)))) - (((t_4 * (z0 / t_1)) * (z0 * fabs(z2))) * fabs(z2));
    	} else {
    		tmp = (z0 / (t_0 + t_3)) - ((t_4 * z0) * (z0 / (t_3 + t_0)));
    	}
    	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(z0, z3, z4, z1, z2)
    use fmin_fmax_functions
        real(8), intent (in) :: z0
        real(8), intent (in) :: z3
        real(8), intent (in) :: z4
        real(8), intent (in) :: z1
        real(8), intent (in) :: z2
        real(8) :: t_0
        real(8) :: t_1
        real(8) :: t_2
        real(8) :: t_3
        real(8) :: t_4
        real(8) :: tmp
        t_0 = z3 / (z4 * z4)
        t_1 = ((abs(z2) * t_0) * abs(z2)) + z1
        t_2 = abs(z2) * abs(z2)
        t_3 = z1 / t_2
        t_4 = (-0.5d0) - (((0.25d0 * z0) - (-0.3333333333333333d0)) * z0)
        if (abs(z2) <= 8d-59) then
            tmp = (((t_2 / t_1) * z1) - ((1.0d0 / z0) * (z0 * ((t_4 * abs(z2)) * (abs(z2) * z0))))) / ((1.0d0 / z0) * z1)
        else if (abs(z2) <= 6.5d+234) then
            tmp = (z0 / (t_0 + ((z1 / abs(z2)) / abs(z2)))) - (((t_4 * (z0 / t_1)) * (z0 * abs(z2))) * abs(z2))
        else
            tmp = (z0 / (t_0 + t_3)) - ((t_4 * z0) * (z0 / (t_3 + t_0)))
        end if
        code = tmp
    end function
    
    public static double code(double z0, double z3, double z4, double z1, double z2) {
    	double t_0 = z3 / (z4 * z4);
    	double t_1 = ((Math.abs(z2) * t_0) * Math.abs(z2)) + z1;
    	double t_2 = Math.abs(z2) * Math.abs(z2);
    	double t_3 = z1 / t_2;
    	double t_4 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
    	double tmp;
    	if (Math.abs(z2) <= 8e-59) {
    		tmp = (((t_2 / t_1) * z1) - ((1.0 / z0) * (z0 * ((t_4 * Math.abs(z2)) * (Math.abs(z2) * z0))))) / ((1.0 / z0) * z1);
    	} else if (Math.abs(z2) <= 6.5e+234) {
    		tmp = (z0 / (t_0 + ((z1 / Math.abs(z2)) / Math.abs(z2)))) - (((t_4 * (z0 / t_1)) * (z0 * Math.abs(z2))) * Math.abs(z2));
    	} else {
    		tmp = (z0 / (t_0 + t_3)) - ((t_4 * z0) * (z0 / (t_3 + t_0)));
    	}
    	return tmp;
    }
    
    def code(z0, z3, z4, z1, z2):
    	t_0 = z3 / (z4 * z4)
    	t_1 = ((math.fabs(z2) * t_0) * math.fabs(z2)) + z1
    	t_2 = math.fabs(z2) * math.fabs(z2)
    	t_3 = z1 / t_2
    	t_4 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)
    	tmp = 0
    	if math.fabs(z2) <= 8e-59:
    		tmp = (((t_2 / t_1) * z1) - ((1.0 / z0) * (z0 * ((t_4 * math.fabs(z2)) * (math.fabs(z2) * z0))))) / ((1.0 / z0) * z1)
    	elif math.fabs(z2) <= 6.5e+234:
    		tmp = (z0 / (t_0 + ((z1 / math.fabs(z2)) / math.fabs(z2)))) - (((t_4 * (z0 / t_1)) * (z0 * math.fabs(z2))) * math.fabs(z2))
    	else:
    		tmp = (z0 / (t_0 + t_3)) - ((t_4 * z0) * (z0 / (t_3 + t_0)))
    	return tmp
    
    function code(z0, z3, z4, z1, z2)
    	t_0 = Float64(z3 / Float64(z4 * z4))
    	t_1 = Float64(Float64(Float64(abs(z2) * t_0) * abs(z2)) + z1)
    	t_2 = Float64(abs(z2) * abs(z2))
    	t_3 = Float64(z1 / t_2)
    	t_4 = Float64(-0.5 - Float64(Float64(Float64(0.25 * z0) - -0.3333333333333333) * z0))
    	tmp = 0.0
    	if (abs(z2) <= 8e-59)
    		tmp = Float64(Float64(Float64(Float64(t_2 / t_1) * z1) - Float64(Float64(1.0 / z0) * Float64(z0 * Float64(Float64(t_4 * abs(z2)) * Float64(abs(z2) * z0))))) / Float64(Float64(1.0 / z0) * z1));
    	elseif (abs(z2) <= 6.5e+234)
    		tmp = Float64(Float64(z0 / Float64(t_0 + Float64(Float64(z1 / abs(z2)) / abs(z2)))) - Float64(Float64(Float64(t_4 * Float64(z0 / t_1)) * Float64(z0 * abs(z2))) * abs(z2)));
    	else
    		tmp = Float64(Float64(z0 / Float64(t_0 + t_3)) - Float64(Float64(t_4 * z0) * Float64(z0 / Float64(t_3 + t_0))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(z0, z3, z4, z1, z2)
    	t_0 = z3 / (z4 * z4);
    	t_1 = ((abs(z2) * t_0) * abs(z2)) + z1;
    	t_2 = abs(z2) * abs(z2);
    	t_3 = z1 / t_2;
    	t_4 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
    	tmp = 0.0;
    	if (abs(z2) <= 8e-59)
    		tmp = (((t_2 / t_1) * z1) - ((1.0 / z0) * (z0 * ((t_4 * abs(z2)) * (abs(z2) * z0))))) / ((1.0 / z0) * z1);
    	elseif (abs(z2) <= 6.5e+234)
    		tmp = (z0 / (t_0 + ((z1 / abs(z2)) / abs(z2)))) - (((t_4 * (z0 / t_1)) * (z0 * abs(z2))) * abs(z2));
    	else
    		tmp = (z0 / (t_0 + t_3)) - ((t_4 * z0) * (z0 / (t_3 + t_0)));
    	end
    	tmp_2 = tmp;
    end
    
    code[z0_, z3_, z4_, z1_, z2_] := Block[{t$95$0 = N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(N[Abs[z2], $MachinePrecision] * t$95$0), $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision] + z1), $MachinePrecision]}, Block[{t$95$2 = N[(N[Abs[z2], $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z1 / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(-0.5 - N[(N[(N[(0.25 * z0), $MachinePrecision] - -0.3333333333333333), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[z2], $MachinePrecision], 8e-59], N[(N[(N[(N[(t$95$2 / t$95$1), $MachinePrecision] * z1), $MachinePrecision] - N[(N[(1.0 / z0), $MachinePrecision] * N[(z0 * N[(N[(t$95$4 * N[Abs[z2], $MachinePrecision]), $MachinePrecision] * N[(N[Abs[z2], $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 / z0), $MachinePrecision] * z1), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[z2], $MachinePrecision], 6.5e+234], N[(N[(z0 / N[(t$95$0 + N[(N[(z1 / N[Abs[z2], $MachinePrecision]), $MachinePrecision] / N[Abs[z2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t$95$4 * N[(z0 / t$95$1), $MachinePrecision]), $MachinePrecision] * N[(z0 * N[Abs[z2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z0 / N[(t$95$0 + t$95$3), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$4 * z0), $MachinePrecision] * N[(z0 / N[(t$95$3 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
    
    \begin{array}{l}
    t_0 := \frac{z3}{z4 \cdot z4}\\
    t_1 := \left(\left|z2\right| \cdot t\_0\right) \cdot \left|z2\right| + z1\\
    t_2 := \left|z2\right| \cdot \left|z2\right|\\
    t_3 := \frac{z1}{t\_2}\\
    t_4 := -0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\\
    \mathbf{if}\;\left|z2\right| \leq 8 \cdot 10^{-59}:\\
    \;\;\;\;\frac{\frac{t\_2}{t\_1} \cdot z1 - \frac{1}{z0} \cdot \left(z0 \cdot \left(\left(t\_4 \cdot \left|z2\right|\right) \cdot \left(\left|z2\right| \cdot z0\right)\right)\right)}{\frac{1}{z0} \cdot z1}\\
    
    \mathbf{elif}\;\left|z2\right| \leq 6.5 \cdot 10^{+234}:\\
    \;\;\;\;\frac{z0}{t\_0 + \frac{\frac{z1}{\left|z2\right|}}{\left|z2\right|}} - \left(\left(t\_4 \cdot \frac{z0}{t\_1}\right) \cdot \left(z0 \cdot \left|z2\right|\right)\right) \cdot \left|z2\right|\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{z0}{t\_0 + t\_3} - \left(t\_4 \cdot z0\right) \cdot \frac{z0}{t\_3 + t\_0}\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if z2 < 8.0000000000000002e-59

      1. Initial program 51.9%

        \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
      2. Taylor expanded in z3 around 0

        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
      3. Step-by-step derivation
        1. Applied rewrites47.3%

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
        2. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right)} \cdot \left(z2 \cdot z2\right) \]
          3. lift-*.f64N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \color{blue}{\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)}\right) \cdot \left(z2 \cdot z2\right) \]
          4. associate-*r*N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot z0\right)} \cdot \left(z2 \cdot z2\right) \]
          5. associate-*l*N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(z0 \cdot \left(z2 \cdot z2\right)\right)} \]
          6. lower-*.f64N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(z0 \cdot \left(z2 \cdot z2\right)\right)} \]
          7. lower-*.f64N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right)} \cdot \left(z0 \cdot \left(z2 \cdot z2\right)\right) \]
          8. lift-*.f64N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(z0 \cdot \color{blue}{\left(z2 \cdot z2\right)}\right) \]
          9. associate-*l*N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z0 \cdot z2\right) \cdot z2\right)} \]
          10. lift-*.f64N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\color{blue}{\left(z0 \cdot z2\right)} \cdot z2\right) \]
          11. lower-*.f6452.8%

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z0 \cdot z2\right) \cdot z2\right)} \]
          12. lift-*.f64N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\color{blue}{\left(z0 \cdot z2\right)} \cdot z2\right) \]
          13. *-commutativeN/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\color{blue}{\left(z2 \cdot z0\right)} \cdot z2\right) \]
          14. lower-*.f6452.8%

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\color{blue}{\left(z2 \cdot z0\right)} \cdot z2\right) \]
        3. Applied rewrites52.8%

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right)} \]
        4. Applied rewrites54.2%

          \[\leadsto \color{blue}{\frac{\frac{z2 \cdot z2}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot z1 - \frac{1}{z0} \cdot \left(z0 \cdot \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z2\right) \cdot \left(z2 \cdot z0\right)\right)\right)}{\frac{1}{z0} \cdot z1}} \]

        if 8.0000000000000002e-59 < z2 < 6.4999999999999995e234

        1. Initial program 51.9%

          \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
        2. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
          3. associate-*r*N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
          4. lower-*.f64N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
        3. Applied rewrites65.8%

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2} \]
        4. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{z1}{z2 \cdot z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
          2. lift-*.f64N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{\color{blue}{z2 \cdot z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
          3. associate-/r*N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
          4. lower-/.f64N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
          5. lower-/.f6468.3%

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{\color{blue}{\frac{z1}{z2}}}{z2}} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
        5. Applied rewrites68.3%

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]

        if 6.4999999999999995e234 < z2

        1. Initial program 51.9%

          \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
        2. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right)} \cdot \left(z2 \cdot z2\right) \]
          3. *-commutativeN/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1}\right)} \cdot \left(z2 \cdot z2\right) \]
          4. associate-*l*N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(z2 \cdot z2\right)\right)} \]
          5. lift-/.f64N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \left(\color{blue}{\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1}} \cdot \left(z2 \cdot z2\right)\right) \]
          6. associate-/r/N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \color{blue}{\frac{z0}{\frac{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1}{z2 \cdot z2}}} \]
          7. lift-+.f64N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \frac{z0}{\frac{\color{blue}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1}}{z2 \cdot z2}} \]
          8. lift-*.f64N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \frac{z0}{\frac{\color{blue}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2} + z1}{z2 \cdot z2}} \]
          9. lift-*.f64N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \frac{z0}{\frac{\color{blue}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right)} \cdot z2 + z1}{z2 \cdot z2}} \]
          10. associate-*l*N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \frac{z0}{\frac{\color{blue}{\frac{z3}{z4 \cdot z4} \cdot \left(z2 \cdot z2\right)} + z1}{z2 \cdot z2}} \]
          11. lift-*.f64N/A

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \frac{z0}{\frac{\frac{z3}{z4 \cdot z4} \cdot \color{blue}{\left(z2 \cdot z2\right)} + z1}{z2 \cdot z2}} \]
        3. Applied rewrites63.4%

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot \frac{z0}{\frac{z1}{z2 \cdot z2} + \frac{z3}{z4 \cdot z4}}} \]
      4. Recombined 3 regimes into one program.
      5. Add Preprocessing

      Alternative 3: 71.0% accurate, 0.9× speedup?

      \[\begin{array}{l} t_0 := \frac{z3}{z4 \cdot z4}\\ t_1 := -0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\\ \mathbf{if}\;z0 \leq -2.3 \cdot 10^{+92}:\\ \;\;\;\;\frac{z0}{\frac{\frac{z3}{z4}}{z4} + \frac{z1}{z2 \cdot z2}} - \frac{z0 \cdot \left(\left(\left(t\_1 \cdot z2\right) \cdot z0\right) \cdot z2\right)}{z1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z0}{t\_0 + \frac{\frac{z1}{z2}}{z2}} - \left(\left(t\_1 \cdot \frac{z0}{\left(z2 \cdot t\_0\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2\\ \end{array} \]
      (FPCore (z0 z3 z4 z1 z2)
        :precision binary64
        (let* ((t_0 (/ z3 (* z4 z4)))
             (t_1 (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0))))
        (if (<= z0 -2.3e+92)
          (-
           (/ z0 (+ (/ (/ z3 z4) z4) (/ z1 (* z2 z2))))
           (/ (* z0 (* (* (* t_1 z2) z0) z2)) z1))
          (-
           (/ z0 (+ t_0 (/ (/ z1 z2) z2)))
           (* (* (* t_1 (/ z0 (+ (* (* z2 t_0) z2) z1))) (* z0 z2)) z2)))))
      double code(double z0, double z3, double z4, double z1, double z2) {
      	double t_0 = z3 / (z4 * z4);
      	double t_1 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
      	double tmp;
      	if (z0 <= -2.3e+92) {
      		tmp = (z0 / (((z3 / z4) / z4) + (z1 / (z2 * z2)))) - ((z0 * (((t_1 * z2) * z0) * z2)) / z1);
      	} else {
      		tmp = (z0 / (t_0 + ((z1 / z2) / z2))) - (((t_1 * (z0 / (((z2 * t_0) * z2) + z1))) * (z0 * z2)) * z2);
      	}
      	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(z0, z3, z4, z1, z2)
      use fmin_fmax_functions
          real(8), intent (in) :: z0
          real(8), intent (in) :: z3
          real(8), intent (in) :: z4
          real(8), intent (in) :: z1
          real(8), intent (in) :: z2
          real(8) :: t_0
          real(8) :: t_1
          real(8) :: tmp
          t_0 = z3 / (z4 * z4)
          t_1 = (-0.5d0) - (((0.25d0 * z0) - (-0.3333333333333333d0)) * z0)
          if (z0 <= (-2.3d+92)) then
              tmp = (z0 / (((z3 / z4) / z4) + (z1 / (z2 * z2)))) - ((z0 * (((t_1 * z2) * z0) * z2)) / z1)
          else
              tmp = (z0 / (t_0 + ((z1 / z2) / z2))) - (((t_1 * (z0 / (((z2 * t_0) * z2) + z1))) * (z0 * z2)) * z2)
          end if
          code = tmp
      end function
      
      public static double code(double z0, double z3, double z4, double z1, double z2) {
      	double t_0 = z3 / (z4 * z4);
      	double t_1 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
      	double tmp;
      	if (z0 <= -2.3e+92) {
      		tmp = (z0 / (((z3 / z4) / z4) + (z1 / (z2 * z2)))) - ((z0 * (((t_1 * z2) * z0) * z2)) / z1);
      	} else {
      		tmp = (z0 / (t_0 + ((z1 / z2) / z2))) - (((t_1 * (z0 / (((z2 * t_0) * z2) + z1))) * (z0 * z2)) * z2);
      	}
      	return tmp;
      }
      
      def code(z0, z3, z4, z1, z2):
      	t_0 = z3 / (z4 * z4)
      	t_1 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)
      	tmp = 0
      	if z0 <= -2.3e+92:
      		tmp = (z0 / (((z3 / z4) / z4) + (z1 / (z2 * z2)))) - ((z0 * (((t_1 * z2) * z0) * z2)) / z1)
      	else:
      		tmp = (z0 / (t_0 + ((z1 / z2) / z2))) - (((t_1 * (z0 / (((z2 * t_0) * z2) + z1))) * (z0 * z2)) * z2)
      	return tmp
      
      function code(z0, z3, z4, z1, z2)
      	t_0 = Float64(z3 / Float64(z4 * z4))
      	t_1 = Float64(-0.5 - Float64(Float64(Float64(0.25 * z0) - -0.3333333333333333) * z0))
      	tmp = 0.0
      	if (z0 <= -2.3e+92)
      		tmp = Float64(Float64(z0 / Float64(Float64(Float64(z3 / z4) / z4) + Float64(z1 / Float64(z2 * z2)))) - Float64(Float64(z0 * Float64(Float64(Float64(t_1 * z2) * z0) * z2)) / z1));
      	else
      		tmp = Float64(Float64(z0 / Float64(t_0 + Float64(Float64(z1 / z2) / z2))) - Float64(Float64(Float64(t_1 * Float64(z0 / Float64(Float64(Float64(z2 * t_0) * z2) + z1))) * Float64(z0 * z2)) * z2));
      	end
      	return tmp
      end
      
      function tmp_2 = code(z0, z3, z4, z1, z2)
      	t_0 = z3 / (z4 * z4);
      	t_1 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
      	tmp = 0.0;
      	if (z0 <= -2.3e+92)
      		tmp = (z0 / (((z3 / z4) / z4) + (z1 / (z2 * z2)))) - ((z0 * (((t_1 * z2) * z0) * z2)) / z1);
      	else
      		tmp = (z0 / (t_0 + ((z1 / z2) / z2))) - (((t_1 * (z0 / (((z2 * t_0) * z2) + z1))) * (z0 * z2)) * z2);
      	end
      	tmp_2 = tmp;
      end
      
      code[z0_, z3_, z4_, z1_, z2_] := Block[{t$95$0 = N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-0.5 - N[(N[(N[(0.25 * z0), $MachinePrecision] - -0.3333333333333333), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z0, -2.3e+92], N[(N[(z0 / N[(N[(N[(z3 / z4), $MachinePrecision] / z4), $MachinePrecision] + N[(z1 / N[(z2 * z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(z0 * N[(N[(N[(t$95$1 * z2), $MachinePrecision] * z0), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision] / z1), $MachinePrecision]), $MachinePrecision], N[(N[(z0 / N[(t$95$0 + N[(N[(z1 / z2), $MachinePrecision] / z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t$95$1 * N[(z0 / N[(N[(N[(z2 * t$95$0), $MachinePrecision] * z2), $MachinePrecision] + z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(z0 * z2), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision]]]]
      
      \begin{array}{l}
      t_0 := \frac{z3}{z4 \cdot z4}\\
      t_1 := -0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\\
      \mathbf{if}\;z0 \leq -2.3 \cdot 10^{+92}:\\
      \;\;\;\;\frac{z0}{\frac{\frac{z3}{z4}}{z4} + \frac{z1}{z2 \cdot z2}} - \frac{z0 \cdot \left(\left(\left(t\_1 \cdot z2\right) \cdot z0\right) \cdot z2\right)}{z1}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{z0}{t\_0 + \frac{\frac{z1}{z2}}{z2}} - \left(\left(t\_1 \cdot \frac{z0}{\left(z2 \cdot t\_0\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z0 < -2.3e92

        1. Initial program 51.9%

          \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
        2. Taylor expanded in z3 around 0

          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
        3. Step-by-step derivation
          1. Applied rewrites47.3%

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
          2. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \frac{z0}{\color{blue}{\frac{z3}{z4 \cdot z4}} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
            2. lift-*.f64N/A

              \[\leadsto \frac{z0}{\frac{z3}{\color{blue}{z4 \cdot z4}} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
            3. associate-/r*N/A

              \[\leadsto \frac{z0}{\color{blue}{\frac{\frac{z3}{z4}}{z4}} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
            4. lower-/.f64N/A

              \[\leadsto \frac{z0}{\color{blue}{\frac{\frac{z3}{z4}}{z4}} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
            5. lower-/.f6448.2%

              \[\leadsto \frac{z0}{\frac{\color{blue}{\frac{z3}{z4}}}{z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
          3. Applied rewrites48.2%

            \[\leadsto \frac{z0}{\color{blue}{\frac{\frac{z3}{z4}}{z4}} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
          4. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \frac{z0}{\frac{\frac{z3}{z4}}{z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
            2. lift-*.f64N/A

              \[\leadsto \frac{z0}{\frac{\frac{z3}{z4}}{z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right)} \cdot \left(z2 \cdot z2\right) \]
            3. associate-*l*N/A

              \[\leadsto \frac{z0}{\frac{\frac{z3}{z4}}{z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0}{z1} \cdot \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \left(z2 \cdot z2\right)\right)} \]
            4. lift-/.f64N/A

              \[\leadsto \frac{z0}{\frac{\frac{z3}{z4}}{z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0}{z1}} \cdot \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \left(z2 \cdot z2\right)\right) \]
            5. associate-*l/N/A

              \[\leadsto \frac{z0}{\frac{\frac{z3}{z4}}{z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0 \cdot \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \left(z2 \cdot z2\right)\right)}{z1}} \]
            6. lower-/.f64N/A

              \[\leadsto \frac{z0}{\frac{\frac{z3}{z4}}{z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0 \cdot \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \left(z2 \cdot z2\right)\right)}{z1}} \]
          5. Applied rewrites55.8%

            \[\leadsto \frac{z0}{\frac{\frac{z3}{z4}}{z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0 \cdot \left(\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z2\right) \cdot z0\right) \cdot z2\right)}{z1}} \]

          if -2.3e92 < z0

          1. Initial program 51.9%

            \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
          2. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
            2. lift-*.f64N/A

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
            3. associate-*r*N/A

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
            4. lower-*.f64N/A

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
          3. Applied rewrites65.8%

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2} \]
          4. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{z1}{z2 \cdot z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
            2. lift-*.f64N/A

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{\color{blue}{z2 \cdot z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
            3. associate-/r*N/A

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
            4. lower-/.f64N/A

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
            5. lower-/.f6468.3%

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{\color{blue}{\frac{z1}{z2}}}{z2}} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
          5. Applied rewrites68.3%

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
        4. Recombined 2 regimes into one program.
        5. Add Preprocessing

        Alternative 4: 70.3% accurate, 0.9× speedup?

        \[\begin{array}{l} t_0 := -0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\\ t_1 := \frac{z3}{z4 \cdot z4}\\ t_2 := \left(z2 \cdot t\_1\right) \cdot z2 + z1\\ t_3 := \frac{z0}{t\_2}\\ \mathbf{if}\;z0 \leq -4.5 \cdot 10^{+29}:\\ \;\;\;\;\frac{z0}{t\_1 + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot t\_0\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{z1}\right)\\ \mathbf{elif}\;z0 \leq 6.8 \cdot 10^{-14}:\\ \;\;\;\;\frac{z0}{t\_1 + \frac{\frac{z1}{z2}}{z2}} - \left(\left(\left(-0.5 - 0.3333333333333333 \cdot z0\right) \cdot t\_3\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2\\ \mathbf{else}:\\ \;\;\;\;\frac{z2 \cdot z2}{t\_2} \cdot z0 - \left(\left(t\_0 \cdot t\_3\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2\\ \end{array} \]
        (FPCore (z0 z3 z4 z1 z2)
          :precision binary64
          (let* ((t_0 (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0)))
               (t_1 (/ z3 (* z4 z4)))
               (t_2 (+ (* (* z2 t_1) z2) z1))
               (t_3 (/ z0 t_2)))
          (if (<= z0 -4.5e+29)
            (-
             (/ z0 (+ t_1 (/ z1 (* z2 z2))))
             (* (* z2 t_0) (* (* z2 z0) (/ z0 z1))))
            (if (<= z0 6.8e-14)
              (-
               (/ z0 (+ t_1 (/ (/ z1 z2) z2)))
               (*
                (* (* (- -0.5 (* 0.3333333333333333 z0)) t_3) (* z0 z2))
                z2))
              (- (* (/ (* z2 z2) t_2) z0) (* (* (* t_0 t_3) (* z0 z2)) z2))))))
        double code(double z0, double z3, double z4, double z1, double z2) {
        	double t_0 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
        	double t_1 = z3 / (z4 * z4);
        	double t_2 = ((z2 * t_1) * z2) + z1;
        	double t_3 = z0 / t_2;
        	double tmp;
        	if (z0 <= -4.5e+29) {
        		tmp = (z0 / (t_1 + (z1 / (z2 * z2)))) - ((z2 * t_0) * ((z2 * z0) * (z0 / z1)));
        	} else if (z0 <= 6.8e-14) {
        		tmp = (z0 / (t_1 + ((z1 / z2) / z2))) - ((((-0.5 - (0.3333333333333333 * z0)) * t_3) * (z0 * z2)) * z2);
        	} else {
        		tmp = (((z2 * z2) / t_2) * z0) - (((t_0 * t_3) * (z0 * z2)) * z2);
        	}
        	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(z0, z3, z4, z1, z2)
        use fmin_fmax_functions
            real(8), intent (in) :: z0
            real(8), intent (in) :: z3
            real(8), intent (in) :: z4
            real(8), intent (in) :: z1
            real(8), intent (in) :: z2
            real(8) :: t_0
            real(8) :: t_1
            real(8) :: t_2
            real(8) :: t_3
            real(8) :: tmp
            t_0 = (-0.5d0) - (((0.25d0 * z0) - (-0.3333333333333333d0)) * z0)
            t_1 = z3 / (z4 * z4)
            t_2 = ((z2 * t_1) * z2) + z1
            t_3 = z0 / t_2
            if (z0 <= (-4.5d+29)) then
                tmp = (z0 / (t_1 + (z1 / (z2 * z2)))) - ((z2 * t_0) * ((z2 * z0) * (z0 / z1)))
            else if (z0 <= 6.8d-14) then
                tmp = (z0 / (t_1 + ((z1 / z2) / z2))) - (((((-0.5d0) - (0.3333333333333333d0 * z0)) * t_3) * (z0 * z2)) * z2)
            else
                tmp = (((z2 * z2) / t_2) * z0) - (((t_0 * t_3) * (z0 * z2)) * z2)
            end if
            code = tmp
        end function
        
        public static double code(double z0, double z3, double z4, double z1, double z2) {
        	double t_0 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
        	double t_1 = z3 / (z4 * z4);
        	double t_2 = ((z2 * t_1) * z2) + z1;
        	double t_3 = z0 / t_2;
        	double tmp;
        	if (z0 <= -4.5e+29) {
        		tmp = (z0 / (t_1 + (z1 / (z2 * z2)))) - ((z2 * t_0) * ((z2 * z0) * (z0 / z1)));
        	} else if (z0 <= 6.8e-14) {
        		tmp = (z0 / (t_1 + ((z1 / z2) / z2))) - ((((-0.5 - (0.3333333333333333 * z0)) * t_3) * (z0 * z2)) * z2);
        	} else {
        		tmp = (((z2 * z2) / t_2) * z0) - (((t_0 * t_3) * (z0 * z2)) * z2);
        	}
        	return tmp;
        }
        
        def code(z0, z3, z4, z1, z2):
        	t_0 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)
        	t_1 = z3 / (z4 * z4)
        	t_2 = ((z2 * t_1) * z2) + z1
        	t_3 = z0 / t_2
        	tmp = 0
        	if z0 <= -4.5e+29:
        		tmp = (z0 / (t_1 + (z1 / (z2 * z2)))) - ((z2 * t_0) * ((z2 * z0) * (z0 / z1)))
        	elif z0 <= 6.8e-14:
        		tmp = (z0 / (t_1 + ((z1 / z2) / z2))) - ((((-0.5 - (0.3333333333333333 * z0)) * t_3) * (z0 * z2)) * z2)
        	else:
        		tmp = (((z2 * z2) / t_2) * z0) - (((t_0 * t_3) * (z0 * z2)) * z2)
        	return tmp
        
        function code(z0, z3, z4, z1, z2)
        	t_0 = Float64(-0.5 - Float64(Float64(Float64(0.25 * z0) - -0.3333333333333333) * z0))
        	t_1 = Float64(z3 / Float64(z4 * z4))
        	t_2 = Float64(Float64(Float64(z2 * t_1) * z2) + z1)
        	t_3 = Float64(z0 / t_2)
        	tmp = 0.0
        	if (z0 <= -4.5e+29)
        		tmp = Float64(Float64(z0 / Float64(t_1 + Float64(z1 / Float64(z2 * z2)))) - Float64(Float64(z2 * t_0) * Float64(Float64(z2 * z0) * Float64(z0 / z1))));
        	elseif (z0 <= 6.8e-14)
        		tmp = Float64(Float64(z0 / Float64(t_1 + Float64(Float64(z1 / z2) / z2))) - Float64(Float64(Float64(Float64(-0.5 - Float64(0.3333333333333333 * z0)) * t_3) * Float64(z0 * z2)) * z2));
        	else
        		tmp = Float64(Float64(Float64(Float64(z2 * z2) / t_2) * z0) - Float64(Float64(Float64(t_0 * t_3) * Float64(z0 * z2)) * z2));
        	end
        	return tmp
        end
        
        function tmp_2 = code(z0, z3, z4, z1, z2)
        	t_0 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
        	t_1 = z3 / (z4 * z4);
        	t_2 = ((z2 * t_1) * z2) + z1;
        	t_3 = z0 / t_2;
        	tmp = 0.0;
        	if (z0 <= -4.5e+29)
        		tmp = (z0 / (t_1 + (z1 / (z2 * z2)))) - ((z2 * t_0) * ((z2 * z0) * (z0 / z1)));
        	elseif (z0 <= 6.8e-14)
        		tmp = (z0 / (t_1 + ((z1 / z2) / z2))) - ((((-0.5 - (0.3333333333333333 * z0)) * t_3) * (z0 * z2)) * z2);
        	else
        		tmp = (((z2 * z2) / t_2) * z0) - (((t_0 * t_3) * (z0 * z2)) * z2);
        	end
        	tmp_2 = tmp;
        end
        
        code[z0_, z3_, z4_, z1_, z2_] := Block[{t$95$0 = N[(-0.5 - N[(N[(N[(0.25 * z0), $MachinePrecision] - -0.3333333333333333), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(z2 * t$95$1), $MachinePrecision] * z2), $MachinePrecision] + z1), $MachinePrecision]}, Block[{t$95$3 = N[(z0 / t$95$2), $MachinePrecision]}, If[LessEqual[z0, -4.5e+29], N[(N[(z0 / N[(t$95$1 + N[(z1 / N[(z2 * z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(z2 * t$95$0), $MachinePrecision] * N[(N[(z2 * z0), $MachinePrecision] * N[(z0 / z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z0, 6.8e-14], N[(N[(z0 / N[(t$95$1 + N[(N[(z1 / z2), $MachinePrecision] / z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(-0.5 - N[(0.3333333333333333 * z0), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(z0 * z2), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(z2 * z2), $MachinePrecision] / t$95$2), $MachinePrecision] * z0), $MachinePrecision] - N[(N[(N[(t$95$0 * t$95$3), $MachinePrecision] * N[(z0 * z2), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision]]]]]]]
        
        \begin{array}{l}
        t_0 := -0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\\
        t_1 := \frac{z3}{z4 \cdot z4}\\
        t_2 := \left(z2 \cdot t\_1\right) \cdot z2 + z1\\
        t_3 := \frac{z0}{t\_2}\\
        \mathbf{if}\;z0 \leq -4.5 \cdot 10^{+29}:\\
        \;\;\;\;\frac{z0}{t\_1 + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot t\_0\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{z1}\right)\\
        
        \mathbf{elif}\;z0 \leq 6.8 \cdot 10^{-14}:\\
        \;\;\;\;\frac{z0}{t\_1 + \frac{\frac{z1}{z2}}{z2}} - \left(\left(\left(-0.5 - 0.3333333333333333 \cdot z0\right) \cdot t\_3\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{z2 \cdot z2}{t\_2} \cdot z0 - \left(\left(t\_0 \cdot t\_3\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if z0 < -4.5000000000000002e29

          1. Initial program 51.9%

            \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
          2. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
            2. lift-*.f64N/A

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
            3. associate-*r*N/A

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
            4. lower-*.f64N/A

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
          3. Applied rewrites65.8%

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2} \]
          4. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2} \]
            2. *-commutativeN/A

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{z2 \cdot \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right)} \]
            3. lift-*.f64N/A

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - z2 \cdot \color{blue}{\left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right)} \]
            4. lift-*.f64N/A

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - z2 \cdot \left(\color{blue}{\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \cdot \left(z0 \cdot z2\right)\right) \]
            5. associate-*l*N/A

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - z2 \cdot \color{blue}{\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right)\right)} \]
            6. associate-*r*N/A

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right)} \]
            7. lower-*.f64N/A

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right)} \]
            8. lower-*.f64N/A

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right)} \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right) \]
            9. *-commutativeN/A

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z0 \cdot z2\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \]
            10. lower-*.f6467.0%

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z0 \cdot z2\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \]
          5. Applied rewrites67.0%

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \]
          6. Taylor expanded in z3 around 0

            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{\color{blue}{z1}}\right) \]
          7. Step-by-step derivation
            1. Applied rewrites56.2%

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{\color{blue}{z1}}\right) \]

            if -4.5000000000000002e29 < z0 < 6.8000000000000001e-14

            1. Initial program 51.9%

              \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
            2. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
              2. lift-*.f64N/A

                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
              3. associate-*r*N/A

                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
              4. lower-*.f64N/A

                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
            3. Applied rewrites65.8%

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2} \]
            4. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{z1}{z2 \cdot z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
              2. lift-*.f64N/A

                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{\color{blue}{z2 \cdot z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
              3. associate-/r*N/A

                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
              4. lower-/.f64N/A

                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
              5. lower-/.f6468.3%

                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{\color{blue}{\frac{z1}{z2}}}{z2}} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
            5. Applied rewrites68.3%

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
            6. Taylor expanded in z0 around 0

              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{\frac{z1}{z2}}{z2}} - \left(\left(\left(-0.5 - \color{blue}{\frac{3333333333333333}{10000000000000000}} \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
            7. Step-by-step derivation
              1. Applied rewrites56.3%

                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{\frac{z1}{z2}}{z2}} - \left(\left(\left(-0.5 - \color{blue}{0.3333333333333333} \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]

              if 6.8000000000000001e-14 < z0

              1. Initial program 51.9%

                \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
              2. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
                3. associate-*r*N/A

                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                4. lower-*.f64N/A

                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
              3. Applied rewrites65.8%

                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2} \]
              4. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto \color{blue}{\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                2. mult-flipN/A

                  \[\leadsto \color{blue}{z0 \cdot \frac{1}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                3. lift-+.f64N/A

                  \[\leadsto z0 \cdot \frac{1}{\color{blue}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                4. +-commutativeN/A

                  \[\leadsto z0 \cdot \frac{1}{\color{blue}{\frac{z1}{z2 \cdot z2} + \frac{z3}{z4 \cdot z4}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                5. lift-/.f64N/A

                  \[\leadsto z0 \cdot \frac{1}{\frac{z1}{z2 \cdot z2} + \color{blue}{\frac{z3}{z4 \cdot z4}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                6. mult-flipN/A

                  \[\leadsto z0 \cdot \frac{1}{\frac{z1}{z2 \cdot z2} + \color{blue}{z3 \cdot \frac{1}{z4 \cdot z4}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                7. lift-/.f64N/A

                  \[\leadsto z0 \cdot \frac{1}{\frac{z1}{z2 \cdot z2} + z3 \cdot \color{blue}{\frac{1}{z4 \cdot z4}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                8. fp-cancel-sign-subN/A

                  \[\leadsto z0 \cdot \frac{1}{\color{blue}{\frac{z1}{z2 \cdot z2} - \left(\mathsf{neg}\left(z3\right)\right) \cdot \frac{1}{z4 \cdot z4}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                9. lift-neg.f64N/A

                  \[\leadsto z0 \cdot \frac{1}{\frac{z1}{z2 \cdot z2} - \color{blue}{\left(-z3\right)} \cdot \frac{1}{z4 \cdot z4}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                10. lift-*.f64N/A

                  \[\leadsto z0 \cdot \frac{1}{\frac{z1}{z2 \cdot z2} - \color{blue}{\left(-z3\right) \cdot \frac{1}{z4 \cdot z4}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                11. lift--.f64N/A

                  \[\leadsto z0 \cdot \frac{1}{\color{blue}{\frac{z1}{z2 \cdot z2} - \left(-z3\right) \cdot \frac{1}{z4 \cdot z4}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                12. *-commutativeN/A

                  \[\leadsto \color{blue}{\frac{1}{\frac{z1}{z2 \cdot z2} - \left(-z3\right) \cdot \frac{1}{z4 \cdot z4}} \cdot z0} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                13. lower-*.f64N/A

                  \[\leadsto \color{blue}{\frac{1}{\frac{z1}{z2 \cdot z2} - \left(-z3\right) \cdot \frac{1}{z4 \cdot z4}} \cdot z0} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
              5. Applied rewrites59.8%

                \[\leadsto \color{blue}{\frac{z2 \cdot z2}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot z0} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
            8. Recombined 3 regimes into one program.
            9. Add Preprocessing

            Alternative 5: 69.2% accurate, 0.9× speedup?

            \[\begin{array}{l} t_0 := z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\\ t_1 := \frac{z3}{z4 \cdot z4}\\ t_2 := \frac{z0}{t\_1 + \frac{z1}{z2 \cdot z2}}\\ t_3 := \left(z2 \cdot t\_1\right) \cdot z2 + z1\\ \mathbf{if}\;z0 \leq -4.5 \cdot 10^{+29}:\\ \;\;\;\;t\_2 - t\_0 \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{z1}\right)\\ \mathbf{elif}\;z0 \leq 2 \cdot 10^{-50}:\\ \;\;\;\;\frac{z0}{t\_1 + \frac{\frac{z1}{z2}}{z2}} - \left(\left(\left(-0.5 - 0.3333333333333333 \cdot z0\right) \cdot \frac{z0}{t\_3}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2\\ \mathbf{else}:\\ \;\;\;\;t\_2 - t\_0 \cdot \frac{\left(z2 \cdot z0\right) \cdot z0}{t\_3}\\ \end{array} \]
            (FPCore (z0 z3 z4 z1 z2)
              :precision binary64
              (let* ((t_0
                    (* z2 (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0))))
                   (t_1 (/ z3 (* z4 z4)))
                   (t_2 (/ z0 (+ t_1 (/ z1 (* z2 z2)))))
                   (t_3 (+ (* (* z2 t_1) z2) z1)))
              (if (<= z0 -4.5e+29)
                (- t_2 (* t_0 (* (* z2 z0) (/ z0 z1))))
                (if (<= z0 2e-50)
                  (-
                   (/ z0 (+ t_1 (/ (/ z1 z2) z2)))
                   (*
                    (*
                     (* (- -0.5 (* 0.3333333333333333 z0)) (/ z0 t_3))
                     (* z0 z2))
                    z2))
                  (- t_2 (* t_0 (/ (* (* z2 z0) z0) t_3)))))))
            double code(double z0, double z3, double z4, double z1, double z2) {
            	double t_0 = z2 * (-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0));
            	double t_1 = z3 / (z4 * z4);
            	double t_2 = z0 / (t_1 + (z1 / (z2 * z2)));
            	double t_3 = ((z2 * t_1) * z2) + z1;
            	double tmp;
            	if (z0 <= -4.5e+29) {
            		tmp = t_2 - (t_0 * ((z2 * z0) * (z0 / z1)));
            	} else if (z0 <= 2e-50) {
            		tmp = (z0 / (t_1 + ((z1 / z2) / z2))) - ((((-0.5 - (0.3333333333333333 * z0)) * (z0 / t_3)) * (z0 * z2)) * z2);
            	} else {
            		tmp = t_2 - (t_0 * (((z2 * z0) * z0) / t_3));
            	}
            	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(z0, z3, z4, z1, z2)
            use fmin_fmax_functions
                real(8), intent (in) :: z0
                real(8), intent (in) :: z3
                real(8), intent (in) :: z4
                real(8), intent (in) :: z1
                real(8), intent (in) :: z2
                real(8) :: t_0
                real(8) :: t_1
                real(8) :: t_2
                real(8) :: t_3
                real(8) :: tmp
                t_0 = z2 * ((-0.5d0) - (((0.25d0 * z0) - (-0.3333333333333333d0)) * z0))
                t_1 = z3 / (z4 * z4)
                t_2 = z0 / (t_1 + (z1 / (z2 * z2)))
                t_3 = ((z2 * t_1) * z2) + z1
                if (z0 <= (-4.5d+29)) then
                    tmp = t_2 - (t_0 * ((z2 * z0) * (z0 / z1)))
                else if (z0 <= 2d-50) then
                    tmp = (z0 / (t_1 + ((z1 / z2) / z2))) - (((((-0.5d0) - (0.3333333333333333d0 * z0)) * (z0 / t_3)) * (z0 * z2)) * z2)
                else
                    tmp = t_2 - (t_0 * (((z2 * z0) * z0) / t_3))
                end if
                code = tmp
            end function
            
            public static double code(double z0, double z3, double z4, double z1, double z2) {
            	double t_0 = z2 * (-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0));
            	double t_1 = z3 / (z4 * z4);
            	double t_2 = z0 / (t_1 + (z1 / (z2 * z2)));
            	double t_3 = ((z2 * t_1) * z2) + z1;
            	double tmp;
            	if (z0 <= -4.5e+29) {
            		tmp = t_2 - (t_0 * ((z2 * z0) * (z0 / z1)));
            	} else if (z0 <= 2e-50) {
            		tmp = (z0 / (t_1 + ((z1 / z2) / z2))) - ((((-0.5 - (0.3333333333333333 * z0)) * (z0 / t_3)) * (z0 * z2)) * z2);
            	} else {
            		tmp = t_2 - (t_0 * (((z2 * z0) * z0) / t_3));
            	}
            	return tmp;
            }
            
            def code(z0, z3, z4, z1, z2):
            	t_0 = z2 * (-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0))
            	t_1 = z3 / (z4 * z4)
            	t_2 = z0 / (t_1 + (z1 / (z2 * z2)))
            	t_3 = ((z2 * t_1) * z2) + z1
            	tmp = 0
            	if z0 <= -4.5e+29:
            		tmp = t_2 - (t_0 * ((z2 * z0) * (z0 / z1)))
            	elif z0 <= 2e-50:
            		tmp = (z0 / (t_1 + ((z1 / z2) / z2))) - ((((-0.5 - (0.3333333333333333 * z0)) * (z0 / t_3)) * (z0 * z2)) * z2)
            	else:
            		tmp = t_2 - (t_0 * (((z2 * z0) * z0) / t_3))
            	return tmp
            
            function code(z0, z3, z4, z1, z2)
            	t_0 = Float64(z2 * Float64(-0.5 - Float64(Float64(Float64(0.25 * z0) - -0.3333333333333333) * z0)))
            	t_1 = Float64(z3 / Float64(z4 * z4))
            	t_2 = Float64(z0 / Float64(t_1 + Float64(z1 / Float64(z2 * z2))))
            	t_3 = Float64(Float64(Float64(z2 * t_1) * z2) + z1)
            	tmp = 0.0
            	if (z0 <= -4.5e+29)
            		tmp = Float64(t_2 - Float64(t_0 * Float64(Float64(z2 * z0) * Float64(z0 / z1))));
            	elseif (z0 <= 2e-50)
            		tmp = Float64(Float64(z0 / Float64(t_1 + Float64(Float64(z1 / z2) / z2))) - Float64(Float64(Float64(Float64(-0.5 - Float64(0.3333333333333333 * z0)) * Float64(z0 / t_3)) * Float64(z0 * z2)) * z2));
            	else
            		tmp = Float64(t_2 - Float64(t_0 * Float64(Float64(Float64(z2 * z0) * z0) / t_3)));
            	end
            	return tmp
            end
            
            function tmp_2 = code(z0, z3, z4, z1, z2)
            	t_0 = z2 * (-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0));
            	t_1 = z3 / (z4 * z4);
            	t_2 = z0 / (t_1 + (z1 / (z2 * z2)));
            	t_3 = ((z2 * t_1) * z2) + z1;
            	tmp = 0.0;
            	if (z0 <= -4.5e+29)
            		tmp = t_2 - (t_0 * ((z2 * z0) * (z0 / z1)));
            	elseif (z0 <= 2e-50)
            		tmp = (z0 / (t_1 + ((z1 / z2) / z2))) - ((((-0.5 - (0.3333333333333333 * z0)) * (z0 / t_3)) * (z0 * z2)) * z2);
            	else
            		tmp = t_2 - (t_0 * (((z2 * z0) * z0) / t_3));
            	end
            	tmp_2 = tmp;
            end
            
            code[z0_, z3_, z4_, z1_, z2_] := Block[{t$95$0 = N[(z2 * N[(-0.5 - N[(N[(N[(0.25 * z0), $MachinePrecision] - -0.3333333333333333), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z0 / N[(t$95$1 + N[(z1 / N[(z2 * z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(z2 * t$95$1), $MachinePrecision] * z2), $MachinePrecision] + z1), $MachinePrecision]}, If[LessEqual[z0, -4.5e+29], N[(t$95$2 - N[(t$95$0 * N[(N[(z2 * z0), $MachinePrecision] * N[(z0 / z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z0, 2e-50], N[(N[(z0 / N[(t$95$1 + N[(N[(z1 / z2), $MachinePrecision] / z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(-0.5 - N[(0.3333333333333333 * z0), $MachinePrecision]), $MachinePrecision] * N[(z0 / t$95$3), $MachinePrecision]), $MachinePrecision] * N[(z0 * z2), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision], N[(t$95$2 - N[(t$95$0 * N[(N[(N[(z2 * z0), $MachinePrecision] * z0), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
            
            \begin{array}{l}
            t_0 := z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\\
            t_1 := \frac{z3}{z4 \cdot z4}\\
            t_2 := \frac{z0}{t\_1 + \frac{z1}{z2 \cdot z2}}\\
            t_3 := \left(z2 \cdot t\_1\right) \cdot z2 + z1\\
            \mathbf{if}\;z0 \leq -4.5 \cdot 10^{+29}:\\
            \;\;\;\;t\_2 - t\_0 \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{z1}\right)\\
            
            \mathbf{elif}\;z0 \leq 2 \cdot 10^{-50}:\\
            \;\;\;\;\frac{z0}{t\_1 + \frac{\frac{z1}{z2}}{z2}} - \left(\left(\left(-0.5 - 0.3333333333333333 \cdot z0\right) \cdot \frac{z0}{t\_3}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_2 - t\_0 \cdot \frac{\left(z2 \cdot z0\right) \cdot z0}{t\_3}\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if z0 < -4.5000000000000002e29

              1. Initial program 51.9%

                \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
              2. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
                3. associate-*r*N/A

                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                4. lower-*.f64N/A

                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
              3. Applied rewrites65.8%

                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2} \]
              4. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2} \]
                2. *-commutativeN/A

                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{z2 \cdot \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right)} \]
                3. lift-*.f64N/A

                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - z2 \cdot \color{blue}{\left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right)} \]
                4. lift-*.f64N/A

                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - z2 \cdot \left(\color{blue}{\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \cdot \left(z0 \cdot z2\right)\right) \]
                5. associate-*l*N/A

                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - z2 \cdot \color{blue}{\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right)\right)} \]
                6. associate-*r*N/A

                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right)} \]
                7. lower-*.f64N/A

                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right)} \]
                8. lower-*.f64N/A

                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right)} \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right) \]
                9. *-commutativeN/A

                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z0 \cdot z2\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \]
                10. lower-*.f6467.0%

                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z0 \cdot z2\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \]
              5. Applied rewrites67.0%

                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \]
              6. Taylor expanded in z3 around 0

                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{\color{blue}{z1}}\right) \]
              7. Step-by-step derivation
                1. Applied rewrites56.2%

                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{\color{blue}{z1}}\right) \]

                if -4.5000000000000002e29 < z0 < 2e-50

                1. Initial program 51.9%

                  \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                2. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                  2. lift-*.f64N/A

                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
                  3. associate-*r*N/A

                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                  4. lower-*.f64N/A

                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                3. Applied rewrites65.8%

                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2} \]
                4. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{z1}{z2 \cdot z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                  2. lift-*.f64N/A

                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{\color{blue}{z2 \cdot z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                  3. associate-/r*N/A

                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                  4. lower-/.f64N/A

                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                  5. lower-/.f6468.3%

                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{\color{blue}{\frac{z1}{z2}}}{z2}} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                5. Applied rewrites68.3%

                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                6. Taylor expanded in z0 around 0

                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{\frac{z1}{z2}}{z2}} - \left(\left(\left(-0.5 - \color{blue}{\frac{3333333333333333}{10000000000000000}} \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                7. Step-by-step derivation
                  1. Applied rewrites56.3%

                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{\frac{z1}{z2}}{z2}} - \left(\left(\left(-0.5 - \color{blue}{0.3333333333333333} \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]

                  if 2e-50 < z0

                  1. Initial program 51.9%

                    \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                  2. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
                    3. associate-*r*N/A

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                    4. lower-*.f64N/A

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                  3. Applied rewrites65.8%

                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2} \]
                  4. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2} \]
                    2. *-commutativeN/A

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{z2 \cdot \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right)} \]
                    3. lift-*.f64N/A

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - z2 \cdot \color{blue}{\left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right)} \]
                    4. lift-*.f64N/A

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - z2 \cdot \left(\color{blue}{\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \cdot \left(z0 \cdot z2\right)\right) \]
                    5. associate-*l*N/A

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - z2 \cdot \color{blue}{\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right)\right)} \]
                    6. associate-*r*N/A

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right)} \]
                    7. lower-*.f64N/A

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right)} \]
                    8. lower-*.f64N/A

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right)} \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right) \]
                    9. *-commutativeN/A

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z0 \cdot z2\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \]
                    10. lower-*.f6467.0%

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z0 \cdot z2\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \]
                  5. Applied rewrites67.0%

                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \]
                  6. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z2 \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \]
                    2. lift-/.f64N/A

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \color{blue}{\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}}\right) \]
                    3. associate-*r/N/A

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \color{blue}{\frac{\left(z2 \cdot z0\right) \cdot z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}} \]
                    4. lower-/.f64N/A

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \color{blue}{\frac{\left(z2 \cdot z0\right) \cdot z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}} \]
                    5. lift-*.f64N/A

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \frac{\color{blue}{\left(z2 \cdot z0\right)} \cdot z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \]
                    6. *-commutativeN/A

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \frac{\color{blue}{\left(z0 \cdot z2\right)} \cdot z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \]
                    7. lift-*.f64N/A

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \frac{\color{blue}{\left(z0 \cdot z2\right)} \cdot z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \]
                    8. lower-*.f6467.4%

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \frac{\color{blue}{\left(z0 \cdot z2\right) \cdot z0}}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \]
                    9. lift-*.f64N/A

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \frac{\color{blue}{\left(z0 \cdot z2\right)} \cdot z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \]
                    10. *-commutativeN/A

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \frac{\color{blue}{\left(z2 \cdot z0\right)} \cdot z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \]
                    11. lift-*.f6467.4%

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \frac{\color{blue}{\left(z2 \cdot z0\right)} \cdot z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \]
                  7. Applied rewrites67.4%

                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \color{blue}{\frac{\left(z2 \cdot z0\right) \cdot z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}} \]
                8. Recombined 3 regimes into one program.
                9. Add Preprocessing

                Alternative 6: 68.8% accurate, 0.9× speedup?

                \[\begin{array}{l} t_0 := \frac{z1}{\left|z2\right| \cdot \left|z2\right|}\\ t_1 := \frac{z3}{z4 \cdot z4}\\ t_2 := -0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\\ \mathbf{if}\;\left|z2\right| \leq 2.15 \cdot 10^{-38}:\\ \;\;\;\;\frac{z0}{\frac{\frac{z3}{z4}}{z4} + t\_0} - \frac{z0 \cdot \left(\left(\left(t\_2 \cdot \left|z2\right|\right) \cdot z0\right) \cdot \left|z2\right|\right)}{z1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z0}{t\_1 + t\_0} - \left(t\_2 \cdot z0\right) \cdot \frac{z0}{t\_0 + t\_1}\\ \end{array} \]
                (FPCore (z0 z3 z4 z1 z2)
                  :precision binary64
                  (let* ((t_0 (/ z1 (* (fabs z2) (fabs z2))))
                       (t_1 (/ z3 (* z4 z4)))
                       (t_2 (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0))))
                  (if (<= (fabs z2) 2.15e-38)
                    (-
                     (/ z0 (+ (/ (/ z3 z4) z4) t_0))
                     (/ (* z0 (* (* (* t_2 (fabs z2)) z0) (fabs z2))) z1))
                    (- (/ z0 (+ t_1 t_0)) (* (* t_2 z0) (/ z0 (+ t_0 t_1)))))))
                double code(double z0, double z3, double z4, double z1, double z2) {
                	double t_0 = z1 / (fabs(z2) * fabs(z2));
                	double t_1 = z3 / (z4 * z4);
                	double t_2 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
                	double tmp;
                	if (fabs(z2) <= 2.15e-38) {
                		tmp = (z0 / (((z3 / z4) / z4) + t_0)) - ((z0 * (((t_2 * fabs(z2)) * z0) * fabs(z2))) / z1);
                	} else {
                		tmp = (z0 / (t_1 + t_0)) - ((t_2 * z0) * (z0 / (t_0 + 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(z0, z3, z4, z1, z2)
                use fmin_fmax_functions
                    real(8), intent (in) :: z0
                    real(8), intent (in) :: z3
                    real(8), intent (in) :: z4
                    real(8), intent (in) :: z1
                    real(8), intent (in) :: z2
                    real(8) :: t_0
                    real(8) :: t_1
                    real(8) :: t_2
                    real(8) :: tmp
                    t_0 = z1 / (abs(z2) * abs(z2))
                    t_1 = z3 / (z4 * z4)
                    t_2 = (-0.5d0) - (((0.25d0 * z0) - (-0.3333333333333333d0)) * z0)
                    if (abs(z2) <= 2.15d-38) then
                        tmp = (z0 / (((z3 / z4) / z4) + t_0)) - ((z0 * (((t_2 * abs(z2)) * z0) * abs(z2))) / z1)
                    else
                        tmp = (z0 / (t_1 + t_0)) - ((t_2 * z0) * (z0 / (t_0 + t_1)))
                    end if
                    code = tmp
                end function
                
                public static double code(double z0, double z3, double z4, double z1, double z2) {
                	double t_0 = z1 / (Math.abs(z2) * Math.abs(z2));
                	double t_1 = z3 / (z4 * z4);
                	double t_2 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
                	double tmp;
                	if (Math.abs(z2) <= 2.15e-38) {
                		tmp = (z0 / (((z3 / z4) / z4) + t_0)) - ((z0 * (((t_2 * Math.abs(z2)) * z0) * Math.abs(z2))) / z1);
                	} else {
                		tmp = (z0 / (t_1 + t_0)) - ((t_2 * z0) * (z0 / (t_0 + t_1)));
                	}
                	return tmp;
                }
                
                def code(z0, z3, z4, z1, z2):
                	t_0 = z1 / (math.fabs(z2) * math.fabs(z2))
                	t_1 = z3 / (z4 * z4)
                	t_2 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)
                	tmp = 0
                	if math.fabs(z2) <= 2.15e-38:
                		tmp = (z0 / (((z3 / z4) / z4) + t_0)) - ((z0 * (((t_2 * math.fabs(z2)) * z0) * math.fabs(z2))) / z1)
                	else:
                		tmp = (z0 / (t_1 + t_0)) - ((t_2 * z0) * (z0 / (t_0 + t_1)))
                	return tmp
                
                function code(z0, z3, z4, z1, z2)
                	t_0 = Float64(z1 / Float64(abs(z2) * abs(z2)))
                	t_1 = Float64(z3 / Float64(z4 * z4))
                	t_2 = Float64(-0.5 - Float64(Float64(Float64(0.25 * z0) - -0.3333333333333333) * z0))
                	tmp = 0.0
                	if (abs(z2) <= 2.15e-38)
                		tmp = Float64(Float64(z0 / Float64(Float64(Float64(z3 / z4) / z4) + t_0)) - Float64(Float64(z0 * Float64(Float64(Float64(t_2 * abs(z2)) * z0) * abs(z2))) / z1));
                	else
                		tmp = Float64(Float64(z0 / Float64(t_1 + t_0)) - Float64(Float64(t_2 * z0) * Float64(z0 / Float64(t_0 + t_1))));
                	end
                	return tmp
                end
                
                function tmp_2 = code(z0, z3, z4, z1, z2)
                	t_0 = z1 / (abs(z2) * abs(z2));
                	t_1 = z3 / (z4 * z4);
                	t_2 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
                	tmp = 0.0;
                	if (abs(z2) <= 2.15e-38)
                		tmp = (z0 / (((z3 / z4) / z4) + t_0)) - ((z0 * (((t_2 * abs(z2)) * z0) * abs(z2))) / z1);
                	else
                		tmp = (z0 / (t_1 + t_0)) - ((t_2 * z0) * (z0 / (t_0 + t_1)));
                	end
                	tmp_2 = tmp;
                end
                
                code[z0_, z3_, z4_, z1_, z2_] := Block[{t$95$0 = N[(z1 / N[(N[Abs[z2], $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-0.5 - N[(N[(N[(0.25 * z0), $MachinePrecision] - -0.3333333333333333), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[z2], $MachinePrecision], 2.15e-38], N[(N[(z0 / N[(N[(N[(z3 / z4), $MachinePrecision] / z4), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] - N[(N[(z0 * N[(N[(N[(t$95$2 * N[Abs[z2], $MachinePrecision]), $MachinePrecision] * z0), $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z1), $MachinePrecision]), $MachinePrecision], N[(N[(z0 / N[(t$95$1 + t$95$0), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$2 * z0), $MachinePrecision] * N[(z0 / N[(t$95$0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
                
                \begin{array}{l}
                t_0 := \frac{z1}{\left|z2\right| \cdot \left|z2\right|}\\
                t_1 := \frac{z3}{z4 \cdot z4}\\
                t_2 := -0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\\
                \mathbf{if}\;\left|z2\right| \leq 2.15 \cdot 10^{-38}:\\
                \;\;\;\;\frac{z0}{\frac{\frac{z3}{z4}}{z4} + t\_0} - \frac{z0 \cdot \left(\left(\left(t\_2 \cdot \left|z2\right|\right) \cdot z0\right) \cdot \left|z2\right|\right)}{z1}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{z0}{t\_1 + t\_0} - \left(t\_2 \cdot z0\right) \cdot \frac{z0}{t\_0 + t\_1}\\
                
                
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if z2 < 2.1500000000000001e-38

                  1. Initial program 51.9%

                    \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                  2. Taylor expanded in z3 around 0

                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                  3. Step-by-step derivation
                    1. Applied rewrites47.3%

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                    2. Step-by-step derivation
                      1. lift-/.f64N/A

                        \[\leadsto \frac{z0}{\color{blue}{\frac{z3}{z4 \cdot z4}} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                      2. lift-*.f64N/A

                        \[\leadsto \frac{z0}{\frac{z3}{\color{blue}{z4 \cdot z4}} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                      3. associate-/r*N/A

                        \[\leadsto \frac{z0}{\color{blue}{\frac{\frac{z3}{z4}}{z4}} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                      4. lower-/.f64N/A

                        \[\leadsto \frac{z0}{\color{blue}{\frac{\frac{z3}{z4}}{z4}} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                      5. lower-/.f6448.2%

                        \[\leadsto \frac{z0}{\frac{\color{blue}{\frac{z3}{z4}}}{z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                    3. Applied rewrites48.2%

                      \[\leadsto \frac{z0}{\color{blue}{\frac{\frac{z3}{z4}}{z4}} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                    4. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \frac{z0}{\frac{\frac{z3}{z4}}{z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                      2. lift-*.f64N/A

                        \[\leadsto \frac{z0}{\frac{\frac{z3}{z4}}{z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right)} \cdot \left(z2 \cdot z2\right) \]
                      3. associate-*l*N/A

                        \[\leadsto \frac{z0}{\frac{\frac{z3}{z4}}{z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0}{z1} \cdot \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \left(z2 \cdot z2\right)\right)} \]
                      4. lift-/.f64N/A

                        \[\leadsto \frac{z0}{\frac{\frac{z3}{z4}}{z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0}{z1}} \cdot \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \left(z2 \cdot z2\right)\right) \]
                      5. associate-*l/N/A

                        \[\leadsto \frac{z0}{\frac{\frac{z3}{z4}}{z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0 \cdot \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \left(z2 \cdot z2\right)\right)}{z1}} \]
                      6. lower-/.f64N/A

                        \[\leadsto \frac{z0}{\frac{\frac{z3}{z4}}{z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0 \cdot \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \left(z2 \cdot z2\right)\right)}{z1}} \]
                    5. Applied rewrites55.8%

                      \[\leadsto \frac{z0}{\frac{\frac{z3}{z4}}{z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0 \cdot \left(\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z2\right) \cdot z0\right) \cdot z2\right)}{z1}} \]

                    if 2.1500000000000001e-38 < z2

                    1. Initial program 51.9%

                      \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                    2. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                      2. lift-*.f64N/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right)} \cdot \left(z2 \cdot z2\right) \]
                      3. *-commutativeN/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1}\right)} \cdot \left(z2 \cdot z2\right) \]
                      4. associate-*l*N/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(z2 \cdot z2\right)\right)} \]
                      5. lift-/.f64N/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \left(\color{blue}{\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1}} \cdot \left(z2 \cdot z2\right)\right) \]
                      6. associate-/r/N/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \color{blue}{\frac{z0}{\frac{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1}{z2 \cdot z2}}} \]
                      7. lift-+.f64N/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \frac{z0}{\frac{\color{blue}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1}}{z2 \cdot z2}} \]
                      8. lift-*.f64N/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \frac{z0}{\frac{\color{blue}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2} + z1}{z2 \cdot z2}} \]
                      9. lift-*.f64N/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \frac{z0}{\frac{\color{blue}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right)} \cdot z2 + z1}{z2 \cdot z2}} \]
                      10. associate-*l*N/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \frac{z0}{\frac{\color{blue}{\frac{z3}{z4 \cdot z4} \cdot \left(z2 \cdot z2\right)} + z1}{z2 \cdot z2}} \]
                      11. lift-*.f64N/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \frac{z0}{\frac{\frac{z3}{z4 \cdot z4} \cdot \color{blue}{\left(z2 \cdot z2\right)} + z1}{z2 \cdot z2}} \]
                    3. Applied rewrites63.4%

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot \frac{z0}{\frac{z1}{z2 \cdot z2} + \frac{z3}{z4 \cdot z4}}} \]
                  4. Recombined 2 regimes into one program.
                  5. Add Preprocessing

                  Alternative 7: 66.6% accurate, 1.0× speedup?

                  \[\begin{array}{l} t_0 := -0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\\ t_1 := \frac{z3}{z4 \cdot z4}\\ t_2 := \frac{z0}{t\_1 + \frac{z1}{z2 \cdot z2}}\\ \mathbf{if}\;z0 \leq -4.8 \cdot 10^{+29}:\\ \;\;\;\;t\_2 - \left(z2 \cdot t\_0\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{z1}\right)\\ \mathbf{elif}\;z0 \leq 66000000:\\ \;\;\;\;t\_2 - \left(\left(-0.5 \cdot \frac{z0}{\left(z2 \cdot t\_1\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2\\ \mathbf{else}:\\ \;\;\;\;\frac{z0}{t\_1 + \frac{\frac{z1}{z2}}{z2}} - \left(\left(t\_0 \cdot \frac{z0}{z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2\\ \end{array} \]
                  (FPCore (z0 z3 z4 z1 z2)
                    :precision binary64
                    (let* ((t_0 (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0)))
                         (t_1 (/ z3 (* z4 z4)))
                         (t_2 (/ z0 (+ t_1 (/ z1 (* z2 z2))))))
                    (if (<= z0 -4.8e+29)
                      (- t_2 (* (* z2 t_0) (* (* z2 z0) (/ z0 z1))))
                      (if (<= z0 66000000.0)
                        (-
                         t_2
                         (* (* (* -0.5 (/ z0 (+ (* (* z2 t_1) z2) z1))) (* z0 z2)) z2))
                        (-
                         (/ z0 (+ t_1 (/ (/ z1 z2) z2)))
                         (* (* (* t_0 (/ z0 z1)) (* z0 z2)) z2))))))
                  double code(double z0, double z3, double z4, double z1, double z2) {
                  	double t_0 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
                  	double t_1 = z3 / (z4 * z4);
                  	double t_2 = z0 / (t_1 + (z1 / (z2 * z2)));
                  	double tmp;
                  	if (z0 <= -4.8e+29) {
                  		tmp = t_2 - ((z2 * t_0) * ((z2 * z0) * (z0 / z1)));
                  	} else if (z0 <= 66000000.0) {
                  		tmp = t_2 - (((-0.5 * (z0 / (((z2 * t_1) * z2) + z1))) * (z0 * z2)) * z2);
                  	} else {
                  		tmp = (z0 / (t_1 + ((z1 / z2) / z2))) - (((t_0 * (z0 / z1)) * (z0 * z2)) * z2);
                  	}
                  	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(z0, z3, z4, z1, z2)
                  use fmin_fmax_functions
                      real(8), intent (in) :: z0
                      real(8), intent (in) :: z3
                      real(8), intent (in) :: z4
                      real(8), intent (in) :: z1
                      real(8), intent (in) :: z2
                      real(8) :: t_0
                      real(8) :: t_1
                      real(8) :: t_2
                      real(8) :: tmp
                      t_0 = (-0.5d0) - (((0.25d0 * z0) - (-0.3333333333333333d0)) * z0)
                      t_1 = z3 / (z4 * z4)
                      t_2 = z0 / (t_1 + (z1 / (z2 * z2)))
                      if (z0 <= (-4.8d+29)) then
                          tmp = t_2 - ((z2 * t_0) * ((z2 * z0) * (z0 / z1)))
                      else if (z0 <= 66000000.0d0) then
                          tmp = t_2 - ((((-0.5d0) * (z0 / (((z2 * t_1) * z2) + z1))) * (z0 * z2)) * z2)
                      else
                          tmp = (z0 / (t_1 + ((z1 / z2) / z2))) - (((t_0 * (z0 / z1)) * (z0 * z2)) * z2)
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double z0, double z3, double z4, double z1, double z2) {
                  	double t_0 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
                  	double t_1 = z3 / (z4 * z4);
                  	double t_2 = z0 / (t_1 + (z1 / (z2 * z2)));
                  	double tmp;
                  	if (z0 <= -4.8e+29) {
                  		tmp = t_2 - ((z2 * t_0) * ((z2 * z0) * (z0 / z1)));
                  	} else if (z0 <= 66000000.0) {
                  		tmp = t_2 - (((-0.5 * (z0 / (((z2 * t_1) * z2) + z1))) * (z0 * z2)) * z2);
                  	} else {
                  		tmp = (z0 / (t_1 + ((z1 / z2) / z2))) - (((t_0 * (z0 / z1)) * (z0 * z2)) * z2);
                  	}
                  	return tmp;
                  }
                  
                  def code(z0, z3, z4, z1, z2):
                  	t_0 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)
                  	t_1 = z3 / (z4 * z4)
                  	t_2 = z0 / (t_1 + (z1 / (z2 * z2)))
                  	tmp = 0
                  	if z0 <= -4.8e+29:
                  		tmp = t_2 - ((z2 * t_0) * ((z2 * z0) * (z0 / z1)))
                  	elif z0 <= 66000000.0:
                  		tmp = t_2 - (((-0.5 * (z0 / (((z2 * t_1) * z2) + z1))) * (z0 * z2)) * z2)
                  	else:
                  		tmp = (z0 / (t_1 + ((z1 / z2) / z2))) - (((t_0 * (z0 / z1)) * (z0 * z2)) * z2)
                  	return tmp
                  
                  function code(z0, z3, z4, z1, z2)
                  	t_0 = Float64(-0.5 - Float64(Float64(Float64(0.25 * z0) - -0.3333333333333333) * z0))
                  	t_1 = Float64(z3 / Float64(z4 * z4))
                  	t_2 = Float64(z0 / Float64(t_1 + Float64(z1 / Float64(z2 * z2))))
                  	tmp = 0.0
                  	if (z0 <= -4.8e+29)
                  		tmp = Float64(t_2 - Float64(Float64(z2 * t_0) * Float64(Float64(z2 * z0) * Float64(z0 / z1))));
                  	elseif (z0 <= 66000000.0)
                  		tmp = Float64(t_2 - Float64(Float64(Float64(-0.5 * Float64(z0 / Float64(Float64(Float64(z2 * t_1) * z2) + z1))) * Float64(z0 * z2)) * z2));
                  	else
                  		tmp = Float64(Float64(z0 / Float64(t_1 + Float64(Float64(z1 / z2) / z2))) - Float64(Float64(Float64(t_0 * Float64(z0 / z1)) * Float64(z0 * z2)) * z2));
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(z0, z3, z4, z1, z2)
                  	t_0 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
                  	t_1 = z3 / (z4 * z4);
                  	t_2 = z0 / (t_1 + (z1 / (z2 * z2)));
                  	tmp = 0.0;
                  	if (z0 <= -4.8e+29)
                  		tmp = t_2 - ((z2 * t_0) * ((z2 * z0) * (z0 / z1)));
                  	elseif (z0 <= 66000000.0)
                  		tmp = t_2 - (((-0.5 * (z0 / (((z2 * t_1) * z2) + z1))) * (z0 * z2)) * z2);
                  	else
                  		tmp = (z0 / (t_1 + ((z1 / z2) / z2))) - (((t_0 * (z0 / z1)) * (z0 * z2)) * z2);
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[z0_, z3_, z4_, z1_, z2_] := Block[{t$95$0 = N[(-0.5 - N[(N[(N[(0.25 * z0), $MachinePrecision] - -0.3333333333333333), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z0 / N[(t$95$1 + N[(z1 / N[(z2 * z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z0, -4.8e+29], N[(t$95$2 - N[(N[(z2 * t$95$0), $MachinePrecision] * N[(N[(z2 * z0), $MachinePrecision] * N[(z0 / z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z0, 66000000.0], N[(t$95$2 - N[(N[(N[(-0.5 * N[(z0 / N[(N[(N[(z2 * t$95$1), $MachinePrecision] * z2), $MachinePrecision] + z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(z0 * z2), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision], N[(N[(z0 / N[(t$95$1 + N[(N[(z1 / z2), $MachinePrecision] / z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t$95$0 * N[(z0 / z1), $MachinePrecision]), $MachinePrecision] * N[(z0 * z2), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision]]]]]]
                  
                  \begin{array}{l}
                  t_0 := -0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\\
                  t_1 := \frac{z3}{z4 \cdot z4}\\
                  t_2 := \frac{z0}{t\_1 + \frac{z1}{z2 \cdot z2}}\\
                  \mathbf{if}\;z0 \leq -4.8 \cdot 10^{+29}:\\
                  \;\;\;\;t\_2 - \left(z2 \cdot t\_0\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{z1}\right)\\
                  
                  \mathbf{elif}\;z0 \leq 66000000:\\
                  \;\;\;\;t\_2 - \left(\left(-0.5 \cdot \frac{z0}{\left(z2 \cdot t\_1\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{z0}{t\_1 + \frac{\frac{z1}{z2}}{z2}} - \left(\left(t\_0 \cdot \frac{z0}{z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2\\
                  
                  
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if z0 < -4.8000000000000002e29

                    1. Initial program 51.9%

                      \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                    2. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                      2. lift-*.f64N/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
                      3. associate-*r*N/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                      4. lower-*.f64N/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                    3. Applied rewrites65.8%

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2} \]
                    4. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2} \]
                      2. *-commutativeN/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{z2 \cdot \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right)} \]
                      3. lift-*.f64N/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - z2 \cdot \color{blue}{\left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right)} \]
                      4. lift-*.f64N/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - z2 \cdot \left(\color{blue}{\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \cdot \left(z0 \cdot z2\right)\right) \]
                      5. associate-*l*N/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - z2 \cdot \color{blue}{\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right)\right)} \]
                      6. associate-*r*N/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right)} \]
                      7. lower-*.f64N/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right)} \]
                      8. lower-*.f64N/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right)} \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right) \]
                      9. *-commutativeN/A

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z0 \cdot z2\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \]
                      10. lower-*.f6467.0%

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z0 \cdot z2\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \]
                    5. Applied rewrites67.0%

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \]
                    6. Taylor expanded in z3 around 0

                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{\color{blue}{z1}}\right) \]
                    7. Step-by-step derivation
                      1. Applied rewrites56.2%

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{\color{blue}{z1}}\right) \]

                      if -4.8000000000000002e29 < z0 < 6.6e7

                      1. Initial program 51.9%

                        \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                      2. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                        2. lift-*.f64N/A

                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
                        3. associate-*r*N/A

                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                        4. lower-*.f64N/A

                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                      3. Applied rewrites65.8%

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2} \]
                      4. Taylor expanded in z0 around 0

                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\color{blue}{\frac{-1}{2}} \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                      5. Step-by-step derivation
                        1. Applied rewrites55.3%

                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\color{blue}{-0.5} \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]

                        if 6.6e7 < z0

                        1. Initial program 51.9%

                          \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                        2. Step-by-step derivation
                          1. lift-*.f64N/A

                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                          2. lift-*.f64N/A

                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
                          3. associate-*r*N/A

                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                          4. lower-*.f64N/A

                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                        3. Applied rewrites65.8%

                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2} \]
                        4. Step-by-step derivation
                          1. lift-/.f64N/A

                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{z1}{z2 \cdot z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                          2. lift-*.f64N/A

                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{\color{blue}{z2 \cdot z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                          3. associate-/r*N/A

                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                          4. lower-/.f64N/A

                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                          5. lower-/.f6468.3%

                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{\color{blue}{\frac{z1}{z2}}}{z2}} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                        5. Applied rewrites68.3%

                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                        6. Taylor expanded in z3 around 0

                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{\frac{z1}{z2}}{z2}} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\color{blue}{z1}}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                        7. Step-by-step derivation
                          1. Applied rewrites57.3%

                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{\frac{z1}{z2}}{z2}} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\color{blue}{z1}}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                        8. Recombined 3 regimes into one program.
                        9. Add Preprocessing

                        Alternative 8: 66.3% accurate, 1.1× speedup?

                        \[\begin{array}{l} t_0 := \frac{z1}{z2 \cdot z2}\\ t_1 := -0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\\ t_2 := \frac{z3}{z4 \cdot z4}\\ t_3 := \frac{z0}{t\_0 + t\_2}\\ \mathbf{if}\;z0 \leq -4.8 \cdot 10^{+29}:\\ \;\;\;\;\frac{z0}{t\_2 + t\_0} - \left(z2 \cdot t\_1\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{z1}\right)\\ \mathbf{elif}\;z0 \leq 66000000:\\ \;\;\;\;t\_3 - \left(-0.5 \cdot z0\right) \cdot t\_3\\ \mathbf{else}:\\ \;\;\;\;\frac{z0}{t\_2 + \frac{\frac{z1}{z2}}{z2}} - \left(\left(t\_1 \cdot \frac{z0}{z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2\\ \end{array} \]
                        (FPCore (z0 z3 z4 z1 z2)
                          :precision binary64
                          (let* ((t_0 (/ z1 (* z2 z2)))
                               (t_1 (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0)))
                               (t_2 (/ z3 (* z4 z4)))
                               (t_3 (/ z0 (+ t_0 t_2))))
                          (if (<= z0 -4.8e+29)
                            (- (/ z0 (+ t_2 t_0)) (* (* z2 t_1) (* (* z2 z0) (/ z0 z1))))
                            (if (<= z0 66000000.0)
                              (- t_3 (* (* -0.5 z0) t_3))
                              (-
                               (/ z0 (+ t_2 (/ (/ z1 z2) z2)))
                               (* (* (* t_1 (/ z0 z1)) (* z0 z2)) z2))))))
                        double code(double z0, double z3, double z4, double z1, double z2) {
                        	double t_0 = z1 / (z2 * z2);
                        	double t_1 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
                        	double t_2 = z3 / (z4 * z4);
                        	double t_3 = z0 / (t_0 + t_2);
                        	double tmp;
                        	if (z0 <= -4.8e+29) {
                        		tmp = (z0 / (t_2 + t_0)) - ((z2 * t_1) * ((z2 * z0) * (z0 / z1)));
                        	} else if (z0 <= 66000000.0) {
                        		tmp = t_3 - ((-0.5 * z0) * t_3);
                        	} else {
                        		tmp = (z0 / (t_2 + ((z1 / z2) / z2))) - (((t_1 * (z0 / z1)) * (z0 * z2)) * z2);
                        	}
                        	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(z0, z3, z4, z1, z2)
                        use fmin_fmax_functions
                            real(8), intent (in) :: z0
                            real(8), intent (in) :: z3
                            real(8), intent (in) :: z4
                            real(8), intent (in) :: z1
                            real(8), intent (in) :: z2
                            real(8) :: t_0
                            real(8) :: t_1
                            real(8) :: t_2
                            real(8) :: t_3
                            real(8) :: tmp
                            t_0 = z1 / (z2 * z2)
                            t_1 = (-0.5d0) - (((0.25d0 * z0) - (-0.3333333333333333d0)) * z0)
                            t_2 = z3 / (z4 * z4)
                            t_3 = z0 / (t_0 + t_2)
                            if (z0 <= (-4.8d+29)) then
                                tmp = (z0 / (t_2 + t_0)) - ((z2 * t_1) * ((z2 * z0) * (z0 / z1)))
                            else if (z0 <= 66000000.0d0) then
                                tmp = t_3 - (((-0.5d0) * z0) * t_3)
                            else
                                tmp = (z0 / (t_2 + ((z1 / z2) / z2))) - (((t_1 * (z0 / z1)) * (z0 * z2)) * z2)
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double z0, double z3, double z4, double z1, double z2) {
                        	double t_0 = z1 / (z2 * z2);
                        	double t_1 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
                        	double t_2 = z3 / (z4 * z4);
                        	double t_3 = z0 / (t_0 + t_2);
                        	double tmp;
                        	if (z0 <= -4.8e+29) {
                        		tmp = (z0 / (t_2 + t_0)) - ((z2 * t_1) * ((z2 * z0) * (z0 / z1)));
                        	} else if (z0 <= 66000000.0) {
                        		tmp = t_3 - ((-0.5 * z0) * t_3);
                        	} else {
                        		tmp = (z0 / (t_2 + ((z1 / z2) / z2))) - (((t_1 * (z0 / z1)) * (z0 * z2)) * z2);
                        	}
                        	return tmp;
                        }
                        
                        def code(z0, z3, z4, z1, z2):
                        	t_0 = z1 / (z2 * z2)
                        	t_1 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)
                        	t_2 = z3 / (z4 * z4)
                        	t_3 = z0 / (t_0 + t_2)
                        	tmp = 0
                        	if z0 <= -4.8e+29:
                        		tmp = (z0 / (t_2 + t_0)) - ((z2 * t_1) * ((z2 * z0) * (z0 / z1)))
                        	elif z0 <= 66000000.0:
                        		tmp = t_3 - ((-0.5 * z0) * t_3)
                        	else:
                        		tmp = (z0 / (t_2 + ((z1 / z2) / z2))) - (((t_1 * (z0 / z1)) * (z0 * z2)) * z2)
                        	return tmp
                        
                        function code(z0, z3, z4, z1, z2)
                        	t_0 = Float64(z1 / Float64(z2 * z2))
                        	t_1 = Float64(-0.5 - Float64(Float64(Float64(0.25 * z0) - -0.3333333333333333) * z0))
                        	t_2 = Float64(z3 / Float64(z4 * z4))
                        	t_3 = Float64(z0 / Float64(t_0 + t_2))
                        	tmp = 0.0
                        	if (z0 <= -4.8e+29)
                        		tmp = Float64(Float64(z0 / Float64(t_2 + t_0)) - Float64(Float64(z2 * t_1) * Float64(Float64(z2 * z0) * Float64(z0 / z1))));
                        	elseif (z0 <= 66000000.0)
                        		tmp = Float64(t_3 - Float64(Float64(-0.5 * z0) * t_3));
                        	else
                        		tmp = Float64(Float64(z0 / Float64(t_2 + Float64(Float64(z1 / z2) / z2))) - Float64(Float64(Float64(t_1 * Float64(z0 / z1)) * Float64(z0 * z2)) * z2));
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(z0, z3, z4, z1, z2)
                        	t_0 = z1 / (z2 * z2);
                        	t_1 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
                        	t_2 = z3 / (z4 * z4);
                        	t_3 = z0 / (t_0 + t_2);
                        	tmp = 0.0;
                        	if (z0 <= -4.8e+29)
                        		tmp = (z0 / (t_2 + t_0)) - ((z2 * t_1) * ((z2 * z0) * (z0 / z1)));
                        	elseif (z0 <= 66000000.0)
                        		tmp = t_3 - ((-0.5 * z0) * t_3);
                        	else
                        		tmp = (z0 / (t_2 + ((z1 / z2) / z2))) - (((t_1 * (z0 / z1)) * (z0 * z2)) * z2);
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[z0_, z3_, z4_, z1_, z2_] := Block[{t$95$0 = N[(z1 / N[(z2 * z2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-0.5 - N[(N[(N[(0.25 * z0), $MachinePrecision] - -0.3333333333333333), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z0 / N[(t$95$0 + t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z0, -4.8e+29], N[(N[(z0 / N[(t$95$2 + t$95$0), $MachinePrecision]), $MachinePrecision] - N[(N[(z2 * t$95$1), $MachinePrecision] * N[(N[(z2 * z0), $MachinePrecision] * N[(z0 / z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z0, 66000000.0], N[(t$95$3 - N[(N[(-0.5 * z0), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision], N[(N[(z0 / N[(t$95$2 + N[(N[(z1 / z2), $MachinePrecision] / z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t$95$1 * N[(z0 / z1), $MachinePrecision]), $MachinePrecision] * N[(z0 * z2), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision]]]]]]]
                        
                        \begin{array}{l}
                        t_0 := \frac{z1}{z2 \cdot z2}\\
                        t_1 := -0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\\
                        t_2 := \frac{z3}{z4 \cdot z4}\\
                        t_3 := \frac{z0}{t\_0 + t\_2}\\
                        \mathbf{if}\;z0 \leq -4.8 \cdot 10^{+29}:\\
                        \;\;\;\;\frac{z0}{t\_2 + t\_0} - \left(z2 \cdot t\_1\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{z1}\right)\\
                        
                        \mathbf{elif}\;z0 \leq 66000000:\\
                        \;\;\;\;t\_3 - \left(-0.5 \cdot z0\right) \cdot t\_3\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{z0}{t\_2 + \frac{\frac{z1}{z2}}{z2}} - \left(\left(t\_1 \cdot \frac{z0}{z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2\\
                        
                        
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if z0 < -4.8000000000000002e29

                          1. Initial program 51.9%

                            \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                          2. Step-by-step derivation
                            1. lift-*.f64N/A

                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                            2. lift-*.f64N/A

                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
                            3. associate-*r*N/A

                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                            4. lower-*.f64N/A

                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                          3. Applied rewrites65.8%

                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2} \]
                          4. Step-by-step derivation
                            1. lift-*.f64N/A

                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2} \]
                            2. *-commutativeN/A

                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{z2 \cdot \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right)} \]
                            3. lift-*.f64N/A

                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - z2 \cdot \color{blue}{\left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right)} \]
                            4. lift-*.f64N/A

                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - z2 \cdot \left(\color{blue}{\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \cdot \left(z0 \cdot z2\right)\right) \]
                            5. associate-*l*N/A

                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - z2 \cdot \color{blue}{\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right)\right)} \]
                            6. associate-*r*N/A

                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right)} \]
                            7. lower-*.f64N/A

                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right)} \]
                            8. lower-*.f64N/A

                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right)} \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right) \]
                            9. *-commutativeN/A

                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z0 \cdot z2\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \]
                            10. lower-*.f6467.0%

                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z0 \cdot z2\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \]
                          5. Applied rewrites67.0%

                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \]
                          6. Taylor expanded in z3 around 0

                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{\color{blue}{z1}}\right) \]
                          7. Step-by-step derivation
                            1. Applied rewrites56.2%

                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{\color{blue}{z1}}\right) \]

                            if -4.8000000000000002e29 < z0 < 6.6e7

                            1. Initial program 51.9%

                              \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                            2. Step-by-step derivation
                              1. lift-+.f64N/A

                                \[\leadsto \frac{z0}{\color{blue}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                              2. +-commutativeN/A

                                \[\leadsto \frac{z0}{\color{blue}{\frac{z1}{z2 \cdot z2} + \frac{z3}{z4 \cdot z4}}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                              3. lift-/.f64N/A

                                \[\leadsto \frac{z0}{\frac{z1}{z2 \cdot z2} + \color{blue}{\frac{z3}{z4 \cdot z4}}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                              4. mult-flipN/A

                                \[\leadsto \frac{z0}{\frac{z1}{z2 \cdot z2} + \color{blue}{z3 \cdot \frac{1}{z4 \cdot z4}}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                              5. fp-cancel-sign-sub-invN/A

                                \[\leadsto \frac{z0}{\color{blue}{\frac{z1}{z2 \cdot z2} - \left(\mathsf{neg}\left(z3\right)\right) \cdot \frac{1}{z4 \cdot z4}}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                              6. lower--.f64N/A

                                \[\leadsto \frac{z0}{\color{blue}{\frac{z1}{z2 \cdot z2} - \left(\mathsf{neg}\left(z3\right)\right) \cdot \frac{1}{z4 \cdot z4}}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                              7. lower-*.f64N/A

                                \[\leadsto \frac{z0}{\frac{z1}{z2 \cdot z2} - \color{blue}{\left(\mathsf{neg}\left(z3\right)\right) \cdot \frac{1}{z4 \cdot z4}}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                              8. lower-neg.f64N/A

                                \[\leadsto \frac{z0}{\frac{z1}{z2 \cdot z2} - \color{blue}{\left(-z3\right)} \cdot \frac{1}{z4 \cdot z4}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                              9. lower-/.f6451.8%

                                \[\leadsto \frac{z0}{\frac{z1}{z2 \cdot z2} - \left(-z3\right) \cdot \color{blue}{\frac{1}{z4 \cdot z4}}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                            3. Applied rewrites51.8%

                              \[\leadsto \frac{z0}{\color{blue}{\frac{z1}{z2 \cdot z2} - \left(-z3\right) \cdot \frac{1}{z4 \cdot z4}}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                            4. Taylor expanded in z0 around 0

                              \[\leadsto \frac{z0}{\frac{z1}{z2 \cdot z2} - \left(-z3\right) \cdot \frac{1}{z4 \cdot z4}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\color{blue}{\frac{-1}{2}} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                            5. Step-by-step derivation
                              1. Applied rewrites45.9%

                                \[\leadsto \frac{z0}{\frac{z1}{z2 \cdot z2} - \left(-z3\right) \cdot \frac{1}{z4 \cdot z4}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\color{blue}{-0.5} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                              2. Step-by-step derivation
                                1. lift--.f64N/A

                                  \[\leadsto \frac{z0}{\color{blue}{\frac{z1}{z2 \cdot z2} - \left(-z3\right) \cdot \frac{1}{z4 \cdot z4}}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                2. lift-*.f64N/A

                                  \[\leadsto \frac{z0}{\frac{z1}{z2 \cdot z2} - \color{blue}{\left(-z3\right) \cdot \frac{1}{z4 \cdot z4}}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                3. lift-neg.f64N/A

                                  \[\leadsto \frac{z0}{\frac{z1}{z2 \cdot z2} - \color{blue}{\left(\mathsf{neg}\left(z3\right)\right)} \cdot \frac{1}{z4 \cdot z4}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                4. fp-cancel-sign-subN/A

                                  \[\leadsto \frac{z0}{\color{blue}{\frac{z1}{z2 \cdot z2} + z3 \cdot \frac{1}{z4 \cdot z4}}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                5. lift-/.f64N/A

                                  \[\leadsto \frac{z0}{\frac{z1}{z2 \cdot z2} + z3 \cdot \color{blue}{\frac{1}{z4 \cdot z4}}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                6. mult-flipN/A

                                  \[\leadsto \frac{z0}{\frac{z1}{z2 \cdot z2} + \color{blue}{\frac{z3}{z4 \cdot z4}}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                7. lift-/.f64N/A

                                  \[\leadsto \frac{z0}{\frac{z1}{z2 \cdot z2} + \color{blue}{\frac{z3}{z4 \cdot z4}}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                8. lift-+.f6446.0%

                                  \[\leadsto \frac{z0}{\color{blue}{\frac{z1}{z2 \cdot z2} + \frac{z3}{z4 \cdot z4}}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(-0.5 \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                9. lift-*.f64N/A

                                  \[\leadsto \frac{z0}{\frac{z1}{z2 \cdot z2} + \frac{z3}{z4 \cdot z4}} - \color{blue}{\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                              3. Applied rewrites53.9%

                                \[\leadsto \color{blue}{\frac{z0}{\frac{z1}{z2 \cdot z2} + \frac{z3}{z4 \cdot z4}} - \left(-0.5 \cdot z0\right) \cdot \frac{z0}{\frac{z1}{z2 \cdot z2} + \frac{z3}{z4 \cdot z4}}} \]

                              if 6.6e7 < z0

                              1. Initial program 51.9%

                                \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                              2. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                                2. lift-*.f64N/A

                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
                                3. associate-*r*N/A

                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                                4. lower-*.f64N/A

                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                              3. Applied rewrites65.8%

                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2} \]
                              4. Step-by-step derivation
                                1. lift-/.f64N/A

                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{z1}{z2 \cdot z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                                2. lift-*.f64N/A

                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{\color{blue}{z2 \cdot z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                                3. associate-/r*N/A

                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                                4. lower-/.f64N/A

                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                                5. lower-/.f6468.3%

                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{\color{blue}{\frac{z1}{z2}}}{z2}} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                              5. Applied rewrites68.3%

                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                              6. Taylor expanded in z3 around 0

                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{\frac{z1}{z2}}{z2}} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\color{blue}{z1}}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                              7. Step-by-step derivation
                                1. Applied rewrites57.3%

                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{\frac{z1}{z2}}{z2}} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\color{blue}{z1}}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                              8. Recombined 3 regimes into one program.
                              9. Add Preprocessing

                              Alternative 9: 60.0% accurate, 1.1× speedup?

                              \[\begin{array}{l} t_0 := -0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\\ t_1 := \frac{z3}{z4 \cdot z4}\\ t_2 := \frac{z0}{t\_1 + \frac{\frac{z1}{z2}}{z2}} - \left(\left(t\_0 \cdot \frac{z0}{z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2\\ \mathbf{if}\;z1 \leq -2.45 \cdot 10^{-88}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z1 \leq 10^{-5}:\\ \;\;\;\;\frac{z0}{t\_1 + \frac{z1}{z2 \cdot z2}} - \frac{\left(\left(\left(t\_0 \cdot z0\right) \cdot z0\right) \cdot z2\right) \cdot z2}{z1}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \]
                              (FPCore (z0 z3 z4 z1 z2)
                                :precision binary64
                                (let* ((t_0 (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0)))
                                     (t_1 (/ z3 (* z4 z4)))
                                     (t_2
                                      (-
                                       (/ z0 (+ t_1 (/ (/ z1 z2) z2)))
                                       (* (* (* t_0 (/ z0 z1)) (* z0 z2)) z2))))
                                (if (<= z1 -2.45e-88)
                                  t_2
                                  (if (<= z1 1e-5)
                                    (-
                                     (/ z0 (+ t_1 (/ z1 (* z2 z2))))
                                     (/ (* (* (* (* t_0 z0) z0) z2) z2) z1))
                                    t_2))))
                              double code(double z0, double z3, double z4, double z1, double z2) {
                              	double t_0 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
                              	double t_1 = z3 / (z4 * z4);
                              	double t_2 = (z0 / (t_1 + ((z1 / z2) / z2))) - (((t_0 * (z0 / z1)) * (z0 * z2)) * z2);
                              	double tmp;
                              	if (z1 <= -2.45e-88) {
                              		tmp = t_2;
                              	} else if (z1 <= 1e-5) {
                              		tmp = (z0 / (t_1 + (z1 / (z2 * z2)))) - (((((t_0 * z0) * z0) * z2) * z2) / z1);
                              	} 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(z0, z3, z4, z1, z2)
                              use fmin_fmax_functions
                                  real(8), intent (in) :: z0
                                  real(8), intent (in) :: z3
                                  real(8), intent (in) :: z4
                                  real(8), intent (in) :: z1
                                  real(8), intent (in) :: z2
                                  real(8) :: t_0
                                  real(8) :: t_1
                                  real(8) :: t_2
                                  real(8) :: tmp
                                  t_0 = (-0.5d0) - (((0.25d0 * z0) - (-0.3333333333333333d0)) * z0)
                                  t_1 = z3 / (z4 * z4)
                                  t_2 = (z0 / (t_1 + ((z1 / z2) / z2))) - (((t_0 * (z0 / z1)) * (z0 * z2)) * z2)
                                  if (z1 <= (-2.45d-88)) then
                                      tmp = t_2
                                  else if (z1 <= 1d-5) then
                                      tmp = (z0 / (t_1 + (z1 / (z2 * z2)))) - (((((t_0 * z0) * z0) * z2) * z2) / z1)
                                  else
                                      tmp = t_2
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double z0, double z3, double z4, double z1, double z2) {
                              	double t_0 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
                              	double t_1 = z3 / (z4 * z4);
                              	double t_2 = (z0 / (t_1 + ((z1 / z2) / z2))) - (((t_0 * (z0 / z1)) * (z0 * z2)) * z2);
                              	double tmp;
                              	if (z1 <= -2.45e-88) {
                              		tmp = t_2;
                              	} else if (z1 <= 1e-5) {
                              		tmp = (z0 / (t_1 + (z1 / (z2 * z2)))) - (((((t_0 * z0) * z0) * z2) * z2) / z1);
                              	} else {
                              		tmp = t_2;
                              	}
                              	return tmp;
                              }
                              
                              def code(z0, z3, z4, z1, z2):
                              	t_0 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)
                              	t_1 = z3 / (z4 * z4)
                              	t_2 = (z0 / (t_1 + ((z1 / z2) / z2))) - (((t_0 * (z0 / z1)) * (z0 * z2)) * z2)
                              	tmp = 0
                              	if z1 <= -2.45e-88:
                              		tmp = t_2
                              	elif z1 <= 1e-5:
                              		tmp = (z0 / (t_1 + (z1 / (z2 * z2)))) - (((((t_0 * z0) * z0) * z2) * z2) / z1)
                              	else:
                              		tmp = t_2
                              	return tmp
                              
                              function code(z0, z3, z4, z1, z2)
                              	t_0 = Float64(-0.5 - Float64(Float64(Float64(0.25 * z0) - -0.3333333333333333) * z0))
                              	t_1 = Float64(z3 / Float64(z4 * z4))
                              	t_2 = Float64(Float64(z0 / Float64(t_1 + Float64(Float64(z1 / z2) / z2))) - Float64(Float64(Float64(t_0 * Float64(z0 / z1)) * Float64(z0 * z2)) * z2))
                              	tmp = 0.0
                              	if (z1 <= -2.45e-88)
                              		tmp = t_2;
                              	elseif (z1 <= 1e-5)
                              		tmp = Float64(Float64(z0 / Float64(t_1 + Float64(z1 / Float64(z2 * z2)))) - Float64(Float64(Float64(Float64(Float64(t_0 * z0) * z0) * z2) * z2) / z1));
                              	else
                              		tmp = t_2;
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(z0, z3, z4, z1, z2)
                              	t_0 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
                              	t_1 = z3 / (z4 * z4);
                              	t_2 = (z0 / (t_1 + ((z1 / z2) / z2))) - (((t_0 * (z0 / z1)) * (z0 * z2)) * z2);
                              	tmp = 0.0;
                              	if (z1 <= -2.45e-88)
                              		tmp = t_2;
                              	elseif (z1 <= 1e-5)
                              		tmp = (z0 / (t_1 + (z1 / (z2 * z2)))) - (((((t_0 * z0) * z0) * z2) * z2) / z1);
                              	else
                              		tmp = t_2;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[z0_, z3_, z4_, z1_, z2_] := Block[{t$95$0 = N[(-0.5 - N[(N[(N[(0.25 * z0), $MachinePrecision] - -0.3333333333333333), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z0 / N[(t$95$1 + N[(N[(z1 / z2), $MachinePrecision] / z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t$95$0 * N[(z0 / z1), $MachinePrecision]), $MachinePrecision] * N[(z0 * z2), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z1, -2.45e-88], t$95$2, If[LessEqual[z1, 1e-5], N[(N[(z0 / N[(t$95$1 + N[(z1 / N[(z2 * z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(N[(t$95$0 * z0), $MachinePrecision] * z0), $MachinePrecision] * z2), $MachinePrecision] * z2), $MachinePrecision] / z1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
                              
                              \begin{array}{l}
                              t_0 := -0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\\
                              t_1 := \frac{z3}{z4 \cdot z4}\\
                              t_2 := \frac{z0}{t\_1 + \frac{\frac{z1}{z2}}{z2}} - \left(\left(t\_0 \cdot \frac{z0}{z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2\\
                              \mathbf{if}\;z1 \leq -2.45 \cdot 10^{-88}:\\
                              \;\;\;\;t\_2\\
                              
                              \mathbf{elif}\;z1 \leq 10^{-5}:\\
                              \;\;\;\;\frac{z0}{t\_1 + \frac{z1}{z2 \cdot z2}} - \frac{\left(\left(\left(t\_0 \cdot z0\right) \cdot z0\right) \cdot z2\right) \cdot z2}{z1}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;t\_2\\
                              
                              
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if z1 < -2.4500000000000001e-88 or 1.0000000000000001e-5 < z1

                                1. Initial program 51.9%

                                  \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                2. Step-by-step derivation
                                  1. lift-*.f64N/A

                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                                  2. lift-*.f64N/A

                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
                                  3. associate-*r*N/A

                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                                  4. lower-*.f64N/A

                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                                3. Applied rewrites65.8%

                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2} \]
                                4. Step-by-step derivation
                                  1. lift-/.f64N/A

                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{z1}{z2 \cdot z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                                  2. lift-*.f64N/A

                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{\color{blue}{z2 \cdot z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                                  3. associate-/r*N/A

                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                                  4. lower-/.f64N/A

                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                                  5. lower-/.f6468.3%

                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{\color{blue}{\frac{z1}{z2}}}{z2}} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                                5. Applied rewrites68.3%

                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                                6. Taylor expanded in z3 around 0

                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{\frac{z1}{z2}}{z2}} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\color{blue}{z1}}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]
                                7. Step-by-step derivation
                                  1. Applied rewrites57.3%

                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{\frac{z1}{z2}}{z2}} - \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\color{blue}{z1}}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2 \]

                                  if -2.4500000000000001e-88 < z1 < 1.0000000000000001e-5

                                  1. Initial program 51.9%

                                    \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                  2. Taylor expanded in z3 around 0

                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites47.3%

                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                    2. Step-by-step derivation
                                      1. lift-*.f64N/A

                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                                      2. lift-*.f64N/A

                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right)} \cdot \left(z2 \cdot z2\right) \]
                                      3. associate-*l*N/A

                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0}{z1} \cdot \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \left(z2 \cdot z2\right)\right)} \]
                                      4. lift-/.f64N/A

                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0}{z1}} \cdot \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \left(z2 \cdot z2\right)\right) \]
                                      5. associate-*l/N/A

                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0 \cdot \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \left(z2 \cdot z2\right)\right)}{z1}} \]
                                      6. associate-*l*N/A

                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \frac{\color{blue}{\left(z0 \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)}}{z1} \]
                                      7. *-commutativeN/A

                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \frac{\color{blue}{\left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0\right)} \cdot \left(z2 \cdot z2\right)}{z1} \]
                                      8. lift-*.f64N/A

                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \frac{\color{blue}{\left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0\right)} \cdot \left(z2 \cdot z2\right)}{z1} \]
                                      9. lift-*.f64N/A

                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \frac{\color{blue}{\left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0\right) \cdot \left(z2 \cdot z2\right)}}{z1} \]
                                    3. Applied rewrites56.4%

                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{\left(\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0\right) \cdot z2\right) \cdot z2}{z1}} \]
                                  4. Recombined 2 regimes into one program.
                                  5. Add Preprocessing

                                  Alternative 10: 59.2% accurate, 1.0× speedup?

                                  \[\begin{array}{l} t_0 := \left|z2\right| \cdot \left|z2\right|\\ t_1 := -0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\\ t_2 := \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{t\_0}}\\ \mathbf{if}\;\left|z2\right| \leq 10^{-41}:\\ \;\;\;\;t\_2 - \frac{z0 \cdot \left(\left(t\_1 \cdot \left|z2\right|\right) \cdot \left(\left|z2\right| \cdot z0\right)\right)}{z1}\\ \mathbf{elif}\;\left|z2\right| \leq 2 \cdot 10^{+133}:\\ \;\;\;\;t\_2 - \frac{\left(t\_1 \cdot z0\right) \cdot z0}{z1} \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_2 - \left(\left(\frac{z0}{z1} \cdot \left(-0.5 \cdot z0\right)\right) \cdot \left|z2\right|\right) \cdot \left|z2\right|\\ \end{array} \]
                                  (FPCore (z0 z3 z4 z1 z2)
                                    :precision binary64
                                    (let* ((t_0 (* (fabs z2) (fabs z2)))
                                         (t_1 (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0)))
                                         (t_2 (/ z0 (+ (/ z3 (* z4 z4)) (/ z1 t_0)))))
                                    (if (<= (fabs z2) 1e-41)
                                      (- t_2 (/ (* z0 (* (* t_1 (fabs z2)) (* (fabs z2) z0))) z1))
                                      (if (<= (fabs z2) 2e+133)
                                        (- t_2 (* (/ (* (* t_1 z0) z0) z1) t_0))
                                        (- t_2 (* (* (* (/ z0 z1) (* -0.5 z0)) (fabs z2)) (fabs z2)))))))
                                  double code(double z0, double z3, double z4, double z1, double z2) {
                                  	double t_0 = fabs(z2) * fabs(z2);
                                  	double t_1 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
                                  	double t_2 = z0 / ((z3 / (z4 * z4)) + (z1 / t_0));
                                  	double tmp;
                                  	if (fabs(z2) <= 1e-41) {
                                  		tmp = t_2 - ((z0 * ((t_1 * fabs(z2)) * (fabs(z2) * z0))) / z1);
                                  	} else if (fabs(z2) <= 2e+133) {
                                  		tmp = t_2 - ((((t_1 * z0) * z0) / z1) * t_0);
                                  	} else {
                                  		tmp = t_2 - ((((z0 / z1) * (-0.5 * z0)) * fabs(z2)) * fabs(z2));
                                  	}
                                  	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(z0, z3, z4, z1, z2)
                                  use fmin_fmax_functions
                                      real(8), intent (in) :: z0
                                      real(8), intent (in) :: z3
                                      real(8), intent (in) :: z4
                                      real(8), intent (in) :: z1
                                      real(8), intent (in) :: z2
                                      real(8) :: t_0
                                      real(8) :: t_1
                                      real(8) :: t_2
                                      real(8) :: tmp
                                      t_0 = abs(z2) * abs(z2)
                                      t_1 = (-0.5d0) - (((0.25d0 * z0) - (-0.3333333333333333d0)) * z0)
                                      t_2 = z0 / ((z3 / (z4 * z4)) + (z1 / t_0))
                                      if (abs(z2) <= 1d-41) then
                                          tmp = t_2 - ((z0 * ((t_1 * abs(z2)) * (abs(z2) * z0))) / z1)
                                      else if (abs(z2) <= 2d+133) then
                                          tmp = t_2 - ((((t_1 * z0) * z0) / z1) * t_0)
                                      else
                                          tmp = t_2 - ((((z0 / z1) * ((-0.5d0) * z0)) * abs(z2)) * abs(z2))
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double z0, double z3, double z4, double z1, double z2) {
                                  	double t_0 = Math.abs(z2) * Math.abs(z2);
                                  	double t_1 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
                                  	double t_2 = z0 / ((z3 / (z4 * z4)) + (z1 / t_0));
                                  	double tmp;
                                  	if (Math.abs(z2) <= 1e-41) {
                                  		tmp = t_2 - ((z0 * ((t_1 * Math.abs(z2)) * (Math.abs(z2) * z0))) / z1);
                                  	} else if (Math.abs(z2) <= 2e+133) {
                                  		tmp = t_2 - ((((t_1 * z0) * z0) / z1) * t_0);
                                  	} else {
                                  		tmp = t_2 - ((((z0 / z1) * (-0.5 * z0)) * Math.abs(z2)) * Math.abs(z2));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(z0, z3, z4, z1, z2):
                                  	t_0 = math.fabs(z2) * math.fabs(z2)
                                  	t_1 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)
                                  	t_2 = z0 / ((z3 / (z4 * z4)) + (z1 / t_0))
                                  	tmp = 0
                                  	if math.fabs(z2) <= 1e-41:
                                  		tmp = t_2 - ((z0 * ((t_1 * math.fabs(z2)) * (math.fabs(z2) * z0))) / z1)
                                  	elif math.fabs(z2) <= 2e+133:
                                  		tmp = t_2 - ((((t_1 * z0) * z0) / z1) * t_0)
                                  	else:
                                  		tmp = t_2 - ((((z0 / z1) * (-0.5 * z0)) * math.fabs(z2)) * math.fabs(z2))
                                  	return tmp
                                  
                                  function code(z0, z3, z4, z1, z2)
                                  	t_0 = Float64(abs(z2) * abs(z2))
                                  	t_1 = Float64(-0.5 - Float64(Float64(Float64(0.25 * z0) - -0.3333333333333333) * z0))
                                  	t_2 = Float64(z0 / Float64(Float64(z3 / Float64(z4 * z4)) + Float64(z1 / t_0)))
                                  	tmp = 0.0
                                  	if (abs(z2) <= 1e-41)
                                  		tmp = Float64(t_2 - Float64(Float64(z0 * Float64(Float64(t_1 * abs(z2)) * Float64(abs(z2) * z0))) / z1));
                                  	elseif (abs(z2) <= 2e+133)
                                  		tmp = Float64(t_2 - Float64(Float64(Float64(Float64(t_1 * z0) * z0) / z1) * t_0));
                                  	else
                                  		tmp = Float64(t_2 - Float64(Float64(Float64(Float64(z0 / z1) * Float64(-0.5 * z0)) * abs(z2)) * abs(z2)));
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(z0, z3, z4, z1, z2)
                                  	t_0 = abs(z2) * abs(z2);
                                  	t_1 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
                                  	t_2 = z0 / ((z3 / (z4 * z4)) + (z1 / t_0));
                                  	tmp = 0.0;
                                  	if (abs(z2) <= 1e-41)
                                  		tmp = t_2 - ((z0 * ((t_1 * abs(z2)) * (abs(z2) * z0))) / z1);
                                  	elseif (abs(z2) <= 2e+133)
                                  		tmp = t_2 - ((((t_1 * z0) * z0) / z1) * t_0);
                                  	else
                                  		tmp = t_2 - ((((z0 / z1) * (-0.5 * z0)) * abs(z2)) * abs(z2));
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[z0_, z3_, z4_, z1_, z2_] := Block[{t$95$0 = N[(N[Abs[z2], $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-0.5 - N[(N[(N[(0.25 * z0), $MachinePrecision] - -0.3333333333333333), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z0 / N[(N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision] + N[(z1 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[z2], $MachinePrecision], 1e-41], N[(t$95$2 - N[(N[(z0 * N[(N[(t$95$1 * N[Abs[z2], $MachinePrecision]), $MachinePrecision] * N[(N[Abs[z2], $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z1), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[z2], $MachinePrecision], 2e+133], N[(t$95$2 - N[(N[(N[(N[(t$95$1 * z0), $MachinePrecision] * z0), $MachinePrecision] / z1), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(t$95$2 - N[(N[(N[(N[(z0 / z1), $MachinePrecision] * N[(-0.5 * z0), $MachinePrecision]), $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
                                  
                                  \begin{array}{l}
                                  t_0 := \left|z2\right| \cdot \left|z2\right|\\
                                  t_1 := -0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\\
                                  t_2 := \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{t\_0}}\\
                                  \mathbf{if}\;\left|z2\right| \leq 10^{-41}:\\
                                  \;\;\;\;t\_2 - \frac{z0 \cdot \left(\left(t\_1 \cdot \left|z2\right|\right) \cdot \left(\left|z2\right| \cdot z0\right)\right)}{z1}\\
                                  
                                  \mathbf{elif}\;\left|z2\right| \leq 2 \cdot 10^{+133}:\\
                                  \;\;\;\;t\_2 - \frac{\left(t\_1 \cdot z0\right) \cdot z0}{z1} \cdot t\_0\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;t\_2 - \left(\left(\frac{z0}{z1} \cdot \left(-0.5 \cdot z0\right)\right) \cdot \left|z2\right|\right) \cdot \left|z2\right|\\
                                  
                                  
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 3 regimes
                                  2. if z2 < 1e-41

                                    1. Initial program 51.9%

                                      \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                    2. Taylor expanded in z3 around 0

                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites47.3%

                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                      2. Step-by-step derivation
                                        1. lift-*.f64N/A

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                                        2. lift-*.f64N/A

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right)} \cdot \left(z2 \cdot z2\right) \]
                                        3. lift-*.f64N/A

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \color{blue}{\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)}\right) \cdot \left(z2 \cdot z2\right) \]
                                        4. associate-*r*N/A

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot z0\right)} \cdot \left(z2 \cdot z2\right) \]
                                        5. associate-*l*N/A

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(z0 \cdot \left(z2 \cdot z2\right)\right)} \]
                                        6. lower-*.f64N/A

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(z0 \cdot \left(z2 \cdot z2\right)\right)} \]
                                        7. lower-*.f64N/A

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right)} \cdot \left(z0 \cdot \left(z2 \cdot z2\right)\right) \]
                                        8. lift-*.f64N/A

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(z0 \cdot \color{blue}{\left(z2 \cdot z2\right)}\right) \]
                                        9. associate-*l*N/A

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z0 \cdot z2\right) \cdot z2\right)} \]
                                        10. lift-*.f64N/A

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\color{blue}{\left(z0 \cdot z2\right)} \cdot z2\right) \]
                                        11. lower-*.f6452.8%

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z0 \cdot z2\right) \cdot z2\right)} \]
                                        12. lift-*.f64N/A

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\color{blue}{\left(z0 \cdot z2\right)} \cdot z2\right) \]
                                        13. *-commutativeN/A

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\color{blue}{\left(z2 \cdot z0\right)} \cdot z2\right) \]
                                        14. lower-*.f6452.8%

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\color{blue}{\left(z2 \cdot z0\right)} \cdot z2\right) \]
                                      3. Applied rewrites52.8%

                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right)} \]
                                      4. Step-by-step derivation
                                        1. lift-*.f64N/A

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right)} \]
                                        2. lift-*.f64N/A

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right)} \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right) \]
                                        3. associate-*l*N/A

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right)\right)} \]
                                        4. lift-/.f64N/A

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0}{z1}} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right)\right) \]
                                        5. associate-*l/N/A

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0 \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right)\right)}{z1}} \]
                                        6. lower-/.f64N/A

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0 \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right)\right)}{z1}} \]
                                      5. Applied rewrites54.6%

                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0 \cdot \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z2\right) \cdot \left(z2 \cdot z0\right)\right)}{z1}} \]

                                      if 1e-41 < z2 < 2e133

                                      1. Initial program 51.9%

                                        \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                      2. Taylor expanded in z3 around 0

                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites47.3%

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                        2. Step-by-step derivation
                                          1. lift-*.f64N/A

                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right)} \cdot \left(z2 \cdot z2\right) \]
                                          2. lift-/.f64N/A

                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\color{blue}{\frac{z0}{z1}} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                          3. associate-*l/N/A

                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0 \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)}{z1}} \cdot \left(z2 \cdot z2\right) \]
                                          4. *-commutativeN/A

                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \frac{\color{blue}{\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0}}{z1} \cdot \left(z2 \cdot z2\right) \]
                                          5. lift-*.f64N/A

                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \frac{\color{blue}{\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0}}{z1} \cdot \left(z2 \cdot z2\right) \]
                                          6. lower-/.f6447.7%

                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0}{z1}} \cdot \left(z2 \cdot z2\right) \]
                                        3. Applied rewrites47.7%

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0}{z1}} \cdot \left(z2 \cdot z2\right) \]

                                        if 2e133 < z2

                                        1. Initial program 51.9%

                                          \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                        2. Taylor expanded in z3 around 0

                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites47.3%

                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                          2. Taylor expanded in z0 around 0

                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\color{blue}{\frac{-1}{2}} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites42.6%

                                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\color{blue}{-0.5} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                            2. Step-by-step derivation
                                              1. lift-*.f64N/A

                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                                              2. lift-*.f64N/A

                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
                                              3. associate-*r*N/A

                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                                              4. lower-*.f64N/A

                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                                            3. Applied rewrites45.7%

                                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(-0.5 \cdot z0\right) \cdot \left(\frac{z0}{z1} \cdot z2\right)\right) \cdot z2} \]
                                            4. Step-by-step derivation
                                              1. lift-*.f64N/A

                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{-1}{2} \cdot z0\right) \cdot \left(\frac{z0}{z1} \cdot z2\right)\right)} \cdot z2 \]
                                              2. lift-*.f64N/A

                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} \cdot z0\right) \cdot \color{blue}{\left(\frac{z0}{z1} \cdot z2\right)}\right) \cdot z2 \]
                                              3. associate-*r*N/A

                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(\frac{-1}{2} \cdot z0\right) \cdot \frac{z0}{z1}\right) \cdot z2\right)} \cdot z2 \]
                                              4. lower-*.f64N/A

                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(\frac{-1}{2} \cdot z0\right) \cdot \frac{z0}{z1}\right) \cdot z2\right)} \cdot z2 \]
                                              5. *-commutativeN/A

                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right)} \cdot z2\right) \cdot z2 \]
                                              6. lower-*.f6450.2%

                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\color{blue}{\left(\frac{z0}{z1} \cdot \left(-0.5 \cdot z0\right)\right)} \cdot z2\right) \cdot z2 \]
                                            5. Applied rewrites50.2%

                                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(-0.5 \cdot z0\right)\right) \cdot z2\right)} \cdot z2 \]
                                          4. Recombined 3 regimes into one program.
                                          5. Add Preprocessing

                                          Alternative 11: 59.0% accurate, 1.1× speedup?

                                          \[\begin{array}{l} t_0 := -0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\\ t_1 := \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{\left|z2\right| \cdot \left|z2\right|}}\\ \mathbf{if}\;\left|z2\right| \leq 8 \cdot 10^{-60}:\\ \;\;\;\;t\_1 - \frac{z0 \cdot \left(\left(t\_0 \cdot \left|z2\right|\right) \cdot \left(\left|z2\right| \cdot z0\right)\right)}{z1}\\ \mathbf{else}:\\ \;\;\;\;t\_1 - \frac{\left(\left(\left(t\_0 \cdot z0\right) \cdot z0\right) \cdot \left|z2\right|\right) \cdot \left|z2\right|}{z1}\\ \end{array} \]
                                          (FPCore (z0 z3 z4 z1 z2)
                                            :precision binary64
                                            (let* ((t_0 (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0)))
                                                 (t_1
                                                  (/ z0 (+ (/ z3 (* z4 z4)) (/ z1 (* (fabs z2) (fabs z2)))))))
                                            (if (<= (fabs z2) 8e-60)
                                              (- t_1 (/ (* z0 (* (* t_0 (fabs z2)) (* (fabs z2) z0))) z1))
                                              (- t_1 (/ (* (* (* (* t_0 z0) z0) (fabs z2)) (fabs z2)) z1)))))
                                          double code(double z0, double z3, double z4, double z1, double z2) {
                                          	double t_0 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
                                          	double t_1 = z0 / ((z3 / (z4 * z4)) + (z1 / (fabs(z2) * fabs(z2))));
                                          	double tmp;
                                          	if (fabs(z2) <= 8e-60) {
                                          		tmp = t_1 - ((z0 * ((t_0 * fabs(z2)) * (fabs(z2) * z0))) / z1);
                                          	} else {
                                          		tmp = t_1 - (((((t_0 * z0) * z0) * fabs(z2)) * fabs(z2)) / z1);
                                          	}
                                          	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(z0, z3, z4, z1, z2)
                                          use fmin_fmax_functions
                                              real(8), intent (in) :: z0
                                              real(8), intent (in) :: z3
                                              real(8), intent (in) :: z4
                                              real(8), intent (in) :: z1
                                              real(8), intent (in) :: z2
                                              real(8) :: t_0
                                              real(8) :: t_1
                                              real(8) :: tmp
                                              t_0 = (-0.5d0) - (((0.25d0 * z0) - (-0.3333333333333333d0)) * z0)
                                              t_1 = z0 / ((z3 / (z4 * z4)) + (z1 / (abs(z2) * abs(z2))))
                                              if (abs(z2) <= 8d-60) then
                                                  tmp = t_1 - ((z0 * ((t_0 * abs(z2)) * (abs(z2) * z0))) / z1)
                                              else
                                                  tmp = t_1 - (((((t_0 * z0) * z0) * abs(z2)) * abs(z2)) / z1)
                                              end if
                                              code = tmp
                                          end function
                                          
                                          public static double code(double z0, double z3, double z4, double z1, double z2) {
                                          	double t_0 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
                                          	double t_1 = z0 / ((z3 / (z4 * z4)) + (z1 / (Math.abs(z2) * Math.abs(z2))));
                                          	double tmp;
                                          	if (Math.abs(z2) <= 8e-60) {
                                          		tmp = t_1 - ((z0 * ((t_0 * Math.abs(z2)) * (Math.abs(z2) * z0))) / z1);
                                          	} else {
                                          		tmp = t_1 - (((((t_0 * z0) * z0) * Math.abs(z2)) * Math.abs(z2)) / z1);
                                          	}
                                          	return tmp;
                                          }
                                          
                                          def code(z0, z3, z4, z1, z2):
                                          	t_0 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)
                                          	t_1 = z0 / ((z3 / (z4 * z4)) + (z1 / (math.fabs(z2) * math.fabs(z2))))
                                          	tmp = 0
                                          	if math.fabs(z2) <= 8e-60:
                                          		tmp = t_1 - ((z0 * ((t_0 * math.fabs(z2)) * (math.fabs(z2) * z0))) / z1)
                                          	else:
                                          		tmp = t_1 - (((((t_0 * z0) * z0) * math.fabs(z2)) * math.fabs(z2)) / z1)
                                          	return tmp
                                          
                                          function code(z0, z3, z4, z1, z2)
                                          	t_0 = Float64(-0.5 - Float64(Float64(Float64(0.25 * z0) - -0.3333333333333333) * z0))
                                          	t_1 = Float64(z0 / Float64(Float64(z3 / Float64(z4 * z4)) + Float64(z1 / Float64(abs(z2) * abs(z2)))))
                                          	tmp = 0.0
                                          	if (abs(z2) <= 8e-60)
                                          		tmp = Float64(t_1 - Float64(Float64(z0 * Float64(Float64(t_0 * abs(z2)) * Float64(abs(z2) * z0))) / z1));
                                          	else
                                          		tmp = Float64(t_1 - Float64(Float64(Float64(Float64(Float64(t_0 * z0) * z0) * abs(z2)) * abs(z2)) / z1));
                                          	end
                                          	return tmp
                                          end
                                          
                                          function tmp_2 = code(z0, z3, z4, z1, z2)
                                          	t_0 = -0.5 - (((0.25 * z0) - -0.3333333333333333) * z0);
                                          	t_1 = z0 / ((z3 / (z4 * z4)) + (z1 / (abs(z2) * abs(z2))));
                                          	tmp = 0.0;
                                          	if (abs(z2) <= 8e-60)
                                          		tmp = t_1 - ((z0 * ((t_0 * abs(z2)) * (abs(z2) * z0))) / z1);
                                          	else
                                          		tmp = t_1 - (((((t_0 * z0) * z0) * abs(z2)) * abs(z2)) / z1);
                                          	end
                                          	tmp_2 = tmp;
                                          end
                                          
                                          code[z0_, z3_, z4_, z1_, z2_] := Block[{t$95$0 = N[(-0.5 - N[(N[(N[(0.25 * z0), $MachinePrecision] - -0.3333333333333333), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z0 / N[(N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision] + N[(z1 / N[(N[Abs[z2], $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[z2], $MachinePrecision], 8e-60], N[(t$95$1 - N[(N[(z0 * N[(N[(t$95$0 * N[Abs[z2], $MachinePrecision]), $MachinePrecision] * N[(N[Abs[z2], $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z1), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(N[(N[(N[(N[(t$95$0 * z0), $MachinePrecision] * z0), $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision] / z1), $MachinePrecision]), $MachinePrecision]]]]
                                          
                                          \begin{array}{l}
                                          t_0 := -0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\\
                                          t_1 := \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{\left|z2\right| \cdot \left|z2\right|}}\\
                                          \mathbf{if}\;\left|z2\right| \leq 8 \cdot 10^{-60}:\\
                                          \;\;\;\;t\_1 - \frac{z0 \cdot \left(\left(t\_0 \cdot \left|z2\right|\right) \cdot \left(\left|z2\right| \cdot z0\right)\right)}{z1}\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;t\_1 - \frac{\left(\left(\left(t\_0 \cdot z0\right) \cdot z0\right) \cdot \left|z2\right|\right) \cdot \left|z2\right|}{z1}\\
                                          
                                          
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if z2 < 7.9999999999999998e-60

                                            1. Initial program 51.9%

                                              \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                            2. Taylor expanded in z3 around 0

                                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites47.3%

                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                              2. Step-by-step derivation
                                                1. lift-*.f64N/A

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                                                2. lift-*.f64N/A

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right)} \cdot \left(z2 \cdot z2\right) \]
                                                3. lift-*.f64N/A

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \color{blue}{\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)}\right) \cdot \left(z2 \cdot z2\right) \]
                                                4. associate-*r*N/A

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot z0\right)} \cdot \left(z2 \cdot z2\right) \]
                                                5. associate-*l*N/A

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(z0 \cdot \left(z2 \cdot z2\right)\right)} \]
                                                6. lower-*.f64N/A

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(z0 \cdot \left(z2 \cdot z2\right)\right)} \]
                                                7. lower-*.f64N/A

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right)} \cdot \left(z0 \cdot \left(z2 \cdot z2\right)\right) \]
                                                8. lift-*.f64N/A

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(z0 \cdot \color{blue}{\left(z2 \cdot z2\right)}\right) \]
                                                9. associate-*l*N/A

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z0 \cdot z2\right) \cdot z2\right)} \]
                                                10. lift-*.f64N/A

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\color{blue}{\left(z0 \cdot z2\right)} \cdot z2\right) \]
                                                11. lower-*.f6452.8%

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z0 \cdot z2\right) \cdot z2\right)} \]
                                                12. lift-*.f64N/A

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\color{blue}{\left(z0 \cdot z2\right)} \cdot z2\right) \]
                                                13. *-commutativeN/A

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\color{blue}{\left(z2 \cdot z0\right)} \cdot z2\right) \]
                                                14. lower-*.f6452.8%

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\color{blue}{\left(z2 \cdot z0\right)} \cdot z2\right) \]
                                              3. Applied rewrites52.8%

                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right)} \]
                                              4. Step-by-step derivation
                                                1. lift-*.f64N/A

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right)} \]
                                                2. lift-*.f64N/A

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right)} \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right) \]
                                                3. associate-*l*N/A

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right)\right)} \]
                                                4. lift-/.f64N/A

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0}{z1}} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right)\right) \]
                                                5. associate-*l/N/A

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0 \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right)\right)}{z1}} \]
                                                6. lower-/.f64N/A

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0 \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right)\right)}{z1}} \]
                                              5. Applied rewrites54.6%

                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0 \cdot \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z2\right) \cdot \left(z2 \cdot z0\right)\right)}{z1}} \]

                                              if 7.9999999999999998e-60 < z2

                                              1. Initial program 51.9%

                                                \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                              2. Taylor expanded in z3 around 0

                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites47.3%

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                2. Step-by-step derivation
                                                  1. lift-*.f64N/A

                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                                                  2. lift-*.f64N/A

                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right)} \cdot \left(z2 \cdot z2\right) \]
                                                  3. associate-*l*N/A

                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0}{z1} \cdot \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \left(z2 \cdot z2\right)\right)} \]
                                                  4. lift-/.f64N/A

                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0}{z1}} \cdot \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \left(z2 \cdot z2\right)\right) \]
                                                  5. associate-*l/N/A

                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0 \cdot \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot \left(z2 \cdot z2\right)\right)}{z1}} \]
                                                  6. associate-*l*N/A

                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \frac{\color{blue}{\left(z0 \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)}}{z1} \]
                                                  7. *-commutativeN/A

                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \frac{\color{blue}{\left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0\right)} \cdot \left(z2 \cdot z2\right)}{z1} \]
                                                  8. lift-*.f64N/A

                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \frac{\color{blue}{\left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0\right)} \cdot \left(z2 \cdot z2\right)}{z1} \]
                                                  9. lift-*.f64N/A

                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \frac{\color{blue}{\left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0\right) \cdot \left(z2 \cdot z2\right)}}{z1} \]
                                                3. Applied rewrites56.4%

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{\left(\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0\right) \cdot z2\right) \cdot z2}{z1}} \]
                                              4. Recombined 2 regimes into one program.
                                              5. Add Preprocessing

                                              Alternative 12: 56.2% accurate, 1.1× speedup?

                                              \[\begin{array}{l} t_0 := \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{\left|z2\right| \cdot \left|z2\right|}}\\ \mathbf{if}\;\left|z2\right| \leq 4.7 \cdot 10^{+126}:\\ \;\;\;\;t\_0 - \left(z0 \cdot \frac{-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0}{z1}\right) \cdot \left(\left(\left|z2\right| \cdot z0\right) \cdot \left|z2\right|\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0 - \left(\left(\frac{z0}{z1} \cdot \left(-0.5 \cdot z0\right)\right) \cdot \left|z2\right|\right) \cdot \left|z2\right|\\ \end{array} \]
                                              (FPCore (z0 z3 z4 z1 z2)
                                                :precision binary64
                                                (let* ((t_0
                                                      (/ z0 (+ (/ z3 (* z4 z4)) (/ z1 (* (fabs z2) (fabs z2)))))))
                                                (if (<= (fabs z2) 4.7e+126)
                                                  (-
                                                   t_0
                                                   (*
                                                    (*
                                                     z0
                                                     (/ (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0)) z1))
                                                    (* (* (fabs z2) z0) (fabs z2))))
                                                  (- t_0 (* (* (* (/ z0 z1) (* -0.5 z0)) (fabs z2)) (fabs z2))))))
                                              double code(double z0, double z3, double z4, double z1, double z2) {
                                              	double t_0 = z0 / ((z3 / (z4 * z4)) + (z1 / (fabs(z2) * fabs(z2))));
                                              	double tmp;
                                              	if (fabs(z2) <= 4.7e+126) {
                                              		tmp = t_0 - ((z0 * ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) / z1)) * ((fabs(z2) * z0) * fabs(z2)));
                                              	} else {
                                              		tmp = t_0 - ((((z0 / z1) * (-0.5 * z0)) * fabs(z2)) * fabs(z2));
                                              	}
                                              	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(z0, z3, z4, z1, z2)
                                              use fmin_fmax_functions
                                                  real(8), intent (in) :: z0
                                                  real(8), intent (in) :: z3
                                                  real(8), intent (in) :: z4
                                                  real(8), intent (in) :: z1
                                                  real(8), intent (in) :: z2
                                                  real(8) :: t_0
                                                  real(8) :: tmp
                                                  t_0 = z0 / ((z3 / (z4 * z4)) + (z1 / (abs(z2) * abs(z2))))
                                                  if (abs(z2) <= 4.7d+126) then
                                                      tmp = t_0 - ((z0 * (((-0.5d0) - (((0.25d0 * z0) - (-0.3333333333333333d0)) * z0)) / z1)) * ((abs(z2) * z0) * abs(z2)))
                                                  else
                                                      tmp = t_0 - ((((z0 / z1) * ((-0.5d0) * z0)) * abs(z2)) * abs(z2))
                                                  end if
                                                  code = tmp
                                              end function
                                              
                                              public static double code(double z0, double z3, double z4, double z1, double z2) {
                                              	double t_0 = z0 / ((z3 / (z4 * z4)) + (z1 / (Math.abs(z2) * Math.abs(z2))));
                                              	double tmp;
                                              	if (Math.abs(z2) <= 4.7e+126) {
                                              		tmp = t_0 - ((z0 * ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) / z1)) * ((Math.abs(z2) * z0) * Math.abs(z2)));
                                              	} else {
                                              		tmp = t_0 - ((((z0 / z1) * (-0.5 * z0)) * Math.abs(z2)) * Math.abs(z2));
                                              	}
                                              	return tmp;
                                              }
                                              
                                              def code(z0, z3, z4, z1, z2):
                                              	t_0 = z0 / ((z3 / (z4 * z4)) + (z1 / (math.fabs(z2) * math.fabs(z2))))
                                              	tmp = 0
                                              	if math.fabs(z2) <= 4.7e+126:
                                              		tmp = t_0 - ((z0 * ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) / z1)) * ((math.fabs(z2) * z0) * math.fabs(z2)))
                                              	else:
                                              		tmp = t_0 - ((((z0 / z1) * (-0.5 * z0)) * math.fabs(z2)) * math.fabs(z2))
                                              	return tmp
                                              
                                              function code(z0, z3, z4, z1, z2)
                                              	t_0 = Float64(z0 / Float64(Float64(z3 / Float64(z4 * z4)) + Float64(z1 / Float64(abs(z2) * abs(z2)))))
                                              	tmp = 0.0
                                              	if (abs(z2) <= 4.7e+126)
                                              		tmp = Float64(t_0 - Float64(Float64(z0 * Float64(Float64(-0.5 - Float64(Float64(Float64(0.25 * z0) - -0.3333333333333333) * z0)) / z1)) * Float64(Float64(abs(z2) * z0) * abs(z2))));
                                              	else
                                              		tmp = Float64(t_0 - Float64(Float64(Float64(Float64(z0 / z1) * Float64(-0.5 * z0)) * abs(z2)) * abs(z2)));
                                              	end
                                              	return tmp
                                              end
                                              
                                              function tmp_2 = code(z0, z3, z4, z1, z2)
                                              	t_0 = z0 / ((z3 / (z4 * z4)) + (z1 / (abs(z2) * abs(z2))));
                                              	tmp = 0.0;
                                              	if (abs(z2) <= 4.7e+126)
                                              		tmp = t_0 - ((z0 * ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) / z1)) * ((abs(z2) * z0) * abs(z2)));
                                              	else
                                              		tmp = t_0 - ((((z0 / z1) * (-0.5 * z0)) * abs(z2)) * abs(z2));
                                              	end
                                              	tmp_2 = tmp;
                                              end
                                              
                                              code[z0_, z3_, z4_, z1_, z2_] := Block[{t$95$0 = N[(z0 / N[(N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision] + N[(z1 / N[(N[Abs[z2], $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[z2], $MachinePrecision], 4.7e+126], N[(t$95$0 - N[(N[(z0 * N[(N[(-0.5 - N[(N[(N[(0.25 * z0), $MachinePrecision] - -0.3333333333333333), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision] / z1), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Abs[z2], $MachinePrecision] * z0), $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 - N[(N[(N[(N[(z0 / z1), $MachinePrecision] * N[(-0.5 * z0), $MachinePrecision]), $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                              
                                              \begin{array}{l}
                                              t_0 := \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{\left|z2\right| \cdot \left|z2\right|}}\\
                                              \mathbf{if}\;\left|z2\right| \leq 4.7 \cdot 10^{+126}:\\
                                              \;\;\;\;t\_0 - \left(z0 \cdot \frac{-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0}{z1}\right) \cdot \left(\left(\left|z2\right| \cdot z0\right) \cdot \left|z2\right|\right)\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;t\_0 - \left(\left(\frac{z0}{z1} \cdot \left(-0.5 \cdot z0\right)\right) \cdot \left|z2\right|\right) \cdot \left|z2\right|\\
                                              
                                              
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 2 regimes
                                              2. if z2 < 4.6999999999999999e126

                                                1. Initial program 51.9%

                                                  \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                2. Taylor expanded in z3 around 0

                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                3. Step-by-step derivation
                                                  1. Applied rewrites47.3%

                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                  2. Step-by-step derivation
                                                    1. lift-*.f64N/A

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                                                    2. lift-*.f64N/A

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right)} \cdot \left(z2 \cdot z2\right) \]
                                                    3. lift-*.f64N/A

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \color{blue}{\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)}\right) \cdot \left(z2 \cdot z2\right) \]
                                                    4. associate-*r*N/A

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot z0\right)} \cdot \left(z2 \cdot z2\right) \]
                                                    5. associate-*l*N/A

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(z0 \cdot \left(z2 \cdot z2\right)\right)} \]
                                                    6. lower-*.f64N/A

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(z0 \cdot \left(z2 \cdot z2\right)\right)} \]
                                                    7. lower-*.f64N/A

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right)} \cdot \left(z0 \cdot \left(z2 \cdot z2\right)\right) \]
                                                    8. lift-*.f64N/A

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(z0 \cdot \color{blue}{\left(z2 \cdot z2\right)}\right) \]
                                                    9. associate-*l*N/A

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z0 \cdot z2\right) \cdot z2\right)} \]
                                                    10. lift-*.f64N/A

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\color{blue}{\left(z0 \cdot z2\right)} \cdot z2\right) \]
                                                    11. lower-*.f6452.8%

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z0 \cdot z2\right) \cdot z2\right)} \]
                                                    12. lift-*.f64N/A

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\color{blue}{\left(z0 \cdot z2\right)} \cdot z2\right) \]
                                                    13. *-commutativeN/A

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\color{blue}{\left(z2 \cdot z0\right)} \cdot z2\right) \]
                                                    14. lower-*.f6452.8%

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\color{blue}{\left(z2 \cdot z0\right)} \cdot z2\right) \]
                                                  3. Applied rewrites52.8%

                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right)} \]
                                                  4. Step-by-step derivation
                                                    1. lift-*.f64N/A

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right)} \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right) \]
                                                    2. lift-/.f64N/A

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\color{blue}{\frac{z0}{z1}} \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right) \]
                                                    3. associate-*l/N/A

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)}{z1}} \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right) \]
                                                    4. associate-/l*N/A

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z0 \cdot \frac{\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0}{z1}\right)} \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right) \]
                                                    5. lower-*.f64N/A

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z0 \cdot \frac{\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0}{z1}\right)} \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right) \]
                                                    6. lower-/.f6452.8%

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z0 \cdot \color{blue}{\frac{-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0}{z1}}\right) \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right) \]
                                                  5. Applied rewrites52.8%

                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z0 \cdot \frac{-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0}{z1}\right)} \cdot \left(\left(z2 \cdot z0\right) \cdot z2\right) \]

                                                  if 4.6999999999999999e126 < z2

                                                  1. Initial program 51.9%

                                                    \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                  2. Taylor expanded in z3 around 0

                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites47.3%

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                    2. Taylor expanded in z0 around 0

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\color{blue}{\frac{-1}{2}} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites42.6%

                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\color{blue}{-0.5} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                      2. Step-by-step derivation
                                                        1. lift-*.f64N/A

                                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                                                        2. lift-*.f64N/A

                                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
                                                        3. associate-*r*N/A

                                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                                                        4. lower-*.f64N/A

                                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                                                      3. Applied rewrites45.7%

                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(-0.5 \cdot z0\right) \cdot \left(\frac{z0}{z1} \cdot z2\right)\right) \cdot z2} \]
                                                      4. Step-by-step derivation
                                                        1. lift-*.f64N/A

                                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{-1}{2} \cdot z0\right) \cdot \left(\frac{z0}{z1} \cdot z2\right)\right)} \cdot z2 \]
                                                        2. lift-*.f64N/A

                                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} \cdot z0\right) \cdot \color{blue}{\left(\frac{z0}{z1} \cdot z2\right)}\right) \cdot z2 \]
                                                        3. associate-*r*N/A

                                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(\frac{-1}{2} \cdot z0\right) \cdot \frac{z0}{z1}\right) \cdot z2\right)} \cdot z2 \]
                                                        4. lower-*.f64N/A

                                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(\frac{-1}{2} \cdot z0\right) \cdot \frac{z0}{z1}\right) \cdot z2\right)} \cdot z2 \]
                                                        5. *-commutativeN/A

                                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right)} \cdot z2\right) \cdot z2 \]
                                                        6. lower-*.f6450.2%

                                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\color{blue}{\left(\frac{z0}{z1} \cdot \left(-0.5 \cdot z0\right)\right)} \cdot z2\right) \cdot z2 \]
                                                      5. Applied rewrites50.2%

                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(-0.5 \cdot z0\right)\right) \cdot z2\right)} \cdot z2 \]
                                                    4. Recombined 2 regimes into one program.
                                                    5. Add Preprocessing

                                                    Alternative 13: 55.4% accurate, 1.3× speedup?

                                                    \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{z1}\right) \]
                                                    (FPCore (z0 z3 z4 z1 z2)
                                                      :precision binary64
                                                      (-
                                                     (/ z0 (+ (/ z3 (* z4 z4)) (/ z1 (* z2 z2))))
                                                     (*
                                                      (* z2 (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0)))
                                                      (* (* z2 z0) (/ z0 z1)))))
                                                    double code(double z0, double z3, double z4, double z1, double z2) {
                                                    	return (z0 / ((z3 / (z4 * z4)) + (z1 / (z2 * z2)))) - ((z2 * (-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0))) * ((z2 * z0) * (z0 / z1)));
                                                    }
                                                    
                                                    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(z0, z3, z4, z1, z2)
                                                    use fmin_fmax_functions
                                                        real(8), intent (in) :: z0
                                                        real(8), intent (in) :: z3
                                                        real(8), intent (in) :: z4
                                                        real(8), intent (in) :: z1
                                                        real(8), intent (in) :: z2
                                                        code = (z0 / ((z3 / (z4 * z4)) + (z1 / (z2 * z2)))) - ((z2 * ((-0.5d0) - (((0.25d0 * z0) - (-0.3333333333333333d0)) * z0))) * ((z2 * z0) * (z0 / z1)))
                                                    end function
                                                    
                                                    public static double code(double z0, double z3, double z4, double z1, double z2) {
                                                    	return (z0 / ((z3 / (z4 * z4)) + (z1 / (z2 * z2)))) - ((z2 * (-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0))) * ((z2 * z0) * (z0 / z1)));
                                                    }
                                                    
                                                    def code(z0, z3, z4, z1, z2):
                                                    	return (z0 / ((z3 / (z4 * z4)) + (z1 / (z2 * z2)))) - ((z2 * (-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0))) * ((z2 * z0) * (z0 / z1)))
                                                    
                                                    function code(z0, z3, z4, z1, z2)
                                                    	return Float64(Float64(z0 / Float64(Float64(z3 / Float64(z4 * z4)) + Float64(z1 / Float64(z2 * z2)))) - Float64(Float64(z2 * Float64(-0.5 - Float64(Float64(Float64(0.25 * z0) - -0.3333333333333333) * z0))) * Float64(Float64(z2 * z0) * Float64(z0 / z1))))
                                                    end
                                                    
                                                    function tmp = code(z0, z3, z4, z1, z2)
                                                    	tmp = (z0 / ((z3 / (z4 * z4)) + (z1 / (z2 * z2)))) - ((z2 * (-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0))) * ((z2 * z0) * (z0 / z1)));
                                                    end
                                                    
                                                    code[z0_, z3_, z4_, z1_, z2_] := N[(N[(z0 / N[(N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision] + N[(z1 / N[(z2 * z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(z2 * N[(-0.5 - N[(N[(N[(0.25 * z0), $MachinePrecision] - -0.3333333333333333), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(z2 * z0), $MachinePrecision] * N[(z0 / z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                                    
                                                    \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{z1}\right)
                                                    
                                                    Derivation
                                                    1. Initial program 51.9%

                                                      \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                    2. Step-by-step derivation
                                                      1. lift-*.f64N/A

                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                                                      2. lift-*.f64N/A

                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
                                                      3. associate-*r*N/A

                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                                                      4. lower-*.f64N/A

                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                                                    3. Applied rewrites65.8%

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2} \]
                                                    4. Step-by-step derivation
                                                      1. lift-*.f64N/A

                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right) \cdot z2} \]
                                                      2. *-commutativeN/A

                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{z2 \cdot \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right)} \]
                                                      3. lift-*.f64N/A

                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - z2 \cdot \color{blue}{\left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right) \cdot \left(z0 \cdot z2\right)\right)} \]
                                                      4. lift-*.f64N/A

                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - z2 \cdot \left(\color{blue}{\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \cdot \left(z0 \cdot z2\right)\right) \]
                                                      5. associate-*l*N/A

                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - z2 \cdot \color{blue}{\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right)\right)} \]
                                                      6. associate-*r*N/A

                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right)} \]
                                                      7. lower-*.f64N/A

                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right)} \]
                                                      8. lower-*.f64N/A

                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right)} \cdot \left(\frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1} \cdot \left(z0 \cdot z2\right)\right) \]
                                                      9. *-commutativeN/A

                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z0 \cdot z2\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \]
                                                      10. lower-*.f6467.0%

                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \color{blue}{\left(\left(z0 \cdot z2\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \]
                                                    5. Applied rewrites67.0%

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{\left(z2 \cdot \frac{z3}{z4 \cdot z4}\right) \cdot z2 + z1}\right)} \]
                                                    6. Taylor expanded in z3 around 0

                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{\color{blue}{z1}}\right) \]
                                                    7. Step-by-step derivation
                                                      1. Applied rewrites56.2%

                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(z2 \cdot \left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right)\right) \cdot \left(\left(z2 \cdot z0\right) \cdot \frac{z0}{\color{blue}{z1}}\right) \]
                                                      2. Add Preprocessing

                                                      Alternative 14: 52.4% accurate, 0.6× speedup?

                                                      \[\begin{array}{l} t_0 := \frac{z3}{z4 \cdot z4}\\ t_1 := \frac{z0}{t\_0 + \frac{z1}{z2 \cdot z2}}\\ \mathbf{if}\;t\_1 - \left(\frac{z0}{\left(t\_0 \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \leq \infty:\\ \;\;\;\;t\_1 - \frac{\left(\left(-0.5 \cdot z0\right) \cdot z0\right) \cdot \left(z2 \cdot z2\right)}{z1}\\ \mathbf{else}:\\ \;\;\;\;t\_1 - \left(\left(\frac{z0}{z1} \cdot \left(-0.5 \cdot z0\right)\right) \cdot z2\right) \cdot z2\\ \end{array} \]
                                                      (FPCore (z0 z3 z4 z1 z2)
                                                        :precision binary64
                                                        (let* ((t_0 (/ z3 (* z4 z4))) (t_1 (/ z0 (+ t_0 (/ z1 (* z2 z2))))))
                                                        (if (<=
                                                             (-
                                                              t_1
                                                              (*
                                                               (*
                                                                (/ z0 (+ (* (* t_0 z2) z2) z1))
                                                                (* (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0)) z0))
                                                               (* z2 z2)))
                                                             INFINITY)
                                                          (- t_1 (/ (* (* (* -0.5 z0) z0) (* z2 z2)) z1))
                                                          (- t_1 (* (* (* (/ z0 z1) (* -0.5 z0)) z2) z2)))))
                                                      double code(double z0, double z3, double z4, double z1, double z2) {
                                                      	double t_0 = z3 / (z4 * z4);
                                                      	double t_1 = z0 / (t_0 + (z1 / (z2 * z2)));
                                                      	double tmp;
                                                      	if ((t_1 - (((z0 / (((t_0 * z2) * z2) + z1)) * ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0)) * (z2 * z2))) <= ((double) INFINITY)) {
                                                      		tmp = t_1 - ((((-0.5 * z0) * z0) * (z2 * z2)) / z1);
                                                      	} else {
                                                      		tmp = t_1 - ((((z0 / z1) * (-0.5 * z0)) * z2) * z2);
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      public static double code(double z0, double z3, double z4, double z1, double z2) {
                                                      	double t_0 = z3 / (z4 * z4);
                                                      	double t_1 = z0 / (t_0 + (z1 / (z2 * z2)));
                                                      	double tmp;
                                                      	if ((t_1 - (((z0 / (((t_0 * z2) * z2) + z1)) * ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0)) * (z2 * z2))) <= Double.POSITIVE_INFINITY) {
                                                      		tmp = t_1 - ((((-0.5 * z0) * z0) * (z2 * z2)) / z1);
                                                      	} else {
                                                      		tmp = t_1 - ((((z0 / z1) * (-0.5 * z0)) * z2) * z2);
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      def code(z0, z3, z4, z1, z2):
                                                      	t_0 = z3 / (z4 * z4)
                                                      	t_1 = z0 / (t_0 + (z1 / (z2 * z2)))
                                                      	tmp = 0
                                                      	if (t_1 - (((z0 / (((t_0 * z2) * z2) + z1)) * ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0)) * (z2 * z2))) <= math.inf:
                                                      		tmp = t_1 - ((((-0.5 * z0) * z0) * (z2 * z2)) / z1)
                                                      	else:
                                                      		tmp = t_1 - ((((z0 / z1) * (-0.5 * z0)) * z2) * z2)
                                                      	return tmp
                                                      
                                                      function code(z0, z3, z4, z1, z2)
                                                      	t_0 = Float64(z3 / Float64(z4 * z4))
                                                      	t_1 = Float64(z0 / Float64(t_0 + Float64(z1 / Float64(z2 * z2))))
                                                      	tmp = 0.0
                                                      	if (Float64(t_1 - Float64(Float64(Float64(z0 / Float64(Float64(Float64(t_0 * z2) * z2) + z1)) * Float64(Float64(-0.5 - Float64(Float64(Float64(0.25 * z0) - -0.3333333333333333) * z0)) * z0)) * Float64(z2 * z2))) <= Inf)
                                                      		tmp = Float64(t_1 - Float64(Float64(Float64(Float64(-0.5 * z0) * z0) * Float64(z2 * z2)) / z1));
                                                      	else
                                                      		tmp = Float64(t_1 - Float64(Float64(Float64(Float64(z0 / z1) * Float64(-0.5 * z0)) * z2) * z2));
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      function tmp_2 = code(z0, z3, z4, z1, z2)
                                                      	t_0 = z3 / (z4 * z4);
                                                      	t_1 = z0 / (t_0 + (z1 / (z2 * z2)));
                                                      	tmp = 0.0;
                                                      	if ((t_1 - (((z0 / (((t_0 * z2) * z2) + z1)) * ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0)) * (z2 * z2))) <= Inf)
                                                      		tmp = t_1 - ((((-0.5 * z0) * z0) * (z2 * z2)) / z1);
                                                      	else
                                                      		tmp = t_1 - ((((z0 / z1) * (-0.5 * z0)) * z2) * z2);
                                                      	end
                                                      	tmp_2 = tmp;
                                                      end
                                                      
                                                      code[z0_, z3_, z4_, z1_, z2_] := Block[{t$95$0 = N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z0 / N[(t$95$0 + N[(z1 / N[(z2 * z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$1 - N[(N[(N[(z0 / N[(N[(N[(t$95$0 * z2), $MachinePrecision] * z2), $MachinePrecision] + z1), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.5 - N[(N[(N[(0.25 * z0), $MachinePrecision] - -0.3333333333333333), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision] * N[(z2 * z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(t$95$1 - N[(N[(N[(N[(-0.5 * z0), $MachinePrecision] * z0), $MachinePrecision] * N[(z2 * z2), $MachinePrecision]), $MachinePrecision] / z1), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(N[(N[(N[(z0 / z1), $MachinePrecision] * N[(-0.5 * z0), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision]]]]
                                                      
                                                      \begin{array}{l}
                                                      t_0 := \frac{z3}{z4 \cdot z4}\\
                                                      t_1 := \frac{z0}{t\_0 + \frac{z1}{z2 \cdot z2}}\\
                                                      \mathbf{if}\;t\_1 - \left(\frac{z0}{\left(t\_0 \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \leq \infty:\\
                                                      \;\;\;\;t\_1 - \frac{\left(\left(-0.5 \cdot z0\right) \cdot z0\right) \cdot \left(z2 \cdot z2\right)}{z1}\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;t\_1 - \left(\left(\frac{z0}{z1} \cdot \left(-0.5 \cdot z0\right)\right) \cdot z2\right) \cdot z2\\
                                                      
                                                      
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 2 regimes
                                                      2. if (-.f64 (/.f64 z0 (+.f64 (/.f64 z3 (*.f64 z4 z4)) (/.f64 z1 (*.f64 z2 z2)))) (*.f64 (*.f64 (/.f64 z0 (+.f64 (*.f64 (*.f64 (/.f64 z3 (*.f64 z4 z4)) z2) z2) z1)) (*.f64 (-.f64 #s(literal -1/2 binary64) (*.f64 (-.f64 (*.f64 #s(literal 1/4 binary64) z0) #s(literal -3333333333333333/10000000000000000 binary64)) z0)) z0)) (*.f64 z2 z2))) < +inf.0

                                                        1. Initial program 51.9%

                                                          \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                        2. Taylor expanded in z3 around 0

                                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites47.3%

                                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                          2. Taylor expanded in z0 around 0

                                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\color{blue}{\frac{-1}{2}} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites42.6%

                                                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\color{blue}{-0.5} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                            2. Step-by-step derivation
                                                              1. lift-*.f64N/A

                                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                                                              2. lift-*.f64N/A

                                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right)} \cdot \left(z2 \cdot z2\right) \]
                                                              3. lift-/.f64N/A

                                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\color{blue}{\frac{z0}{z1}} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                              4. associate-*l/N/A

                                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{z0 \cdot \left(\frac{-1}{2} \cdot z0\right)}{z1}} \cdot \left(z2 \cdot z2\right) \]
                                                              5. associate-*l/N/A

                                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{\left(z0 \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)}{z1}} \]
                                                              6. lower-/.f64N/A

                                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{\left(z0 \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)}{z1}} \]
                                                            3. Applied rewrites44.9%

                                                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{\left(\left(-0.5 \cdot z0\right) \cdot z0\right) \cdot \left(z2 \cdot z2\right)}{z1}} \]

                                                            if +inf.0 < (-.f64 (/.f64 z0 (+.f64 (/.f64 z3 (*.f64 z4 z4)) (/.f64 z1 (*.f64 z2 z2)))) (*.f64 (*.f64 (/.f64 z0 (+.f64 (*.f64 (*.f64 (/.f64 z3 (*.f64 z4 z4)) z2) z2) z1)) (*.f64 (-.f64 #s(literal -1/2 binary64) (*.f64 (-.f64 (*.f64 #s(literal 1/4 binary64) z0) #s(literal -3333333333333333/10000000000000000 binary64)) z0)) z0)) (*.f64 z2 z2)))

                                                            1. Initial program 51.9%

                                                              \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                            2. Taylor expanded in z3 around 0

                                                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                            3. Step-by-step derivation
                                                              1. Applied rewrites47.3%

                                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                              2. Taylor expanded in z0 around 0

                                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\color{blue}{\frac{-1}{2}} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                              3. Step-by-step derivation
                                                                1. Applied rewrites42.6%

                                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\color{blue}{-0.5} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                2. Step-by-step derivation
                                                                  1. lift-*.f64N/A

                                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                                                                  2. lift-*.f64N/A

                                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
                                                                  3. associate-*r*N/A

                                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                                                                  4. lower-*.f64N/A

                                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                                                                3. Applied rewrites45.7%

                                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(-0.5 \cdot z0\right) \cdot \left(\frac{z0}{z1} \cdot z2\right)\right) \cdot z2} \]
                                                                4. Step-by-step derivation
                                                                  1. lift-*.f64N/A

                                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{-1}{2} \cdot z0\right) \cdot \left(\frac{z0}{z1} \cdot z2\right)\right)} \cdot z2 \]
                                                                  2. lift-*.f64N/A

                                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} \cdot z0\right) \cdot \color{blue}{\left(\frac{z0}{z1} \cdot z2\right)}\right) \cdot z2 \]
                                                                  3. associate-*r*N/A

                                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(\frac{-1}{2} \cdot z0\right) \cdot \frac{z0}{z1}\right) \cdot z2\right)} \cdot z2 \]
                                                                  4. lower-*.f64N/A

                                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(\frac{-1}{2} \cdot z0\right) \cdot \frac{z0}{z1}\right) \cdot z2\right)} \cdot z2 \]
                                                                  5. *-commutativeN/A

                                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right)} \cdot z2\right) \cdot z2 \]
                                                                  6. lower-*.f6450.2%

                                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\color{blue}{\left(\frac{z0}{z1} \cdot \left(-0.5 \cdot z0\right)\right)} \cdot z2\right) \cdot z2 \]
                                                                5. Applied rewrites50.2%

                                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(-0.5 \cdot z0\right)\right) \cdot z2\right)} \cdot z2 \]
                                                              4. Recombined 2 regimes into one program.
                                                              5. Add Preprocessing

                                                              Alternative 15: 51.2% accurate, 0.6× speedup?

                                                              \[\begin{array}{l} t_0 := \frac{z3}{z4 \cdot z4}\\ t_1 := \frac{z0}{t\_0 + \frac{z1}{z2 \cdot z2}}\\ \mathbf{if}\;t\_1 - \left(\frac{z0}{\left(t\_0 \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \leq \infty:\\ \;\;\;\;t\_1 - \frac{\left(-0.5 \cdot z0\right) \cdot \left(z2 \cdot z0\right)}{z1} \cdot z2\\ \mathbf{else}:\\ \;\;\;\;t\_1 - \left(\left(\frac{z0}{z1} \cdot \left(-0.5 \cdot z0\right)\right) \cdot z2\right) \cdot z2\\ \end{array} \]
                                                              (FPCore (z0 z3 z4 z1 z2)
                                                                :precision binary64
                                                                (let* ((t_0 (/ z3 (* z4 z4))) (t_1 (/ z0 (+ t_0 (/ z1 (* z2 z2))))))
                                                                (if (<=
                                                                     (-
                                                                      t_1
                                                                      (*
                                                                       (*
                                                                        (/ z0 (+ (* (* t_0 z2) z2) z1))
                                                                        (* (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0)) z0))
                                                                       (* z2 z2)))
                                                                     INFINITY)
                                                                  (- t_1 (* (/ (* (* -0.5 z0) (* z2 z0)) z1) z2))
                                                                  (- t_1 (* (* (* (/ z0 z1) (* -0.5 z0)) z2) z2)))))
                                                              double code(double z0, double z3, double z4, double z1, double z2) {
                                                              	double t_0 = z3 / (z4 * z4);
                                                              	double t_1 = z0 / (t_0 + (z1 / (z2 * z2)));
                                                              	double tmp;
                                                              	if ((t_1 - (((z0 / (((t_0 * z2) * z2) + z1)) * ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0)) * (z2 * z2))) <= ((double) INFINITY)) {
                                                              		tmp = t_1 - ((((-0.5 * z0) * (z2 * z0)) / z1) * z2);
                                                              	} else {
                                                              		tmp = t_1 - ((((z0 / z1) * (-0.5 * z0)) * z2) * z2);
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              public static double code(double z0, double z3, double z4, double z1, double z2) {
                                                              	double t_0 = z3 / (z4 * z4);
                                                              	double t_1 = z0 / (t_0 + (z1 / (z2 * z2)));
                                                              	double tmp;
                                                              	if ((t_1 - (((z0 / (((t_0 * z2) * z2) + z1)) * ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0)) * (z2 * z2))) <= Double.POSITIVE_INFINITY) {
                                                              		tmp = t_1 - ((((-0.5 * z0) * (z2 * z0)) / z1) * z2);
                                                              	} else {
                                                              		tmp = t_1 - ((((z0 / z1) * (-0.5 * z0)) * z2) * z2);
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              def code(z0, z3, z4, z1, z2):
                                                              	t_0 = z3 / (z4 * z4)
                                                              	t_1 = z0 / (t_0 + (z1 / (z2 * z2)))
                                                              	tmp = 0
                                                              	if (t_1 - (((z0 / (((t_0 * z2) * z2) + z1)) * ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0)) * (z2 * z2))) <= math.inf:
                                                              		tmp = t_1 - ((((-0.5 * z0) * (z2 * z0)) / z1) * z2)
                                                              	else:
                                                              		tmp = t_1 - ((((z0 / z1) * (-0.5 * z0)) * z2) * z2)
                                                              	return tmp
                                                              
                                                              function code(z0, z3, z4, z1, z2)
                                                              	t_0 = Float64(z3 / Float64(z4 * z4))
                                                              	t_1 = Float64(z0 / Float64(t_0 + Float64(z1 / Float64(z2 * z2))))
                                                              	tmp = 0.0
                                                              	if (Float64(t_1 - Float64(Float64(Float64(z0 / Float64(Float64(Float64(t_0 * z2) * z2) + z1)) * Float64(Float64(-0.5 - Float64(Float64(Float64(0.25 * z0) - -0.3333333333333333) * z0)) * z0)) * Float64(z2 * z2))) <= Inf)
                                                              		tmp = Float64(t_1 - Float64(Float64(Float64(Float64(-0.5 * z0) * Float64(z2 * z0)) / z1) * z2));
                                                              	else
                                                              		tmp = Float64(t_1 - Float64(Float64(Float64(Float64(z0 / z1) * Float64(-0.5 * z0)) * z2) * z2));
                                                              	end
                                                              	return tmp
                                                              end
                                                              
                                                              function tmp_2 = code(z0, z3, z4, z1, z2)
                                                              	t_0 = z3 / (z4 * z4);
                                                              	t_1 = z0 / (t_0 + (z1 / (z2 * z2)));
                                                              	tmp = 0.0;
                                                              	if ((t_1 - (((z0 / (((t_0 * z2) * z2) + z1)) * ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0)) * (z2 * z2))) <= Inf)
                                                              		tmp = t_1 - ((((-0.5 * z0) * (z2 * z0)) / z1) * z2);
                                                              	else
                                                              		tmp = t_1 - ((((z0 / z1) * (-0.5 * z0)) * z2) * z2);
                                                              	end
                                                              	tmp_2 = tmp;
                                                              end
                                                              
                                                              code[z0_, z3_, z4_, z1_, z2_] := Block[{t$95$0 = N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z0 / N[(t$95$0 + N[(z1 / N[(z2 * z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$1 - N[(N[(N[(z0 / N[(N[(N[(t$95$0 * z2), $MachinePrecision] * z2), $MachinePrecision] + z1), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.5 - N[(N[(N[(0.25 * z0), $MachinePrecision] - -0.3333333333333333), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision] * N[(z2 * z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(t$95$1 - N[(N[(N[(N[(-0.5 * z0), $MachinePrecision] * N[(z2 * z0), $MachinePrecision]), $MachinePrecision] / z1), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(N[(N[(N[(z0 / z1), $MachinePrecision] * N[(-0.5 * z0), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision]]]]
                                                              
                                                              \begin{array}{l}
                                                              t_0 := \frac{z3}{z4 \cdot z4}\\
                                                              t_1 := \frac{z0}{t\_0 + \frac{z1}{z2 \cdot z2}}\\
                                                              \mathbf{if}\;t\_1 - \left(\frac{z0}{\left(t\_0 \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \leq \infty:\\
                                                              \;\;\;\;t\_1 - \frac{\left(-0.5 \cdot z0\right) \cdot \left(z2 \cdot z0\right)}{z1} \cdot z2\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;t\_1 - \left(\left(\frac{z0}{z1} \cdot \left(-0.5 \cdot z0\right)\right) \cdot z2\right) \cdot z2\\
                                                              
                                                              
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 2 regimes
                                                              2. if (-.f64 (/.f64 z0 (+.f64 (/.f64 z3 (*.f64 z4 z4)) (/.f64 z1 (*.f64 z2 z2)))) (*.f64 (*.f64 (/.f64 z0 (+.f64 (*.f64 (*.f64 (/.f64 z3 (*.f64 z4 z4)) z2) z2) z1)) (*.f64 (-.f64 #s(literal -1/2 binary64) (*.f64 (-.f64 (*.f64 #s(literal 1/4 binary64) z0) #s(literal -3333333333333333/10000000000000000 binary64)) z0)) z0)) (*.f64 z2 z2))) < +inf.0

                                                                1. Initial program 51.9%

                                                                  \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                2. Taylor expanded in z3 around 0

                                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                3. Step-by-step derivation
                                                                  1. Applied rewrites47.3%

                                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                  2. Taylor expanded in z0 around 0

                                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\color{blue}{\frac{-1}{2}} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                  3. Step-by-step derivation
                                                                    1. Applied rewrites42.6%

                                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\color{blue}{-0.5} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                    2. Step-by-step derivation
                                                                      1. lift-*.f64N/A

                                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                                                                      2. lift-*.f64N/A

                                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
                                                                      3. associate-*r*N/A

                                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                                                                      4. lower-*.f64N/A

                                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                                                                    3. Applied rewrites45.7%

                                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(-0.5 \cdot z0\right) \cdot \left(\frac{z0}{z1} \cdot z2\right)\right) \cdot z2} \]
                                                                    4. Step-by-step derivation
                                                                      1. lift-*.f64N/A

                                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{-1}{2} \cdot z0\right) \cdot \left(\frac{z0}{z1} \cdot z2\right)\right)} \cdot z2 \]
                                                                      2. lift-*.f64N/A

                                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} \cdot z0\right) \cdot \color{blue}{\left(\frac{z0}{z1} \cdot z2\right)}\right) \cdot z2 \]
                                                                      3. lift-/.f64N/A

                                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} \cdot z0\right) \cdot \left(\color{blue}{\frac{z0}{z1}} \cdot z2\right)\right) \cdot z2 \]
                                                                      4. associate-*l/N/A

                                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} \cdot z0\right) \cdot \color{blue}{\frac{z0 \cdot z2}{z1}}\right) \cdot z2 \]
                                                                      5. lift-*.f64N/A

                                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} \cdot z0\right) \cdot \frac{\color{blue}{z0 \cdot z2}}{z1}\right) \cdot z2 \]
                                                                      6. associate-*r/N/A

                                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{\left(\frac{-1}{2} \cdot z0\right) \cdot \left(z0 \cdot z2\right)}{z1}} \cdot z2 \]
                                                                      7. lower-/.f64N/A

                                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{\left(\frac{-1}{2} \cdot z0\right) \cdot \left(z0 \cdot z2\right)}{z1}} \cdot z2 \]
                                                                      8. lower-*.f6448.2%

                                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \frac{\color{blue}{\left(-0.5 \cdot z0\right) \cdot \left(z0 \cdot z2\right)}}{z1} \cdot z2 \]
                                                                      9. lift-*.f64N/A

                                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \frac{\left(\frac{-1}{2} \cdot z0\right) \cdot \color{blue}{\left(z0 \cdot z2\right)}}{z1} \cdot z2 \]
                                                                      10. *-commutativeN/A

                                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \frac{\left(\frac{-1}{2} \cdot z0\right) \cdot \color{blue}{\left(z2 \cdot z0\right)}}{z1} \cdot z2 \]
                                                                      11. lift-*.f6448.2%

                                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \frac{\left(-0.5 \cdot z0\right) \cdot \color{blue}{\left(z2 \cdot z0\right)}}{z1} \cdot z2 \]
                                                                    5. Applied rewrites48.2%

                                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\frac{\left(-0.5 \cdot z0\right) \cdot \left(z2 \cdot z0\right)}{z1}} \cdot z2 \]

                                                                    if +inf.0 < (-.f64 (/.f64 z0 (+.f64 (/.f64 z3 (*.f64 z4 z4)) (/.f64 z1 (*.f64 z2 z2)))) (*.f64 (*.f64 (/.f64 z0 (+.f64 (*.f64 (*.f64 (/.f64 z3 (*.f64 z4 z4)) z2) z2) z1)) (*.f64 (-.f64 #s(literal -1/2 binary64) (*.f64 (-.f64 (*.f64 #s(literal 1/4 binary64) z0) #s(literal -3333333333333333/10000000000000000 binary64)) z0)) z0)) (*.f64 z2 z2)))

                                                                    1. Initial program 51.9%

                                                                      \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                    2. Taylor expanded in z3 around 0

                                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                    3. Step-by-step derivation
                                                                      1. Applied rewrites47.3%

                                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                      2. Taylor expanded in z0 around 0

                                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\color{blue}{\frac{-1}{2}} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                      3. Step-by-step derivation
                                                                        1. Applied rewrites42.6%

                                                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\color{blue}{-0.5} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                        2. Step-by-step derivation
                                                                          1. lift-*.f64N/A

                                                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                                                                          2. lift-*.f64N/A

                                                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
                                                                          3. associate-*r*N/A

                                                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                                                                          4. lower-*.f64N/A

                                                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                                                                        3. Applied rewrites45.7%

                                                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(-0.5 \cdot z0\right) \cdot \left(\frac{z0}{z1} \cdot z2\right)\right) \cdot z2} \]
                                                                        4. Step-by-step derivation
                                                                          1. lift-*.f64N/A

                                                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{-1}{2} \cdot z0\right) \cdot \left(\frac{z0}{z1} \cdot z2\right)\right)} \cdot z2 \]
                                                                          2. lift-*.f64N/A

                                                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} \cdot z0\right) \cdot \color{blue}{\left(\frac{z0}{z1} \cdot z2\right)}\right) \cdot z2 \]
                                                                          3. associate-*r*N/A

                                                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(\frac{-1}{2} \cdot z0\right) \cdot \frac{z0}{z1}\right) \cdot z2\right)} \cdot z2 \]
                                                                          4. lower-*.f64N/A

                                                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(\frac{-1}{2} \cdot z0\right) \cdot \frac{z0}{z1}\right) \cdot z2\right)} \cdot z2 \]
                                                                          5. *-commutativeN/A

                                                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right)} \cdot z2\right) \cdot z2 \]
                                                                          6. lower-*.f6450.2%

                                                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\color{blue}{\left(\frac{z0}{z1} \cdot \left(-0.5 \cdot z0\right)\right)} \cdot z2\right) \cdot z2 \]
                                                                        5. Applied rewrites50.2%

                                                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(-0.5 \cdot z0\right)\right) \cdot z2\right)} \cdot z2 \]
                                                                      4. Recombined 2 regimes into one program.
                                                                      5. Add Preprocessing

                                                                      Alternative 16: 50.2% accurate, 1.6× speedup?

                                                                      \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{z0}{z1} \cdot \left(-0.5 \cdot z0\right)\right) \cdot z2\right) \cdot z2 \]
                                                                      (FPCore (z0 z3 z4 z1 z2)
                                                                        :precision binary64
                                                                        (-
                                                                       (/ z0 (+ (/ z3 (* z4 z4)) (/ z1 (* z2 z2))))
                                                                       (* (* (* (/ z0 z1) (* -0.5 z0)) z2) z2)))
                                                                      double code(double z0, double z3, double z4, double z1, double z2) {
                                                                      	return (z0 / ((z3 / (z4 * z4)) + (z1 / (z2 * z2)))) - ((((z0 / z1) * (-0.5 * z0)) * z2) * z2);
                                                                      }
                                                                      
                                                                      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(z0, z3, z4, z1, z2)
                                                                      use fmin_fmax_functions
                                                                          real(8), intent (in) :: z0
                                                                          real(8), intent (in) :: z3
                                                                          real(8), intent (in) :: z4
                                                                          real(8), intent (in) :: z1
                                                                          real(8), intent (in) :: z2
                                                                          code = (z0 / ((z3 / (z4 * z4)) + (z1 / (z2 * z2)))) - ((((z0 / z1) * ((-0.5d0) * z0)) * z2) * z2)
                                                                      end function
                                                                      
                                                                      public static double code(double z0, double z3, double z4, double z1, double z2) {
                                                                      	return (z0 / ((z3 / (z4 * z4)) + (z1 / (z2 * z2)))) - ((((z0 / z1) * (-0.5 * z0)) * z2) * z2);
                                                                      }
                                                                      
                                                                      def code(z0, z3, z4, z1, z2):
                                                                      	return (z0 / ((z3 / (z4 * z4)) + (z1 / (z2 * z2)))) - ((((z0 / z1) * (-0.5 * z0)) * z2) * z2)
                                                                      
                                                                      function code(z0, z3, z4, z1, z2)
                                                                      	return Float64(Float64(z0 / Float64(Float64(z3 / Float64(z4 * z4)) + Float64(z1 / Float64(z2 * z2)))) - Float64(Float64(Float64(Float64(z0 / z1) * Float64(-0.5 * z0)) * z2) * z2))
                                                                      end
                                                                      
                                                                      function tmp = code(z0, z3, z4, z1, z2)
                                                                      	tmp = (z0 / ((z3 / (z4 * z4)) + (z1 / (z2 * z2)))) - ((((z0 / z1) * (-0.5 * z0)) * z2) * z2);
                                                                      end
                                                                      
                                                                      code[z0_, z3_, z4_, z1_, z2_] := N[(N[(z0 / N[(N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision] + N[(z1 / N[(z2 * z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(z0 / z1), $MachinePrecision] * N[(-0.5 * z0), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision]
                                                                      
                                                                      \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{z0}{z1} \cdot \left(-0.5 \cdot z0\right)\right) \cdot z2\right) \cdot z2
                                                                      
                                                                      Derivation
                                                                      1. Initial program 51.9%

                                                                        \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                      2. Taylor expanded in z3 around 0

                                                                        \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                      3. Step-by-step derivation
                                                                        1. Applied rewrites47.3%

                                                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                        2. Taylor expanded in z0 around 0

                                                                          \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\color{blue}{\frac{-1}{2}} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                        3. Step-by-step derivation
                                                                          1. Applied rewrites42.6%

                                                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\color{blue}{-0.5} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                          2. Step-by-step derivation
                                                                            1. lift-*.f64N/A

                                                                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                                                                            2. lift-*.f64N/A

                                                                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
                                                                            3. associate-*r*N/A

                                                                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                                                                            4. lower-*.f64N/A

                                                                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                                                                          3. Applied rewrites45.7%

                                                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(-0.5 \cdot z0\right) \cdot \left(\frac{z0}{z1} \cdot z2\right)\right) \cdot z2} \]
                                                                          4. Step-by-step derivation
                                                                            1. lift-*.f64N/A

                                                                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{-1}{2} \cdot z0\right) \cdot \left(\frac{z0}{z1} \cdot z2\right)\right)} \cdot z2 \]
                                                                            2. lift-*.f64N/A

                                                                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} \cdot z0\right) \cdot \color{blue}{\left(\frac{z0}{z1} \cdot z2\right)}\right) \cdot z2 \]
                                                                            3. associate-*r*N/A

                                                                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(\frac{-1}{2} \cdot z0\right) \cdot \frac{z0}{z1}\right) \cdot z2\right)} \cdot z2 \]
                                                                            4. lower-*.f64N/A

                                                                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\left(\frac{-1}{2} \cdot z0\right) \cdot \frac{z0}{z1}\right) \cdot z2\right)} \cdot z2 \]
                                                                            5. *-commutativeN/A

                                                                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right)} \cdot z2\right) \cdot z2 \]
                                                                            6. lower-*.f6450.2%

                                                                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\color{blue}{\left(\frac{z0}{z1} \cdot \left(-0.5 \cdot z0\right)\right)} \cdot z2\right) \cdot z2 \]
                                                                          5. Applied rewrites50.2%

                                                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(-0.5 \cdot z0\right)\right) \cdot z2\right)} \cdot z2 \]
                                                                          6. Add Preprocessing

                                                                          Alternative 17: 45.7% accurate, 1.6× speedup?

                                                                          \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(-0.5 \cdot z0\right) \cdot \left(\frac{z0}{z1} \cdot z2\right)\right) \cdot z2 \]
                                                                          (FPCore (z0 z3 z4 z1 z2)
                                                                            :precision binary64
                                                                            (-
                                                                           (/ z0 (+ (/ z3 (* z4 z4)) (/ z1 (* z2 z2))))
                                                                           (* (* (* -0.5 z0) (* (/ z0 z1) z2)) z2)))
                                                                          double code(double z0, double z3, double z4, double z1, double z2) {
                                                                          	return (z0 / ((z3 / (z4 * z4)) + (z1 / (z2 * z2)))) - (((-0.5 * z0) * ((z0 / z1) * z2)) * z2);
                                                                          }
                                                                          
                                                                          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(z0, z3, z4, z1, z2)
                                                                          use fmin_fmax_functions
                                                                              real(8), intent (in) :: z0
                                                                              real(8), intent (in) :: z3
                                                                              real(8), intent (in) :: z4
                                                                              real(8), intent (in) :: z1
                                                                              real(8), intent (in) :: z2
                                                                              code = (z0 / ((z3 / (z4 * z4)) + (z1 / (z2 * z2)))) - ((((-0.5d0) * z0) * ((z0 / z1) * z2)) * z2)
                                                                          end function
                                                                          
                                                                          public static double code(double z0, double z3, double z4, double z1, double z2) {
                                                                          	return (z0 / ((z3 / (z4 * z4)) + (z1 / (z2 * z2)))) - (((-0.5 * z0) * ((z0 / z1) * z2)) * z2);
                                                                          }
                                                                          
                                                                          def code(z0, z3, z4, z1, z2):
                                                                          	return (z0 / ((z3 / (z4 * z4)) + (z1 / (z2 * z2)))) - (((-0.5 * z0) * ((z0 / z1) * z2)) * z2)
                                                                          
                                                                          function code(z0, z3, z4, z1, z2)
                                                                          	return Float64(Float64(z0 / Float64(Float64(z3 / Float64(z4 * z4)) + Float64(z1 / Float64(z2 * z2)))) - Float64(Float64(Float64(-0.5 * z0) * Float64(Float64(z0 / z1) * z2)) * z2))
                                                                          end
                                                                          
                                                                          function tmp = code(z0, z3, z4, z1, z2)
                                                                          	tmp = (z0 / ((z3 / (z4 * z4)) + (z1 / (z2 * z2)))) - (((-0.5 * z0) * ((z0 / z1) * z2)) * z2);
                                                                          end
                                                                          
                                                                          code[z0_, z3_, z4_, z1_, z2_] := N[(N[(z0 / N[(N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision] + N[(z1 / N[(z2 * z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(-0.5 * z0), $MachinePrecision] * N[(N[(z0 / z1), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision]
                                                                          
                                                                          \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(-0.5 \cdot z0\right) \cdot \left(\frac{z0}{z1} \cdot z2\right)\right) \cdot z2
                                                                          
                                                                          Derivation
                                                                          1. Initial program 51.9%

                                                                            \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                          2. Taylor expanded in z3 around 0

                                                                            \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                          3. Step-by-step derivation
                                                                            1. Applied rewrites47.3%

                                                                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                            2. Taylor expanded in z0 around 0

                                                                              \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\color{blue}{\frac{-1}{2}} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                            3. Step-by-step derivation
                                                                              1. Applied rewrites42.6%

                                                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\color{blue}{-0.5} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                              2. Step-by-step derivation
                                                                                1. lift-*.f64N/A

                                                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                                                                                2. lift-*.f64N/A

                                                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
                                                                                3. associate-*r*N/A

                                                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                                                                                4. lower-*.f64N/A

                                                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                                                                              3. Applied rewrites45.7%

                                                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(-0.5 \cdot z0\right) \cdot \left(\frac{z0}{z1} \cdot z2\right)\right) \cdot z2} \]
                                                                              4. Add Preprocessing

                                                                              Alternative 18: 44.7% accurate, 1.6× speedup?

                                                                              \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(-0.5 \cdot z0\right) \cdot \left(z0 \cdot \frac{z2}{z1}\right)\right) \cdot z2 \]
                                                                              (FPCore (z0 z3 z4 z1 z2)
                                                                                :precision binary64
                                                                                (-
                                                                               (/ z0 (+ (/ z3 (* z4 z4)) (/ z1 (* z2 z2))))
                                                                               (* (* (* -0.5 z0) (* z0 (/ z2 z1))) z2)))
                                                                              double code(double z0, double z3, double z4, double z1, double z2) {
                                                                              	return (z0 / ((z3 / (z4 * z4)) + (z1 / (z2 * z2)))) - (((-0.5 * z0) * (z0 * (z2 / z1))) * z2);
                                                                              }
                                                                              
                                                                              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(z0, z3, z4, z1, z2)
                                                                              use fmin_fmax_functions
                                                                                  real(8), intent (in) :: z0
                                                                                  real(8), intent (in) :: z3
                                                                                  real(8), intent (in) :: z4
                                                                                  real(8), intent (in) :: z1
                                                                                  real(8), intent (in) :: z2
                                                                                  code = (z0 / ((z3 / (z4 * z4)) + (z1 / (z2 * z2)))) - ((((-0.5d0) * z0) * (z0 * (z2 / z1))) * z2)
                                                                              end function
                                                                              
                                                                              public static double code(double z0, double z3, double z4, double z1, double z2) {
                                                                              	return (z0 / ((z3 / (z4 * z4)) + (z1 / (z2 * z2)))) - (((-0.5 * z0) * (z0 * (z2 / z1))) * z2);
                                                                              }
                                                                              
                                                                              def code(z0, z3, z4, z1, z2):
                                                                              	return (z0 / ((z3 / (z4 * z4)) + (z1 / (z2 * z2)))) - (((-0.5 * z0) * (z0 * (z2 / z1))) * z2)
                                                                              
                                                                              function code(z0, z3, z4, z1, z2)
                                                                              	return Float64(Float64(z0 / Float64(Float64(z3 / Float64(z4 * z4)) + Float64(z1 / Float64(z2 * z2)))) - Float64(Float64(Float64(-0.5 * z0) * Float64(z0 * Float64(z2 / z1))) * z2))
                                                                              end
                                                                              
                                                                              function tmp = code(z0, z3, z4, z1, z2)
                                                                              	tmp = (z0 / ((z3 / (z4 * z4)) + (z1 / (z2 * z2)))) - (((-0.5 * z0) * (z0 * (z2 / z1))) * z2);
                                                                              end
                                                                              
                                                                              code[z0_, z3_, z4_, z1_, z2_] := N[(N[(z0 / N[(N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision] + N[(z1 / N[(z2 * z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(-0.5 * z0), $MachinePrecision] * N[(z0 * N[(z2 / z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision]
                                                                              
                                                                              \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(-0.5 \cdot z0\right) \cdot \left(z0 \cdot \frac{z2}{z1}\right)\right) \cdot z2
                                                                              
                                                                              Derivation
                                                                              1. Initial program 51.9%

                                                                                \[\frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                              2. Taylor expanded in z3 around 0

                                                                                \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                              3. Step-by-step derivation
                                                                                1. Applied rewrites47.3%

                                                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{\color{blue}{z1}} \cdot \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                                2. Taylor expanded in z0 around 0

                                                                                  \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\color{blue}{\frac{-1}{2}} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                                3. Step-by-step derivation
                                                                                  1. Applied rewrites42.6%

                                                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\color{blue}{-0.5} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right) \]
                                                                                  2. Step-by-step derivation
                                                                                    1. lift-*.f64N/A

                                                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \left(z2 \cdot z2\right)} \]
                                                                                    2. lift-*.f64N/A

                                                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot \color{blue}{\left(z2 \cdot z2\right)} \]
                                                                                    3. associate-*r*N/A

                                                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                                                                                    4. lower-*.f64N/A

                                                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(\frac{z0}{z1} \cdot \left(\frac{-1}{2} \cdot z0\right)\right) \cdot z2\right) \cdot z2} \]
                                                                                  3. Applied rewrites45.7%

                                                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \color{blue}{\left(\left(-0.5 \cdot z0\right) \cdot \left(\frac{z0}{z1} \cdot z2\right)\right) \cdot z2} \]
                                                                                  4. Step-by-step derivation
                                                                                    1. lift-*.f64N/A

                                                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} \cdot z0\right) \cdot \color{blue}{\left(\frac{z0}{z1} \cdot z2\right)}\right) \cdot z2 \]
                                                                                    2. lift-/.f64N/A

                                                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} \cdot z0\right) \cdot \left(\color{blue}{\frac{z0}{z1}} \cdot z2\right)\right) \cdot z2 \]
                                                                                    3. associate-*l/N/A

                                                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} \cdot z0\right) \cdot \color{blue}{\frac{z0 \cdot z2}{z1}}\right) \cdot z2 \]
                                                                                    4. associate-/l*N/A

                                                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} \cdot z0\right) \cdot \color{blue}{\left(z0 \cdot \frac{z2}{z1}\right)}\right) \cdot z2 \]
                                                                                    5. lower-*.f64N/A

                                                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(\frac{-1}{2} \cdot z0\right) \cdot \color{blue}{\left(z0 \cdot \frac{z2}{z1}\right)}\right) \cdot z2 \]
                                                                                    6. lower-/.f6444.7%

                                                                                      \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(-0.5 \cdot z0\right) \cdot \left(z0 \cdot \color{blue}{\frac{z2}{z1}}\right)\right) \cdot z2 \]
                                                                                  5. Applied rewrites44.7%

                                                                                    \[\leadsto \frac{z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} - \left(\left(-0.5 \cdot z0\right) \cdot \color{blue}{\left(z0 \cdot \frac{z2}{z1}\right)}\right) \cdot z2 \]
                                                                                  6. Add Preprocessing

                                                                                  Reproduce

                                                                                  ?
                                                                                  herbie shell --seed 2025250 
                                                                                  (FPCore (z0 z3 z4 z1 z2)
                                                                                    :name "(- (/ z0 (+ (/ z3 (* z4 z4)) (/ z1 (* z2 z2)))) (* (* (/ z0 (+ (* (* (/ z3 (* z4 z4)) z2) z2) z1)) (* (- -1/2 (* (- (* 1/4 z0) -3333333333333333/10000000000000000) z0)) z0)) (* z2 z2)))"
                                                                                    :precision binary64
                                                                                    (- (/ z0 (+ (/ z3 (* z4 z4)) (/ z1 (* z2 z2)))) (* (* (/ z0 (+ (* (* (/ z3 (* z4 z4)) z2) z2) z1)) (* (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0)) z0)) (* z2 z2))))