Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J

Percentage Accurate: 79.4% → 88.9%
Time: 5.9s
Alternatives: 17
Speedup: 0.1×

Specification

?
\[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
(FPCore (x y z t a b c)
  :precision binary64
  (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
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(x, y, z, t, a, b, c)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c):
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c)
	return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c))
end
function tmp = code(x, y, z, t, a, b, c)
	tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}

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

\[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
(FPCore (x y z t a b c)
  :precision binary64
  (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
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(x, y, z, t, a, b, c)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c):
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c)
	return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c))
end
function tmp = code(x, y, z, t, a, b, c)
	tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}

Alternative 1: 88.9% accurate, 0.0× speedup?

\[\begin{array}{l} t_1 := \left(\mathsf{min}\left(x, y\right) \cdot 9\right) \cdot \mathsf{max}\left(x, y\right)\\ t_2 := z \cdot \left|c\right|\\ t_3 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{t\_2}\\ \mathsf{copysign}\left(1, c\right) \cdot \begin{array}{l} \mathbf{if}\;t\_3 \leq -5 \cdot 10^{+43}:\\ \;\;\;\;\frac{\left(t\_1 - \left(\left(a \cdot z\right) \cdot 4\right) \cdot t\right) + b}{t\_2}\\ \mathbf{elif}\;t\_3 \leq 2 \cdot 10^{-111}:\\ \;\;\;\;\frac{\frac{\left(t\_1 + b\right) - \left(\left(t \cdot a\right) \cdot 4\right) \cdot z}{z}}{\left|c\right|}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\left(-4 \cdot a\right) \cdot \frac{t}{\left|c\right|}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
  :precision binary64
  (let* ((t_1 (* (* (fmin x y) 9.0) (fmax x y)))
       (t_2 (* z (fabs c)))
       (t_3 (/ (+ (- t_1 (* (* (* z 4.0) t) a)) b) t_2)))
  (*
   (copysign 1.0 c)
   (if (<= t_3 -5e+43)
     (/ (+ (- t_1 (* (* (* a z) 4.0) t)) b) t_2)
     (if (<= t_3 2e-111)
       (/ (/ (- (+ t_1 b) (* (* (* t a) 4.0) z)) z) (fabs c))
       (if (<= t_3 INFINITY) t_3 (* (* -4.0 a) (/ t (fabs c)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (fmin(x, y) * 9.0) * fmax(x, y);
	double t_2 = z * fabs(c);
	double t_3 = ((t_1 - (((z * 4.0) * t) * a)) + b) / t_2;
	double tmp;
	if (t_3 <= -5e+43) {
		tmp = ((t_1 - (((a * z) * 4.0) * t)) + b) / t_2;
	} else if (t_3 <= 2e-111) {
		tmp = (((t_1 + b) - (((t * a) * 4.0) * z)) / z) / fabs(c);
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = t_3;
	} else {
		tmp = (-4.0 * a) * (t / fabs(c));
	}
	return copysign(1.0, c) * tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (fmin(x, y) * 9.0) * fmax(x, y);
	double t_2 = z * Math.abs(c);
	double t_3 = ((t_1 - (((z * 4.0) * t) * a)) + b) / t_2;
	double tmp;
	if (t_3 <= -5e+43) {
		tmp = ((t_1 - (((a * z) * 4.0) * t)) + b) / t_2;
	} else if (t_3 <= 2e-111) {
		tmp = (((t_1 + b) - (((t * a) * 4.0) * z)) / z) / Math.abs(c);
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = t_3;
	} else {
		tmp = (-4.0 * a) * (t / Math.abs(c));
	}
	return Math.copySign(1.0, c) * tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = (fmin(x, y) * 9.0) * fmax(x, y)
	t_2 = z * math.fabs(c)
	t_3 = ((t_1 - (((z * 4.0) * t) * a)) + b) / t_2
	tmp = 0
	if t_3 <= -5e+43:
		tmp = ((t_1 - (((a * z) * 4.0) * t)) + b) / t_2
	elif t_3 <= 2e-111:
		tmp = (((t_1 + b) - (((t * a) * 4.0) * z)) / z) / math.fabs(c)
	elif t_3 <= math.inf:
		tmp = t_3
	else:
		tmp = (-4.0 * a) * (t / math.fabs(c))
	return math.copysign(1.0, c) * tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(Float64(fmin(x, y) * 9.0) * fmax(x, y))
	t_2 = Float64(z * abs(c))
	t_3 = Float64(Float64(Float64(t_1 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / t_2)
	tmp = 0.0
	if (t_3 <= -5e+43)
		tmp = Float64(Float64(Float64(t_1 - Float64(Float64(Float64(a * z) * 4.0) * t)) + b) / t_2);
	elseif (t_3 <= 2e-111)
		tmp = Float64(Float64(Float64(Float64(t_1 + b) - Float64(Float64(Float64(t * a) * 4.0) * z)) / z) / abs(c));
	elseif (t_3 <= Inf)
		tmp = t_3;
	else
		tmp = Float64(Float64(-4.0 * a) * Float64(t / abs(c)));
	end
	return Float64(copysign(1.0, c) * tmp)
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = (min(x, y) * 9.0) * max(x, y);
	t_2 = z * abs(c);
	t_3 = ((t_1 - (((z * 4.0) * t) * a)) + b) / t_2;
	tmp = 0.0;
	if (t_3 <= -5e+43)
		tmp = ((t_1 - (((a * z) * 4.0) * t)) + b) / t_2;
	elseif (t_3 <= 2e-111)
		tmp = (((t_1 + b) - (((t * a) * 4.0) * z)) / z) / abs(c);
	elseif (t_3 <= Inf)
		tmp = t_3;
	else
		tmp = (-4.0 * a) * (t / abs(c));
	end
	tmp_2 = (sign(c) * abs(1.0)) * tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[Min[x, y], $MachinePrecision] * 9.0), $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[Abs[c], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / t$95$2), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[t$95$3, -5e+43], N[(N[(N[(t$95$1 - N[(N[(N[(a * z), $MachinePrecision] * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$3, 2e-111], N[(N[(N[(N[(t$95$1 + b), $MachinePrecision] - N[(N[(N[(t * a), $MachinePrecision] * 4.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / N[Abs[c], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$3, N[(N[(-4.0 * a), $MachinePrecision] * N[(t / N[Abs[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := \left(\mathsf{min}\left(x, y\right) \cdot 9\right) \cdot \mathsf{max}\left(x, y\right)\\
t_2 := z \cdot \left|c\right|\\
t_3 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{t\_2}\\
\mathsf{copysign}\left(1, c\right) \cdot \begin{array}{l}
\mathbf{if}\;t\_3 \leq -5 \cdot 10^{+43}:\\
\;\;\;\;\frac{\left(t\_1 - \left(\left(a \cdot z\right) \cdot 4\right) \cdot t\right) + b}{t\_2}\\

\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{-111}:\\
\;\;\;\;\frac{\frac{\left(t\_1 + b\right) - \left(\left(t \cdot a\right) \cdot 4\right) \cdot z}{z}}{\left|c\right|}\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;\left(-4 \cdot a\right) \cdot \frac{t}{\left|c\right|}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -5.0000000000000004e43

    1. Initial program 79.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - a \cdot \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      4. associate-*r*N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t}\right) + b}{z \cdot c} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t}\right) + b}{z \cdot c} \]
      6. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(a \cdot \color{blue}{\left(z \cdot 4\right)}\right) \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(a \cdot z\right) \cdot 4\right)} \cdot t\right) + b}{z \cdot c} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(a \cdot z\right) \cdot 4\right)} \cdot t\right) + b}{z \cdot c} \]
      9. lower-*.f6479.5%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(a \cdot z\right)} \cdot 4\right) \cdot t\right) + b}{z \cdot c} \]
    3. Applied rewrites79.5%

      \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(a \cdot z\right) \cdot 4\right) \cdot t}\right) + b}{z \cdot c} \]

    if -5.0000000000000004e43 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 2.0000000000000002e-111

    1. Initial program 79.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{z \cdot c}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{c \cdot z}} \]
      4. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
    3. Applied rewrites79.7%

      \[\leadsto \color{blue}{\frac{\frac{\left(b + y \cdot \left(9 \cdot x\right)\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)}{c}}{z}} \]
    4. Applied rewrites82.0%

      \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y + b\right) - \left(\left(t \cdot a\right) \cdot 4\right) \cdot z}{z}}{c}} \]

    if 2.0000000000000002e-111 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0

    1. Initial program 79.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]

    if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c))

    1. Initial program 79.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{z \cdot c}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{c \cdot z}} \]
      4. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
    3. Applied rewrites79.7%

      \[\leadsto \color{blue}{\frac{\frac{\left(b + y \cdot \left(9 \cdot x\right)\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)}{c}}{z}} \]
    4. Taylor expanded in z around inf

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    5. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
      2. lower-/.f64N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
      3. lower-*.f6438.7%

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
    6. Applied rewrites38.7%

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
      2. lift-/.f64N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
      3. lift-*.f64N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      4. associate-/l*N/A

        \[\leadsto -4 \cdot \left(a \cdot \color{blue}{\frac{t}{c}}\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
      6. lower-*.f64N/A

        \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
      7. lower-*.f64N/A

        \[\leadsto \left(-4 \cdot a\right) \cdot \frac{\color{blue}{t}}{c} \]
      8. lower-/.f6440.7%

        \[\leadsto \left(-4 \cdot a\right) \cdot \frac{t}{\color{blue}{c}} \]
    8. Applied rewrites40.7%

      \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 2: 88.1% accurate, 0.0× speedup?

\[\begin{array}{l} t_1 := \left(\mathsf{min}\left(x, y\right) \cdot 9\right) \cdot \mathsf{max}\left(x, y\right)\\ t_2 := z \cdot \left|c\right|\\ t_3 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot \mathsf{min}\left(t, a\right)\right) \cdot \mathsf{max}\left(t, a\right)\right) + b}{t\_2}\\ \mathsf{copysign}\left(1, c\right) \cdot \begin{array}{l} \mathbf{if}\;t\_3 \leq -1 \cdot 10^{-236}:\\ \;\;\;\;\frac{\left(t\_1 - \left(\left(\mathsf{max}\left(t, a\right) \cdot z\right) \cdot 4\right) \cdot \mathsf{min}\left(t, a\right)\right) + b}{t\_2}\\ \mathbf{elif}\;t\_3 \leq 10^{+62}:\\ \;\;\;\;\frac{\frac{\left(b + \mathsf{max}\left(x, y\right) \cdot \left(9 \cdot \mathsf{min}\left(x, y\right)\right)\right) - \mathsf{max}\left(t, a\right) \cdot \left(\mathsf{min}\left(t, a\right) \cdot \left(4 \cdot z\right)\right)}{\left|c\right|}}{z}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\left(-4 \cdot \mathsf{max}\left(t, a\right)\right) \cdot \frac{\mathsf{min}\left(t, a\right)}{\left|c\right|}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
  :precision binary64
  (let* ((t_1 (* (* (fmin x y) 9.0) (fmax x y)))
       (t_2 (* z (fabs c)))
       (t_3
        (/
         (+ (- t_1 (* (* (* z 4.0) (fmin t a)) (fmax t a))) b)
         t_2)))
  (*
   (copysign 1.0 c)
   (if (<= t_3 -1e-236)
     (/ (+ (- t_1 (* (* (* (fmax t a) z) 4.0) (fmin t a))) b) t_2)
     (if (<= t_3 1e+62)
       (/
        (/
         (-
          (+ b (* (fmax x y) (* 9.0 (fmin x y))))
          (* (fmax t a) (* (fmin t a) (* 4.0 z))))
         (fabs c))
        z)
       (if (<= t_3 INFINITY)
         t_3
         (* (* -4.0 (fmax t a)) (/ (fmin t a) (fabs c)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (fmin(x, y) * 9.0) * fmax(x, y);
	double t_2 = z * fabs(c);
	double t_3 = ((t_1 - (((z * 4.0) * fmin(t, a)) * fmax(t, a))) + b) / t_2;
	double tmp;
	if (t_3 <= -1e-236) {
		tmp = ((t_1 - (((fmax(t, a) * z) * 4.0) * fmin(t, a))) + b) / t_2;
	} else if (t_3 <= 1e+62) {
		tmp = (((b + (fmax(x, y) * (9.0 * fmin(x, y)))) - (fmax(t, a) * (fmin(t, a) * (4.0 * z)))) / fabs(c)) / z;
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = t_3;
	} else {
		tmp = (-4.0 * fmax(t, a)) * (fmin(t, a) / fabs(c));
	}
	return copysign(1.0, c) * tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (fmin(x, y) * 9.0) * fmax(x, y);
	double t_2 = z * Math.abs(c);
	double t_3 = ((t_1 - (((z * 4.0) * fmin(t, a)) * fmax(t, a))) + b) / t_2;
	double tmp;
	if (t_3 <= -1e-236) {
		tmp = ((t_1 - (((fmax(t, a) * z) * 4.0) * fmin(t, a))) + b) / t_2;
	} else if (t_3 <= 1e+62) {
		tmp = (((b + (fmax(x, y) * (9.0 * fmin(x, y)))) - (fmax(t, a) * (fmin(t, a) * (4.0 * z)))) / Math.abs(c)) / z;
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = t_3;
	} else {
		tmp = (-4.0 * fmax(t, a)) * (fmin(t, a) / Math.abs(c));
	}
	return Math.copySign(1.0, c) * tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = (fmin(x, y) * 9.0) * fmax(x, y)
	t_2 = z * math.fabs(c)
	t_3 = ((t_1 - (((z * 4.0) * fmin(t, a)) * fmax(t, a))) + b) / t_2
	tmp = 0
	if t_3 <= -1e-236:
		tmp = ((t_1 - (((fmax(t, a) * z) * 4.0) * fmin(t, a))) + b) / t_2
	elif t_3 <= 1e+62:
		tmp = (((b + (fmax(x, y) * (9.0 * fmin(x, y)))) - (fmax(t, a) * (fmin(t, a) * (4.0 * z)))) / math.fabs(c)) / z
	elif t_3 <= math.inf:
		tmp = t_3
	else:
		tmp = (-4.0 * fmax(t, a)) * (fmin(t, a) / math.fabs(c))
	return math.copysign(1.0, c) * tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(Float64(fmin(x, y) * 9.0) * fmax(x, y))
	t_2 = Float64(z * abs(c))
	t_3 = Float64(Float64(Float64(t_1 - Float64(Float64(Float64(z * 4.0) * fmin(t, a)) * fmax(t, a))) + b) / t_2)
	tmp = 0.0
	if (t_3 <= -1e-236)
		tmp = Float64(Float64(Float64(t_1 - Float64(Float64(Float64(fmax(t, a) * z) * 4.0) * fmin(t, a))) + b) / t_2);
	elseif (t_3 <= 1e+62)
		tmp = Float64(Float64(Float64(Float64(b + Float64(fmax(x, y) * Float64(9.0 * fmin(x, y)))) - Float64(fmax(t, a) * Float64(fmin(t, a) * Float64(4.0 * z)))) / abs(c)) / z);
	elseif (t_3 <= Inf)
		tmp = t_3;
	else
		tmp = Float64(Float64(-4.0 * fmax(t, a)) * Float64(fmin(t, a) / abs(c)));
	end
	return Float64(copysign(1.0, c) * tmp)
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = (min(x, y) * 9.0) * max(x, y);
	t_2 = z * abs(c);
	t_3 = ((t_1 - (((z * 4.0) * min(t, a)) * max(t, a))) + b) / t_2;
	tmp = 0.0;
	if (t_3 <= -1e-236)
		tmp = ((t_1 - (((max(t, a) * z) * 4.0) * min(t, a))) + b) / t_2;
	elseif (t_3 <= 1e+62)
		tmp = (((b + (max(x, y) * (9.0 * min(x, y)))) - (max(t, a) * (min(t, a) * (4.0 * z)))) / abs(c)) / z;
	elseif (t_3 <= Inf)
		tmp = t_3;
	else
		tmp = (-4.0 * max(t, a)) * (min(t, a) / abs(c));
	end
	tmp_2 = (sign(c) * abs(1.0)) * tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[Min[x, y], $MachinePrecision] * 9.0), $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[Abs[c], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 - N[(N[(N[(z * 4.0), $MachinePrecision] * N[Min[t, a], $MachinePrecision]), $MachinePrecision] * N[Max[t, a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / t$95$2), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[t$95$3, -1e-236], N[(N[(N[(t$95$1 - N[(N[(N[(N[Max[t, a], $MachinePrecision] * z), $MachinePrecision] * 4.0), $MachinePrecision] * N[Min[t, a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$3, 1e+62], N[(N[(N[(N[(b + N[(N[Max[x, y], $MachinePrecision] * N[(9.0 * N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Max[t, a], $MachinePrecision] * N[(N[Min[t, a], $MachinePrecision] * N[(4.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Abs[c], $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$3, N[(N[(-4.0 * N[Max[t, a], $MachinePrecision]), $MachinePrecision] * N[(N[Min[t, a], $MachinePrecision] / N[Abs[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := \left(\mathsf{min}\left(x, y\right) \cdot 9\right) \cdot \mathsf{max}\left(x, y\right)\\
t_2 := z \cdot \left|c\right|\\
t_3 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot \mathsf{min}\left(t, a\right)\right) \cdot \mathsf{max}\left(t, a\right)\right) + b}{t\_2}\\
\mathsf{copysign}\left(1, c\right) \cdot \begin{array}{l}
\mathbf{if}\;t\_3 \leq -1 \cdot 10^{-236}:\\
\;\;\;\;\frac{\left(t\_1 - \left(\left(\mathsf{max}\left(t, a\right) \cdot z\right) \cdot 4\right) \cdot \mathsf{min}\left(t, a\right)\right) + b}{t\_2}\\

\mathbf{elif}\;t\_3 \leq 10^{+62}:\\
\;\;\;\;\frac{\frac{\left(b + \mathsf{max}\left(x, y\right) \cdot \left(9 \cdot \mathsf{min}\left(x, y\right)\right)\right) - \mathsf{max}\left(t, a\right) \cdot \left(\mathsf{min}\left(t, a\right) \cdot \left(4 \cdot z\right)\right)}{\left|c\right|}}{z}\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;\left(-4 \cdot \mathsf{max}\left(t, a\right)\right) \cdot \frac{\mathsf{min}\left(t, a\right)}{\left|c\right|}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -1e-236

    1. Initial program 79.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - a \cdot \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      4. associate-*r*N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t}\right) + b}{z \cdot c} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t}\right) + b}{z \cdot c} \]
      6. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(a \cdot \color{blue}{\left(z \cdot 4\right)}\right) \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(a \cdot z\right) \cdot 4\right)} \cdot t\right) + b}{z \cdot c} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(a \cdot z\right) \cdot 4\right)} \cdot t\right) + b}{z \cdot c} \]
      9. lower-*.f6479.5%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(a \cdot z\right)} \cdot 4\right) \cdot t\right) + b}{z \cdot c} \]
    3. Applied rewrites79.5%

      \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(a \cdot z\right) \cdot 4\right) \cdot t}\right) + b}{z \cdot c} \]

    if -1e-236 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 1e62

    1. Initial program 79.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{z \cdot c}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{c \cdot z}} \]
      4. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
    3. Applied rewrites79.7%

      \[\leadsto \color{blue}{\frac{\frac{\left(b + y \cdot \left(9 \cdot x\right)\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)}{c}}{z}} \]

    if 1e62 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0

    1. Initial program 79.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]

    if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c))

    1. Initial program 79.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{z \cdot c}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{c \cdot z}} \]
      4. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
    3. Applied rewrites79.7%

      \[\leadsto \color{blue}{\frac{\frac{\left(b + y \cdot \left(9 \cdot x\right)\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)}{c}}{z}} \]
    4. Taylor expanded in z around inf

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    5. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
      2. lower-/.f64N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
      3. lower-*.f6438.7%

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
    6. Applied rewrites38.7%

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
      2. lift-/.f64N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
      3. lift-*.f64N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      4. associate-/l*N/A

        \[\leadsto -4 \cdot \left(a \cdot \color{blue}{\frac{t}{c}}\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
      6. lower-*.f64N/A

        \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
      7. lower-*.f64N/A

        \[\leadsto \left(-4 \cdot a\right) \cdot \frac{\color{blue}{t}}{c} \]
      8. lower-/.f6440.7%

        \[\leadsto \left(-4 \cdot a\right) \cdot \frac{t}{\color{blue}{c}} \]
    8. Applied rewrites40.7%

      \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 3: 87.4% accurate, 0.0× speedup?

\[\begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ t_2 := z \cdot \left|c\right|\\ t_3 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot \mathsf{min}\left(t, a\right)\right) \cdot \mathsf{max}\left(t, a\right)\right) + b}{t\_2}\\ \mathsf{copysign}\left(1, c\right) \cdot \begin{array}{l} \mathbf{if}\;t\_3 \leq -1 \cdot 10^{-236}:\\ \;\;\;\;\frac{\left(t\_1 - \left(\left(\mathsf{max}\left(t, a\right) \cdot z\right) \cdot 4\right) \cdot \mathsf{min}\left(t, a\right)\right) + b}{t\_2}\\ \mathbf{elif}\;t\_3 \leq 0:\\ \;\;\;\;\frac{\left(\left(\left(z \cdot \mathsf{min}\left(t, a\right)\right) \cdot \mathsf{max}\left(t, a\right)\right) \cdot -4 + b\right) \cdot \frac{1}{\left|c\right|}}{z}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\left(-4 \cdot \mathsf{max}\left(t, a\right)\right) \cdot \frac{\mathsf{min}\left(t, a\right)}{\left|c\right|}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
  :precision binary64
  (let* ((t_1 (* (* x 9.0) y))
       (t_2 (* z (fabs c)))
       (t_3
        (/
         (+ (- t_1 (* (* (* z 4.0) (fmin t a)) (fmax t a))) b)
         t_2)))
  (*
   (copysign 1.0 c)
   (if (<= t_3 -1e-236)
     (/ (+ (- t_1 (* (* (* (fmax t a) z) 4.0) (fmin t a))) b) t_2)
     (if (<= t_3 0.0)
       (/
        (*
         (+ (* (* (* z (fmin t a)) (fmax t a)) -4.0) b)
         (/ 1.0 (fabs c)))
        z)
       (if (<= t_3 INFINITY)
         t_3
         (* (* -4.0 (fmax t a)) (/ (fmin t a) (fabs c)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (x * 9.0) * y;
	double t_2 = z * fabs(c);
	double t_3 = ((t_1 - (((z * 4.0) * fmin(t, a)) * fmax(t, a))) + b) / t_2;
	double tmp;
	if (t_3 <= -1e-236) {
		tmp = ((t_1 - (((fmax(t, a) * z) * 4.0) * fmin(t, a))) + b) / t_2;
	} else if (t_3 <= 0.0) {
		tmp = (((((z * fmin(t, a)) * fmax(t, a)) * -4.0) + b) * (1.0 / fabs(c))) / z;
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = t_3;
	} else {
		tmp = (-4.0 * fmax(t, a)) * (fmin(t, a) / fabs(c));
	}
	return copysign(1.0, c) * tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (x * 9.0) * y;
	double t_2 = z * Math.abs(c);
	double t_3 = ((t_1 - (((z * 4.0) * fmin(t, a)) * fmax(t, a))) + b) / t_2;
	double tmp;
	if (t_3 <= -1e-236) {
		tmp = ((t_1 - (((fmax(t, a) * z) * 4.0) * fmin(t, a))) + b) / t_2;
	} else if (t_3 <= 0.0) {
		tmp = (((((z * fmin(t, a)) * fmax(t, a)) * -4.0) + b) * (1.0 / Math.abs(c))) / z;
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = t_3;
	} else {
		tmp = (-4.0 * fmax(t, a)) * (fmin(t, a) / Math.abs(c));
	}
	return Math.copySign(1.0, c) * tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = (x * 9.0) * y
	t_2 = z * math.fabs(c)
	t_3 = ((t_1 - (((z * 4.0) * fmin(t, a)) * fmax(t, a))) + b) / t_2
	tmp = 0
	if t_3 <= -1e-236:
		tmp = ((t_1 - (((fmax(t, a) * z) * 4.0) * fmin(t, a))) + b) / t_2
	elif t_3 <= 0.0:
		tmp = (((((z * fmin(t, a)) * fmax(t, a)) * -4.0) + b) * (1.0 / math.fabs(c))) / z
	elif t_3 <= math.inf:
		tmp = t_3
	else:
		tmp = (-4.0 * fmax(t, a)) * (fmin(t, a) / math.fabs(c))
	return math.copysign(1.0, c) * tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(Float64(x * 9.0) * y)
	t_2 = Float64(z * abs(c))
	t_3 = Float64(Float64(Float64(t_1 - Float64(Float64(Float64(z * 4.0) * fmin(t, a)) * fmax(t, a))) + b) / t_2)
	tmp = 0.0
	if (t_3 <= -1e-236)
		tmp = Float64(Float64(Float64(t_1 - Float64(Float64(Float64(fmax(t, a) * z) * 4.0) * fmin(t, a))) + b) / t_2);
	elseif (t_3 <= 0.0)
		tmp = Float64(Float64(Float64(Float64(Float64(Float64(z * fmin(t, a)) * fmax(t, a)) * -4.0) + b) * Float64(1.0 / abs(c))) / z);
	elseif (t_3 <= Inf)
		tmp = t_3;
	else
		tmp = Float64(Float64(-4.0 * fmax(t, a)) * Float64(fmin(t, a) / abs(c)));
	end
	return Float64(copysign(1.0, c) * tmp)
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = (x * 9.0) * y;
	t_2 = z * abs(c);
	t_3 = ((t_1 - (((z * 4.0) * min(t, a)) * max(t, a))) + b) / t_2;
	tmp = 0.0;
	if (t_3 <= -1e-236)
		tmp = ((t_1 - (((max(t, a) * z) * 4.0) * min(t, a))) + b) / t_2;
	elseif (t_3 <= 0.0)
		tmp = (((((z * min(t, a)) * max(t, a)) * -4.0) + b) * (1.0 / abs(c))) / z;
	elseif (t_3 <= Inf)
		tmp = t_3;
	else
		tmp = (-4.0 * max(t, a)) * (min(t, a) / abs(c));
	end
	tmp_2 = (sign(c) * abs(1.0)) * tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[Abs[c], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 - N[(N[(N[(z * 4.0), $MachinePrecision] * N[Min[t, a], $MachinePrecision]), $MachinePrecision] * N[Max[t, a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / t$95$2), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[t$95$3, -1e-236], N[(N[(N[(t$95$1 - N[(N[(N[(N[Max[t, a], $MachinePrecision] * z), $MachinePrecision] * 4.0), $MachinePrecision] * N[Min[t, a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(N[(N[(N[(N[(N[(z * N[Min[t, a], $MachinePrecision]), $MachinePrecision] * N[Max[t, a], $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision] + b), $MachinePrecision] * N[(1.0 / N[Abs[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$3, N[(N[(-4.0 * N[Max[t, a], $MachinePrecision]), $MachinePrecision] * N[(N[Min[t, a], $MachinePrecision] / N[Abs[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
t_2 := z \cdot \left|c\right|\\
t_3 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot \mathsf{min}\left(t, a\right)\right) \cdot \mathsf{max}\left(t, a\right)\right) + b}{t\_2}\\
\mathsf{copysign}\left(1, c\right) \cdot \begin{array}{l}
\mathbf{if}\;t\_3 \leq -1 \cdot 10^{-236}:\\
\;\;\;\;\frac{\left(t\_1 - \left(\left(\mathsf{max}\left(t, a\right) \cdot z\right) \cdot 4\right) \cdot \mathsf{min}\left(t, a\right)\right) + b}{t\_2}\\

\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{\left(\left(\left(z \cdot \mathsf{min}\left(t, a\right)\right) \cdot \mathsf{max}\left(t, a\right)\right) \cdot -4 + b\right) \cdot \frac{1}{\left|c\right|}}{z}\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;\left(-4 \cdot \mathsf{max}\left(t, a\right)\right) \cdot \frac{\mathsf{min}\left(t, a\right)}{\left|c\right|}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -1e-236

    1. Initial program 79.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - a \cdot \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      4. associate-*r*N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t}\right) + b}{z \cdot c} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t}\right) + b}{z \cdot c} \]
      6. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(a \cdot \color{blue}{\left(z \cdot 4\right)}\right) \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(a \cdot z\right) \cdot 4\right)} \cdot t\right) + b}{z \cdot c} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(a \cdot z\right) \cdot 4\right)} \cdot t\right) + b}{z \cdot c} \]
      9. lower-*.f6479.5%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(a \cdot z\right)} \cdot 4\right) \cdot t\right) + b}{z \cdot c} \]
    3. Applied rewrites79.5%

      \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(a \cdot z\right) \cdot 4\right) \cdot t}\right) + b}{z \cdot c} \]

    if -1e-236 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -0.0

    1. Initial program 79.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Taylor expanded in x around 0

      \[\leadsto \frac{\color{blue}{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{-4 \cdot \color{blue}{\left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{-4 \cdot \left(a \cdot \color{blue}{\left(t \cdot z\right)}\right) + b}{z \cdot c} \]
      3. lower-*.f6456.3%

        \[\leadsto \frac{-4 \cdot \left(a \cdot \left(t \cdot \color{blue}{z}\right)\right) + b}{z \cdot c} \]
    4. Applied rewrites56.3%

      \[\leadsto \frac{\color{blue}{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]
    5. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right) + b}{z \cdot c}} \]
      2. mult-flipN/A

        \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot \left(t \cdot z\right)\right) + b\right) \cdot \frac{1}{z \cdot c}} \]
      3. lift-*.f64N/A

        \[\leadsto \left(-4 \cdot \left(a \cdot \left(t \cdot z\right)\right) + b\right) \cdot \frac{1}{\color{blue}{z \cdot c}} \]
      4. *-commutativeN/A

        \[\leadsto \left(-4 \cdot \left(a \cdot \left(t \cdot z\right)\right) + b\right) \cdot \frac{1}{\color{blue}{c \cdot z}} \]
      5. lift-*.f64N/A

        \[\leadsto \left(-4 \cdot \left(a \cdot \left(t \cdot z\right)\right) + b\right) \cdot \frac{1}{\color{blue}{c \cdot z}} \]
      6. lift-*.f64N/A

        \[\leadsto \left(-4 \cdot \left(a \cdot \left(t \cdot z\right)\right) + b\right) \cdot \frac{1}{\color{blue}{c \cdot z}} \]
      7. associate-/r*N/A

        \[\leadsto \left(-4 \cdot \left(a \cdot \left(t \cdot z\right)\right) + b\right) \cdot \color{blue}{\frac{\frac{1}{c}}{z}} \]
      8. associate-*r/N/A

        \[\leadsto \color{blue}{\frac{\left(-4 \cdot \left(a \cdot \left(t \cdot z\right)\right) + b\right) \cdot \frac{1}{c}}{z}} \]
      9. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(-4 \cdot \left(a \cdot \left(t \cdot z\right)\right) + b\right) \cdot \frac{1}{c}}{z}} \]
    6. Applied rewrites55.9%

      \[\leadsto \color{blue}{\frac{\left(\left(\left(z \cdot t\right) \cdot a\right) \cdot -4 + b\right) \cdot \frac{1}{c}}{z}} \]

    if -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0

    1. Initial program 79.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]

    if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c))

    1. Initial program 79.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{z \cdot c}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{c \cdot z}} \]
      4. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
    3. Applied rewrites79.7%

      \[\leadsto \color{blue}{\frac{\frac{\left(b + y \cdot \left(9 \cdot x\right)\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)}{c}}{z}} \]
    4. Taylor expanded in z around inf

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    5. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
      2. lower-/.f64N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
      3. lower-*.f6438.7%

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
    6. Applied rewrites38.7%

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
      2. lift-/.f64N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
      3. lift-*.f64N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      4. associate-/l*N/A

        \[\leadsto -4 \cdot \left(a \cdot \color{blue}{\frac{t}{c}}\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
      6. lower-*.f64N/A

        \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
      7. lower-*.f64N/A

        \[\leadsto \left(-4 \cdot a\right) \cdot \frac{\color{blue}{t}}{c} \]
      8. lower-/.f6440.7%

        \[\leadsto \left(-4 \cdot a\right) \cdot \frac{t}{\color{blue}{c}} \]
    8. Applied rewrites40.7%

      \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 4: 87.2% accurate, 0.1× speedup?

\[\begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ t_2 := z \cdot \left|c\right|\\ t_3 := \frac{\left(t\_1 - \left(\left(a \cdot z\right) \cdot 4\right) \cdot t\right) + b}{t\_2}\\ t_4 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{t\_2}\\ \mathsf{copysign}\left(1, c\right) \cdot \begin{array}{l} \mathbf{if}\;t\_4 \leq -5 \cdot 10^{-227}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_4 \leq 4 \cdot 10^{-224}:\\ \;\;\;\;\frac{\frac{\left(\left(z \cdot t\right) \cdot a\right) \cdot -4 + b}{z}}{\left|c\right|}\\ \mathbf{elif}\;t\_4 \leq \infty:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\left(-4 \cdot a\right) \cdot \frac{t}{\left|c\right|}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
  :precision binary64
  (let* ((t_1 (* (* x 9.0) y))
       (t_2 (* z (fabs c)))
       (t_3 (/ (+ (- t_1 (* (* (* a z) 4.0) t)) b) t_2))
       (t_4 (/ (+ (- t_1 (* (* (* z 4.0) t) a)) b) t_2)))
  (*
   (copysign 1.0 c)
   (if (<= t_4 -5e-227)
     t_3
     (if (<= t_4 4e-224)
       (/ (/ (+ (* (* (* z t) a) -4.0) b) z) (fabs c))
       (if (<= t_4 INFINITY) t_3 (* (* -4.0 a) (/ t (fabs c)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (x * 9.0) * y;
	double t_2 = z * fabs(c);
	double t_3 = ((t_1 - (((a * z) * 4.0) * t)) + b) / t_2;
	double t_4 = ((t_1 - (((z * 4.0) * t) * a)) + b) / t_2;
	double tmp;
	if (t_4 <= -5e-227) {
		tmp = t_3;
	} else if (t_4 <= 4e-224) {
		tmp = (((((z * t) * a) * -4.0) + b) / z) / fabs(c);
	} else if (t_4 <= ((double) INFINITY)) {
		tmp = t_3;
	} else {
		tmp = (-4.0 * a) * (t / fabs(c));
	}
	return copysign(1.0, c) * tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (x * 9.0) * y;
	double t_2 = z * Math.abs(c);
	double t_3 = ((t_1 - (((a * z) * 4.0) * t)) + b) / t_2;
	double t_4 = ((t_1 - (((z * 4.0) * t) * a)) + b) / t_2;
	double tmp;
	if (t_4 <= -5e-227) {
		tmp = t_3;
	} else if (t_4 <= 4e-224) {
		tmp = (((((z * t) * a) * -4.0) + b) / z) / Math.abs(c);
	} else if (t_4 <= Double.POSITIVE_INFINITY) {
		tmp = t_3;
	} else {
		tmp = (-4.0 * a) * (t / Math.abs(c));
	}
	return Math.copySign(1.0, c) * tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = (x * 9.0) * y
	t_2 = z * math.fabs(c)
	t_3 = ((t_1 - (((a * z) * 4.0) * t)) + b) / t_2
	t_4 = ((t_1 - (((z * 4.0) * t) * a)) + b) / t_2
	tmp = 0
	if t_4 <= -5e-227:
		tmp = t_3
	elif t_4 <= 4e-224:
		tmp = (((((z * t) * a) * -4.0) + b) / z) / math.fabs(c)
	elif t_4 <= math.inf:
		tmp = t_3
	else:
		tmp = (-4.0 * a) * (t / math.fabs(c))
	return math.copysign(1.0, c) * tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(Float64(x * 9.0) * y)
	t_2 = Float64(z * abs(c))
	t_3 = Float64(Float64(Float64(t_1 - Float64(Float64(Float64(a * z) * 4.0) * t)) + b) / t_2)
	t_4 = Float64(Float64(Float64(t_1 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / t_2)
	tmp = 0.0
	if (t_4 <= -5e-227)
		tmp = t_3;
	elseif (t_4 <= 4e-224)
		tmp = Float64(Float64(Float64(Float64(Float64(Float64(z * t) * a) * -4.0) + b) / z) / abs(c));
	elseif (t_4 <= Inf)
		tmp = t_3;
	else
		tmp = Float64(Float64(-4.0 * a) * Float64(t / abs(c)));
	end
	return Float64(copysign(1.0, c) * tmp)
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = (x * 9.0) * y;
	t_2 = z * abs(c);
	t_3 = ((t_1 - (((a * z) * 4.0) * t)) + b) / t_2;
	t_4 = ((t_1 - (((z * 4.0) * t) * a)) + b) / t_2;
	tmp = 0.0;
	if (t_4 <= -5e-227)
		tmp = t_3;
	elseif (t_4 <= 4e-224)
		tmp = (((((z * t) * a) * -4.0) + b) / z) / abs(c);
	elseif (t_4 <= Inf)
		tmp = t_3;
	else
		tmp = (-4.0 * a) * (t / abs(c));
	end
	tmp_2 = (sign(c) * abs(1.0)) * tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[Abs[c], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 - N[(N[(N[(a * z), $MachinePrecision] * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$1 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / t$95$2), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[t$95$4, -5e-227], t$95$3, If[LessEqual[t$95$4, 4e-224], N[(N[(N[(N[(N[(N[(z * t), $MachinePrecision] * a), $MachinePrecision] * -4.0), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision] / N[Abs[c], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], t$95$3, N[(N[(-4.0 * a), $MachinePrecision] * N[(t / N[Abs[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]]]
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
t_2 := z \cdot \left|c\right|\\
t_3 := \frac{\left(t\_1 - \left(\left(a \cdot z\right) \cdot 4\right) \cdot t\right) + b}{t\_2}\\
t_4 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{t\_2}\\
\mathsf{copysign}\left(1, c\right) \cdot \begin{array}{l}
\mathbf{if}\;t\_4 \leq -5 \cdot 10^{-227}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_4 \leq 4 \cdot 10^{-224}:\\
\;\;\;\;\frac{\frac{\left(\left(z \cdot t\right) \cdot a\right) \cdot -4 + b}{z}}{\left|c\right|}\\

\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;\left(-4 \cdot a\right) \cdot \frac{t}{\left|c\right|}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -4.9999999999999996e-227 or 4.0000000000000001e-224 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0

    1. Initial program 79.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - a \cdot \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      4. associate-*r*N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t}\right) + b}{z \cdot c} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t}\right) + b}{z \cdot c} \]
      6. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(a \cdot \color{blue}{\left(z \cdot 4\right)}\right) \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(a \cdot z\right) \cdot 4\right)} \cdot t\right) + b}{z \cdot c} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(a \cdot z\right) \cdot 4\right)} \cdot t\right) + b}{z \cdot c} \]
      9. lower-*.f6479.5%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(a \cdot z\right)} \cdot 4\right) \cdot t\right) + b}{z \cdot c} \]
    3. Applied rewrites79.5%

      \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(a \cdot z\right) \cdot 4\right) \cdot t}\right) + b}{z \cdot c} \]

    if -4.9999999999999996e-227 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 4.0000000000000001e-224

    1. Initial program 79.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Taylor expanded in x around 0

      \[\leadsto \frac{\color{blue}{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{-4 \cdot \color{blue}{\left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{-4 \cdot \left(a \cdot \color{blue}{\left(t \cdot z\right)}\right) + b}{z \cdot c} \]
      3. lower-*.f6456.3%

        \[\leadsto \frac{-4 \cdot \left(a \cdot \left(t \cdot \color{blue}{z}\right)\right) + b}{z \cdot c} \]
    4. Applied rewrites56.3%

      \[\leadsto \frac{\color{blue}{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]
    5. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right) + b}{z \cdot c}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right) + b}{\color{blue}{z \cdot c}} \]
      3. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right) + b}{z}}{c}} \]
      4. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right) + b}{z}}{c}} \]
    6. Applied rewrites55.8%

      \[\leadsto \color{blue}{\frac{\frac{\left(\left(z \cdot t\right) \cdot a\right) \cdot -4 + b}{z}}{c}} \]

    if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c))

    1. Initial program 79.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{z \cdot c}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{c \cdot z}} \]
      4. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
    3. Applied rewrites79.7%

      \[\leadsto \color{blue}{\frac{\frac{\left(b + y \cdot \left(9 \cdot x\right)\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)}{c}}{z}} \]
    4. Taylor expanded in z around inf

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    5. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
      2. lower-/.f64N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
      3. lower-*.f6438.7%

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
    6. Applied rewrites38.7%

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
      2. lift-/.f64N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
      3. lift-*.f64N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      4. associate-/l*N/A

        \[\leadsto -4 \cdot \left(a \cdot \color{blue}{\frac{t}{c}}\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
      6. lower-*.f64N/A

        \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
      7. lower-*.f64N/A

        \[\leadsto \left(-4 \cdot a\right) \cdot \frac{\color{blue}{t}}{c} \]
      8. lower-/.f6440.7%

        \[\leadsto \left(-4 \cdot a\right) \cdot \frac{t}{\color{blue}{c}} \]
    8. Applied rewrites40.7%

      \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 5: 70.5% accurate, 0.2× speedup?

\[\begin{array}{l} t_1 := \frac{\frac{\left(\left(z \cdot t\right) \cdot a\right) \cdot -4 + b}{z}}{c}\\ \mathbf{if}\;z \leq -5.5 \cdot 10^{+97}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-141}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-20}:\\ \;\;\;\;\frac{\frac{b + \mathsf{max}\left(x, y\right) \cdot \left(9 \cdot \mathsf{min}\left(x, y\right)\right)}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a b c)
  :precision binary64
  (let* ((t_1 (/ (/ (+ (* (* (* z t) a) -4.0) b) z) c)))
  (if (<= z -5.5e+97)
    (* -4.0 (/ (* a t) c))
    (if (<= z -2.3e-141)
      t_1
      (if (<= z 4e-20)
        (/ (/ (+ b (* (fmax x y) (* 9.0 (fmin x y)))) c) z)
        t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (((((z * t) * a) * -4.0) + b) / z) / c;
	double tmp;
	if (z <= -5.5e+97) {
		tmp = -4.0 * ((a * t) / c);
	} else if (z <= -2.3e-141) {
		tmp = t_1;
	} else if (z <= 4e-20) {
		tmp = ((b + (fmax(x, y) * (9.0 * fmin(x, y)))) / c) / z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (((((z * t) * a) * (-4.0d0)) + b) / z) / c
    if (z <= (-5.5d+97)) then
        tmp = (-4.0d0) * ((a * t) / c)
    else if (z <= (-2.3d-141)) then
        tmp = t_1
    else if (z <= 4d-20) then
        tmp = ((b + (fmax(x, y) * (9.0d0 * fmin(x, y)))) / c) / z
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (((((z * t) * a) * -4.0) + b) / z) / c;
	double tmp;
	if (z <= -5.5e+97) {
		tmp = -4.0 * ((a * t) / c);
	} else if (z <= -2.3e-141) {
		tmp = t_1;
	} else if (z <= 4e-20) {
		tmp = ((b + (fmax(x, y) * (9.0 * fmin(x, y)))) / c) / z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = (((((z * t) * a) * -4.0) + b) / z) / c
	tmp = 0
	if z <= -5.5e+97:
		tmp = -4.0 * ((a * t) / c)
	elif z <= -2.3e-141:
		tmp = t_1
	elif z <= 4e-20:
		tmp = ((b + (fmax(x, y) * (9.0 * fmin(x, y)))) / c) / z
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(Float64(Float64(Float64(Float64(Float64(z * t) * a) * -4.0) + b) / z) / c)
	tmp = 0.0
	if (z <= -5.5e+97)
		tmp = Float64(-4.0 * Float64(Float64(a * t) / c));
	elseif (z <= -2.3e-141)
		tmp = t_1;
	elseif (z <= 4e-20)
		tmp = Float64(Float64(Float64(b + Float64(fmax(x, y) * Float64(9.0 * fmin(x, y)))) / c) / z);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = (((((z * t) * a) * -4.0) + b) / z) / c;
	tmp = 0.0;
	if (z <= -5.5e+97)
		tmp = -4.0 * ((a * t) / c);
	elseif (z <= -2.3e-141)
		tmp = t_1;
	elseif (z <= 4e-20)
		tmp = ((b + (max(x, y) * (9.0 * min(x, y)))) / c) / z;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(z * t), $MachinePrecision] * a), $MachinePrecision] * -4.0), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -5.5e+97], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.3e-141], t$95$1, If[LessEqual[z, 4e-20], N[(N[(N[(b + N[(N[Max[x, y], $MachinePrecision] * N[(9.0 * N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := \frac{\frac{\left(\left(z \cdot t\right) \cdot a\right) \cdot -4 + b}{z}}{c}\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{+97}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\

\mathbf{elif}\;z \leq -2.3 \cdot 10^{-141}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4 \cdot 10^{-20}:\\
\;\;\;\;\frac{\frac{b + \mathsf{max}\left(x, y\right) \cdot \left(9 \cdot \mathsf{min}\left(x, y\right)\right)}{c}}{z}\\

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.5000000000000002e97

    1. Initial program 79.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Taylor expanded in z around inf

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
      2. lower-/.f64N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
      3. lower-*.f6438.7%

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
    4. Applied rewrites38.7%

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]

    if -5.5000000000000002e97 < z < -2.2999999999999999e-141 or 3.9999999999999998e-20 < z

    1. Initial program 79.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Taylor expanded in x around 0

      \[\leadsto \frac{\color{blue}{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{-4 \cdot \color{blue}{\left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{-4 \cdot \left(a \cdot \color{blue}{\left(t \cdot z\right)}\right) + b}{z \cdot c} \]
      3. lower-*.f6456.3%

        \[\leadsto \frac{-4 \cdot \left(a \cdot \left(t \cdot \color{blue}{z}\right)\right) + b}{z \cdot c} \]
    4. Applied rewrites56.3%

      \[\leadsto \frac{\color{blue}{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]
    5. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right) + b}{z \cdot c}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right) + b}{\color{blue}{z \cdot c}} \]
      3. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right) + b}{z}}{c}} \]
      4. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right) + b}{z}}{c}} \]
    6. Applied rewrites55.8%

      \[\leadsto \color{blue}{\frac{\frac{\left(\left(z \cdot t\right) \cdot a\right) \cdot -4 + b}{z}}{c}} \]

    if -2.2999999999999999e-141 < z < 3.9999999999999998e-20

    1. Initial program 79.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Taylor expanded in z around 0

      \[\leadsto \frac{\color{blue}{b + 9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
    3. Step-by-step derivation
      1. lower-+.f64N/A

        \[\leadsto \frac{b + \color{blue}{9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{b + 9 \cdot \color{blue}{\left(x \cdot y\right)}}{z \cdot c} \]
      3. lower-*.f6459.9%

        \[\leadsto \frac{b + 9 \cdot \left(x \cdot \color{blue}{y}\right)}{z \cdot c} \]
    4. Applied rewrites59.9%

      \[\leadsto \frac{\color{blue}{b + 9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
    5. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{b + 9 \cdot \left(x \cdot y\right)}{\color{blue}{z \cdot c}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{b + 9 \cdot \left(x \cdot y\right)}{\color{blue}{c \cdot z}} \]
      4. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z}} \]
    6. Applied rewrites60.5%

      \[\leadsto \color{blue}{\frac{\frac{b + y \cdot \left(9 \cdot x\right)}{c}}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 6: 68.2% accurate, 0.1× speedup?

\[\begin{array}{l} t_1 := \left(\mathsf{min}\left(x, y\right) \cdot 9\right) \cdot \mathsf{max}\left(x, y\right)\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-48}:\\ \;\;\;\;\frac{\frac{b + \mathsf{max}\left(x, y\right) \cdot \left(9 \cdot \mathsf{min}\left(x, y\right)\right)}{c}}{z}\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-75}:\\ \;\;\;\;\frac{\frac{1}{c} \cdot \left(b - \left(\left(\mathsf{min}\left(t, a\right) \cdot \mathsf{max}\left(t, a\right)\right) \cdot 4\right) \cdot z\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{9 \cdot \left(\mathsf{min}\left(x, y\right) \cdot \mathsf{max}\left(x, y\right)\right) - 4 \cdot \left(\mathsf{max}\left(t, a\right) \cdot \left(\mathsf{min}\left(t, a\right) \cdot z\right)\right)}{c \cdot z}\\ \end{array} \]
(FPCore (x y z t a b c)
  :precision binary64
  (let* ((t_1 (* (* (fmin x y) 9.0) (fmax x y))))
  (if (<= t_1 -1e-48)
    (/ (/ (+ b (* (fmax x y) (* 9.0 (fmin x y)))) c) z)
    (if (<= t_1 4e-75)
      (/
       (* (/ 1.0 c) (- b (* (* (* (fmin t a) (fmax t a)) 4.0) z)))
       z)
      (/
       (-
        (* 9.0 (* (fmin x y) (fmax x y)))
        (* 4.0 (* (fmax t a) (* (fmin t a) z))))
       (* c z))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (fmin(x, y) * 9.0) * fmax(x, y);
	double tmp;
	if (t_1 <= -1e-48) {
		tmp = ((b + (fmax(x, y) * (9.0 * fmin(x, y)))) / c) / z;
	} else if (t_1 <= 4e-75) {
		tmp = ((1.0 / c) * (b - (((fmin(t, a) * fmax(t, a)) * 4.0) * z))) / z;
	} else {
		tmp = ((9.0 * (fmin(x, y) * fmax(x, y))) - (4.0 * (fmax(t, a) * (fmin(t, a) * z)))) / (c * z);
	}
	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(x, y, z, t, a, b, c)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (fmin(x, y) * 9.0d0) * fmax(x, y)
    if (t_1 <= (-1d-48)) then
        tmp = ((b + (fmax(x, y) * (9.0d0 * fmin(x, y)))) / c) / z
    else if (t_1 <= 4d-75) then
        tmp = ((1.0d0 / c) * (b - (((fmin(t, a) * fmax(t, a)) * 4.0d0) * z))) / z
    else
        tmp = ((9.0d0 * (fmin(x, y) * fmax(x, y))) - (4.0d0 * (fmax(t, a) * (fmin(t, a) * z)))) / (c * z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (fmin(x, y) * 9.0) * fmax(x, y);
	double tmp;
	if (t_1 <= -1e-48) {
		tmp = ((b + (fmax(x, y) * (9.0 * fmin(x, y)))) / c) / z;
	} else if (t_1 <= 4e-75) {
		tmp = ((1.0 / c) * (b - (((fmin(t, a) * fmax(t, a)) * 4.0) * z))) / z;
	} else {
		tmp = ((9.0 * (fmin(x, y) * fmax(x, y))) - (4.0 * (fmax(t, a) * (fmin(t, a) * z)))) / (c * z);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = (fmin(x, y) * 9.0) * fmax(x, y)
	tmp = 0
	if t_1 <= -1e-48:
		tmp = ((b + (fmax(x, y) * (9.0 * fmin(x, y)))) / c) / z
	elif t_1 <= 4e-75:
		tmp = ((1.0 / c) * (b - (((fmin(t, a) * fmax(t, a)) * 4.0) * z))) / z
	else:
		tmp = ((9.0 * (fmin(x, y) * fmax(x, y))) - (4.0 * (fmax(t, a) * (fmin(t, a) * z)))) / (c * z)
	return tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(Float64(fmin(x, y) * 9.0) * fmax(x, y))
	tmp = 0.0
	if (t_1 <= -1e-48)
		tmp = Float64(Float64(Float64(b + Float64(fmax(x, y) * Float64(9.0 * fmin(x, y)))) / c) / z);
	elseif (t_1 <= 4e-75)
		tmp = Float64(Float64(Float64(1.0 / c) * Float64(b - Float64(Float64(Float64(fmin(t, a) * fmax(t, a)) * 4.0) * z))) / z);
	else
		tmp = Float64(Float64(Float64(9.0 * Float64(fmin(x, y) * fmax(x, y))) - Float64(4.0 * Float64(fmax(t, a) * Float64(fmin(t, a) * z)))) / Float64(c * z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = (min(x, y) * 9.0) * max(x, y);
	tmp = 0.0;
	if (t_1 <= -1e-48)
		tmp = ((b + (max(x, y) * (9.0 * min(x, y)))) / c) / z;
	elseif (t_1 <= 4e-75)
		tmp = ((1.0 / c) * (b - (((min(t, a) * max(t, a)) * 4.0) * z))) / z;
	else
		tmp = ((9.0 * (min(x, y) * max(x, y))) - (4.0 * (max(t, a) * (min(t, a) * z)))) / (c * z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[Min[x, y], $MachinePrecision] * 9.0), $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-48], N[(N[(N[(b + N[(N[Max[x, y], $MachinePrecision] * N[(9.0 * N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 4e-75], N[(N[(N[(1.0 / c), $MachinePrecision] * N[(b - N[(N[(N[(N[Min[t, a], $MachinePrecision] * N[Max[t, a], $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(9.0 * N[(N[Min[x, y], $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[Max[t, a], $MachinePrecision] * N[(N[Min[t, a], $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := \left(\mathsf{min}\left(x, y\right) \cdot 9\right) \cdot \mathsf{max}\left(x, y\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-48}:\\
\;\;\;\;\frac{\frac{b + \mathsf{max}\left(x, y\right) \cdot \left(9 \cdot \mathsf{min}\left(x, y\right)\right)}{c}}{z}\\

\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-75}:\\
\;\;\;\;\frac{\frac{1}{c} \cdot \left(b - \left(\left(\mathsf{min}\left(t, a\right) \cdot \mathsf{max}\left(t, a\right)\right) \cdot 4\right) \cdot z\right)}{z}\\

\mathbf{else}:\\
\;\;\;\;\frac{9 \cdot \left(\mathsf{min}\left(x, y\right) \cdot \mathsf{max}\left(x, y\right)\right) - 4 \cdot \left(\mathsf{max}\left(t, a\right) \cdot \left(\mathsf{min}\left(t, a\right) \cdot z\right)\right)}{c \cdot z}\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.9999999999999997e-49

    1. Initial program 79.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Taylor expanded in z around 0

      \[\leadsto \frac{\color{blue}{b + 9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
    3. Step-by-step derivation
      1. lower-+.f64N/A

        \[\leadsto \frac{b + \color{blue}{9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{b + 9 \cdot \color{blue}{\left(x \cdot y\right)}}{z \cdot c} \]
      3. lower-*.f6459.9%

        \[\leadsto \frac{b + 9 \cdot \left(x \cdot \color{blue}{y}\right)}{z \cdot c} \]
    4. Applied rewrites59.9%

      \[\leadsto \frac{\color{blue}{b + 9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
    5. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{b + 9 \cdot \left(x \cdot y\right)}{\color{blue}{z \cdot c}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{b + 9 \cdot \left(x \cdot y\right)}{\color{blue}{c \cdot z}} \]
      4. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z}} \]
    6. Applied rewrites60.5%

      \[\leadsto \color{blue}{\frac{\frac{b + y \cdot \left(9 \cdot x\right)}{c}}{z}} \]

    if -9.9999999999999997e-49 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 3.9999999999999998e-75

    1. Initial program 79.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{z \cdot c}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{c \cdot z}} \]
      4. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
    3. Applied rewrites79.7%

      \[\leadsto \color{blue}{\frac{\frac{\left(b + y \cdot \left(9 \cdot x\right)\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)}{c}}{z}} \]
    4. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{\left(b + y \cdot \left(9 \cdot x\right)\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)}{c}}}{z} \]
      2. mult-flipN/A

        \[\leadsto \frac{\color{blue}{\left(\left(b + y \cdot \left(9 \cdot x\right)\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right) \cdot \frac{1}{c}}}{z} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{1}{c} \cdot \left(\left(b + y \cdot \left(9 \cdot x\right)\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}}{z} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{1}{c} \cdot \left(\left(b + y \cdot \left(9 \cdot x\right)\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}}{z} \]
      5. lower-/.f6479.7%

        \[\leadsto \frac{\color{blue}{\frac{1}{c}} \cdot \left(\left(b + y \cdot \left(9 \cdot x\right)\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}{z} \]
      6. lift-+.f64N/A

        \[\leadsto \frac{\frac{1}{c} \cdot \left(\color{blue}{\left(b + y \cdot \left(9 \cdot x\right)\right)} - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}{z} \]
      7. +-commutativeN/A

        \[\leadsto \frac{\frac{1}{c} \cdot \left(\color{blue}{\left(y \cdot \left(9 \cdot x\right) + b\right)} - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}{z} \]
      8. lower-+.f6479.7%

        \[\leadsto \frac{\frac{1}{c} \cdot \left(\color{blue}{\left(y \cdot \left(9 \cdot x\right) + b\right)} - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}{z} \]
      9. lift-*.f64N/A

        \[\leadsto \frac{\frac{1}{c} \cdot \left(\left(\color{blue}{y \cdot \left(9 \cdot x\right)} + b\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}{z} \]
      10. *-commutativeN/A

        \[\leadsto \frac{\frac{1}{c} \cdot \left(\left(\color{blue}{\left(9 \cdot x\right) \cdot y} + b\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}{z} \]
      11. lower-*.f6479.7%

        \[\leadsto \frac{\frac{1}{c} \cdot \left(\left(\color{blue}{\left(9 \cdot x\right) \cdot y} + b\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}{z} \]
      12. lift-*.f64N/A

        \[\leadsto \frac{\frac{1}{c} \cdot \left(\left(\color{blue}{\left(9 \cdot x\right)} \cdot y + b\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}{z} \]
      13. *-commutativeN/A

        \[\leadsto \frac{\frac{1}{c} \cdot \left(\left(\color{blue}{\left(x \cdot 9\right)} \cdot y + b\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}{z} \]
      14. lower-*.f6479.7%

        \[\leadsto \frac{\frac{1}{c} \cdot \left(\left(\color{blue}{\left(x \cdot 9\right)} \cdot y + b\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}{z} \]
      15. lift-*.f64N/A

        \[\leadsto \frac{\frac{1}{c} \cdot \left(\left(\left(x \cdot 9\right) \cdot y + b\right) - \color{blue}{a \cdot \left(t \cdot \left(4 \cdot z\right)\right)}\right)}{z} \]
      16. lift-*.f64N/A

        \[\leadsto \frac{\frac{1}{c} \cdot \left(\left(\left(x \cdot 9\right) \cdot y + b\right) - a \cdot \color{blue}{\left(t \cdot \left(4 \cdot z\right)\right)}\right)}{z} \]
      17. associate-*r*N/A

        \[\leadsto \frac{\frac{1}{c} \cdot \left(\left(\left(x \cdot 9\right) \cdot y + b\right) - \color{blue}{\left(a \cdot t\right) \cdot \left(4 \cdot z\right)}\right)}{z} \]
      18. lift-*.f64N/A

        \[\leadsto \frac{\frac{1}{c} \cdot \left(\left(\left(x \cdot 9\right) \cdot y + b\right) - \left(a \cdot t\right) \cdot \color{blue}{\left(4 \cdot z\right)}\right)}{z} \]
      19. associate-*r*N/A

        \[\leadsto \frac{\frac{1}{c} \cdot \left(\left(\left(x \cdot 9\right) \cdot y + b\right) - \color{blue}{\left(\left(a \cdot t\right) \cdot 4\right) \cdot z}\right)}{z} \]
      20. lower-*.f64N/A

        \[\leadsto \frac{\frac{1}{c} \cdot \left(\left(\left(x \cdot 9\right) \cdot y + b\right) - \color{blue}{\left(\left(a \cdot t\right) \cdot 4\right) \cdot z}\right)}{z} \]
      21. lower-*.f64N/A

        \[\leadsto \frac{\frac{1}{c} \cdot \left(\left(\left(x \cdot 9\right) \cdot y + b\right) - \color{blue}{\left(\left(a \cdot t\right) \cdot 4\right)} \cdot z\right)}{z} \]
      22. *-commutativeN/A

        \[\leadsto \frac{\frac{1}{c} \cdot \left(\left(\left(x \cdot 9\right) \cdot y + b\right) - \left(\color{blue}{\left(t \cdot a\right)} \cdot 4\right) \cdot z\right)}{z} \]
      23. lower-*.f6480.3%

        \[\leadsto \frac{\frac{1}{c} \cdot \left(\left(\left(x \cdot 9\right) \cdot y + b\right) - \left(\color{blue}{\left(t \cdot a\right)} \cdot 4\right) \cdot z\right)}{z} \]
    5. Applied rewrites80.3%

      \[\leadsto \frac{\color{blue}{\frac{1}{c} \cdot \left(\left(\left(x \cdot 9\right) \cdot y + b\right) - \left(\left(t \cdot a\right) \cdot 4\right) \cdot z\right)}}{z} \]
    6. Taylor expanded in x around 0

      \[\leadsto \frac{\frac{1}{c} \cdot \left(\color{blue}{b} - \left(\left(t \cdot a\right) \cdot 4\right) \cdot z\right)}{z} \]
    7. Step-by-step derivation
      1. Applied rewrites56.8%

        \[\leadsto \frac{\frac{1}{c} \cdot \left(\color{blue}{b} - \left(\left(t \cdot a\right) \cdot 4\right) \cdot z\right)}{z} \]

      if 3.9999999999999998e-75 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in b around 0

        \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{\color{blue}{c \cdot z}} \]
        2. lower--.f64N/A

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{\color{blue}{c} \cdot z} \]
        3. lower-*.f64N/A

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
        4. lower-*.f64N/A

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
        5. lower-*.f64N/A

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
        7. lower-*.f64N/A

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
        8. lower-*.f6456.8%

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites56.8%

        \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z}} \]
    8. Recombined 3 regimes into one program.
    9. Add Preprocessing

    Alternative 7: 68.2% accurate, 0.1× speedup?

    \[\begin{array}{l} t_1 := \mathsf{max}\left(t, a\right) \cdot \left(\mathsf{min}\left(t, a\right) \cdot z\right)\\ \mathbf{if}\;\mathsf{min}\left(x, y\right) \leq -5 \cdot 10^{+19}:\\ \;\;\;\;\frac{\frac{b + \mathsf{max}\left(x, y\right) \cdot \left(9 \cdot \mathsf{min}\left(x, y\right)\right)}{c}}{z}\\ \mathbf{elif}\;\mathsf{min}\left(x, y\right) \leq 1.05 \cdot 10^{-181}:\\ \;\;\;\;\frac{-4 \cdot t\_1 + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{9 \cdot \left(\mathsf{min}\left(x, y\right) \cdot \mathsf{max}\left(x, y\right)\right) - 4 \cdot t\_1}{c \cdot z}\\ \end{array} \]
    (FPCore (x y z t a b c)
      :precision binary64
      (let* ((t_1 (* (fmax t a) (* (fmin t a) z))))
      (if (<= (fmin x y) -5e+19)
        (/ (/ (+ b (* (fmax x y) (* 9.0 (fmin x y)))) c) z)
        (if (<= (fmin x y) 1.05e-181)
          (/ (+ (* -4.0 t_1) b) (* z c))
          (/ (- (* 9.0 (* (fmin x y) (fmax x y))) (* 4.0 t_1)) (* c z))))))
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = fmax(t, a) * (fmin(t, a) * z);
    	double tmp;
    	if (fmin(x, y) <= -5e+19) {
    		tmp = ((b + (fmax(x, y) * (9.0 * fmin(x, y)))) / c) / z;
    	} else if (fmin(x, y) <= 1.05e-181) {
    		tmp = ((-4.0 * t_1) + b) / (z * c);
    	} else {
    		tmp = ((9.0 * (fmin(x, y) * fmax(x, y))) - (4.0 * t_1)) / (c * z);
    	}
    	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(x, y, z, t, a, b, c)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        real(8) :: t_1
        real(8) :: tmp
        t_1 = fmax(t, a) * (fmin(t, a) * z)
        if (fmin(x, y) <= (-5d+19)) then
            tmp = ((b + (fmax(x, y) * (9.0d0 * fmin(x, y)))) / c) / z
        else if (fmin(x, y) <= 1.05d-181) then
            tmp = (((-4.0d0) * t_1) + b) / (z * c)
        else
            tmp = ((9.0d0 * (fmin(x, y) * fmax(x, y))) - (4.0d0 * t_1)) / (c * z)
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = fmax(t, a) * (fmin(t, a) * z);
    	double tmp;
    	if (fmin(x, y) <= -5e+19) {
    		tmp = ((b + (fmax(x, y) * (9.0 * fmin(x, y)))) / c) / z;
    	} else if (fmin(x, y) <= 1.05e-181) {
    		tmp = ((-4.0 * t_1) + b) / (z * c);
    	} else {
    		tmp = ((9.0 * (fmin(x, y) * fmax(x, y))) - (4.0 * t_1)) / (c * z);
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b, c):
    	t_1 = fmax(t, a) * (fmin(t, a) * z)
    	tmp = 0
    	if fmin(x, y) <= -5e+19:
    		tmp = ((b + (fmax(x, y) * (9.0 * fmin(x, y)))) / c) / z
    	elif fmin(x, y) <= 1.05e-181:
    		tmp = ((-4.0 * t_1) + b) / (z * c)
    	else:
    		tmp = ((9.0 * (fmin(x, y) * fmax(x, y))) - (4.0 * t_1)) / (c * z)
    	return tmp
    
    function code(x, y, z, t, a, b, c)
    	t_1 = Float64(fmax(t, a) * Float64(fmin(t, a) * z))
    	tmp = 0.0
    	if (fmin(x, y) <= -5e+19)
    		tmp = Float64(Float64(Float64(b + Float64(fmax(x, y) * Float64(9.0 * fmin(x, y)))) / c) / z);
    	elseif (fmin(x, y) <= 1.05e-181)
    		tmp = Float64(Float64(Float64(-4.0 * t_1) + b) / Float64(z * c));
    	else
    		tmp = Float64(Float64(Float64(9.0 * Float64(fmin(x, y) * fmax(x, y))) - Float64(4.0 * t_1)) / Float64(c * z));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b, c)
    	t_1 = max(t, a) * (min(t, a) * z);
    	tmp = 0.0;
    	if (min(x, y) <= -5e+19)
    		tmp = ((b + (max(x, y) * (9.0 * min(x, y)))) / c) / z;
    	elseif (min(x, y) <= 1.05e-181)
    		tmp = ((-4.0 * t_1) + b) / (z * c);
    	else
    		tmp = ((9.0 * (min(x, y) * max(x, y))) - (4.0 * t_1)) / (c * z);
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[Max[t, a], $MachinePrecision] * N[(N[Min[t, a], $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Min[x, y], $MachinePrecision], -5e+19], N[(N[(N[(b + N[(N[Max[x, y], $MachinePrecision] * N[(9.0 * N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[N[Min[x, y], $MachinePrecision], 1.05e-181], N[(N[(N[(-4.0 * t$95$1), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(9.0 * N[(N[Min[x, y], $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * t$95$1), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    t_1 := \mathsf{max}\left(t, a\right) \cdot \left(\mathsf{min}\left(t, a\right) \cdot z\right)\\
    \mathbf{if}\;\mathsf{min}\left(x, y\right) \leq -5 \cdot 10^{+19}:\\
    \;\;\;\;\frac{\frac{b + \mathsf{max}\left(x, y\right) \cdot \left(9 \cdot \mathsf{min}\left(x, y\right)\right)}{c}}{z}\\
    
    \mathbf{elif}\;\mathsf{min}\left(x, y\right) \leq 1.05 \cdot 10^{-181}:\\
    \;\;\;\;\frac{-4 \cdot t\_1 + b}{z \cdot c}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{9 \cdot \left(\mathsf{min}\left(x, y\right) \cdot \mathsf{max}\left(x, y\right)\right) - 4 \cdot t\_1}{c \cdot z}\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if x < -5e19

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in z around 0

        \[\leadsto \frac{\color{blue}{b + 9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
      3. Step-by-step derivation
        1. lower-+.f64N/A

          \[\leadsto \frac{b + \color{blue}{9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{b + 9 \cdot \color{blue}{\left(x \cdot y\right)}}{z \cdot c} \]
        3. lower-*.f6459.9%

          \[\leadsto \frac{b + 9 \cdot \left(x \cdot \color{blue}{y}\right)}{z \cdot c} \]
      4. Applied rewrites59.9%

        \[\leadsto \frac{\color{blue}{b + 9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
      5. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{b + 9 \cdot \left(x \cdot y\right)}{\color{blue}{z \cdot c}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{b + 9 \cdot \left(x \cdot y\right)}{\color{blue}{c \cdot z}} \]
        4. associate-/r*N/A

          \[\leadsto \color{blue}{\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z}} \]
      6. Applied rewrites60.5%

        \[\leadsto \color{blue}{\frac{\frac{b + y \cdot \left(9 \cdot x\right)}{c}}{z}} \]

      if -5e19 < x < 1.05e-181

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in x around 0

        \[\leadsto \frac{\color{blue}{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \frac{-4 \cdot \color{blue}{\left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{-4 \cdot \left(a \cdot \color{blue}{\left(t \cdot z\right)}\right) + b}{z \cdot c} \]
        3. lower-*.f6456.3%

          \[\leadsto \frac{-4 \cdot \left(a \cdot \left(t \cdot \color{blue}{z}\right)\right) + b}{z \cdot c} \]
      4. Applied rewrites56.3%

        \[\leadsto \frac{\color{blue}{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]

      if 1.05e-181 < x

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in b around 0

        \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{\color{blue}{c \cdot z}} \]
        2. lower--.f64N/A

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{\color{blue}{c} \cdot z} \]
        3. lower-*.f64N/A

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
        4. lower-*.f64N/A

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
        5. lower-*.f64N/A

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
        7. lower-*.f64N/A

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
        8. lower-*.f6456.8%

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites56.8%

        \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z}} \]
    3. Recombined 3 regimes into one program.
    4. Add Preprocessing

    Alternative 8: 67.6% accurate, 0.1× speedup?

    \[\begin{array}{l} \mathbf{if}\;\mathsf{min}\left(x, y\right) \leq -5 \cdot 10^{+19}:\\ \;\;\;\;\frac{\frac{b + \mathsf{max}\left(x, y\right) \cdot \left(9 \cdot \mathsf{min}\left(x, y\right)\right)}{c}}{z}\\ \mathbf{elif}\;\mathsf{min}\left(x, y\right) \leq 8600000000:\\ \;\;\;\;\frac{-4 \cdot \left(\mathsf{max}\left(t, a\right) \cdot \left(\mathsf{min}\left(t, a\right) \cdot z\right)\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b + 9 \cdot \left(\mathsf{min}\left(x, y\right) \cdot \mathsf{max}\left(x, y\right)\right)}{c}}{z}\\ \end{array} \]
    (FPCore (x y z t a b c)
      :precision binary64
      (if (<= (fmin x y) -5e+19)
      (/ (/ (+ b (* (fmax x y) (* 9.0 (fmin x y)))) c) z)
      (if (<= (fmin x y) 8600000000.0)
        (/ (+ (* -4.0 (* (fmax t a) (* (fmin t a) z))) b) (* z c))
        (/ (/ (+ b (* 9.0 (* (fmin x y) (fmax x y)))) c) z))))
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double tmp;
    	if (fmin(x, y) <= -5e+19) {
    		tmp = ((b + (fmax(x, y) * (9.0 * fmin(x, y)))) / c) / z;
    	} else if (fmin(x, y) <= 8600000000.0) {
    		tmp = ((-4.0 * (fmax(t, a) * (fmin(t, a) * z))) + b) / (z * c);
    	} else {
    		tmp = ((b + (9.0 * (fmin(x, y) * fmax(x, y)))) / c) / z;
    	}
    	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(x, y, z, t, a, b, c)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        real(8) :: tmp
        if (fmin(x, y) <= (-5d+19)) then
            tmp = ((b + (fmax(x, y) * (9.0d0 * fmin(x, y)))) / c) / z
        else if (fmin(x, y) <= 8600000000.0d0) then
            tmp = (((-4.0d0) * (fmax(t, a) * (fmin(t, a) * z))) + b) / (z * c)
        else
            tmp = ((b + (9.0d0 * (fmin(x, y) * fmax(x, y)))) / c) / z
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	double tmp;
    	if (fmin(x, y) <= -5e+19) {
    		tmp = ((b + (fmax(x, y) * (9.0 * fmin(x, y)))) / c) / z;
    	} else if (fmin(x, y) <= 8600000000.0) {
    		tmp = ((-4.0 * (fmax(t, a) * (fmin(t, a) * z))) + b) / (z * c);
    	} else {
    		tmp = ((b + (9.0 * (fmin(x, y) * fmax(x, y)))) / c) / z;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b, c):
    	tmp = 0
    	if fmin(x, y) <= -5e+19:
    		tmp = ((b + (fmax(x, y) * (9.0 * fmin(x, y)))) / c) / z
    	elif fmin(x, y) <= 8600000000.0:
    		tmp = ((-4.0 * (fmax(t, a) * (fmin(t, a) * z))) + b) / (z * c)
    	else:
    		tmp = ((b + (9.0 * (fmin(x, y) * fmax(x, y)))) / c) / z
    	return tmp
    
    function code(x, y, z, t, a, b, c)
    	tmp = 0.0
    	if (fmin(x, y) <= -5e+19)
    		tmp = Float64(Float64(Float64(b + Float64(fmax(x, y) * Float64(9.0 * fmin(x, y)))) / c) / z);
    	elseif (fmin(x, y) <= 8600000000.0)
    		tmp = Float64(Float64(Float64(-4.0 * Float64(fmax(t, a) * Float64(fmin(t, a) * z))) + b) / Float64(z * c));
    	else
    		tmp = Float64(Float64(Float64(b + Float64(9.0 * Float64(fmin(x, y) * fmax(x, y)))) / c) / z);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b, c)
    	tmp = 0.0;
    	if (min(x, y) <= -5e+19)
    		tmp = ((b + (max(x, y) * (9.0 * min(x, y)))) / c) / z;
    	elseif (min(x, y) <= 8600000000.0)
    		tmp = ((-4.0 * (max(t, a) * (min(t, a) * z))) + b) / (z * c);
    	else
    		tmp = ((b + (9.0 * (min(x, y) * max(x, y)))) / c) / z;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[Min[x, y], $MachinePrecision], -5e+19], N[(N[(N[(b + N[(N[Max[x, y], $MachinePrecision] * N[(9.0 * N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[N[Min[x, y], $MachinePrecision], 8600000000.0], N[(N[(N[(-4.0 * N[(N[Max[t, a], $MachinePrecision] * N[(N[Min[t, a], $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b + N[(9.0 * N[(N[Min[x, y], $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision]]]
    
    \begin{array}{l}
    \mathbf{if}\;\mathsf{min}\left(x, y\right) \leq -5 \cdot 10^{+19}:\\
    \;\;\;\;\frac{\frac{b + \mathsf{max}\left(x, y\right) \cdot \left(9 \cdot \mathsf{min}\left(x, y\right)\right)}{c}}{z}\\
    
    \mathbf{elif}\;\mathsf{min}\left(x, y\right) \leq 8600000000:\\
    \;\;\;\;\frac{-4 \cdot \left(\mathsf{max}\left(t, a\right) \cdot \left(\mathsf{min}\left(t, a\right) \cdot z\right)\right) + b}{z \cdot c}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\frac{b + 9 \cdot \left(\mathsf{min}\left(x, y\right) \cdot \mathsf{max}\left(x, y\right)\right)}{c}}{z}\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if x < -5e19

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in z around 0

        \[\leadsto \frac{\color{blue}{b + 9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
      3. Step-by-step derivation
        1. lower-+.f64N/A

          \[\leadsto \frac{b + \color{blue}{9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{b + 9 \cdot \color{blue}{\left(x \cdot y\right)}}{z \cdot c} \]
        3. lower-*.f6459.9%

          \[\leadsto \frac{b + 9 \cdot \left(x \cdot \color{blue}{y}\right)}{z \cdot c} \]
      4. Applied rewrites59.9%

        \[\leadsto \frac{\color{blue}{b + 9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
      5. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{b + 9 \cdot \left(x \cdot y\right)}{\color{blue}{z \cdot c}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{b + 9 \cdot \left(x \cdot y\right)}{\color{blue}{c \cdot z}} \]
        4. associate-/r*N/A

          \[\leadsto \color{blue}{\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z}} \]
      6. Applied rewrites60.5%

        \[\leadsto \color{blue}{\frac{\frac{b + y \cdot \left(9 \cdot x\right)}{c}}{z}} \]

      if -5e19 < x < 8.6e9

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in x around 0

        \[\leadsto \frac{\color{blue}{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \frac{-4 \cdot \color{blue}{\left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{-4 \cdot \left(a \cdot \color{blue}{\left(t \cdot z\right)}\right) + b}{z \cdot c} \]
        3. lower-*.f6456.3%

          \[\leadsto \frac{-4 \cdot \left(a \cdot \left(t \cdot \color{blue}{z}\right)\right) + b}{z \cdot c} \]
      4. Applied rewrites56.3%

        \[\leadsto \frac{\color{blue}{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]

      if 8.6e9 < x

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{z \cdot c}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{c \cdot z}} \]
        4. associate-/r*N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      3. Applied rewrites79.7%

        \[\leadsto \color{blue}{\frac{\frac{\left(b + y \cdot \left(9 \cdot x\right)\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)}{c}}{z}} \]
      4. Taylor expanded in z around 0

        \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
      5. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{\color{blue}{c}}}{z} \]
        2. lower-+.f64N/A

          \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
        3. lower-*.f64N/A

          \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
        4. lower-*.f6460.5%

          \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      6. Applied rewrites60.5%

        \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
    3. Recombined 3 regimes into one program.
    4. Add Preprocessing

    Alternative 9: 67.6% accurate, 0.1× speedup?

    \[\begin{array}{l} t_1 := \frac{\frac{b + 9 \cdot \left(\mathsf{min}\left(x, y\right) \cdot \mathsf{max}\left(x, y\right)\right)}{c}}{z}\\ \mathbf{if}\;\mathsf{min}\left(x, y\right) \leq -5 \cdot 10^{+19}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;\mathsf{min}\left(x, y\right) \leq 8600000000:\\ \;\;\;\;\frac{-4 \cdot \left(\mathsf{max}\left(t, a\right) \cdot \left(\mathsf{min}\left(t, a\right) \cdot z\right)\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
    (FPCore (x y z t a b c)
      :precision binary64
      (let* ((t_1 (/ (/ (+ b (* 9.0 (* (fmin x y) (fmax x y)))) c) z)))
      (if (<= (fmin x y) -5e+19)
        t_1
        (if (<= (fmin x y) 8600000000.0)
          (/ (+ (* -4.0 (* (fmax t a) (* (fmin t a) z))) b) (* z c))
          t_1))))
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = ((b + (9.0 * (fmin(x, y) * fmax(x, y)))) / c) / z;
    	double tmp;
    	if (fmin(x, y) <= -5e+19) {
    		tmp = t_1;
    	} else if (fmin(x, y) <= 8600000000.0) {
    		tmp = ((-4.0 * (fmax(t, a) * (fmin(t, a) * z))) + b) / (z * c);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t, a, b, c)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        real(8) :: t_1
        real(8) :: tmp
        t_1 = ((b + (9.0d0 * (fmin(x, y) * fmax(x, y)))) / c) / z
        if (fmin(x, y) <= (-5d+19)) then
            tmp = t_1
        else if (fmin(x, y) <= 8600000000.0d0) then
            tmp = (((-4.0d0) * (fmax(t, a) * (fmin(t, a) * z))) + b) / (z * c)
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = ((b + (9.0 * (fmin(x, y) * fmax(x, y)))) / c) / z;
    	double tmp;
    	if (fmin(x, y) <= -5e+19) {
    		tmp = t_1;
    	} else if (fmin(x, y) <= 8600000000.0) {
    		tmp = ((-4.0 * (fmax(t, a) * (fmin(t, a) * z))) + b) / (z * c);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b, c):
    	t_1 = ((b + (9.0 * (fmin(x, y) * fmax(x, y)))) / c) / z
    	tmp = 0
    	if fmin(x, y) <= -5e+19:
    		tmp = t_1
    	elif fmin(x, y) <= 8600000000.0:
    		tmp = ((-4.0 * (fmax(t, a) * (fmin(t, a) * z))) + b) / (z * c)
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a, b, c)
    	t_1 = Float64(Float64(Float64(b + Float64(9.0 * Float64(fmin(x, y) * fmax(x, y)))) / c) / z)
    	tmp = 0.0
    	if (fmin(x, y) <= -5e+19)
    		tmp = t_1;
    	elseif (fmin(x, y) <= 8600000000.0)
    		tmp = Float64(Float64(Float64(-4.0 * Float64(fmax(t, a) * Float64(fmin(t, a) * z))) + b) / Float64(z * c));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b, c)
    	t_1 = ((b + (9.0 * (min(x, y) * max(x, y)))) / c) / z;
    	tmp = 0.0;
    	if (min(x, y) <= -5e+19)
    		tmp = t_1;
    	elseif (min(x, y) <= 8600000000.0)
    		tmp = ((-4.0 * (max(t, a) * (min(t, a) * z))) + b) / (z * c);
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(b + N[(9.0 * N[(N[Min[x, y], $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[N[Min[x, y], $MachinePrecision], -5e+19], t$95$1, If[LessEqual[N[Min[x, y], $MachinePrecision], 8600000000.0], N[(N[(N[(-4.0 * N[(N[Max[t, a], $MachinePrecision] * N[(N[Min[t, a], $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    t_1 := \frac{\frac{b + 9 \cdot \left(\mathsf{min}\left(x, y\right) \cdot \mathsf{max}\left(x, y\right)\right)}{c}}{z}\\
    \mathbf{if}\;\mathsf{min}\left(x, y\right) \leq -5 \cdot 10^{+19}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;\mathsf{min}\left(x, y\right) \leq 8600000000:\\
    \;\;\;\;\frac{-4 \cdot \left(\mathsf{max}\left(t, a\right) \cdot \left(\mathsf{min}\left(t, a\right) \cdot z\right)\right) + b}{z \cdot c}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < -5e19 or 8.6e9 < x

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{z \cdot c}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{c \cdot z}} \]
        4. associate-/r*N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      3. Applied rewrites79.7%

        \[\leadsto \color{blue}{\frac{\frac{\left(b + y \cdot \left(9 \cdot x\right)\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)}{c}}{z}} \]
      4. Taylor expanded in z around 0

        \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
      5. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{\color{blue}{c}}}{z} \]
        2. lower-+.f64N/A

          \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
        3. lower-*.f64N/A

          \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
        4. lower-*.f6460.5%

          \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      6. Applied rewrites60.5%

        \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}}{z} \]

      if -5e19 < x < 8.6e9

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in x around 0

        \[\leadsto \frac{\color{blue}{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \frac{-4 \cdot \color{blue}{\left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{-4 \cdot \left(a \cdot \color{blue}{\left(t \cdot z\right)}\right) + b}{z \cdot c} \]
        3. lower-*.f6456.3%

          \[\leadsto \frac{-4 \cdot \left(a \cdot \left(t \cdot \color{blue}{z}\right)\right) + b}{z \cdot c} \]
      4. Applied rewrites56.3%

        \[\leadsto \frac{\color{blue}{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 10: 67.5% accurate, 0.2× speedup?

    \[\begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+97}:\\ \;\;\;\;-4 \cdot \frac{\mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right)}{c}\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-141}:\\ \;\;\;\;\frac{-4 \cdot \left(\mathsf{max}\left(t, a\right) \cdot \left(\mathsf{min}\left(t, a\right) \cdot z\right)\right) + b}{z \cdot c}\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+105}:\\ \;\;\;\;\frac{b + y \cdot \left(9 \cdot x\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\left(-4 \cdot \mathsf{max}\left(t, a\right)\right) \cdot \frac{\mathsf{min}\left(t, a\right)}{c}\\ \end{array} \]
    (FPCore (x y z t a b c)
      :precision binary64
      (if (<= z -3.3e+97)
      (* -4.0 (/ (* (fmax t a) (fmin t a)) c))
      (if (<= z -2.3e-141)
        (/ (+ (* -4.0 (* (fmax t a) (* (fmin t a) z))) b) (* z c))
        (if (<= z 7.8e+105)
          (/ (+ b (* y (* 9.0 x))) (* z c))
          (* (* -4.0 (fmax t a)) (/ (fmin t a) c))))))
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double tmp;
    	if (z <= -3.3e+97) {
    		tmp = -4.0 * ((fmax(t, a) * fmin(t, a)) / c);
    	} else if (z <= -2.3e-141) {
    		tmp = ((-4.0 * (fmax(t, a) * (fmin(t, a) * z))) + b) / (z * c);
    	} else if (z <= 7.8e+105) {
    		tmp = (b + (y * (9.0 * x))) / (z * c);
    	} else {
    		tmp = (-4.0 * fmax(t, a)) * (fmin(t, a) / c);
    	}
    	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(x, y, z, t, a, b, c)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        real(8) :: tmp
        if (z <= (-3.3d+97)) then
            tmp = (-4.0d0) * ((fmax(t, a) * fmin(t, a)) / c)
        else if (z <= (-2.3d-141)) then
            tmp = (((-4.0d0) * (fmax(t, a) * (fmin(t, a) * z))) + b) / (z * c)
        else if (z <= 7.8d+105) then
            tmp = (b + (y * (9.0d0 * x))) / (z * c)
        else
            tmp = ((-4.0d0) * fmax(t, a)) * (fmin(t, a) / c)
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	double tmp;
    	if (z <= -3.3e+97) {
    		tmp = -4.0 * ((fmax(t, a) * fmin(t, a)) / c);
    	} else if (z <= -2.3e-141) {
    		tmp = ((-4.0 * (fmax(t, a) * (fmin(t, a) * z))) + b) / (z * c);
    	} else if (z <= 7.8e+105) {
    		tmp = (b + (y * (9.0 * x))) / (z * c);
    	} else {
    		tmp = (-4.0 * fmax(t, a)) * (fmin(t, a) / c);
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b, c):
    	tmp = 0
    	if z <= -3.3e+97:
    		tmp = -4.0 * ((fmax(t, a) * fmin(t, a)) / c)
    	elif z <= -2.3e-141:
    		tmp = ((-4.0 * (fmax(t, a) * (fmin(t, a) * z))) + b) / (z * c)
    	elif z <= 7.8e+105:
    		tmp = (b + (y * (9.0 * x))) / (z * c)
    	else:
    		tmp = (-4.0 * fmax(t, a)) * (fmin(t, a) / c)
    	return tmp
    
    function code(x, y, z, t, a, b, c)
    	tmp = 0.0
    	if (z <= -3.3e+97)
    		tmp = Float64(-4.0 * Float64(Float64(fmax(t, a) * fmin(t, a)) / c));
    	elseif (z <= -2.3e-141)
    		tmp = Float64(Float64(Float64(-4.0 * Float64(fmax(t, a) * Float64(fmin(t, a) * z))) + b) / Float64(z * c));
    	elseif (z <= 7.8e+105)
    		tmp = Float64(Float64(b + Float64(y * Float64(9.0 * x))) / Float64(z * c));
    	else
    		tmp = Float64(Float64(-4.0 * fmax(t, a)) * Float64(fmin(t, a) / c));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b, c)
    	tmp = 0.0;
    	if (z <= -3.3e+97)
    		tmp = -4.0 * ((max(t, a) * min(t, a)) / c);
    	elseif (z <= -2.3e-141)
    		tmp = ((-4.0 * (max(t, a) * (min(t, a) * z))) + b) / (z * c);
    	elseif (z <= 7.8e+105)
    		tmp = (b + (y * (9.0 * x))) / (z * c);
    	else
    		tmp = (-4.0 * max(t, a)) * (min(t, a) / c);
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -3.3e+97], N[(-4.0 * N[(N[(N[Max[t, a], $MachinePrecision] * N[Min[t, a], $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.3e-141], N[(N[(N[(-4.0 * N[(N[Max[t, a], $MachinePrecision] * N[(N[Min[t, a], $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.8e+105], N[(N[(b + N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * N[Max[t, a], $MachinePrecision]), $MachinePrecision] * N[(N[Min[t, a], $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    \mathbf{if}\;z \leq -3.3 \cdot 10^{+97}:\\
    \;\;\;\;-4 \cdot \frac{\mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right)}{c}\\
    
    \mathbf{elif}\;z \leq -2.3 \cdot 10^{-141}:\\
    \;\;\;\;\frac{-4 \cdot \left(\mathsf{max}\left(t, a\right) \cdot \left(\mathsf{min}\left(t, a\right) \cdot z\right)\right) + b}{z \cdot c}\\
    
    \mathbf{elif}\;z \leq 7.8 \cdot 10^{+105}:\\
    \;\;\;\;\frac{b + y \cdot \left(9 \cdot x\right)}{z \cdot c}\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(-4 \cdot \mathsf{max}\left(t, a\right)\right) \cdot \frac{\mathsf{min}\left(t, a\right)}{c}\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if z < -3.3000000000000001e97

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in z around inf

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lower-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lower-*.f6438.7%

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      4. Applied rewrites38.7%

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]

      if -3.3000000000000001e97 < z < -2.2999999999999999e-141

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in x around 0

        \[\leadsto \frac{\color{blue}{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \frac{-4 \cdot \color{blue}{\left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{-4 \cdot \left(a \cdot \color{blue}{\left(t \cdot z\right)}\right) + b}{z \cdot c} \]
        3. lower-*.f6456.3%

          \[\leadsto \frac{-4 \cdot \left(a \cdot \left(t \cdot \color{blue}{z}\right)\right) + b}{z \cdot c} \]
      4. Applied rewrites56.3%

        \[\leadsto \frac{\color{blue}{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]

      if -2.2999999999999999e-141 < z < 7.7999999999999996e105

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in z around 0

        \[\leadsto \frac{\color{blue}{b + 9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
      3. Step-by-step derivation
        1. lower-+.f64N/A

          \[\leadsto \frac{b + \color{blue}{9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{b + 9 \cdot \color{blue}{\left(x \cdot y\right)}}{z \cdot c} \]
        3. lower-*.f6459.9%

          \[\leadsto \frac{b + 9 \cdot \left(x \cdot \color{blue}{y}\right)}{z \cdot c} \]
      4. Applied rewrites59.9%

        \[\leadsto \frac{\color{blue}{b + 9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
      5. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{b + 9 \cdot \color{blue}{\left(x \cdot y\right)}}{z \cdot c} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{b + 9 \cdot \left(x \cdot \color{blue}{y}\right)}{z \cdot c} \]
        3. associate-*r*N/A

          \[\leadsto \frac{b + \left(9 \cdot x\right) \cdot \color{blue}{y}}{z \cdot c} \]
        4. *-commutativeN/A

          \[\leadsto \frac{b + \left(x \cdot 9\right) \cdot y}{z \cdot c} \]
        5. lift-*.f64N/A

          \[\leadsto \frac{b + \left(x \cdot 9\right) \cdot y}{z \cdot c} \]
        6. *-commutativeN/A

          \[\leadsto \frac{b + y \cdot \color{blue}{\left(x \cdot 9\right)}}{z \cdot c} \]
        7. lower-*.f6459.8%

          \[\leadsto \frac{b + y \cdot \color{blue}{\left(x \cdot 9\right)}}{z \cdot c} \]
        8. lift-*.f64N/A

          \[\leadsto \frac{b + y \cdot \left(x \cdot \color{blue}{9}\right)}{z \cdot c} \]
        9. *-commutativeN/A

          \[\leadsto \frac{b + y \cdot \left(9 \cdot \color{blue}{x}\right)}{z \cdot c} \]
        10. lower-*.f6459.8%

          \[\leadsto \frac{b + y \cdot \left(9 \cdot \color{blue}{x}\right)}{z \cdot c} \]
      6. Applied rewrites59.8%

        \[\leadsto \frac{\color{blue}{b + y \cdot \left(9 \cdot x\right)}}{z \cdot c} \]

      if 7.7999999999999996e105 < z

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{z \cdot c}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{c \cdot z}} \]
        4. associate-/r*N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      3. Applied rewrites79.7%

        \[\leadsto \color{blue}{\frac{\frac{\left(b + y \cdot \left(9 \cdot x\right)\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)}{c}}{z}} \]
      4. Taylor expanded in z around inf

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      5. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lower-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lower-*.f6438.7%

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      6. Applied rewrites38.7%

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      7. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lift-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lift-*.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
        4. associate-/l*N/A

          \[\leadsto -4 \cdot \left(a \cdot \color{blue}{\frac{t}{c}}\right) \]
        5. associate-*r*N/A

          \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
        6. lower-*.f64N/A

          \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
        7. lower-*.f64N/A

          \[\leadsto \left(-4 \cdot a\right) \cdot \frac{\color{blue}{t}}{c} \]
        8. lower-/.f6440.7%

          \[\leadsto \left(-4 \cdot a\right) \cdot \frac{t}{\color{blue}{c}} \]
      8. Applied rewrites40.7%

        \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
    3. Recombined 4 regimes into one program.
    4. Add Preprocessing

    Alternative 11: 67.1% accurate, 0.2× speedup?

    \[\begin{array}{l} \mathbf{if}\;z \leq -3.9 \cdot 10^{+65}:\\ \;\;\;\;-4 \cdot \frac{\mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right)}{c}\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+105}:\\ \;\;\;\;\frac{b + y \cdot \left(9 \cdot x\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\left(-4 \cdot \mathsf{max}\left(t, a\right)\right) \cdot \frac{\mathsf{min}\left(t, a\right)}{c}\\ \end{array} \]
    (FPCore (x y z t a b c)
      :precision binary64
      (if (<= z -3.9e+65)
      (* -4.0 (/ (* (fmax t a) (fmin t a)) c))
      (if (<= z 7.8e+105)
        (/ (+ b (* y (* 9.0 x))) (* z c))
        (* (* -4.0 (fmax t a)) (/ (fmin t a) c)))))
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double tmp;
    	if (z <= -3.9e+65) {
    		tmp = -4.0 * ((fmax(t, a) * fmin(t, a)) / c);
    	} else if (z <= 7.8e+105) {
    		tmp = (b + (y * (9.0 * x))) / (z * c);
    	} else {
    		tmp = (-4.0 * fmax(t, a)) * (fmin(t, a) / c);
    	}
    	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(x, y, z, t, a, b, c)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        real(8) :: tmp
        if (z <= (-3.9d+65)) then
            tmp = (-4.0d0) * ((fmax(t, a) * fmin(t, a)) / c)
        else if (z <= 7.8d+105) then
            tmp = (b + (y * (9.0d0 * x))) / (z * c)
        else
            tmp = ((-4.0d0) * fmax(t, a)) * (fmin(t, a) / c)
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	double tmp;
    	if (z <= -3.9e+65) {
    		tmp = -4.0 * ((fmax(t, a) * fmin(t, a)) / c);
    	} else if (z <= 7.8e+105) {
    		tmp = (b + (y * (9.0 * x))) / (z * c);
    	} else {
    		tmp = (-4.0 * fmax(t, a)) * (fmin(t, a) / c);
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b, c):
    	tmp = 0
    	if z <= -3.9e+65:
    		tmp = -4.0 * ((fmax(t, a) * fmin(t, a)) / c)
    	elif z <= 7.8e+105:
    		tmp = (b + (y * (9.0 * x))) / (z * c)
    	else:
    		tmp = (-4.0 * fmax(t, a)) * (fmin(t, a) / c)
    	return tmp
    
    function code(x, y, z, t, a, b, c)
    	tmp = 0.0
    	if (z <= -3.9e+65)
    		tmp = Float64(-4.0 * Float64(Float64(fmax(t, a) * fmin(t, a)) / c));
    	elseif (z <= 7.8e+105)
    		tmp = Float64(Float64(b + Float64(y * Float64(9.0 * x))) / Float64(z * c));
    	else
    		tmp = Float64(Float64(-4.0 * fmax(t, a)) * Float64(fmin(t, a) / c));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b, c)
    	tmp = 0.0;
    	if (z <= -3.9e+65)
    		tmp = -4.0 * ((max(t, a) * min(t, a)) / c);
    	elseif (z <= 7.8e+105)
    		tmp = (b + (y * (9.0 * x))) / (z * c);
    	else
    		tmp = (-4.0 * max(t, a)) * (min(t, a) / c);
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -3.9e+65], N[(-4.0 * N[(N[(N[Max[t, a], $MachinePrecision] * N[Min[t, a], $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.8e+105], N[(N[(b + N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * N[Max[t, a], $MachinePrecision]), $MachinePrecision] * N[(N[Min[t, a], $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    \mathbf{if}\;z \leq -3.9 \cdot 10^{+65}:\\
    \;\;\;\;-4 \cdot \frac{\mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right)}{c}\\
    
    \mathbf{elif}\;z \leq 7.8 \cdot 10^{+105}:\\
    \;\;\;\;\frac{b + y \cdot \left(9 \cdot x\right)}{z \cdot c}\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(-4 \cdot \mathsf{max}\left(t, a\right)\right) \cdot \frac{\mathsf{min}\left(t, a\right)}{c}\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if z < -3.8999999999999998e65

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in z around inf

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lower-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lower-*.f6438.7%

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      4. Applied rewrites38.7%

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]

      if -3.8999999999999998e65 < z < 7.7999999999999996e105

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in z around 0

        \[\leadsto \frac{\color{blue}{b + 9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
      3. Step-by-step derivation
        1. lower-+.f64N/A

          \[\leadsto \frac{b + \color{blue}{9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{b + 9 \cdot \color{blue}{\left(x \cdot y\right)}}{z \cdot c} \]
        3. lower-*.f6459.9%

          \[\leadsto \frac{b + 9 \cdot \left(x \cdot \color{blue}{y}\right)}{z \cdot c} \]
      4. Applied rewrites59.9%

        \[\leadsto \frac{\color{blue}{b + 9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
      5. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{b + 9 \cdot \color{blue}{\left(x \cdot y\right)}}{z \cdot c} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{b + 9 \cdot \left(x \cdot \color{blue}{y}\right)}{z \cdot c} \]
        3. associate-*r*N/A

          \[\leadsto \frac{b + \left(9 \cdot x\right) \cdot \color{blue}{y}}{z \cdot c} \]
        4. *-commutativeN/A

          \[\leadsto \frac{b + \left(x \cdot 9\right) \cdot y}{z \cdot c} \]
        5. lift-*.f64N/A

          \[\leadsto \frac{b + \left(x \cdot 9\right) \cdot y}{z \cdot c} \]
        6. *-commutativeN/A

          \[\leadsto \frac{b + y \cdot \color{blue}{\left(x \cdot 9\right)}}{z \cdot c} \]
        7. lower-*.f6459.8%

          \[\leadsto \frac{b + y \cdot \color{blue}{\left(x \cdot 9\right)}}{z \cdot c} \]
        8. lift-*.f64N/A

          \[\leadsto \frac{b + y \cdot \left(x \cdot \color{blue}{9}\right)}{z \cdot c} \]
        9. *-commutativeN/A

          \[\leadsto \frac{b + y \cdot \left(9 \cdot \color{blue}{x}\right)}{z \cdot c} \]
        10. lower-*.f6459.8%

          \[\leadsto \frac{b + y \cdot \left(9 \cdot \color{blue}{x}\right)}{z \cdot c} \]
      6. Applied rewrites59.8%

        \[\leadsto \frac{\color{blue}{b + y \cdot \left(9 \cdot x\right)}}{z \cdot c} \]

      if 7.7999999999999996e105 < z

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{z \cdot c}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{c \cdot z}} \]
        4. associate-/r*N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      3. Applied rewrites79.7%

        \[\leadsto \color{blue}{\frac{\frac{\left(b + y \cdot \left(9 \cdot x\right)\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)}{c}}{z}} \]
      4. Taylor expanded in z around inf

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      5. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lower-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lower-*.f6438.7%

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      6. Applied rewrites38.7%

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      7. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lift-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lift-*.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
        4. associate-/l*N/A

          \[\leadsto -4 \cdot \left(a \cdot \color{blue}{\frac{t}{c}}\right) \]
        5. associate-*r*N/A

          \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
        6. lower-*.f64N/A

          \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
        7. lower-*.f64N/A

          \[\leadsto \left(-4 \cdot a\right) \cdot \frac{\color{blue}{t}}{c} \]
        8. lower-/.f6440.7%

          \[\leadsto \left(-4 \cdot a\right) \cdot \frac{t}{\color{blue}{c}} \]
      8. Applied rewrites40.7%

        \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
    3. Recombined 3 regimes into one program.
    4. Add Preprocessing

    Alternative 12: 66.4% accurate, 0.2× speedup?

    \[\begin{array}{l} \mathbf{if}\;z \leq -3.9 \cdot 10^{+65}:\\ \;\;\;\;-4 \cdot \frac{\mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right)}{c}\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+105}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\left(-4 \cdot \mathsf{max}\left(t, a\right)\right) \cdot \frac{\mathsf{min}\left(t, a\right)}{c}\\ \end{array} \]
    (FPCore (x y z t a b c)
      :precision binary64
      (if (<= z -3.9e+65)
      (* -4.0 (/ (* (fmax t a) (fmin t a)) c))
      (if (<= z 7.8e+105)
        (/ (+ b (* 9.0 (* x y))) (* z c))
        (* (* -4.0 (fmax t a)) (/ (fmin t a) c)))))
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double tmp;
    	if (z <= -3.9e+65) {
    		tmp = -4.0 * ((fmax(t, a) * fmin(t, a)) / c);
    	} else if (z <= 7.8e+105) {
    		tmp = (b + (9.0 * (x * y))) / (z * c);
    	} else {
    		tmp = (-4.0 * fmax(t, a)) * (fmin(t, a) / c);
    	}
    	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(x, y, z, t, a, b, c)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        real(8) :: tmp
        if (z <= (-3.9d+65)) then
            tmp = (-4.0d0) * ((fmax(t, a) * fmin(t, a)) / c)
        else if (z <= 7.8d+105) then
            tmp = (b + (9.0d0 * (x * y))) / (z * c)
        else
            tmp = ((-4.0d0) * fmax(t, a)) * (fmin(t, a) / c)
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	double tmp;
    	if (z <= -3.9e+65) {
    		tmp = -4.0 * ((fmax(t, a) * fmin(t, a)) / c);
    	} else if (z <= 7.8e+105) {
    		tmp = (b + (9.0 * (x * y))) / (z * c);
    	} else {
    		tmp = (-4.0 * fmax(t, a)) * (fmin(t, a) / c);
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b, c):
    	tmp = 0
    	if z <= -3.9e+65:
    		tmp = -4.0 * ((fmax(t, a) * fmin(t, a)) / c)
    	elif z <= 7.8e+105:
    		tmp = (b + (9.0 * (x * y))) / (z * c)
    	else:
    		tmp = (-4.0 * fmax(t, a)) * (fmin(t, a) / c)
    	return tmp
    
    function code(x, y, z, t, a, b, c)
    	tmp = 0.0
    	if (z <= -3.9e+65)
    		tmp = Float64(-4.0 * Float64(Float64(fmax(t, a) * fmin(t, a)) / c));
    	elseif (z <= 7.8e+105)
    		tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c));
    	else
    		tmp = Float64(Float64(-4.0 * fmax(t, a)) * Float64(fmin(t, a) / c));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b, c)
    	tmp = 0.0;
    	if (z <= -3.9e+65)
    		tmp = -4.0 * ((max(t, a) * min(t, a)) / c);
    	elseif (z <= 7.8e+105)
    		tmp = (b + (9.0 * (x * y))) / (z * c);
    	else
    		tmp = (-4.0 * max(t, a)) * (min(t, a) / c);
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -3.9e+65], N[(-4.0 * N[(N[(N[Max[t, a], $MachinePrecision] * N[Min[t, a], $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.8e+105], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * N[Max[t, a], $MachinePrecision]), $MachinePrecision] * N[(N[Min[t, a], $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    \mathbf{if}\;z \leq -3.9 \cdot 10^{+65}:\\
    \;\;\;\;-4 \cdot \frac{\mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right)}{c}\\
    
    \mathbf{elif}\;z \leq 7.8 \cdot 10^{+105}:\\
    \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(-4 \cdot \mathsf{max}\left(t, a\right)\right) \cdot \frac{\mathsf{min}\left(t, a\right)}{c}\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if z < -3.8999999999999998e65

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in z around inf

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lower-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lower-*.f6438.7%

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      4. Applied rewrites38.7%

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]

      if -3.8999999999999998e65 < z < 7.7999999999999996e105

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in z around 0

        \[\leadsto \frac{\color{blue}{b + 9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
      3. Step-by-step derivation
        1. lower-+.f64N/A

          \[\leadsto \frac{b + \color{blue}{9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{b + 9 \cdot \color{blue}{\left(x \cdot y\right)}}{z \cdot c} \]
        3. lower-*.f6459.9%

          \[\leadsto \frac{b + 9 \cdot \left(x \cdot \color{blue}{y}\right)}{z \cdot c} \]
      4. Applied rewrites59.9%

        \[\leadsto \frac{\color{blue}{b + 9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]

      if 7.7999999999999996e105 < z

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{z \cdot c}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{c \cdot z}} \]
        4. associate-/r*N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      3. Applied rewrites79.7%

        \[\leadsto \color{blue}{\frac{\frac{\left(b + y \cdot \left(9 \cdot x\right)\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)}{c}}{z}} \]
      4. Taylor expanded in z around inf

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      5. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lower-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lower-*.f6438.7%

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      6. Applied rewrites38.7%

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      7. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lift-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lift-*.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
        4. associate-/l*N/A

          \[\leadsto -4 \cdot \left(a \cdot \color{blue}{\frac{t}{c}}\right) \]
        5. associate-*r*N/A

          \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
        6. lower-*.f64N/A

          \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
        7. lower-*.f64N/A

          \[\leadsto \left(-4 \cdot a\right) \cdot \frac{\color{blue}{t}}{c} \]
        8. lower-/.f6440.7%

          \[\leadsto \left(-4 \cdot a\right) \cdot \frac{t}{\color{blue}{c}} \]
      8. Applied rewrites40.7%

        \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
    3. Recombined 3 regimes into one program.
    4. Add Preprocessing

    Alternative 13: 49.9% accurate, 0.2× speedup?

    \[\begin{array}{l} t_1 := \left(-4 \cdot \mathsf{max}\left(t, a\right)\right) \cdot \frac{\mathsf{min}\left(t, a\right)}{c}\\ \mathbf{if}\;z \leq -2.75 \cdot 10^{-64}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-175}:\\ \;\;\;\;\frac{b}{c \cdot z}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+19}:\\ \;\;\;\;9 \cdot \frac{x \cdot y}{c \cdot z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
    (FPCore (x y z t a b c)
      :precision binary64
      (let* ((t_1 (* (* -4.0 (fmax t a)) (/ (fmin t a) c))))
      (if (<= z -2.75e-64)
        t_1
        (if (<= z 1.1e-175)
          (/ b (* c z))
          (if (<= z 9.5e+19) (* 9.0 (/ (* x y) (* c z))) t_1)))))
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = (-4.0 * fmax(t, a)) * (fmin(t, a) / c);
    	double tmp;
    	if (z <= -2.75e-64) {
    		tmp = t_1;
    	} else if (z <= 1.1e-175) {
    		tmp = b / (c * z);
    	} else if (z <= 9.5e+19) {
    		tmp = 9.0 * ((x * y) / (c * z));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t, a, b, c)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        real(8) :: t_1
        real(8) :: tmp
        t_1 = ((-4.0d0) * fmax(t, a)) * (fmin(t, a) / c)
        if (z <= (-2.75d-64)) then
            tmp = t_1
        else if (z <= 1.1d-175) then
            tmp = b / (c * z)
        else if (z <= 9.5d+19) then
            tmp = 9.0d0 * ((x * y) / (c * z))
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = (-4.0 * fmax(t, a)) * (fmin(t, a) / c);
    	double tmp;
    	if (z <= -2.75e-64) {
    		tmp = t_1;
    	} else if (z <= 1.1e-175) {
    		tmp = b / (c * z);
    	} else if (z <= 9.5e+19) {
    		tmp = 9.0 * ((x * y) / (c * z));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b, c):
    	t_1 = (-4.0 * fmax(t, a)) * (fmin(t, a) / c)
    	tmp = 0
    	if z <= -2.75e-64:
    		tmp = t_1
    	elif z <= 1.1e-175:
    		tmp = b / (c * z)
    	elif z <= 9.5e+19:
    		tmp = 9.0 * ((x * y) / (c * z))
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a, b, c)
    	t_1 = Float64(Float64(-4.0 * fmax(t, a)) * Float64(fmin(t, a) / c))
    	tmp = 0.0
    	if (z <= -2.75e-64)
    		tmp = t_1;
    	elseif (z <= 1.1e-175)
    		tmp = Float64(b / Float64(c * z));
    	elseif (z <= 9.5e+19)
    		tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(c * z)));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b, c)
    	t_1 = (-4.0 * max(t, a)) * (min(t, a) / c);
    	tmp = 0.0;
    	if (z <= -2.75e-64)
    		tmp = t_1;
    	elseif (z <= 1.1e-175)
    		tmp = b / (c * z);
    	elseif (z <= 9.5e+19)
    		tmp = 9.0 * ((x * y) / (c * z));
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(-4.0 * N[Max[t, a], $MachinePrecision]), $MachinePrecision] * N[(N[Min[t, a], $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.75e-64], t$95$1, If[LessEqual[z, 1.1e-175], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+19], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
    
    \begin{array}{l}
    t_1 := \left(-4 \cdot \mathsf{max}\left(t, a\right)\right) \cdot \frac{\mathsf{min}\left(t, a\right)}{c}\\
    \mathbf{if}\;z \leq -2.75 \cdot 10^{-64}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq 1.1 \cdot 10^{-175}:\\
    \;\;\;\;\frac{b}{c \cdot z}\\
    
    \mathbf{elif}\;z \leq 9.5 \cdot 10^{+19}:\\
    \;\;\;\;9 \cdot \frac{x \cdot y}{c \cdot z}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if z < -2.7499999999999999e-64 or 9.5e19 < z

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{z \cdot c}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{c \cdot z}} \]
        4. associate-/r*N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      3. Applied rewrites79.7%

        \[\leadsto \color{blue}{\frac{\frac{\left(b + y \cdot \left(9 \cdot x\right)\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)}{c}}{z}} \]
      4. Taylor expanded in z around inf

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      5. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lower-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lower-*.f6438.7%

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      6. Applied rewrites38.7%

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      7. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lift-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lift-*.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
        4. associate-/l*N/A

          \[\leadsto -4 \cdot \left(a \cdot \color{blue}{\frac{t}{c}}\right) \]
        5. associate-*r*N/A

          \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
        6. lower-*.f64N/A

          \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
        7. lower-*.f64N/A

          \[\leadsto \left(-4 \cdot a\right) \cdot \frac{\color{blue}{t}}{c} \]
        8. lower-/.f6440.7%

          \[\leadsto \left(-4 \cdot a\right) \cdot \frac{t}{\color{blue}{c}} \]
      8. Applied rewrites40.7%

        \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]

      if -2.7499999999999999e-64 < z < 1.1e-175

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in b around inf

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6435.0%

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites35.0%

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]

      if 1.1e-175 < z < 9.5e19

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in x around inf

        \[\leadsto \color{blue}{9 \cdot \frac{x \cdot y}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto 9 \cdot \color{blue}{\frac{x \cdot y}{c \cdot z}} \]
        2. lower-/.f64N/A

          \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c \cdot z}} \]
        3. lower-*.f64N/A

          \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c} \cdot z} \]
        4. lower-*.f6436.2%

          \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites36.2%

        \[\leadsto \color{blue}{9 \cdot \frac{x \cdot y}{c \cdot z}} \]
    3. Recombined 3 regimes into one program.
    4. Add Preprocessing

    Alternative 14: 49.7% accurate, 0.2× speedup?

    \[\begin{array}{l} t_1 := \left(-4 \cdot \mathsf{max}\left(t, a\right)\right) \cdot \frac{\mathsf{min}\left(t, a\right)}{c}\\ \mathbf{if}\;z \leq -2.75 \cdot 10^{-64}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.36 \cdot 10^{+23}:\\ \;\;\;\;\frac{b}{c \cdot z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
    (FPCore (x y z t a b c)
      :precision binary64
      (let* ((t_1 (* (* -4.0 (fmax t a)) (/ (fmin t a) c))))
      (if (<= z -2.75e-64) t_1 (if (<= z 1.36e+23) (/ b (* c z)) t_1))))
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = (-4.0 * fmax(t, a)) * (fmin(t, a) / c);
    	double tmp;
    	if (z <= -2.75e-64) {
    		tmp = t_1;
    	} else if (z <= 1.36e+23) {
    		tmp = b / (c * z);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t, a, b, c)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        real(8) :: t_1
        real(8) :: tmp
        t_1 = ((-4.0d0) * fmax(t, a)) * (fmin(t, a) / c)
        if (z <= (-2.75d-64)) then
            tmp = t_1
        else if (z <= 1.36d+23) then
            tmp = b / (c * z)
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = (-4.0 * fmax(t, a)) * (fmin(t, a) / c);
    	double tmp;
    	if (z <= -2.75e-64) {
    		tmp = t_1;
    	} else if (z <= 1.36e+23) {
    		tmp = b / (c * z);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b, c):
    	t_1 = (-4.0 * fmax(t, a)) * (fmin(t, a) / c)
    	tmp = 0
    	if z <= -2.75e-64:
    		tmp = t_1
    	elif z <= 1.36e+23:
    		tmp = b / (c * z)
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a, b, c)
    	t_1 = Float64(Float64(-4.0 * fmax(t, a)) * Float64(fmin(t, a) / c))
    	tmp = 0.0
    	if (z <= -2.75e-64)
    		tmp = t_1;
    	elseif (z <= 1.36e+23)
    		tmp = Float64(b / Float64(c * z));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b, c)
    	t_1 = (-4.0 * max(t, a)) * (min(t, a) / c);
    	tmp = 0.0;
    	if (z <= -2.75e-64)
    		tmp = t_1;
    	elseif (z <= 1.36e+23)
    		tmp = b / (c * z);
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(-4.0 * N[Max[t, a], $MachinePrecision]), $MachinePrecision] * N[(N[Min[t, a], $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.75e-64], t$95$1, If[LessEqual[z, 1.36e+23], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    t_1 := \left(-4 \cdot \mathsf{max}\left(t, a\right)\right) \cdot \frac{\mathsf{min}\left(t, a\right)}{c}\\
    \mathbf{if}\;z \leq -2.75 \cdot 10^{-64}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq 1.36 \cdot 10^{+23}:\\
    \;\;\;\;\frac{b}{c \cdot z}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -2.7499999999999999e-64 or 1.36e23 < z

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{z \cdot c}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{c \cdot z}} \]
        4. associate-/r*N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      3. Applied rewrites79.7%

        \[\leadsto \color{blue}{\frac{\frac{\left(b + y \cdot \left(9 \cdot x\right)\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)}{c}}{z}} \]
      4. Taylor expanded in z around inf

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      5. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lower-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lower-*.f6438.7%

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      6. Applied rewrites38.7%

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      7. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lift-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lift-*.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
        4. associate-/l*N/A

          \[\leadsto -4 \cdot \left(a \cdot \color{blue}{\frac{t}{c}}\right) \]
        5. associate-*r*N/A

          \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
        6. lower-*.f64N/A

          \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]
        7. lower-*.f64N/A

          \[\leadsto \left(-4 \cdot a\right) \cdot \frac{\color{blue}{t}}{c} \]
        8. lower-/.f6440.7%

          \[\leadsto \left(-4 \cdot a\right) \cdot \frac{t}{\color{blue}{c}} \]
      8. Applied rewrites40.7%

        \[\leadsto \left(-4 \cdot a\right) \cdot \color{blue}{\frac{t}{c}} \]

      if -2.7499999999999999e-64 < z < 1.36e23

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in b around inf

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6435.0%

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites35.0%

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 15: 49.7% accurate, 1.4× speedup?

    \[\begin{array}{l} \mathbf{if}\;z \leq -2.75 \cdot 10^{-64}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\ \mathbf{elif}\;z \leq 1.36 \cdot 10^{+23}:\\ \;\;\;\;\frac{b}{c \cdot z}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \end{array} \]
    (FPCore (x y z t a b c)
      :precision binary64
      (if (<= z -2.75e-64)
      (* -4.0 (/ (* a t) c))
      (if (<= z 1.36e+23) (/ b (* c z)) (* -4.0 (* t (/ a c))))))
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double tmp;
    	if (z <= -2.75e-64) {
    		tmp = -4.0 * ((a * t) / c);
    	} else if (z <= 1.36e+23) {
    		tmp = b / (c * z);
    	} else {
    		tmp = -4.0 * (t * (a / c));
    	}
    	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(x, y, z, t, a, b, c)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        real(8) :: tmp
        if (z <= (-2.75d-64)) then
            tmp = (-4.0d0) * ((a * t) / c)
        else if (z <= 1.36d+23) then
            tmp = b / (c * z)
        else
            tmp = (-4.0d0) * (t * (a / c))
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	double tmp;
    	if (z <= -2.75e-64) {
    		tmp = -4.0 * ((a * t) / c);
    	} else if (z <= 1.36e+23) {
    		tmp = b / (c * z);
    	} else {
    		tmp = -4.0 * (t * (a / c));
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b, c):
    	tmp = 0
    	if z <= -2.75e-64:
    		tmp = -4.0 * ((a * t) / c)
    	elif z <= 1.36e+23:
    		tmp = b / (c * z)
    	else:
    		tmp = -4.0 * (t * (a / c))
    	return tmp
    
    function code(x, y, z, t, a, b, c)
    	tmp = 0.0
    	if (z <= -2.75e-64)
    		tmp = Float64(-4.0 * Float64(Float64(a * t) / c));
    	elseif (z <= 1.36e+23)
    		tmp = Float64(b / Float64(c * z));
    	else
    		tmp = Float64(-4.0 * Float64(t * Float64(a / c)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b, c)
    	tmp = 0.0;
    	if (z <= -2.75e-64)
    		tmp = -4.0 * ((a * t) / c);
    	elseif (z <= 1.36e+23)
    		tmp = b / (c * z);
    	else
    		tmp = -4.0 * (t * (a / c));
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -2.75e-64], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.36e+23], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    \mathbf{if}\;z \leq -2.75 \cdot 10^{-64}:\\
    \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
    
    \mathbf{elif}\;z \leq 1.36 \cdot 10^{+23}:\\
    \;\;\;\;\frac{b}{c \cdot z}\\
    
    \mathbf{else}:\\
    \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if z < -2.7499999999999999e-64

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in z around inf

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lower-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lower-*.f6438.7%

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      4. Applied rewrites38.7%

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]

      if -2.7499999999999999e-64 < z < 1.36e23

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in b around inf

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6435.0%

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites35.0%

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]

      if 1.36e23 < z

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{z \cdot c}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{c \cdot z}} \]
        4. associate-/r*N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      3. Applied rewrites79.7%

        \[\leadsto \color{blue}{\frac{\frac{\left(b + y \cdot \left(9 \cdot x\right)\right) - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)}{c}}{z}} \]
      4. Taylor expanded in z around inf

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      5. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lower-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lower-*.f6438.7%

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      6. Applied rewrites38.7%

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      7. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        2. lift-*.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
        3. *-commutativeN/A

          \[\leadsto -4 \cdot \frac{t \cdot a}{c} \]
        4. associate-/l*N/A

          \[\leadsto -4 \cdot \left(t \cdot \color{blue}{\frac{a}{c}}\right) \]
        5. lower-*.f64N/A

          \[\leadsto -4 \cdot \left(t \cdot \color{blue}{\frac{a}{c}}\right) \]
        6. lower-/.f6440.7%

          \[\leadsto -4 \cdot \left(t \cdot \frac{a}{\color{blue}{c}}\right) \]
      8. Applied rewrites40.7%

        \[\leadsto -4 \cdot \left(t \cdot \color{blue}{\frac{a}{c}}\right) \]
    3. Recombined 3 regimes into one program.
    4. Add Preprocessing

    Alternative 16: 49.4% accurate, 1.4× speedup?

    \[\begin{array}{l} t_1 := -4 \cdot \frac{a \cdot t}{c}\\ \mathbf{if}\;z \leq -2.75 \cdot 10^{-64}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.36 \cdot 10^{+23}:\\ \;\;\;\;\frac{b}{c \cdot z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
    (FPCore (x y z t a b c)
      :precision binary64
      (let* ((t_1 (* -4.0 (/ (* a t) c))))
      (if (<= z -2.75e-64) t_1 (if (<= z 1.36e+23) (/ b (* c z)) t_1))))
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = -4.0 * ((a * t) / c);
    	double tmp;
    	if (z <= -2.75e-64) {
    		tmp = t_1;
    	} else if (z <= 1.36e+23) {
    		tmp = b / (c * z);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t, a, b, c)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        real(8) :: t_1
        real(8) :: tmp
        t_1 = (-4.0d0) * ((a * t) / c)
        if (z <= (-2.75d-64)) then
            tmp = t_1
        else if (z <= 1.36d+23) then
            tmp = b / (c * z)
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = -4.0 * ((a * t) / c);
    	double tmp;
    	if (z <= -2.75e-64) {
    		tmp = t_1;
    	} else if (z <= 1.36e+23) {
    		tmp = b / (c * z);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b, c):
    	t_1 = -4.0 * ((a * t) / c)
    	tmp = 0
    	if z <= -2.75e-64:
    		tmp = t_1
    	elif z <= 1.36e+23:
    		tmp = b / (c * z)
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a, b, c)
    	t_1 = Float64(-4.0 * Float64(Float64(a * t) / c))
    	tmp = 0.0
    	if (z <= -2.75e-64)
    		tmp = t_1;
    	elseif (z <= 1.36e+23)
    		tmp = Float64(b / Float64(c * z));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b, c)
    	t_1 = -4.0 * ((a * t) / c);
    	tmp = 0.0;
    	if (z <= -2.75e-64)
    		tmp = t_1;
    	elseif (z <= 1.36e+23)
    		tmp = b / (c * z);
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.75e-64], t$95$1, If[LessEqual[z, 1.36e+23], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    t_1 := -4 \cdot \frac{a \cdot t}{c}\\
    \mathbf{if}\;z \leq -2.75 \cdot 10^{-64}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq 1.36 \cdot 10^{+23}:\\
    \;\;\;\;\frac{b}{c \cdot z}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -2.7499999999999999e-64 or 1.36e23 < z

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in z around inf

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lower-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lower-*.f6438.7%

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      4. Applied rewrites38.7%

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]

      if -2.7499999999999999e-64 < z < 1.36e23

      1. Initial program 79.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in b around inf

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6435.0%

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites35.0%

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 17: 35.0% accurate, 2.8× speedup?

    \[\frac{b}{c \cdot z} \]
    (FPCore (x y z t a b c)
      :precision binary64
      (/ b (* c z)))
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	return b / (c * z);
    }
    
    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(x, y, z, t, a, b, c)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        code = b / (c * z)
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	return b / (c * z);
    }
    
    def code(x, y, z, t, a, b, c):
    	return b / (c * z)
    
    function code(x, y, z, t, a, b, c)
    	return Float64(b / Float64(c * z))
    end
    
    function tmp = code(x, y, z, t, a, b, c)
    	tmp = b / (c * z);
    end
    
    code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]
    
    \frac{b}{c \cdot z}
    
    Derivation
    1. Initial program 79.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Taylor expanded in b around inf

      \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
      2. lower-*.f6435.0%

        \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
    4. Applied rewrites35.0%

      \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
    5. Add Preprocessing

    Reproduce

    ?
    herbie shell --seed 2025258 
    (FPCore (x y z t a b c)
      :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, J"
      :precision binary64
      (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))