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

Percentage Accurate: 66.3% → 76.0%
Time: 4.3s
Alternatives: 16
Speedup: 0.9×

Specification

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

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 16 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: 66.3% accurate, 1.0× speedup?

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

Alternative 1: 76.0% accurate, 0.1× speedup?

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

\mathbf{elif}\;\left|z4\right| \leq 10^{+108}:\\
\;\;\;\;z0 \cdot \left(z0 \cdot \left(0.5 \cdot t\_1 + z0 \cdot \left(0.25 \cdot \frac{z0 \cdot z2}{t\_0} + 0.3333333333333333 \cdot t\_1\right)\right) + t\_1\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_2}{z2 \cdot \frac{z3}{\left|z4\right| \cdot \left|z4\right|} + \frac{z1}{z2}} \cdot z2\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z4 < 3.7000000000000002e-75

    1. Initial program 66.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z0 - \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 z4 + \frac{z3}{z4} \cdot \left(z2 \cdot z2\right)} \cdot \color{blue}{\left(\left(z2 \cdot z2\right) \cdot z4\right)} \]
      9. associate-/r/N/A

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

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

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

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

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

    if 3.7000000000000002e-75 < z4 < 1e108

    1. Initial program 66.3%

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

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

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

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

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

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

        \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
      7. lower--.f64N/A

        \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
      8. frac-2negN/A

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

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

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

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

        \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
      13. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e108 < z4

    1. Initial program 66.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 75.8% accurate, 0.8× speedup?

\[\begin{array}{l} t_0 := z0 - \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0\\ \mathbf{if}\;\left|z4\right| \leq 3.6 \cdot 10^{-16}:\\ \;\;\;\;\frac{t\_0}{\frac{z1}{z2 \cdot z2} \cdot \left|z4\right| + \frac{z3}{\left|z4\right|}} \cdot \left|z4\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_0}{z2 \cdot \frac{z3}{\left|z4\right| \cdot \left|z4\right|} + \frac{z1}{z2}} \cdot z2\\ \end{array} \]
(FPCore (z0 z3 z4 z1 z2)
  :precision binary64
  (let* ((t_0
        (-
         z0
         (*
          (* (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0)) z0)
          z0))))
  (if (<= (fabs z4) 3.6e-16)
    (*
     (/ t_0 (+ (* (/ z1 (* z2 z2)) (fabs z4)) (/ z3 (fabs z4))))
     (fabs z4))
    (*
     (/ t_0 (+ (* z2 (/ z3 (* (fabs z4) (fabs z4)))) (/ z1 z2)))
     z2))))
double code(double z0, double z3, double z4, double z1, double z2) {
	double t_0 = z0 - (((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0) * z0);
	double tmp;
	if (fabs(z4) <= 3.6e-16) {
		tmp = (t_0 / (((z1 / (z2 * z2)) * fabs(z4)) + (z3 / fabs(z4)))) * fabs(z4);
	} else {
		tmp = (t_0 / ((z2 * (z3 / (fabs(z4) * fabs(z4)))) + (z1 / 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) :: tmp
    t_0 = z0 - ((((-0.5d0) - (((0.25d0 * z0) - (-0.3333333333333333d0)) * z0)) * z0) * z0)
    if (abs(z4) <= 3.6d-16) then
        tmp = (t_0 / (((z1 / (z2 * z2)) * abs(z4)) + (z3 / abs(z4)))) * abs(z4)
    else
        tmp = (t_0 / ((z2 * (z3 / (abs(z4) * abs(z4)))) + (z1 / 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 = z0 - (((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0) * z0);
	double tmp;
	if (Math.abs(z4) <= 3.6e-16) {
		tmp = (t_0 / (((z1 / (z2 * z2)) * Math.abs(z4)) + (z3 / Math.abs(z4)))) * Math.abs(z4);
	} else {
		tmp = (t_0 / ((z2 * (z3 / (Math.abs(z4) * Math.abs(z4)))) + (z1 / z2))) * z2;
	}
	return tmp;
}
def code(z0, z3, z4, z1, z2):
	t_0 = z0 - (((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0) * z0)
	tmp = 0
	if math.fabs(z4) <= 3.6e-16:
		tmp = (t_0 / (((z1 / (z2 * z2)) * math.fabs(z4)) + (z3 / math.fabs(z4)))) * math.fabs(z4)
	else:
		tmp = (t_0 / ((z2 * (z3 / (math.fabs(z4) * math.fabs(z4)))) + (z1 / z2))) * z2
	return tmp
function code(z0, z3, z4, z1, z2)
	t_0 = Float64(z0 - Float64(Float64(Float64(-0.5 - Float64(Float64(Float64(0.25 * z0) - -0.3333333333333333) * z0)) * z0) * z0))
	tmp = 0.0
	if (abs(z4) <= 3.6e-16)
		tmp = Float64(Float64(t_0 / Float64(Float64(Float64(z1 / Float64(z2 * z2)) * abs(z4)) + Float64(z3 / abs(z4)))) * abs(z4));
	else
		tmp = Float64(Float64(t_0 / Float64(Float64(z2 * Float64(z3 / Float64(abs(z4) * abs(z4)))) + Float64(z1 / z2))) * z2);
	end
	return tmp
end
function tmp_2 = code(z0, z3, z4, z1, z2)
	t_0 = z0 - (((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0) * z0);
	tmp = 0.0;
	if (abs(z4) <= 3.6e-16)
		tmp = (t_0 / (((z1 / (z2 * z2)) * abs(z4)) + (z3 / abs(z4)))) * abs(z4);
	else
		tmp = (t_0 / ((z2 * (z3 / (abs(z4) * abs(z4)))) + (z1 / z2))) * z2;
	end
	tmp_2 = tmp;
end
code[z0_, z3_, z4_, z1_, z2_] := Block[{t$95$0 = N[(z0 - N[(N[(N[(-0.5 - N[(N[(N[(0.25 * z0), $MachinePrecision] - -0.3333333333333333), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision] * z0), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[z4], $MachinePrecision], 3.6e-16], N[(N[(t$95$0 / N[(N[(N[(z1 / N[(z2 * z2), $MachinePrecision]), $MachinePrecision] * N[Abs[z4], $MachinePrecision]), $MachinePrecision] + N[(z3 / N[Abs[z4], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Abs[z4], $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 / N[(N[(z2 * N[(z3 / N[(N[Abs[z4], $MachinePrecision] * N[Abs[z4], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z1 / z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision]]]
\begin{array}{l}
t_0 := z0 - \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0\\
\mathbf{if}\;\left|z4\right| \leq 3.6 \cdot 10^{-16}:\\
\;\;\;\;\frac{t\_0}{\frac{z1}{z2 \cdot z2} \cdot \left|z4\right| + \frac{z3}{\left|z4\right|}} \cdot \left|z4\right|\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_0}{z2 \cdot \frac{z3}{\left|z4\right| \cdot \left|z4\right|} + \frac{z1}{z2}} \cdot z2\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z4 < 3.5999999999999998e-16

    1. Initial program 66.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z0 - \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 z4 + \frac{z3}{z4} \cdot \left(z2 \cdot z2\right)} \cdot \color{blue}{\left(\left(z2 \cdot z2\right) \cdot z4\right)} \]
      9. associate-/r/N/A

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

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

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

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

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

    if 3.5999999999999998e-16 < z4

    1. Initial program 66.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 73.0% accurate, 0.8× speedup?

\[\begin{array}{l} t_0 := \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \left(\left(-1 \cdot \frac{z2}{z1}\right) \cdot z2\right)\\ \mathbf{if}\;z0 \leq -4.5 \cdot 10^{+29}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z0 \leq 1.1 \cdot 10^{-9}:\\ \;\;\;\;\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4} \cdot z2}{z4}}\\ \mathbf{elif}\;z0 \leq 6.2 \cdot 10^{+180}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{z0 - \left(\left(-0.5 - 0.3333333333333333 \cdot z0\right) \cdot z0\right) \cdot z0}{\frac{z1}{z2 \cdot z2} \cdot z4 + \frac{z3}{z4}} \cdot z4\\ \end{array} \]
(FPCore (z0 z3 z4 z1 z2)
  :precision binary64
  (let* ((t_0
        (*
         (-
          (*
           (* (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0)) z0)
           z0)
          z0)
         (* (* -1.0 (/ z2 z1)) z2))))
  (if (<= z0 -4.5e+29)
    t_0
    (if (<= z0 1.1e-9)
      (/ (* z0 z2) (+ (/ z1 z2) (/ (* (/ z3 z4) z2) z4)))
      (if (<= z0 6.2e+180)
        t_0
        (*
         (/
          (- z0 (* (* (- -0.5 (* 0.3333333333333333 z0)) z0) z0))
          (+ (* (/ z1 (* z2 z2)) z4) (/ z3 z4)))
         z4))))))
double code(double z0, double z3, double z4, double z1, double z2) {
	double t_0 = ((((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0) * z0) - z0) * ((-1.0 * (z2 / z1)) * z2);
	double tmp;
	if (z0 <= -4.5e+29) {
		tmp = t_0;
	} else if (z0 <= 1.1e-9) {
		tmp = (z0 * z2) / ((z1 / z2) + (((z3 / z4) * z2) / z4));
	} else if (z0 <= 6.2e+180) {
		tmp = t_0;
	} else {
		tmp = ((z0 - (((-0.5 - (0.3333333333333333 * z0)) * z0) * z0)) / (((z1 / (z2 * z2)) * z4) + (z3 / z4))) * z4;
	}
	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 = (((((-0.5d0) - (((0.25d0 * z0) - (-0.3333333333333333d0)) * z0)) * z0) * z0) - z0) * (((-1.0d0) * (z2 / z1)) * z2)
    if (z0 <= (-4.5d+29)) then
        tmp = t_0
    else if (z0 <= 1.1d-9) then
        tmp = (z0 * z2) / ((z1 / z2) + (((z3 / z4) * z2) / z4))
    else if (z0 <= 6.2d+180) then
        tmp = t_0
    else
        tmp = ((z0 - ((((-0.5d0) - (0.3333333333333333d0 * z0)) * z0) * z0)) / (((z1 / (z2 * z2)) * z4) + (z3 / z4))) * z4
    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)) * z0) * z0) - z0) * ((-1.0 * (z2 / z1)) * z2);
	double tmp;
	if (z0 <= -4.5e+29) {
		tmp = t_0;
	} else if (z0 <= 1.1e-9) {
		tmp = (z0 * z2) / ((z1 / z2) + (((z3 / z4) * z2) / z4));
	} else if (z0 <= 6.2e+180) {
		tmp = t_0;
	} else {
		tmp = ((z0 - (((-0.5 - (0.3333333333333333 * z0)) * z0) * z0)) / (((z1 / (z2 * z2)) * z4) + (z3 / z4))) * z4;
	}
	return tmp;
}
def code(z0, z3, z4, z1, z2):
	t_0 = ((((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0) * z0) - z0) * ((-1.0 * (z2 / z1)) * z2)
	tmp = 0
	if z0 <= -4.5e+29:
		tmp = t_0
	elif z0 <= 1.1e-9:
		tmp = (z0 * z2) / ((z1 / z2) + (((z3 / z4) * z2) / z4))
	elif z0 <= 6.2e+180:
		tmp = t_0
	else:
		tmp = ((z0 - (((-0.5 - (0.3333333333333333 * z0)) * z0) * z0)) / (((z1 / (z2 * z2)) * z4) + (z3 / z4))) * z4
	return tmp
function code(z0, z3, z4, z1, z2)
	t_0 = Float64(Float64(Float64(Float64(Float64(-0.5 - Float64(Float64(Float64(0.25 * z0) - -0.3333333333333333) * z0)) * z0) * z0) - z0) * Float64(Float64(-1.0 * Float64(z2 / z1)) * z2))
	tmp = 0.0
	if (z0 <= -4.5e+29)
		tmp = t_0;
	elseif (z0 <= 1.1e-9)
		tmp = Float64(Float64(z0 * z2) / Float64(Float64(z1 / z2) + Float64(Float64(Float64(z3 / z4) * z2) / z4)));
	elseif (z0 <= 6.2e+180)
		tmp = t_0;
	else
		tmp = Float64(Float64(Float64(z0 - Float64(Float64(Float64(-0.5 - Float64(0.3333333333333333 * z0)) * z0) * z0)) / Float64(Float64(Float64(z1 / Float64(z2 * z2)) * z4) + Float64(z3 / z4))) * z4);
	end
	return tmp
end
function tmp_2 = code(z0, z3, z4, z1, z2)
	t_0 = ((((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0) * z0) - z0) * ((-1.0 * (z2 / z1)) * z2);
	tmp = 0.0;
	if (z0 <= -4.5e+29)
		tmp = t_0;
	elseif (z0 <= 1.1e-9)
		tmp = (z0 * z2) / ((z1 / z2) + (((z3 / z4) * z2) / z4));
	elseif (z0 <= 6.2e+180)
		tmp = t_0;
	else
		tmp = ((z0 - (((-0.5 - (0.3333333333333333 * z0)) * z0) * z0)) / (((z1 / (z2 * z2)) * z4) + (z3 / z4))) * z4;
	end
	tmp_2 = tmp;
end
code[z0_, z3_, z4_, z1_, z2_] := Block[{t$95$0 = N[(N[(N[(N[(N[(-0.5 - N[(N[(N[(0.25 * z0), $MachinePrecision] - -0.3333333333333333), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision] * z0), $MachinePrecision] * z0), $MachinePrecision] - z0), $MachinePrecision] * N[(N[(-1.0 * N[(z2 / z1), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z0, -4.5e+29], t$95$0, If[LessEqual[z0, 1.1e-9], N[(N[(z0 * z2), $MachinePrecision] / N[(N[(z1 / z2), $MachinePrecision] + N[(N[(N[(z3 / z4), $MachinePrecision] * z2), $MachinePrecision] / z4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z0, 6.2e+180], t$95$0, N[(N[(N[(z0 - N[(N[(N[(-0.5 - N[(0.3333333333333333 * z0), $MachinePrecision]), $MachinePrecision] * z0), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z1 / N[(z2 * z2), $MachinePrecision]), $MachinePrecision] * z4), $MachinePrecision] + N[(z3 / z4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * z4), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \left(\left(-1 \cdot \frac{z2}{z1}\right) \cdot z2\right)\\
\mathbf{if}\;z0 \leq -4.5 \cdot 10^{+29}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z0 \leq 1.1 \cdot 10^{-9}:\\
\;\;\;\;\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4} \cdot z2}{z4}}\\

\mathbf{elif}\;z0 \leq 6.2 \cdot 10^{+180}:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{z0 - \left(\left(-0.5 - 0.3333333333333333 \cdot z0\right) \cdot z0\right) \cdot z0}{\frac{z1}{z2 \cdot z2} \cdot z4 + \frac{z3}{z4}} \cdot z4\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z0 < -4.5000000000000002e29 or 1.0999999999999999e-9 < z0 < 6.2e180

    1. Initial program 66.3%

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

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

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

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

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

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

        \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
      7. lower--.f64N/A

        \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
      8. frac-2negN/A

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

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

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

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

        \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
      13. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.5000000000000002e29 < z0 < 1.0999999999999999e-9

    1. Initial program 66.3%

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

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

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

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

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

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

        \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
      7. lower--.f64N/A

        \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
      8. frac-2negN/A

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

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

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

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

        \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
      13. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
    7. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2}} + \frac{z2 \cdot z3}{{z4}^{2}}} \]
      3. lower-+.f64N/A

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \color{blue}{\frac{z2 \cdot z3}{{z4}^{2}}}} \]
      4. lower-/.f64N/A

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\color{blue}{z2 \cdot z3}}{{z4}^{2}}} \]
      5. lower-/.f64N/A

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
      6. lower-*.f64N/A

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{\color{blue}{z4}}^{2}}} \]
      7. lower-pow.f6450.0%

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
    8. Applied rewrites50.0%

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

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
      2. lift-pow.f64N/A

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
      3. pow2N/A

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{z4 \cdot \color{blue}{z4}}} \]
      4. lift-*.f64N/A

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

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{z4} \cdot z4}} \]
      6. *-commutativeN/A

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z3 \cdot z2}{\color{blue}{z4} \cdot z4}} \]
      7. associate-*l/N/A

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z3}{z4 \cdot z4} \cdot \color{blue}{z2}} \]
      8. lift-*.f64N/A

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z3}{z4 \cdot z4} \cdot z2} \]
      9. associate-/l/N/A

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4}}{z4} \cdot z2} \]
      10. lift-/.f64N/A

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4}}{z4} \cdot z2} \]
      11. associate-*l/N/A

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4} \cdot z2}{\color{blue}{z4}}} \]
      12. lower-/.f64N/A

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4} \cdot z2}{\color{blue}{z4}}} \]
      13. lower-*.f6454.8%

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4} \cdot z2}{z4}} \]
    10. Applied rewrites54.8%

      \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4} \cdot z2}{\color{blue}{z4}}} \]

    if 6.2e180 < z0

    1. Initial program 66.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 69.1% accurate, 0.8× speedup?

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

      1. Initial program 66.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.5999999999999998e-16 < z4

      1. Initial program 66.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 69.1% accurate, 0.8× speedup?

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

      1. Initial program 66.3%

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

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

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

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

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

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

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lower--.f64N/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        8. frac-2negN/A

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

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

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

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

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
        13. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -4.5000000000000002e29 < z0 < 5.5999999999999999e-49

      1. Initial program 66.3%

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

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

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

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

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

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

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lower--.f64N/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        8. frac-2negN/A

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

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

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

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

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
        13. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2}} + \frac{z2 \cdot z3}{{z4}^{2}}} \]
        3. lower-+.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \color{blue}{\frac{z2 \cdot z3}{{z4}^{2}}}} \]
        4. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\color{blue}{z2 \cdot z3}}{{z4}^{2}}} \]
        5. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{\color{blue}{z4}}^{2}}} \]
        7. lower-pow.f6450.0%

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
      8. Applied rewrites50.0%

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

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
        2. lift-pow.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
        3. pow2N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{z4 \cdot \color{blue}{z4}}} \]
        4. lift-*.f64N/A

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

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{z4} \cdot z4}} \]
        6. *-commutativeN/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z3 \cdot z2}{\color{blue}{z4} \cdot z4}} \]
        7. associate-*l/N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z3}{z4 \cdot z4} \cdot \color{blue}{z2}} \]
        8. lift-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z3}{z4 \cdot z4} \cdot z2} \]
        9. associate-/l/N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4}}{z4} \cdot z2} \]
        10. lift-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4}}{z4} \cdot z2} \]
        11. associate-*l/N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4} \cdot z2}{\color{blue}{z4}}} \]
        12. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4} \cdot z2}{\color{blue}{z4}}} \]
        13. lower-*.f6454.8%

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4} \cdot z2}{z4}} \]
      10. Applied rewrites54.8%

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4} \cdot z2}{\color{blue}{z4}}} \]

      if 5.5999999999999999e-49 < z0

      1. Initial program 66.3%

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

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

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

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

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

          \[\leadsto \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 - z0}}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        6. lower--.f64N/A

          \[\leadsto \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 - z0}}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lift-+.f64N/A

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

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

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

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

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

    Alternative 6: 68.4% accurate, 0.9× speedup?

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

      1. Initial program 66.3%

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

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

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

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

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

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

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lower--.f64N/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        8. frac-2negN/A

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

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

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

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

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
        13. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -4.5000000000000002e29 < z0 < 3.3499999999999999e-49

      1. Initial program 66.3%

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

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

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

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

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

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

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lower--.f64N/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        8. frac-2negN/A

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

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

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

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

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
        13. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2}} + \frac{z2 \cdot z3}{{z4}^{2}}} \]
        3. lower-+.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \color{blue}{\frac{z2 \cdot z3}{{z4}^{2}}}} \]
        4. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\color{blue}{z2 \cdot z3}}{{z4}^{2}}} \]
        5. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{\color{blue}{z4}}^{2}}} \]
        7. lower-pow.f6450.0%

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
      8. Applied rewrites50.0%

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

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
        2. lift-pow.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
        3. pow2N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{z4 \cdot \color{blue}{z4}}} \]
        4. lift-*.f64N/A

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

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{z4} \cdot z4}} \]
        6. *-commutativeN/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z3 \cdot z2}{\color{blue}{z4} \cdot z4}} \]
        7. associate-*l/N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z3}{z4 \cdot z4} \cdot \color{blue}{z2}} \]
        8. lift-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z3}{z4 \cdot z4} \cdot z2} \]
        9. associate-/l/N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4}}{z4} \cdot z2} \]
        10. lift-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4}}{z4} \cdot z2} \]
        11. associate-*l/N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4} \cdot z2}{\color{blue}{z4}}} \]
        12. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4} \cdot z2}{\color{blue}{z4}}} \]
        13. lower-*.f6454.8%

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4} \cdot z2}{z4}} \]
      10. Applied rewrites54.8%

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4} \cdot z2}{\color{blue}{z4}}} \]

      if 3.3499999999999999e-49 < z0

      1. Initial program 66.3%

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

    Alternative 7: 68.1% accurate, 0.8× speedup?

    \[\begin{array}{l} t_0 := \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0\\ \mathbf{if}\;z0 - t\_0 \leq 10^{-15}:\\ \;\;\;\;\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4} \cdot z2}{z4}}\\ \mathbf{else}:\\ \;\;\;\;\left(t\_0 - z0\right) \cdot \left(\left(-1 \cdot \frac{z2}{z1}\right) \cdot z2\right)\\ \end{array} \]
    (FPCore (z0 z3 z4 z1 z2)
      :precision binary64
      (let* ((t_0
            (*
             (* (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0)) z0)
             z0)))
      (if (<= (- z0 t_0) 1e-15)
        (/ (* z0 z2) (+ (/ z1 z2) (/ (* (/ z3 z4) z2) z4)))
        (* (- t_0 z0) (* (* -1.0 (/ z2 z1)) z2)))))
    double code(double z0, double z3, double z4, double z1, double z2) {
    	double t_0 = ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0) * z0;
    	double tmp;
    	if ((z0 - t_0) <= 1e-15) {
    		tmp = (z0 * z2) / ((z1 / z2) + (((z3 / z4) * z2) / z4));
    	} else {
    		tmp = (t_0 - z0) * ((-1.0 * (z2 / z1)) * 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 = (((-0.5d0) - (((0.25d0 * z0) - (-0.3333333333333333d0)) * z0)) * z0) * z0
        if ((z0 - t_0) <= 1d-15) then
            tmp = (z0 * z2) / ((z1 / z2) + (((z3 / z4) * z2) / z4))
        else
            tmp = (t_0 - z0) * (((-1.0d0) * (z2 / z1)) * 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)) * z0) * z0;
    	double tmp;
    	if ((z0 - t_0) <= 1e-15) {
    		tmp = (z0 * z2) / ((z1 / z2) + (((z3 / z4) * z2) / z4));
    	} else {
    		tmp = (t_0 - z0) * ((-1.0 * (z2 / z1)) * z2);
    	}
    	return tmp;
    }
    
    def code(z0, z3, z4, z1, z2):
    	t_0 = ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0) * z0
    	tmp = 0
    	if (z0 - t_0) <= 1e-15:
    		tmp = (z0 * z2) / ((z1 / z2) + (((z3 / z4) * z2) / z4))
    	else:
    		tmp = (t_0 - z0) * ((-1.0 * (z2 / z1)) * z2)
    	return tmp
    
    function code(z0, z3, z4, z1, z2)
    	t_0 = Float64(Float64(Float64(-0.5 - Float64(Float64(Float64(0.25 * z0) - -0.3333333333333333) * z0)) * z0) * z0)
    	tmp = 0.0
    	if (Float64(z0 - t_0) <= 1e-15)
    		tmp = Float64(Float64(z0 * z2) / Float64(Float64(z1 / z2) + Float64(Float64(Float64(z3 / z4) * z2) / z4)));
    	else
    		tmp = Float64(Float64(t_0 - z0) * Float64(Float64(-1.0 * Float64(z2 / z1)) * z2));
    	end
    	return tmp
    end
    
    function tmp_2 = code(z0, z3, z4, z1, z2)
    	t_0 = ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0) * z0;
    	tmp = 0.0;
    	if ((z0 - t_0) <= 1e-15)
    		tmp = (z0 * z2) / ((z1 / z2) + (((z3 / z4) * z2) / z4));
    	else
    		tmp = (t_0 - z0) * ((-1.0 * (z2 / z1)) * z2);
    	end
    	tmp_2 = tmp;
    end
    
    code[z0_, z3_, z4_, z1_, z2_] := Block[{t$95$0 = N[(N[(N[(-0.5 - N[(N[(N[(0.25 * z0), $MachinePrecision] - -0.3333333333333333), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision] * z0), $MachinePrecision] * z0), $MachinePrecision]}, If[LessEqual[N[(z0 - t$95$0), $MachinePrecision], 1e-15], N[(N[(z0 * z2), $MachinePrecision] / N[(N[(z1 / z2), $MachinePrecision] + N[(N[(N[(z3 / z4), $MachinePrecision] * z2), $MachinePrecision] / z4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 - z0), $MachinePrecision] * N[(N[(-1.0 * N[(z2 / z1), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    t_0 := \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0\\
    \mathbf{if}\;z0 - t\_0 \leq 10^{-15}:\\
    \;\;\;\;\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4} \cdot z2}{z4}}\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(t\_0 - z0\right) \cdot \left(\left(-1 \cdot \frac{z2}{z1}\right) \cdot z2\right)\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (-.f64 z0 (*.f64 (*.f64 (-.f64 #s(literal -1/2 binary64) (*.f64 (-.f64 (*.f64 #s(literal 1/4 binary64) z0) #s(literal -3333333333333333/10000000000000000 binary64)) z0)) z0) z0)) < 1.0000000000000001e-15

      1. Initial program 66.3%

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

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

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

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

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

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

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lower--.f64N/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        8. frac-2negN/A

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

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

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

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

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
        13. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2}} + \frac{z2 \cdot z3}{{z4}^{2}}} \]
        3. lower-+.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \color{blue}{\frac{z2 \cdot z3}{{z4}^{2}}}} \]
        4. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\color{blue}{z2 \cdot z3}}{{z4}^{2}}} \]
        5. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{\color{blue}{z4}}^{2}}} \]
        7. lower-pow.f6450.0%

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
      8. Applied rewrites50.0%

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

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
        2. lift-pow.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
        3. pow2N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{z4 \cdot \color{blue}{z4}}} \]
        4. lift-*.f64N/A

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

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{z4} \cdot z4}} \]
        6. *-commutativeN/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z3 \cdot z2}{\color{blue}{z4} \cdot z4}} \]
        7. associate-*l/N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z3}{z4 \cdot z4} \cdot \color{blue}{z2}} \]
        8. lift-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z3}{z4 \cdot z4} \cdot z2} \]
        9. associate-/l/N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4}}{z4} \cdot z2} \]
        10. lift-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4}}{z4} \cdot z2} \]
        11. associate-*l/N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4} \cdot z2}{\color{blue}{z4}}} \]
        12. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4} \cdot z2}{\color{blue}{z4}}} \]
        13. lower-*.f6454.8%

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4} \cdot z2}{z4}} \]
      10. Applied rewrites54.8%

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\frac{z3}{z4} \cdot z2}{\color{blue}{z4}}} \]

      if 1.0000000000000001e-15 < (-.f64 z0 (*.f64 (*.f64 (-.f64 #s(literal -1/2 binary64) (*.f64 (-.f64 (*.f64 #s(literal 1/4 binary64) z0) #s(literal -3333333333333333/10000000000000000 binary64)) z0)) z0) z0))

      1. Initial program 66.3%

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

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

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

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

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

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

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lower--.f64N/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        8. frac-2negN/A

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

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

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

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

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
        13. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 8: 64.1% accurate, 0.8× speedup?

    \[\begin{array}{l} t_0 := \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0\\ \mathbf{if}\;z0 - t\_0 \leq 10^{-15}:\\ \;\;\;\;\left(\frac{z2}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot z2\right) \cdot z0\\ \mathbf{else}:\\ \;\;\;\;\left(t\_0 - z0\right) \cdot \left(\left(-1 \cdot \frac{z2}{z1}\right) \cdot z2\right)\\ \end{array} \]
    (FPCore (z0 z3 z4 z1 z2)
      :precision binary64
      (let* ((t_0
            (*
             (* (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0)) z0)
             z0)))
      (if (<= (- z0 t_0) 1e-15)
        (* (* (/ z2 (+ (* (* (/ z3 (* z4 z4)) z2) z2) z1)) z2) z0)
        (* (- t_0 z0) (* (* -1.0 (/ z2 z1)) z2)))))
    double code(double z0, double z3, double z4, double z1, double z2) {
    	double t_0 = ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0) * z0;
    	double tmp;
    	if ((z0 - t_0) <= 1e-15) {
    		tmp = ((z2 / ((((z3 / (z4 * z4)) * z2) * z2) + z1)) * z2) * z0;
    	} else {
    		tmp = (t_0 - z0) * ((-1.0 * (z2 / z1)) * 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 = (((-0.5d0) - (((0.25d0 * z0) - (-0.3333333333333333d0)) * z0)) * z0) * z0
        if ((z0 - t_0) <= 1d-15) then
            tmp = ((z2 / ((((z3 / (z4 * z4)) * z2) * z2) + z1)) * z2) * z0
        else
            tmp = (t_0 - z0) * (((-1.0d0) * (z2 / z1)) * 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)) * z0) * z0;
    	double tmp;
    	if ((z0 - t_0) <= 1e-15) {
    		tmp = ((z2 / ((((z3 / (z4 * z4)) * z2) * z2) + z1)) * z2) * z0;
    	} else {
    		tmp = (t_0 - z0) * ((-1.0 * (z2 / z1)) * z2);
    	}
    	return tmp;
    }
    
    def code(z0, z3, z4, z1, z2):
    	t_0 = ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0) * z0
    	tmp = 0
    	if (z0 - t_0) <= 1e-15:
    		tmp = ((z2 / ((((z3 / (z4 * z4)) * z2) * z2) + z1)) * z2) * z0
    	else:
    		tmp = (t_0 - z0) * ((-1.0 * (z2 / z1)) * z2)
    	return tmp
    
    function code(z0, z3, z4, z1, z2)
    	t_0 = Float64(Float64(Float64(-0.5 - Float64(Float64(Float64(0.25 * z0) - -0.3333333333333333) * z0)) * z0) * z0)
    	tmp = 0.0
    	if (Float64(z0 - t_0) <= 1e-15)
    		tmp = Float64(Float64(Float64(z2 / Float64(Float64(Float64(Float64(z3 / Float64(z4 * z4)) * z2) * z2) + z1)) * z2) * z0);
    	else
    		tmp = Float64(Float64(t_0 - z0) * Float64(Float64(-1.0 * Float64(z2 / z1)) * z2));
    	end
    	return tmp
    end
    
    function tmp_2 = code(z0, z3, z4, z1, z2)
    	t_0 = ((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0) * z0;
    	tmp = 0.0;
    	if ((z0 - t_0) <= 1e-15)
    		tmp = ((z2 / ((((z3 / (z4 * z4)) * z2) * z2) + z1)) * z2) * z0;
    	else
    		tmp = (t_0 - z0) * ((-1.0 * (z2 / z1)) * z2);
    	end
    	tmp_2 = tmp;
    end
    
    code[z0_, z3_, z4_, z1_, z2_] := Block[{t$95$0 = N[(N[(N[(-0.5 - N[(N[(N[(0.25 * z0), $MachinePrecision] - -0.3333333333333333), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision] * z0), $MachinePrecision] * z0), $MachinePrecision]}, If[LessEqual[N[(z0 - t$95$0), $MachinePrecision], 1e-15], N[(N[(N[(z2 / N[(N[(N[(N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision] * z2), $MachinePrecision] + z1), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision] * z0), $MachinePrecision], N[(N[(t$95$0 - z0), $MachinePrecision] * N[(N[(-1.0 * N[(z2 / z1), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    t_0 := \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0\\
    \mathbf{if}\;z0 - t\_0 \leq 10^{-15}:\\
    \;\;\;\;\left(\frac{z2}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1} \cdot z2\right) \cdot z0\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(t\_0 - z0\right) \cdot \left(\left(-1 \cdot \frac{z2}{z1}\right) \cdot z2\right)\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (-.f64 z0 (*.f64 (*.f64 (-.f64 #s(literal -1/2 binary64) (*.f64 (-.f64 (*.f64 #s(literal 1/4 binary64) z0) #s(literal -3333333333333333/10000000000000000 binary64)) z0)) z0) z0)) < 1.0000000000000001e-15

      1. Initial program 66.3%

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

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

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

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

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

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

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lower--.f64N/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        8. frac-2negN/A

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

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

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

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

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
        13. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2}} + \frac{z2 \cdot z3}{{z4}^{2}}} \]
        3. lower-+.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \color{blue}{\frac{z2 \cdot z3}{{z4}^{2}}}} \]
        4. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\color{blue}{z2 \cdot z3}}{{z4}^{2}}} \]
        5. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{\color{blue}{z4}}^{2}}} \]
        7. lower-pow.f6450.0%

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
      8. Applied rewrites50.0%

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      9. Applied rewrites50.2%

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

      if 1.0000000000000001e-15 < (-.f64 z0 (*.f64 (*.f64 (-.f64 #s(literal -1/2 binary64) (*.f64 (-.f64 (*.f64 #s(literal 1/4 binary64) z0) #s(literal -3333333333333333/10000000000000000 binary64)) z0)) z0) z0))

      1. Initial program 66.3%

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

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

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

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

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

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

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lower--.f64N/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        8. frac-2negN/A

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

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

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

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

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
        13. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 9: 55.3% accurate, 1.0× speedup?

    \[\begin{array}{l} t_0 := \left|z4\right| \cdot \left|z4\right|\\ \mathbf{if}\;\left|z4\right| \leq 160000000000:\\ \;\;\;\;\frac{-z0}{\left(\frac{z1}{\left(-\left|z2\right|\right) \cdot \left|z2\right|} \cdot \left|z4\right|\right) \cdot \left|z4\right| - z3} \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{z0 \cdot \left|z2\right|}{\frac{z1}{\left|z2\right|} + z3 \cdot \frac{\left|z2\right|}{t\_0}}\\ \end{array} \]
    (FPCore (z0 z3 z4 z1 z2)
      :precision binary64
      (let* ((t_0 (* (fabs z4) (fabs z4))))
      (if (<= (fabs z4) 160000000000.0)
        (*
         (/
          (- z0)
          (-
           (* (* (/ z1 (* (- (fabs z2)) (fabs z2))) (fabs z4)) (fabs z4))
           z3))
         t_0)
        (/
         (* z0 (fabs z2))
         (+ (/ z1 (fabs z2)) (* z3 (/ (fabs z2) t_0)))))))
    double code(double z0, double z3, double z4, double z1, double z2) {
    	double t_0 = fabs(z4) * fabs(z4);
    	double tmp;
    	if (fabs(z4) <= 160000000000.0) {
    		tmp = (-z0 / ((((z1 / (-fabs(z2) * fabs(z2))) * fabs(z4)) * fabs(z4)) - z3)) * t_0;
    	} else {
    		tmp = (z0 * fabs(z2)) / ((z1 / fabs(z2)) + (z3 * (fabs(z2) / 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) :: tmp
        t_0 = abs(z4) * abs(z4)
        if (abs(z4) <= 160000000000.0d0) then
            tmp = (-z0 / ((((z1 / (-abs(z2) * abs(z2))) * abs(z4)) * abs(z4)) - z3)) * t_0
        else
            tmp = (z0 * abs(z2)) / ((z1 / abs(z2)) + (z3 * (abs(z2) / 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 = Math.abs(z4) * Math.abs(z4);
    	double tmp;
    	if (Math.abs(z4) <= 160000000000.0) {
    		tmp = (-z0 / ((((z1 / (-Math.abs(z2) * Math.abs(z2))) * Math.abs(z4)) * Math.abs(z4)) - z3)) * t_0;
    	} else {
    		tmp = (z0 * Math.abs(z2)) / ((z1 / Math.abs(z2)) + (z3 * (Math.abs(z2) / t_0)));
    	}
    	return tmp;
    }
    
    def code(z0, z3, z4, z1, z2):
    	t_0 = math.fabs(z4) * math.fabs(z4)
    	tmp = 0
    	if math.fabs(z4) <= 160000000000.0:
    		tmp = (-z0 / ((((z1 / (-math.fabs(z2) * math.fabs(z2))) * math.fabs(z4)) * math.fabs(z4)) - z3)) * t_0
    	else:
    		tmp = (z0 * math.fabs(z2)) / ((z1 / math.fabs(z2)) + (z3 * (math.fabs(z2) / t_0)))
    	return tmp
    
    function code(z0, z3, z4, z1, z2)
    	t_0 = Float64(abs(z4) * abs(z4))
    	tmp = 0.0
    	if (abs(z4) <= 160000000000.0)
    		tmp = Float64(Float64(Float64(-z0) / Float64(Float64(Float64(Float64(z1 / Float64(Float64(-abs(z2)) * abs(z2))) * abs(z4)) * abs(z4)) - z3)) * t_0);
    	else
    		tmp = Float64(Float64(z0 * abs(z2)) / Float64(Float64(z1 / abs(z2)) + Float64(z3 * Float64(abs(z2) / t_0))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(z0, z3, z4, z1, z2)
    	t_0 = abs(z4) * abs(z4);
    	tmp = 0.0;
    	if (abs(z4) <= 160000000000.0)
    		tmp = (-z0 / ((((z1 / (-abs(z2) * abs(z2))) * abs(z4)) * abs(z4)) - z3)) * t_0;
    	else
    		tmp = (z0 * abs(z2)) / ((z1 / abs(z2)) + (z3 * (abs(z2) / t_0)));
    	end
    	tmp_2 = tmp;
    end
    
    code[z0_, z3_, z4_, z1_, z2_] := Block[{t$95$0 = N[(N[Abs[z4], $MachinePrecision] * N[Abs[z4], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[z4], $MachinePrecision], 160000000000.0], N[(N[((-z0) / N[(N[(N[(N[(z1 / N[((-N[Abs[z2], $MachinePrecision]) * N[Abs[z2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Abs[z4], $MachinePrecision]), $MachinePrecision] * N[Abs[z4], $MachinePrecision]), $MachinePrecision] - z3), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(z0 * N[Abs[z2], $MachinePrecision]), $MachinePrecision] / N[(N[(z1 / N[Abs[z2], $MachinePrecision]), $MachinePrecision] + N[(z3 * N[(N[Abs[z2], $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    t_0 := \left|z4\right| \cdot \left|z4\right|\\
    \mathbf{if}\;\left|z4\right| \leq 160000000000:\\
    \;\;\;\;\frac{-z0}{\left(\frac{z1}{\left(-\left|z2\right|\right) \cdot \left|z2\right|} \cdot \left|z4\right|\right) \cdot \left|z4\right| - z3} \cdot t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{z0 \cdot \left|z2\right|}{\frac{z1}{\left|z2\right|} + z3 \cdot \frac{\left|z2\right|}{t\_0}}\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z4 < 1.6e11

      1. Initial program 66.3%

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

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

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

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

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

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

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lower--.f64N/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        8. frac-2negN/A

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

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

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

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

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
        13. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(-1 \cdot z0\right) \cdot \color{blue}{\frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2} \cdot \frac{1}{z2}\right)\right)}} \]
        14. metadata-evalN/A

          \[\leadsto \left(-1 \cdot z0\right) \cdot \frac{\color{blue}{1}}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2} \cdot \frac{1}{z2}\right)\right)} \]
      8. Applied rewrites49.3%

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

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

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

          \[\leadsto \frac{-z0}{\frac{z1}{\left(-z2\right) \cdot z2} - \color{blue}{\frac{z3}{z4 \cdot z4}}} \]
        4. sub-to-fractionN/A

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

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

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

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

      if 1.6e11 < z4

      1. Initial program 66.3%

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

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

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

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

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

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

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lower--.f64N/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        8. frac-2negN/A

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

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

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

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

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
        13. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2}} + \frac{z2 \cdot z3}{{z4}^{2}}} \]
        3. lower-+.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \color{blue}{\frac{z2 \cdot z3}{{z4}^{2}}}} \]
        4. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\color{blue}{z2 \cdot z3}}{{z4}^{2}}} \]
        5. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{\color{blue}{z4}}^{2}}} \]
        7. lower-pow.f6450.0%

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
      8. Applied rewrites50.0%

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

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

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{\color{blue}{z4}}^{2}}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z3 \cdot z2}{{\color{blue}{z4}}^{2}}} \]
        4. lift-pow.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z3 \cdot z2}{{z4}^{\color{blue}{2}}}} \]
        5. pow2N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z3 \cdot z2}{z4 \cdot \color{blue}{z4}}} \]
        6. lift-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z3 \cdot z2}{z4 \cdot \color{blue}{z4}}} \]
        7. associate-/l*N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + z3 \cdot \color{blue}{\frac{z2}{z4 \cdot z4}}} \]
        8. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + z3 \cdot \color{blue}{\frac{z2}{z4 \cdot z4}}} \]
        9. lower-/.f6452.2%

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + z3 \cdot \frac{z2}{\color{blue}{z4 \cdot z4}}} \]
      10. Applied rewrites52.2%

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + z3 \cdot \color{blue}{\frac{z2}{z4 \cdot z4}}} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 10: 55.0% accurate, 1.1× speedup?

    \[\begin{array}{l} \mathbf{if}\;\left|z4\right| \leq 1.2 \cdot 10^{-9}:\\ \;\;\;\;\frac{z0}{\frac{z1}{\left|z2\right| \cdot \left|z2\right|} \cdot \left|z4\right| + \frac{z3}{\left|z4\right|}} \cdot \left|z4\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{z0 \cdot \left|z2\right|}{\frac{z1}{\left|z2\right|} + z3 \cdot \frac{\left|z2\right|}{\left|z4\right| \cdot \left|z4\right|}}\\ \end{array} \]
    (FPCore (z0 z3 z4 z1 z2)
      :precision binary64
      (if (<= (fabs z4) 1.2e-9)
      (*
       (/
        z0
        (+ (* (/ z1 (* (fabs z2) (fabs z2))) (fabs z4)) (/ z3 (fabs z4))))
       (fabs z4))
      (/
       (* z0 (fabs z2))
       (+ (/ z1 (fabs z2)) (* z3 (/ (fabs z2) (* (fabs z4) (fabs z4))))))))
    double code(double z0, double z3, double z4, double z1, double z2) {
    	double tmp;
    	if (fabs(z4) <= 1.2e-9) {
    		tmp = (z0 / (((z1 / (fabs(z2) * fabs(z2))) * fabs(z4)) + (z3 / fabs(z4)))) * fabs(z4);
    	} else {
    		tmp = (z0 * fabs(z2)) / ((z1 / fabs(z2)) + (z3 * (fabs(z2) / (fabs(z4) * fabs(z4)))));
    	}
    	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) :: tmp
        if (abs(z4) <= 1.2d-9) then
            tmp = (z0 / (((z1 / (abs(z2) * abs(z2))) * abs(z4)) + (z3 / abs(z4)))) * abs(z4)
        else
            tmp = (z0 * abs(z2)) / ((z1 / abs(z2)) + (z3 * (abs(z2) / (abs(z4) * abs(z4)))))
        end if
        code = tmp
    end function
    
    public static double code(double z0, double z3, double z4, double z1, double z2) {
    	double tmp;
    	if (Math.abs(z4) <= 1.2e-9) {
    		tmp = (z0 / (((z1 / (Math.abs(z2) * Math.abs(z2))) * Math.abs(z4)) + (z3 / Math.abs(z4)))) * Math.abs(z4);
    	} else {
    		tmp = (z0 * Math.abs(z2)) / ((z1 / Math.abs(z2)) + (z3 * (Math.abs(z2) / (Math.abs(z4) * Math.abs(z4)))));
    	}
    	return tmp;
    }
    
    def code(z0, z3, z4, z1, z2):
    	tmp = 0
    	if math.fabs(z4) <= 1.2e-9:
    		tmp = (z0 / (((z1 / (math.fabs(z2) * math.fabs(z2))) * math.fabs(z4)) + (z3 / math.fabs(z4)))) * math.fabs(z4)
    	else:
    		tmp = (z0 * math.fabs(z2)) / ((z1 / math.fabs(z2)) + (z3 * (math.fabs(z2) / (math.fabs(z4) * math.fabs(z4)))))
    	return tmp
    
    function code(z0, z3, z4, z1, z2)
    	tmp = 0.0
    	if (abs(z4) <= 1.2e-9)
    		tmp = Float64(Float64(z0 / Float64(Float64(Float64(z1 / Float64(abs(z2) * abs(z2))) * abs(z4)) + Float64(z3 / abs(z4)))) * abs(z4));
    	else
    		tmp = Float64(Float64(z0 * abs(z2)) / Float64(Float64(z1 / abs(z2)) + Float64(z3 * Float64(abs(z2) / Float64(abs(z4) * abs(z4))))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(z0, z3, z4, z1, z2)
    	tmp = 0.0;
    	if (abs(z4) <= 1.2e-9)
    		tmp = (z0 / (((z1 / (abs(z2) * abs(z2))) * abs(z4)) + (z3 / abs(z4)))) * abs(z4);
    	else
    		tmp = (z0 * abs(z2)) / ((z1 / abs(z2)) + (z3 * (abs(z2) / (abs(z4) * abs(z4)))));
    	end
    	tmp_2 = tmp;
    end
    
    code[z0_, z3_, z4_, z1_, z2_] := If[LessEqual[N[Abs[z4], $MachinePrecision], 1.2e-9], N[(N[(z0 / N[(N[(N[(z1 / N[(N[Abs[z2], $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Abs[z4], $MachinePrecision]), $MachinePrecision] + N[(z3 / N[Abs[z4], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Abs[z4], $MachinePrecision]), $MachinePrecision], N[(N[(z0 * N[Abs[z2], $MachinePrecision]), $MachinePrecision] / N[(N[(z1 / N[Abs[z2], $MachinePrecision]), $MachinePrecision] + N[(z3 * N[(N[Abs[z2], $MachinePrecision] / N[(N[Abs[z4], $MachinePrecision] * N[Abs[z4], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    \mathbf{if}\;\left|z4\right| \leq 1.2 \cdot 10^{-9}:\\
    \;\;\;\;\frac{z0}{\frac{z1}{\left|z2\right| \cdot \left|z2\right|} \cdot \left|z4\right| + \frac{z3}{\left|z4\right|}} \cdot \left|z4\right|\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{z0 \cdot \left|z2\right|}{\frac{z1}{\left|z2\right|} + z3 \cdot \frac{\left|z2\right|}{\left|z4\right| \cdot \left|z4\right|}}\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z4 < 1.2e-9

      1. Initial program 66.3%

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

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

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

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

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

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

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lower--.f64N/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        8. frac-2negN/A

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

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

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

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

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
        13. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2}} + \frac{z2 \cdot z3}{{z4}^{2}}} \]
        3. lower-+.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \color{blue}{\frac{z2 \cdot z3}{{z4}^{2}}}} \]
        4. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\color{blue}{z2 \cdot z3}}{{z4}^{2}}} \]
        5. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{\color{blue}{z4}}^{2}}} \]
        7. lower-pow.f6450.0%

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
      8. Applied rewrites50.0%

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      9. Applied rewrites50.6%

        \[\leadsto \frac{z0}{\frac{z1}{z2 \cdot z2} \cdot z4 + \frac{z3}{z4}} \cdot \color{blue}{z4} \]

      if 1.2e-9 < z4

      1. Initial program 66.3%

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

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

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

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

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

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

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lower--.f64N/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        8. frac-2negN/A

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

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

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

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

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
        13. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2}} + \frac{z2 \cdot z3}{{z4}^{2}}} \]
        3. lower-+.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \color{blue}{\frac{z2 \cdot z3}{{z4}^{2}}}} \]
        4. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\color{blue}{z2 \cdot z3}}{{z4}^{2}}} \]
        5. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{\color{blue}{z4}}^{2}}} \]
        7. lower-pow.f6450.0%

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
      8. Applied rewrites50.0%

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

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

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{\color{blue}{z4}}^{2}}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z3 \cdot z2}{{\color{blue}{z4}}^{2}}} \]
        4. lift-pow.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z3 \cdot z2}{{z4}^{\color{blue}{2}}}} \]
        5. pow2N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z3 \cdot z2}{z4 \cdot \color{blue}{z4}}} \]
        6. lift-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z3 \cdot z2}{z4 \cdot \color{blue}{z4}}} \]
        7. associate-/l*N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + z3 \cdot \color{blue}{\frac{z2}{z4 \cdot z4}}} \]
        8. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + z3 \cdot \color{blue}{\frac{z2}{z4 \cdot z4}}} \]
        9. lower-/.f6452.2%

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + z3 \cdot \frac{z2}{\color{blue}{z4 \cdot z4}}} \]
      10. Applied rewrites52.2%

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + z3 \cdot \color{blue}{\frac{z2}{z4 \cdot z4}}} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 11: 54.3% accurate, 1.1× speedup?

    \[\begin{array}{l} \mathbf{if}\;\left|z2\right| \leq 5.2 \cdot 10^{+212}:\\ \;\;\;\;\frac{\left|z2\right| \cdot z0}{\left(\frac{z3}{z4 \cdot z4} \cdot \left|z2\right|\right) \cdot \left|z2\right| + z1} \cdot \left|z2\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{z0}{\frac{z1}{\left|z2\right| \cdot \left|z2\right|} \cdot z4 + \frac{z3}{z4}} \cdot z4\\ \end{array} \]
    (FPCore (z0 z3 z4 z1 z2)
      :precision binary64
      (if (<= (fabs z2) 5.2e+212)
      (*
       (/
        (* (fabs z2) z0)
        (+ (* (* (/ z3 (* z4 z4)) (fabs z2)) (fabs z2)) z1))
       (fabs z2))
      (* (/ z0 (+ (* (/ z1 (* (fabs z2) (fabs z2))) z4) (/ z3 z4))) z4)))
    double code(double z0, double z3, double z4, double z1, double z2) {
    	double tmp;
    	if (fabs(z2) <= 5.2e+212) {
    		tmp = ((fabs(z2) * z0) / ((((z3 / (z4 * z4)) * fabs(z2)) * fabs(z2)) + z1)) * fabs(z2);
    	} else {
    		tmp = (z0 / (((z1 / (fabs(z2) * fabs(z2))) * z4) + (z3 / z4))) * z4;
    	}
    	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) :: tmp
        if (abs(z2) <= 5.2d+212) then
            tmp = ((abs(z2) * z0) / ((((z3 / (z4 * z4)) * abs(z2)) * abs(z2)) + z1)) * abs(z2)
        else
            tmp = (z0 / (((z1 / (abs(z2) * abs(z2))) * z4) + (z3 / z4))) * z4
        end if
        code = tmp
    end function
    
    public static double code(double z0, double z3, double z4, double z1, double z2) {
    	double tmp;
    	if (Math.abs(z2) <= 5.2e+212) {
    		tmp = ((Math.abs(z2) * z0) / ((((z3 / (z4 * z4)) * Math.abs(z2)) * Math.abs(z2)) + z1)) * Math.abs(z2);
    	} else {
    		tmp = (z0 / (((z1 / (Math.abs(z2) * Math.abs(z2))) * z4) + (z3 / z4))) * z4;
    	}
    	return tmp;
    }
    
    def code(z0, z3, z4, z1, z2):
    	tmp = 0
    	if math.fabs(z2) <= 5.2e+212:
    		tmp = ((math.fabs(z2) * z0) / ((((z3 / (z4 * z4)) * math.fabs(z2)) * math.fabs(z2)) + z1)) * math.fabs(z2)
    	else:
    		tmp = (z0 / (((z1 / (math.fabs(z2) * math.fabs(z2))) * z4) + (z3 / z4))) * z4
    	return tmp
    
    function code(z0, z3, z4, z1, z2)
    	tmp = 0.0
    	if (abs(z2) <= 5.2e+212)
    		tmp = Float64(Float64(Float64(abs(z2) * z0) / Float64(Float64(Float64(Float64(z3 / Float64(z4 * z4)) * abs(z2)) * abs(z2)) + z1)) * abs(z2));
    	else
    		tmp = Float64(Float64(z0 / Float64(Float64(Float64(z1 / Float64(abs(z2) * abs(z2))) * z4) + Float64(z3 / z4))) * z4);
    	end
    	return tmp
    end
    
    function tmp_2 = code(z0, z3, z4, z1, z2)
    	tmp = 0.0;
    	if (abs(z2) <= 5.2e+212)
    		tmp = ((abs(z2) * z0) / ((((z3 / (z4 * z4)) * abs(z2)) * abs(z2)) + z1)) * abs(z2);
    	else
    		tmp = (z0 / (((z1 / (abs(z2) * abs(z2))) * z4) + (z3 / z4))) * z4;
    	end
    	tmp_2 = tmp;
    end
    
    code[z0_, z3_, z4_, z1_, z2_] := If[LessEqual[N[Abs[z2], $MachinePrecision], 5.2e+212], N[(N[(N[(N[Abs[z2], $MachinePrecision] * z0), $MachinePrecision] / N[(N[(N[(N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision] + z1), $MachinePrecision]), $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision], N[(N[(z0 / N[(N[(N[(z1 / N[(N[Abs[z2], $MachinePrecision] * N[Abs[z2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * z4), $MachinePrecision] + N[(z3 / z4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * z4), $MachinePrecision]]
    
    \begin{array}{l}
    \mathbf{if}\;\left|z2\right| \leq 5.2 \cdot 10^{+212}:\\
    \;\;\;\;\frac{\left|z2\right| \cdot z0}{\left(\frac{z3}{z4 \cdot z4} \cdot \left|z2\right|\right) \cdot \left|z2\right| + z1} \cdot \left|z2\right|\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{z0}{\frac{z1}{\left|z2\right| \cdot \left|z2\right|} \cdot z4 + \frac{z3}{z4}} \cdot z4\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z2 < 5.1999999999999997e212

      1. Initial program 66.3%

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

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

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

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

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

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

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lower--.f64N/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        8. frac-2negN/A

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

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

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

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

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
        13. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2}} + \frac{z2 \cdot z3}{{z4}^{2}}} \]
        3. lower-+.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \color{blue}{\frac{z2 \cdot z3}{{z4}^{2}}}} \]
        4. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\color{blue}{z2 \cdot z3}}{{z4}^{2}}} \]
        5. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{\color{blue}{z4}}^{2}}} \]
        7. lower-pow.f6450.0%

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
      8. Applied rewrites50.0%

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      9. Applied rewrites50.7%

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

      if 5.1999999999999997e212 < z2

      1. Initial program 66.3%

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

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

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

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

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

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

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lower--.f64N/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        8. frac-2negN/A

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

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

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

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

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
        13. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2}} + \frac{z2 \cdot z3}{{z4}^{2}}} \]
        3. lower-+.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \color{blue}{\frac{z2 \cdot z3}{{z4}^{2}}}} \]
        4. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\color{blue}{z2 \cdot z3}}{{z4}^{2}}} \]
        5. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{\color{blue}{z4}}^{2}}} \]
        7. lower-pow.f6450.0%

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
      8. Applied rewrites50.0%

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      9. Applied rewrites50.6%

        \[\leadsto \frac{z0}{\frac{z1}{z2 \cdot z2} \cdot z4 + \frac{z3}{z4}} \cdot \color{blue}{z4} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 12: 53.1% accurate, 1.1× speedup?

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

      1. Initial program 66.3%

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

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

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

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

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

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

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lower--.f64N/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        8. frac-2negN/A

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

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

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

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

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
        13. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2}} + \frac{z2 \cdot z3}{{z4}^{2}}} \]
        3. lower-+.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \color{blue}{\frac{z2 \cdot z3}{{z4}^{2}}}} \]
        4. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\color{blue}{z2 \cdot z3}}{{z4}^{2}}} \]
        5. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{\color{blue}{z4}}^{2}}} \]
        7. lower-pow.f6450.0%

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
      8. Applied rewrites50.0%

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      9. Applied rewrites50.7%

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

      if 5.2000000000000003e200 < z2

      1. Initial program 66.3%

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

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

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

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

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

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

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lower--.f64N/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        8. frac-2negN/A

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

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

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

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

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
        13. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(-1 \cdot z0\right) \cdot \color{blue}{\frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2} \cdot \frac{1}{z2}\right)\right)}} \]
        14. metadata-evalN/A

          \[\leadsto \left(-1 \cdot z0\right) \cdot \frac{\color{blue}{1}}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2} \cdot \frac{1}{z2}\right)\right)} \]
      8. Applied rewrites49.3%

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

    Alternative 13: 52.5% accurate, 1.1× speedup?

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

      1. Initial program 66.3%

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

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

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

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

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

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

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lower--.f64N/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        8. frac-2negN/A

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

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

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

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

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
        13. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2}} + \frac{z2 \cdot z3}{{z4}^{2}}} \]
        3. lower-+.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \color{blue}{\frac{z2 \cdot z3}{{z4}^{2}}}} \]
        4. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\color{blue}{z2 \cdot z3}}{{z4}^{2}}} \]
        5. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{\color{blue}{z4}}^{2}}} \]
        7. lower-pow.f6450.0%

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
      8. Applied rewrites50.0%

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      9. Applied rewrites50.7%

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

      if 3.0000000000000001e212 < z2

      1. Initial program 66.3%

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

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

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

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

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

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

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lower--.f64N/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        8. frac-2negN/A

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

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

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

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

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
        13. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2}} + \frac{z2 \cdot z3}{{z4}^{2}}} \]
        3. lower-+.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \color{blue}{\frac{z2 \cdot z3}{{z4}^{2}}}} \]
        4. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\color{blue}{z2 \cdot z3}}{{z4}^{2}}} \]
        5. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{\color{blue}{z4}}^{2}}} \]
        7. lower-pow.f6450.0%

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
      8. Applied rewrites50.0%

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

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

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

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
        4. lift-pow.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
        5. pow2N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{z4 \cdot \color{blue}{z4}}} \]
        6. lift-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{z4 \cdot \color{blue}{z4}}} \]
        7. lift-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{z4} \cdot z4}} \]
        8. associate-/l*N/A

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

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + z2 \cdot \frac{z3}{z4 \cdot \color{blue}{z4}}} \]
        10. lower-+.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \color{blue}{z2 \cdot \frac{z3}{z4 \cdot z4}}} \]
        11. +-commutativeN/A

          \[\leadsto \frac{z0 \cdot z2}{z2 \cdot \frac{z3}{z4 \cdot z4} + \color{blue}{\frac{z1}{z2}}} \]
        12. lift-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{z2 \cdot \frac{z3}{z4 \cdot z4} + \frac{z1}{\color{blue}{z2}}} \]
        13. associate-/l*N/A

          \[\leadsto z0 \cdot \color{blue}{\frac{z2}{z2 \cdot \frac{z3}{z4 \cdot z4} + \frac{z1}{z2}}} \]
        14. div-flip-revN/A

          \[\leadsto z0 \cdot \frac{1}{\color{blue}{\frac{z2 \cdot \frac{z3}{z4 \cdot z4} + \frac{z1}{z2}}{z2}}} \]
      10. Applied rewrites49.2%

        \[\leadsto \frac{z0}{\color{blue}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}}} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 14: 52.4% accurate, 1.1× speedup?

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

      1. Initial program 66.3%

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

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

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

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

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

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

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lower--.f64N/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        8. frac-2negN/A

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

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

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

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

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
        13. sub-negate-revN/A

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

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

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

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

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

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{z1}{z2 \cdot z2}}} \]
        5. lift-*.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z3}{z4 \cdot z4} + \frac{z1}{\color{blue}{z2 \cdot z2}}} \]
        6. associate-/l/N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} \]
        7. lift-/.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z3}{z4 \cdot z4} + \frac{\color{blue}{\frac{z1}{z2}}}{z2}} \]
        8. add-to-fractionN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\color{blue}{\frac{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}}{z2}}} \]
        9. associate-/r/N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\left(\frac{-1}{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}} \cdot z2\right)} \]
        10. lower-*.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\left(\frac{-1}{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}} \cdot z2\right)} \]
        11. lower-/.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \left(\color{blue}{\frac{-1}{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}}} \cdot z2\right) \]
        12. lower-+.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \left(\frac{-1}{\color{blue}{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}}} \cdot z2\right) \]
        13. *-commutativeN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \left(\frac{-1}{\color{blue}{z2 \cdot \frac{z3}{z4 \cdot z4}} + \frac{z1}{z2}} \cdot z2\right) \]
        14. lower-*.f6469.1%

          \[\leadsto \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \left(\frac{-1}{\color{blue}{z2 \cdot \frac{z3}{z4 \cdot z4}} + \frac{z1}{z2}} \cdot z2\right) \]
      5. Applied rewrites69.1%

        \[\leadsto \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\left(\frac{-1}{z2 \cdot \frac{z3}{z4 \cdot z4} + \frac{z1}{z2}} \cdot z2\right)} \]
      6. Taylor expanded in z0 around 0

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2}} + \frac{z2 \cdot z3}{{z4}^{2}}} \]
        3. lower-+.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \color{blue}{\frac{z2 \cdot z3}{{z4}^{2}}}} \]
        4. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\color{blue}{z2 \cdot z3}}{{z4}^{2}}} \]
        5. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{\color{blue}{z4}}^{2}}} \]
        7. lower-pow.f6450.0%

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
      8. Applied rewrites50.0%

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      9. Applied rewrites50.6%

        \[\leadsto z2 \cdot \color{blue}{\left(z0 \cdot \frac{z2}{\left(\frac{z3}{z4 \cdot z4} \cdot z2\right) \cdot z2 + z1}\right)} \]

      if 3.1e212 < z2

      1. Initial program 66.3%

        \[\frac{z0 - \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} \]
      2. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{z0 - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}}} \]
        2. frac-2negN/A

          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(z0 - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0\right)\right)}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)}} \]
        3. mult-flipN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(z0 - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)}} \]
        4. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(z0 - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)}} \]
        5. lift--.f64N/A

          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(z0 - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0\right)}\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        6. sub-negate-revN/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lower--.f64N/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        8. frac-2negN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)\right)\right)}} \]
        9. metadata-evalN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{\color{blue}{-1}}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)\right)\right)} \]
        10. lift-+.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)}\right)\right)\right)} \]
        11. add-flipN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{z3}{z4 \cdot z4} - \left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right)\right)}\right)\right)\right)} \]
        12. sub-negateN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
        13. sub-negate-revN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\color{blue}{\frac{z3}{z4 \cdot z4} - \left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right)}} \]
      3. Applied rewrites66.2%

        \[\leadsto \color{blue}{\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z1}{z2 \cdot z2} + \frac{z3}{z4 \cdot z4}}} \]
      4. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\frac{-1}{\frac{z1}{z2 \cdot z2} + \frac{z3}{z4 \cdot z4}}} \]
        2. lift-+.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\color{blue}{\frac{z1}{z2 \cdot z2} + \frac{z3}{z4 \cdot z4}}} \]
        3. +-commutativeN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\color{blue}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}}} \]
        4. lift-/.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{z1}{z2 \cdot z2}}} \]
        5. lift-*.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z3}{z4 \cdot z4} + \frac{z1}{\color{blue}{z2 \cdot z2}}} \]
        6. associate-/l/N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} \]
        7. lift-/.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z3}{z4 \cdot z4} + \frac{\color{blue}{\frac{z1}{z2}}}{z2}} \]
        8. add-to-fractionN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\color{blue}{\frac{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}}{z2}}} \]
        9. associate-/r/N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\left(\frac{-1}{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}} \cdot z2\right)} \]
        10. lower-*.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\left(\frac{-1}{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}} \cdot z2\right)} \]
        11. lower-/.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \left(\color{blue}{\frac{-1}{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}}} \cdot z2\right) \]
        12. lower-+.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \left(\frac{-1}{\color{blue}{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}}} \cdot z2\right) \]
        13. *-commutativeN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \left(\frac{-1}{\color{blue}{z2 \cdot \frac{z3}{z4 \cdot z4}} + \frac{z1}{z2}} \cdot z2\right) \]
        14. lower-*.f6469.1%

          \[\leadsto \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \left(\frac{-1}{\color{blue}{z2 \cdot \frac{z3}{z4 \cdot z4}} + \frac{z1}{z2}} \cdot z2\right) \]
      5. Applied rewrites69.1%

        \[\leadsto \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\left(\frac{-1}{z2 \cdot \frac{z3}{z4 \cdot z4} + \frac{z1}{z2}} \cdot z2\right)} \]
      6. Taylor expanded in z0 around 0

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2}} + \frac{z2 \cdot z3}{{z4}^{2}}} \]
        3. lower-+.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \color{blue}{\frac{z2 \cdot z3}{{z4}^{2}}}} \]
        4. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\color{blue}{z2 \cdot z3}}{{z4}^{2}}} \]
        5. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{\color{blue}{z4}}^{2}}} \]
        7. lower-pow.f6450.0%

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
      8. Applied rewrites50.0%

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      9. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2}} + \frac{z2 \cdot z3}{{z4}^{2}}} \]
        3. lift-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
        4. lift-pow.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
        5. pow2N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{z4 \cdot \color{blue}{z4}}} \]
        6. lift-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{z4 \cdot \color{blue}{z4}}} \]
        7. lift-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{z4} \cdot z4}} \]
        8. associate-/l*N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + z2 \cdot \color{blue}{\frac{z3}{z4 \cdot z4}}} \]
        9. lift-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + z2 \cdot \frac{z3}{z4 \cdot \color{blue}{z4}}} \]
        10. lower-+.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \color{blue}{z2 \cdot \frac{z3}{z4 \cdot z4}}} \]
        11. +-commutativeN/A

          \[\leadsto \frac{z0 \cdot z2}{z2 \cdot \frac{z3}{z4 \cdot z4} + \color{blue}{\frac{z1}{z2}}} \]
        12. lift-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{z2 \cdot \frac{z3}{z4 \cdot z4} + \frac{z1}{\color{blue}{z2}}} \]
        13. associate-/l*N/A

          \[\leadsto z0 \cdot \color{blue}{\frac{z2}{z2 \cdot \frac{z3}{z4 \cdot z4} + \frac{z1}{z2}}} \]
        14. div-flip-revN/A

          \[\leadsto z0 \cdot \frac{1}{\color{blue}{\frac{z2 \cdot \frac{z3}{z4 \cdot z4} + \frac{z1}{z2}}{z2}}} \]
      10. Applied rewrites49.2%

        \[\leadsto \frac{z0}{\color{blue}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}}} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 15: 52.1% accurate, 0.6× speedup?

    \[\begin{array}{l} t_0 := \frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\\ \mathbf{if}\;\frac{z0 - \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0}{t\_0} \leq 4 \cdot 10^{+202}:\\ \;\;\;\;\frac{z0}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{z0 \cdot z2}{\frac{z1}{z2}}\\ \end{array} \]
    (FPCore (z0 z3 z4 z1 z2)
      :precision binary64
      (let* ((t_0 (+ (/ z3 (* z4 z4)) (/ z1 (* z2 z2)))))
      (if (<=
           (/
            (-
             z0
             (*
              (* (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0)) z0)
              z0))
            t_0)
           4e+202)
        (/ z0 t_0)
        (/ (* z0 z2) (/ z1 z2)))))
    double code(double z0, double z3, double z4, double z1, double z2) {
    	double t_0 = (z3 / (z4 * z4)) + (z1 / (z2 * z2));
    	double tmp;
    	if (((z0 - (((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0) * z0)) / t_0) <= 4e+202) {
    		tmp = z0 / t_0;
    	} else {
    		tmp = (z0 * z2) / (z1 / 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 = (z3 / (z4 * z4)) + (z1 / (z2 * z2))
        if (((z0 - ((((-0.5d0) - (((0.25d0 * z0) - (-0.3333333333333333d0)) * z0)) * z0) * z0)) / t_0) <= 4d+202) then
            tmp = z0 / t_0
        else
            tmp = (z0 * z2) / (z1 / 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)) + (z1 / (z2 * z2));
    	double tmp;
    	if (((z0 - (((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0) * z0)) / t_0) <= 4e+202) {
    		tmp = z0 / t_0;
    	} else {
    		tmp = (z0 * z2) / (z1 / z2);
    	}
    	return tmp;
    }
    
    def code(z0, z3, z4, z1, z2):
    	t_0 = (z3 / (z4 * z4)) + (z1 / (z2 * z2))
    	tmp = 0
    	if ((z0 - (((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0) * z0)) / t_0) <= 4e+202:
    		tmp = z0 / t_0
    	else:
    		tmp = (z0 * z2) / (z1 / z2)
    	return tmp
    
    function code(z0, z3, z4, z1, z2)
    	t_0 = Float64(Float64(z3 / Float64(z4 * z4)) + Float64(z1 / Float64(z2 * z2)))
    	tmp = 0.0
    	if (Float64(Float64(z0 - Float64(Float64(Float64(-0.5 - Float64(Float64(Float64(0.25 * z0) - -0.3333333333333333) * z0)) * z0) * z0)) / t_0) <= 4e+202)
    		tmp = Float64(z0 / t_0);
    	else
    		tmp = Float64(Float64(z0 * z2) / Float64(z1 / z2));
    	end
    	return tmp
    end
    
    function tmp_2 = code(z0, z3, z4, z1, z2)
    	t_0 = (z3 / (z4 * z4)) + (z1 / (z2 * z2));
    	tmp = 0.0;
    	if (((z0 - (((-0.5 - (((0.25 * z0) - -0.3333333333333333) * z0)) * z0) * z0)) / t_0) <= 4e+202)
    		tmp = z0 / t_0;
    	else
    		tmp = (z0 * z2) / (z1 / z2);
    	end
    	tmp_2 = tmp;
    end
    
    code[z0_, z3_, z4_, z1_, z2_] := Block[{t$95$0 = N[(N[(z3 / N[(z4 * z4), $MachinePrecision]), $MachinePrecision] + N[(z1 / N[(z2 * z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(z0 - N[(N[(N[(-0.5 - N[(N[(N[(0.25 * z0), $MachinePrecision] - -0.3333333333333333), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision] * z0), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], 4e+202], N[(z0 / t$95$0), $MachinePrecision], N[(N[(z0 * z2), $MachinePrecision] / N[(z1 / z2), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    t_0 := \frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\\
    \mathbf{if}\;\frac{z0 - \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0}{t\_0} \leq 4 \cdot 10^{+202}:\\
    \;\;\;\;\frac{z0}{t\_0}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{z0 \cdot z2}{\frac{z1}{z2}}\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 (-.f64 z0 (*.f64 (*.f64 (-.f64 #s(literal -1/2 binary64) (*.f64 (-.f64 (*.f64 #s(literal 1/4 binary64) z0) #s(literal -3333333333333333/10000000000000000 binary64)) z0)) z0) z0)) (+.f64 (/.f64 z3 (*.f64 z4 z4)) (/.f64 z1 (*.f64 z2 z2)))) < 3.9999999999999996e202

      1. Initial program 66.3%

        \[\frac{z0 - \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} \]
      2. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{z0 - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}}} \]
        2. frac-2negN/A

          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(z0 - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0\right)\right)}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)}} \]
        3. mult-flipN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(z0 - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)}} \]
        4. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(z0 - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)}} \]
        5. lift--.f64N/A

          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(z0 - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0\right)}\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        6. sub-negate-revN/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lower--.f64N/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        8. frac-2negN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)\right)\right)}} \]
        9. metadata-evalN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{\color{blue}{-1}}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)\right)\right)} \]
        10. lift-+.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)}\right)\right)\right)} \]
        11. add-flipN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{z3}{z4 \cdot z4} - \left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right)\right)}\right)\right)\right)} \]
        12. sub-negateN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
        13. sub-negate-revN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\color{blue}{\frac{z3}{z4 \cdot z4} - \left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right)}} \]
      3. Applied rewrites66.2%

        \[\leadsto \color{blue}{\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z1}{z2 \cdot z2} + \frac{z3}{z4 \cdot z4}}} \]
      4. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\frac{-1}{\frac{z1}{z2 \cdot z2} + \frac{z3}{z4 \cdot z4}}} \]
        2. lift-+.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\color{blue}{\frac{z1}{z2 \cdot z2} + \frac{z3}{z4 \cdot z4}}} \]
        3. +-commutativeN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\color{blue}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}}} \]
        4. lift-/.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{z1}{z2 \cdot z2}}} \]
        5. lift-*.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z3}{z4 \cdot z4} + \frac{z1}{\color{blue}{z2 \cdot z2}}} \]
        6. associate-/l/N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} \]
        7. lift-/.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z3}{z4 \cdot z4} + \frac{\color{blue}{\frac{z1}{z2}}}{z2}} \]
        8. add-to-fractionN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\color{blue}{\frac{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}}{z2}}} \]
        9. associate-/r/N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\left(\frac{-1}{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}} \cdot z2\right)} \]
        10. lower-*.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\left(\frac{-1}{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}} \cdot z2\right)} \]
        11. lower-/.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \left(\color{blue}{\frac{-1}{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}}} \cdot z2\right) \]
        12. lower-+.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \left(\frac{-1}{\color{blue}{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}}} \cdot z2\right) \]
        13. *-commutativeN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \left(\frac{-1}{\color{blue}{z2 \cdot \frac{z3}{z4 \cdot z4}} + \frac{z1}{z2}} \cdot z2\right) \]
        14. lower-*.f6469.1%

          \[\leadsto \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \left(\frac{-1}{\color{blue}{z2 \cdot \frac{z3}{z4 \cdot z4}} + \frac{z1}{z2}} \cdot z2\right) \]
      5. Applied rewrites69.1%

        \[\leadsto \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\left(\frac{-1}{z2 \cdot \frac{z3}{z4 \cdot z4} + \frac{z1}{z2}} \cdot z2\right)} \]
      6. Taylor expanded in z0 around 0

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2}} + \frac{z2 \cdot z3}{{z4}^{2}}} \]
        3. lower-+.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \color{blue}{\frac{z2 \cdot z3}{{z4}^{2}}}} \]
        4. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\color{blue}{z2 \cdot z3}}{{z4}^{2}}} \]
        5. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{\color{blue}{z4}}^{2}}} \]
        7. lower-pow.f6450.0%

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
      8. Applied rewrites50.0%

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      9. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2}} + \frac{z2 \cdot z3}{{z4}^{2}}} \]
        3. lift-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
        4. lift-pow.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
        5. pow2N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{z4 \cdot \color{blue}{z4}}} \]
        6. lift-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{z4 \cdot \color{blue}{z4}}} \]
        7. lift-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{z4} \cdot z4}} \]
        8. associate-/l*N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + z2 \cdot \color{blue}{\frac{z3}{z4 \cdot z4}}} \]
        9. lift-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + z2 \cdot \frac{z3}{z4 \cdot \color{blue}{z4}}} \]
        10. lower-+.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \color{blue}{z2 \cdot \frac{z3}{z4 \cdot z4}}} \]
        11. +-commutativeN/A

          \[\leadsto \frac{z0 \cdot z2}{z2 \cdot \frac{z3}{z4 \cdot z4} + \color{blue}{\frac{z1}{z2}}} \]
        12. lift-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{z2 \cdot \frac{z3}{z4 \cdot z4} + \frac{z1}{\color{blue}{z2}}} \]
        13. associate-/l*N/A

          \[\leadsto z0 \cdot \color{blue}{\frac{z2}{z2 \cdot \frac{z3}{z4 \cdot z4} + \frac{z1}{z2}}} \]
        14. div-flip-revN/A

          \[\leadsto z0 \cdot \frac{1}{\color{blue}{\frac{z2 \cdot \frac{z3}{z4 \cdot z4} + \frac{z1}{z2}}{z2}}} \]
      10. Applied rewrites49.2%

        \[\leadsto \frac{z0}{\color{blue}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}}} \]

      if 3.9999999999999996e202 < (/.f64 (-.f64 z0 (*.f64 (*.f64 (-.f64 #s(literal -1/2 binary64) (*.f64 (-.f64 (*.f64 #s(literal 1/4 binary64) z0) #s(literal -3333333333333333/10000000000000000 binary64)) z0)) z0) z0)) (+.f64 (/.f64 z3 (*.f64 z4 z4)) (/.f64 z1 (*.f64 z2 z2))))

      1. Initial program 66.3%

        \[\frac{z0 - \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} \]
      2. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{z0 - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}}} \]
        2. frac-2negN/A

          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(z0 - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0\right)\right)}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)}} \]
        3. mult-flipN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(z0 - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)}} \]
        4. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(z0 - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)}} \]
        5. lift--.f64N/A

          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(z0 - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0\right)}\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        6. sub-negate-revN/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        7. lower--.f64N/A

          \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
        8. frac-2negN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)\right)\right)}} \]
        9. metadata-evalN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{\color{blue}{-1}}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)\right)\right)} \]
        10. lift-+.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)}\right)\right)\right)} \]
        11. add-flipN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{z3}{z4 \cdot z4} - \left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right)\right)}\right)\right)\right)} \]
        12. sub-negateN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
        13. sub-negate-revN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\color{blue}{\frac{z3}{z4 \cdot z4} - \left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right)}} \]
      3. Applied rewrites66.2%

        \[\leadsto \color{blue}{\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z1}{z2 \cdot z2} + \frac{z3}{z4 \cdot z4}}} \]
      4. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\frac{-1}{\frac{z1}{z2 \cdot z2} + \frac{z3}{z4 \cdot z4}}} \]
        2. lift-+.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\color{blue}{\frac{z1}{z2 \cdot z2} + \frac{z3}{z4 \cdot z4}}} \]
        3. +-commutativeN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\color{blue}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}}} \]
        4. lift-/.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{z1}{z2 \cdot z2}}} \]
        5. lift-*.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z3}{z4 \cdot z4} + \frac{z1}{\color{blue}{z2 \cdot z2}}} \]
        6. associate-/l/N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} \]
        7. lift-/.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z3}{z4 \cdot z4} + \frac{\color{blue}{\frac{z1}{z2}}}{z2}} \]
        8. add-to-fractionN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\color{blue}{\frac{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}}{z2}}} \]
        9. associate-/r/N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\left(\frac{-1}{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}} \cdot z2\right)} \]
        10. lower-*.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\left(\frac{-1}{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}} \cdot z2\right)} \]
        11. lower-/.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \left(\color{blue}{\frac{-1}{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}}} \cdot z2\right) \]
        12. lower-+.f64N/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \left(\frac{-1}{\color{blue}{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}}} \cdot z2\right) \]
        13. *-commutativeN/A

          \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \left(\frac{-1}{\color{blue}{z2 \cdot \frac{z3}{z4 \cdot z4}} + \frac{z1}{z2}} \cdot z2\right) \]
        14. lower-*.f6469.1%

          \[\leadsto \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \left(\frac{-1}{\color{blue}{z2 \cdot \frac{z3}{z4 \cdot z4}} + \frac{z1}{z2}} \cdot z2\right) \]
      5. Applied rewrites69.1%

        \[\leadsto \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\left(\frac{-1}{z2 \cdot \frac{z3}{z4 \cdot z4} + \frac{z1}{z2}} \cdot z2\right)} \]
      6. Taylor expanded in z0 around 0

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2}} + \frac{z2 \cdot z3}{{z4}^{2}}} \]
        3. lower-+.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \color{blue}{\frac{z2 \cdot z3}{{z4}^{2}}}} \]
        4. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\color{blue}{z2 \cdot z3}}{{z4}^{2}}} \]
        5. lower-/.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{\color{blue}{z4}}^{2}}} \]
        7. lower-pow.f6450.0%

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
      8. Applied rewrites50.0%

        \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      9. Taylor expanded in z3 around 0

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{\color{blue}{z2}}} \]
      10. Step-by-step derivation
        1. lower-/.f6439.8%

          \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2}} \]
      11. Applied rewrites39.8%

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{\color{blue}{z2}}} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 16: 39.8% accurate, 2.7× speedup?

    \[\frac{z0 \cdot z2}{\frac{z1}{z2}} \]
    (FPCore (z0 z3 z4 z1 z2)
      :precision binary64
      (/ (* z0 z2) (/ z1 z2)))
    double code(double z0, double z3, double z4, double z1, double z2) {
    	return (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 * z2) / (z1 / z2)
    end function
    
    public static double code(double z0, double z3, double z4, double z1, double z2) {
    	return (z0 * z2) / (z1 / z2);
    }
    
    def code(z0, z3, z4, z1, z2):
    	return (z0 * z2) / (z1 / z2)
    
    function code(z0, z3, z4, z1, z2)
    	return Float64(Float64(z0 * z2) / Float64(z1 / z2))
    end
    
    function tmp = code(z0, z3, z4, z1, z2)
    	tmp = (z0 * z2) / (z1 / z2);
    end
    
    code[z0_, z3_, z4_, z1_, z2_] := N[(N[(z0 * z2), $MachinePrecision] / N[(z1 / z2), $MachinePrecision]), $MachinePrecision]
    
    \frac{z0 \cdot z2}{\frac{z1}{z2}}
    
    Derivation
    1. Initial program 66.3%

      \[\frac{z0 - \left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}} \]
    2. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{z0 - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}}} \]
      2. frac-2negN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(z0 - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0\right)\right)}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)}} \]
      3. mult-flipN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(z0 - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)}} \]
      4. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(z0 - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)}} \]
      5. lift--.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(z0 - \left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0\right)}\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
      6. sub-negate-revN/A

        \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
      7. lower--.f64N/A

        \[\leadsto \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 - z0\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)} \]
      8. frac-2negN/A

        \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)\right)\right)}} \]
      9. metadata-evalN/A

        \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{\color{blue}{-1}}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)\right)\right)\right)} \]
      10. lift-+.f64N/A

        \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}\right)}\right)\right)\right)} \]
      11. add-flipN/A

        \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{z3}{z4 \cdot z4} - \left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right)\right)}\right)\right)\right)} \]
      12. sub-negateN/A

        \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right) - \frac{z3}{z4 \cdot z4}\right)}\right)} \]
      13. sub-negate-revN/A

        \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\color{blue}{\frac{z3}{z4 \cdot z4} - \left(\mathsf{neg}\left(\frac{z1}{z2 \cdot z2}\right)\right)}} \]
    3. Applied rewrites66.2%

      \[\leadsto \color{blue}{\left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z1}{z2 \cdot z2} + \frac{z3}{z4 \cdot z4}}} \]
    4. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\frac{-1}{\frac{z1}{z2 \cdot z2} + \frac{z3}{z4 \cdot z4}}} \]
      2. lift-+.f64N/A

        \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\color{blue}{\frac{z1}{z2 \cdot z2} + \frac{z3}{z4 \cdot z4}}} \]
      3. +-commutativeN/A

        \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\color{blue}{\frac{z3}{z4 \cdot z4} + \frac{z1}{z2 \cdot z2}}} \]
      4. lift-/.f64N/A

        \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{z1}{z2 \cdot z2}}} \]
      5. lift-*.f64N/A

        \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z3}{z4 \cdot z4} + \frac{z1}{\color{blue}{z2 \cdot z2}}} \]
      6. associate-/l/N/A

        \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z3}{z4 \cdot z4} + \color{blue}{\frac{\frac{z1}{z2}}{z2}}} \]
      7. lift-/.f64N/A

        \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\frac{z3}{z4 \cdot z4} + \frac{\color{blue}{\frac{z1}{z2}}}{z2}} \]
      8. add-to-fractionN/A

        \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \frac{-1}{\color{blue}{\frac{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}}{z2}}} \]
      9. associate-/r/N/A

        \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\left(\frac{-1}{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}} \cdot z2\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\left(\frac{-1}{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}} \cdot z2\right)} \]
      11. lower-/.f64N/A

        \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \left(\color{blue}{\frac{-1}{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}}} \cdot z2\right) \]
      12. lower-+.f64N/A

        \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \left(\frac{-1}{\color{blue}{\frac{z3}{z4 \cdot z4} \cdot z2 + \frac{z1}{z2}}} \cdot z2\right) \]
      13. *-commutativeN/A

        \[\leadsto \left(\left(\left(\frac{-1}{2} - \left(\frac{1}{4} \cdot z0 - \frac{-3333333333333333}{10000000000000000}\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \left(\frac{-1}{\color{blue}{z2 \cdot \frac{z3}{z4 \cdot z4}} + \frac{z1}{z2}} \cdot z2\right) \]
      14. lower-*.f6469.1%

        \[\leadsto \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \left(\frac{-1}{\color{blue}{z2 \cdot \frac{z3}{z4 \cdot z4}} + \frac{z1}{z2}} \cdot z2\right) \]
    5. Applied rewrites69.1%

      \[\leadsto \left(\left(\left(-0.5 - \left(0.25 \cdot z0 - -0.3333333333333333\right) \cdot z0\right) \cdot z0\right) \cdot z0 - z0\right) \cdot \color{blue}{\left(\frac{-1}{z2 \cdot \frac{z3}{z4 \cdot z4} + \frac{z1}{z2}} \cdot z2\right)} \]
    6. Taylor expanded in z0 around 0

      \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
    7. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{z0 \cdot z2}{\color{blue}{\frac{z1}{z2}} + \frac{z2 \cdot z3}{{z4}^{2}}} \]
      3. lower-+.f64N/A

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \color{blue}{\frac{z2 \cdot z3}{{z4}^{2}}}} \]
      4. lower-/.f64N/A

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{\color{blue}{z2 \cdot z3}}{{z4}^{2}}} \]
      5. lower-/.f64N/A

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{\color{blue}{{z4}^{2}}}} \]
      6. lower-*.f64N/A

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{\color{blue}{z4}}^{2}}} \]
      7. lower-pow.f6450.0%

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{\color{blue}{2}}}} \]
    8. Applied rewrites50.0%

      \[\leadsto \color{blue}{\frac{z0 \cdot z2}{\frac{z1}{z2} + \frac{z2 \cdot z3}{{z4}^{2}}}} \]
    9. Taylor expanded in z3 around 0

      \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{\color{blue}{z2}}} \]
    10. Step-by-step derivation
      1. lower-/.f6439.8%

        \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{z2}} \]
    11. Applied rewrites39.8%

      \[\leadsto \frac{z0 \cdot z2}{\frac{z1}{\color{blue}{z2}}} \]
    12. Add Preprocessing

    Reproduce

    ?
    herbie shell --seed 2025250 
    (FPCore (z0 z3 z4 z1 z2)
      :name "(/ (- z0 (* (* (- -1/2 (* (- (* 1/4 z0) -3333333333333333/10000000000000000) z0)) z0) z0)) (+ (/ z3 (* z4 z4)) (/ z1 (* z2 z2))))"
      :precision binary64
      (/ (- z0 (* (* (- -0.5 (* (- (* 0.25 z0) -0.3333333333333333) z0)) z0) z0)) (+ (/ z3 (* z4 z4)) (/ z1 (* z2 z2)))))