Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2

Percentage Accurate: 55.8% → 83.8%
Time: 12.0s
Alternatives: 14
Speedup: 1.8×

Specification

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

\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 14 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: 55.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (/
  (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t)
  (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
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, i)
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), intent (in) :: i
    code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i):
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}

Alternative 1: 83.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)\\ t_2 := \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)\\ \mathbf{if}\;y \leq -4.6 \cdot 10^{+64}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+63}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right), y, 230661.510616\right)}{t\_2}, \frac{t}{t\_2}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (fma (/ (* -1.0 (- z (* a x))) y) -1.0 x))
        (t_2 (fma (fma (fma (+ a y) y b) y c) y i)))
   (if (<= y -4.6e+64)
     t_1
     (if (<= y 1.2e+63)
       (fma
        y
        (/ (fma (fma (fma y x z) y 27464.7644705) y 230661.510616) t_2)
        (/ t t_2))
       t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = fma(((-1.0 * (z - (a * x))) / y), -1.0, x);
	double t_2 = fma(fma(fma((a + y), y, b), y, c), y, i);
	double tmp;
	if (y <= -4.6e+64) {
		tmp = t_1;
	} else if (y <= 1.2e+63) {
		tmp = fma(y, (fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616) / t_2), (t / t_2));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = fma(Float64(Float64(-1.0 * Float64(z - Float64(a * x))) / y), -1.0, x)
	t_2 = fma(fma(fma(Float64(a + y), y, b), y, c), y, i)
	tmp = 0.0
	if (y <= -4.6e+64)
		tmp = t_1;
	elseif (y <= 1.2e+63)
		tmp = fma(y, Float64(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616) / t_2), Float64(t / t_2));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(-1.0 * N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] * -1.0 + x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]}, If[LessEqual[y, -4.6e+64], t$95$1, If[LessEqual[y, 1.2e+63], N[(y * N[(N[(N[(N[(y * x + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(t / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)\\
t_2 := \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.2 \cdot 10^{+63}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right), y, 230661.510616\right)}{t\_2}, \frac{t}{t\_2}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.6e64 or 1.2e63 < y

    1. Initial program 1.3%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf

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

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

        \[\leadsto \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y} \cdot -1 + x \]
      3. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}, \color{blue}{-1}, x\right) \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}, -1, x\right) \]
      5. distribute-lft-out--N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
      6. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
      7. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
      8. lower-*.f6469.9

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
    5. Applied rewrites69.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)} \]

    if -4.6e64 < y < 1.2e63

    1. Initial program 92.5%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Applied rewrites93.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right), y, 230661.510616\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}, \frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 83.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)\\ \mathbf{if}\;y \leq -1.4 \cdot 10^{+64}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3 \cdot 10^{+51}:\\ \;\;\;\;\frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, x, 27464.7644705\right), y, \left(y \cdot y\right) \cdot z\right) + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (fma (/ (* -1.0 (- z (* a x))) y) -1.0 x)))
   (if (<= y -1.4e+64)
     t_1
     (if (<= y 3e+51)
       (/
        (+
         (*
          (+ (fma (fma (* y y) x 27464.7644705) y (* (* y y) z)) 230661.510616)
          y)
         t)
        (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
       t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = fma(((-1.0 * (z - (a * x))) / y), -1.0, x);
	double tmp;
	if (y <= -1.4e+64) {
		tmp = t_1;
	} else if (y <= 3e+51) {
		tmp = (((fma(fma((y * y), x, 27464.7644705), y, ((y * y) * z)) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = fma(Float64(Float64(-1.0 * Float64(z - Float64(a * x))) / y), -1.0, x)
	tmp = 0.0
	if (y <= -1.4e+64)
		tmp = t_1;
	elseif (y <= 3e+51)
		tmp = Float64(Float64(Float64(Float64(fma(fma(Float64(y * y), x, 27464.7644705), y, Float64(Float64(y * y) * z)) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(-1.0 * N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] * -1.0 + x), $MachinePrecision]}, If[LessEqual[y, -1.4e+64], t$95$1, If[LessEqual[y, 3e+51], N[(N[(N[(N[(N[(N[(N[(y * y), $MachinePrecision] * x + 27464.7644705), $MachinePrecision] * y + N[(N[(y * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)\\
\mathbf{if}\;y \leq -1.4 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 3 \cdot 10^{+51}:\\
\;\;\;\;\frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, x, 27464.7644705\right), y, \left(y \cdot y\right) \cdot z\right) + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.40000000000000012e64 or 3e51 < y

    1. Initial program 1.9%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf

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

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

        \[\leadsto \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y} \cdot -1 + x \]
      3. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}, \color{blue}{-1}, x\right) \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}, -1, x\right) \]
      5. distribute-lft-out--N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
      6. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
      7. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
      8. lower-*.f6468.8

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
    5. Applied rewrites68.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)} \]

    if -1.40000000000000012e64 < y < 3e51

    1. Initial program 93.4%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0

      \[\leadsto \frac{\left(\color{blue}{\left(y \cdot \left(\frac{54929528941}{2000000} + x \cdot {y}^{2}\right) + {y}^{2} \cdot z\right)} + \frac{28832688827}{125000}\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\left(\left(\left(\frac{54929528941}{2000000} + x \cdot {y}^{2}\right) \cdot y + \color{blue}{{y}^{2}} \cdot z\right) + \frac{28832688827}{125000}\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      2. lower-fma.f64N/A

        \[\leadsto \frac{\left(\mathsf{fma}\left(\frac{54929528941}{2000000} + x \cdot {y}^{2}, \color{blue}{y}, {y}^{2} \cdot z\right) + \frac{28832688827}{125000}\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      3. +-commutativeN/A

        \[\leadsto \frac{\left(\mathsf{fma}\left(x \cdot {y}^{2} + \frac{54929528941}{2000000}, y, {y}^{2} \cdot z\right) + \frac{28832688827}{125000}\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\left(\mathsf{fma}\left({y}^{2} \cdot x + \frac{54929528941}{2000000}, y, {y}^{2} \cdot z\right) + \frac{28832688827}{125000}\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{\left(\mathsf{fma}\left(\mathsf{fma}\left({y}^{2}, x, \frac{54929528941}{2000000}\right), y, {y}^{2} \cdot z\right) + \frac{28832688827}{125000}\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      6. unpow2N/A

        \[\leadsto \frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, x, \frac{54929528941}{2000000}\right), y, {y}^{2} \cdot z\right) + \frac{28832688827}{125000}\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      7. lower-*.f64N/A

        \[\leadsto \frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, x, \frac{54929528941}{2000000}\right), y, {y}^{2} \cdot z\right) + \frac{28832688827}{125000}\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, x, \frac{54929528941}{2000000}\right), y, {y}^{2} \cdot z\right) + \frac{28832688827}{125000}\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      9. unpow2N/A

        \[\leadsto \frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, x, \frac{54929528941}{2000000}\right), y, \left(y \cdot y\right) \cdot z\right) + \frac{28832688827}{125000}\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      10. lower-*.f6493.4

        \[\leadsto \frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, x, 27464.7644705\right), y, \left(y \cdot y\right) \cdot z\right) + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    5. Applied rewrites93.4%

      \[\leadsto \frac{\left(\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, x, 27464.7644705\right), y, \left(y \cdot y\right) \cdot z\right)} + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 3: 83.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)\\ \mathbf{if}\;y \leq -1.4 \cdot 10^{+64}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3 \cdot 10^{+51}:\\ \;\;\;\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (fma (/ (* -1.0 (- z (* a x))) y) -1.0 x)))
   (if (<= y -1.4e+64)
     t_1
     (if (<= y 3e+51)
       (/
        (+
         (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
         t)
        (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
       t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = fma(((-1.0 * (z - (a * x))) / y), -1.0, x);
	double tmp;
	if (y <= -1.4e+64) {
		tmp = t_1;
	} else if (y <= 3e+51) {
		tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = fma(Float64(Float64(-1.0 * Float64(z - Float64(a * x))) / y), -1.0, x)
	tmp = 0.0
	if (y <= -1.4e+64)
		tmp = t_1;
	elseif (y <= 3e+51)
		tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(-1.0 * N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] * -1.0 + x), $MachinePrecision]}, If[LessEqual[y, -1.4e+64], t$95$1, If[LessEqual[y, 3e+51], N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)\\
\mathbf{if}\;y \leq -1.4 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 3 \cdot 10^{+51}:\\
\;\;\;\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.40000000000000012e64 or 3e51 < y

    1. Initial program 1.9%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf

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

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

        \[\leadsto \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y} \cdot -1 + x \]
      3. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}, \color{blue}{-1}, x\right) \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}, -1, x\right) \]
      5. distribute-lft-out--N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
      6. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
      7. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
      8. lower-*.f6468.8

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
    5. Applied rewrites68.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)} \]

    if -1.40000000000000012e64 < y < 3e51

    1. Initial program 93.4%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 4: 79.9% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)\\ \mathbf{if}\;y \leq -1.3 \cdot 10^{+64}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+48}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (fma (/ (* -1.0 (- z (* a x))) y) -1.0 x)))
   (if (<= y -1.3e+64)
     t_1
     (if (<= y 1.4e+48)
       (/
        (fma (fma (fma z y 27464.7644705) y 230661.510616) y t)
        (fma (fma (fma (+ a y) y b) y c) y i))
       t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = fma(((-1.0 * (z - (a * x))) / y), -1.0, x);
	double tmp;
	if (y <= -1.3e+64) {
		tmp = t_1;
	} else if (y <= 1.4e+48) {
		tmp = fma(fma(fma(z, y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma((a + y), y, b), y, c), y, i);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = fma(Float64(Float64(-1.0 * Float64(z - Float64(a * x))) / y), -1.0, x)
	tmp = 0.0
	if (y <= -1.3e+64)
		tmp = t_1;
	elseif (y <= 1.4e+48)
		tmp = Float64(fma(fma(fma(z, y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(Float64(a + y), y, b), y, c), y, i));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(-1.0 * N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] * -1.0 + x), $MachinePrecision]}, If[LessEqual[y, -1.3e+64], t$95$1, If[LessEqual[y, 1.4e+48], N[(N[(N[(N[(z * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)\\
\mathbf{if}\;y \leq -1.3 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.4 \cdot 10^{+48}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.29999999999999998e64 or 1.40000000000000006e48 < y

    1. Initial program 2.1%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf

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

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

        \[\leadsto \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y} \cdot -1 + x \]
      3. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}, \color{blue}{-1}, x\right) \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}, -1, x\right) \]
      5. distribute-lft-out--N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
      6. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
      7. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
      8. lower-*.f6468.5

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
    5. Applied rewrites68.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)} \]

    if -1.29999999999999998e64 < y < 1.40000000000000006e48

    1. Initial program 93.7%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

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

        \[\leadsto \frac{t + y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right)\right)}{\color{blue}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
      2. +-commutativeN/A

        \[\leadsto \frac{y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right)\right) + t}{\color{blue}{i} + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right)\right) \cdot y + t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      4. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right), y, t\right)}{\color{blue}{i} + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      5. +-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right) + \frac{28832688827}{125000}, y, t\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(\left(\frac{54929528941}{2000000} + y \cdot z\right) \cdot y + \frac{28832688827}{125000}, y, t\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      7. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{54929528941}{2000000} + y \cdot z, y, \frac{28832688827}{125000}\right), y, t\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      8. +-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot z + \frac{54929528941}{2000000}, y, \frac{28832688827}{125000}\right), y, t\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      9. *-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z \cdot y + \frac{54929528941}{2000000}, y, \frac{28832688827}{125000}\right), y, t\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      10. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, y, \frac{54929528941}{2000000}\right), y, \frac{28832688827}{125000}\right), y, t\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      11. +-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, y, \frac{54929528941}{2000000}\right), y, \frac{28832688827}{125000}\right), y, t\right)}{y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) + \color{blue}{i}} \]
    5. Applied rewrites88.0%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 5: 75.6% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)\\ t_2 := \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)\\ \mathbf{if}\;y \leq -1.3 \cdot 10^{+64}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-19}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\left(y \cdot y\right) \cdot z, y, t\right)}{t\_2}\\ \mathbf{elif}\;y \leq 3.05 \cdot 10^{+44}:\\ \;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{t\_2}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (fma (/ (* -1.0 (- z (* a x))) y) -1.0 x))
        (t_2 (fma (fma (fma (+ y a) y b) y c) y i)))
   (if (<= y -1.3e+64)
     t_1
     (if (<= y -9e-19)
       (/ (fma (* (* y y) z) y t) t_2)
       (if (<= y 3.05e+44) (/ (fma 230661.510616 y t) t_2) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = fma(((-1.0 * (z - (a * x))) / y), -1.0, x);
	double t_2 = fma(fma(fma((y + a), y, b), y, c), y, i);
	double tmp;
	if (y <= -1.3e+64) {
		tmp = t_1;
	} else if (y <= -9e-19) {
		tmp = fma(((y * y) * z), y, t) / t_2;
	} else if (y <= 3.05e+44) {
		tmp = fma(230661.510616, y, t) / t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = fma(Float64(Float64(-1.0 * Float64(z - Float64(a * x))) / y), -1.0, x)
	t_2 = fma(fma(fma(Float64(y + a), y, b), y, c), y, i)
	tmp = 0.0
	if (y <= -1.3e+64)
		tmp = t_1;
	elseif (y <= -9e-19)
		tmp = Float64(fma(Float64(Float64(y * y) * z), y, t) / t_2);
	elseif (y <= 3.05e+44)
		tmp = Float64(fma(230661.510616, y, t) / t_2);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(-1.0 * N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] * -1.0 + x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(y + a), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]}, If[LessEqual[y, -1.3e+64], t$95$1, If[LessEqual[y, -9e-19], N[(N[(N[(N[(y * y), $MachinePrecision] * z), $MachinePrecision] * y + t), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, 3.05e+44], N[(N[(230661.510616 * y + t), $MachinePrecision] / t$95$2), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)\\
t_2 := \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)\\
\mathbf{if}\;y \leq -1.3 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -9 \cdot 10^{-19}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\left(y \cdot y\right) \cdot z, y, t\right)}{t\_2}\\

\mathbf{elif}\;y \leq 3.05 \cdot 10^{+44}:\\
\;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{t\_2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.29999999999999998e64 or 3.04999999999999991e44 < y

    1. Initial program 2.2%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf

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

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

        \[\leadsto \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y} \cdot -1 + x \]
      3. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}, \color{blue}{-1}, x\right) \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}, -1, x\right) \]
      5. distribute-lft-out--N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
      6. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
      7. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
      8. lower-*.f6468.2

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
    5. Applied rewrites68.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)} \]

    if -1.29999999999999998e64 < y < -9.00000000000000026e-19

    1. Initial program 65.8%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

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

        \[\leadsto \frac{\left({y}^{2} \cdot \color{blue}{z}\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      2. unpow2N/A

        \[\leadsto \frac{\left(\left(y \cdot y\right) \cdot z\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      3. lower-*.f6438.8

        \[\leadsto \frac{\left(\left(y \cdot y\right) \cdot z\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    5. Applied rewrites38.8%

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

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

        \[\leadsto \frac{\color{blue}{\left(\left(y \cdot y\right) \cdot z\right) \cdot y} + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      3. lower-fma.f6438.8

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\left(y \cdot y\right) \cdot z, y, t\right)}}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      4. lift-+.f64N/A

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

        \[\leadsto \frac{\mathsf{fma}\left(\left(y \cdot y\right) \cdot z, y, t\right)}{\color{blue}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y} + i} \]
      6. lift-+.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\left(y \cdot y\right) \cdot z, y, t\right)}{\color{blue}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right)} \cdot y + i} \]
      7. lift-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\left(y \cdot y\right) \cdot z, y, t\right)}{\left(\color{blue}{\left(\left(y + a\right) \cdot y + b\right) \cdot y} + c\right) \cdot y + i} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\left(y \cdot y\right) \cdot z, y, t\right)}{\left(\color{blue}{\left(\left(y + a\right) \cdot y + b\right)} \cdot y + c\right) \cdot y + i} \]
      9. lift-+.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\left(y \cdot y\right) \cdot z, y, t\right)}{\left(\left(\color{blue}{\left(y + a\right)} \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      10. lift-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\left(y \cdot y\right) \cdot z, y, t\right)}{\left(\left(\color{blue}{\left(y + a\right) \cdot y} + b\right) \cdot y + c\right) \cdot y + i} \]
      11. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\left(y \cdot y\right) \cdot z, y, t\right)}{\color{blue}{\mathsf{fma}\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c, y, i\right)}} \]
    7. Applied rewrites38.8%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\left(y \cdot y\right) \cdot z, y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]

    if -9.00000000000000026e-19 < y < 3.04999999999999991e44

    1. Initial program 97.2%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \frac{\color{blue}{\frac{28832688827}{125000}} \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    4. Step-by-step derivation
      1. Applied rewrites85.7%

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

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

          \[\leadsto \frac{\color{blue}{\frac{28832688827}{125000} \cdot y} + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
        3. lower-fma.f6485.7

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(230661.510616, y, t\right)}}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
        4. lift-+.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{28832688827}{125000}, y, t\right)}{\color{blue}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}} \]
        5. lift-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{28832688827}{125000}, y, t\right)}{\color{blue}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y} + i} \]
        6. lift-+.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{28832688827}{125000}, y, t\right)}{\color{blue}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right)} \cdot y + i} \]
        7. lift-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{28832688827}{125000}, y, t\right)}{\left(\color{blue}{\left(\left(y + a\right) \cdot y + b\right) \cdot y} + c\right) \cdot y + i} \]
        8. lift-+.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{28832688827}{125000}, y, t\right)}{\left(\color{blue}{\left(\left(y + a\right) \cdot y + b\right)} \cdot y + c\right) \cdot y + i} \]
        9. lift-+.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{28832688827}{125000}, y, t\right)}{\left(\left(\color{blue}{\left(y + a\right)} \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
        10. lift-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{28832688827}{125000}, y, t\right)}{\left(\left(\color{blue}{\left(y + a\right) \cdot y} + b\right) \cdot y + c\right) \cdot y + i} \]
        11. lower-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{28832688827}{125000}, y, t\right)}{\color{blue}{\mathsf{fma}\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c, y, i\right)}} \]
      3. Applied rewrites85.7%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]
    5. Recombined 3 regimes into one program.
    6. Add Preprocessing

    Alternative 6: 74.9% accurate, 1.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)\\ \mathbf{if}\;y \leq -7.4 \cdot 10^{+34}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3.05 \cdot 10^{+44}:\\ \;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b c i)
     :precision binary64
     (let* ((t_1 (fma (/ (* -1.0 (- z (* a x))) y) -1.0 x)))
       (if (<= y -7.4e+34)
         t_1
         (if (<= y 3.05e+44)
           (/ (fma 230661.510616 y t) (fma (fma (fma (+ y a) y b) y c) y i))
           t_1))))
    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
    	double t_1 = fma(((-1.0 * (z - (a * x))) / y), -1.0, x);
    	double tmp;
    	if (y <= -7.4e+34) {
    		tmp = t_1;
    	} else if (y <= 3.05e+44) {
    		tmp = fma(230661.510616, y, t) / fma(fma(fma((y + a), y, b), y, c), y, i);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b, c, i)
    	t_1 = fma(Float64(Float64(-1.0 * Float64(z - Float64(a * x))) / y), -1.0, x)
    	tmp = 0.0
    	if (y <= -7.4e+34)
    		tmp = t_1;
    	elseif (y <= 3.05e+44)
    		tmp = Float64(fma(230661.510616, y, t) / fma(fma(fma(Float64(y + a), y, b), y, c), y, i));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(-1.0 * N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] * -1.0 + x), $MachinePrecision]}, If[LessEqual[y, -7.4e+34], t$95$1, If[LessEqual[y, 3.05e+44], N[(N[(230661.510616 * y + t), $MachinePrecision] / N[(N[(N[(N[(y + a), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)\\
    \mathbf{if}\;y \leq -7.4 \cdot 10^{+34}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;y \leq 3.05 \cdot 10^{+44}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < -7.40000000000000017e34 or 3.04999999999999991e44 < y

      1. Initial program 3.9%

        \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      2. Add Preprocessing
      3. Taylor expanded in y around -inf

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

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

          \[\leadsto \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y} \cdot -1 + x \]
        3. lower-fma.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}, \color{blue}{-1}, x\right) \]
        4. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}, -1, x\right) \]
        5. distribute-lft-out--N/A

          \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
        6. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
        7. lower--.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
        8. lower-*.f6465.9

          \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
      5. Applied rewrites65.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)} \]

      if -7.40000000000000017e34 < y < 3.04999999999999991e44

      1. Initial program 96.1%

        \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      2. Add Preprocessing
      3. Taylor expanded in y around 0

        \[\leadsto \frac{\color{blue}{\frac{28832688827}{125000}} \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      4. Step-by-step derivation
        1. Applied rewrites81.9%

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

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

            \[\leadsto \frac{\color{blue}{\frac{28832688827}{125000} \cdot y} + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
          3. lower-fma.f6481.9

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(230661.510616, y, t\right)}}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
          4. lift-+.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(\frac{28832688827}{125000}, y, t\right)}{\color{blue}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}} \]
          5. lift-*.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(\frac{28832688827}{125000}, y, t\right)}{\color{blue}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y} + i} \]
          6. lift-+.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(\frac{28832688827}{125000}, y, t\right)}{\color{blue}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right)} \cdot y + i} \]
          7. lift-*.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(\frac{28832688827}{125000}, y, t\right)}{\left(\color{blue}{\left(\left(y + a\right) \cdot y + b\right) \cdot y} + c\right) \cdot y + i} \]
          8. lift-+.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(\frac{28832688827}{125000}, y, t\right)}{\left(\color{blue}{\left(\left(y + a\right) \cdot y + b\right)} \cdot y + c\right) \cdot y + i} \]
          9. lift-+.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(\frac{28832688827}{125000}, y, t\right)}{\left(\left(\color{blue}{\left(y + a\right)} \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
          10. lift-*.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(\frac{28832688827}{125000}, y, t\right)}{\left(\left(\color{blue}{\left(y + a\right) \cdot y} + b\right) \cdot y + c\right) \cdot y + i} \]
          11. lower-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(\frac{28832688827}{125000}, y, t\right)}{\color{blue}{\mathsf{fma}\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c, y, i\right)}} \]
        3. Applied rewrites81.9%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]
      5. Recombined 2 regimes into one program.
      6. Add Preprocessing

      Alternative 7: 69.9% accurate, 1.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)\\ \mathbf{if}\;y \leq -3.3 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -5 \cdot 10^{-109}:\\ \;\;\;\;\frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\ \mathbf{elif}\;y \leq 5 \cdot 10^{+43}:\\ \;\;\;\;\frac{230661.510616 \cdot y + t}{c \cdot y + i}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b c i)
       :precision binary64
       (let* ((t_1 (fma (/ (* -1.0 (- z (* a x))) y) -1.0 x)))
         (if (<= y -3.3e+40)
           t_1
           (if (<= y -5e-109)
             (/ t (fma (fma (fma (+ a y) y b) y c) y i))
             (if (<= y 5e+43) (/ (+ (* 230661.510616 y) t) (+ (* c y) i)) t_1)))))
      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
      	double t_1 = fma(((-1.0 * (z - (a * x))) / y), -1.0, x);
      	double tmp;
      	if (y <= -3.3e+40) {
      		tmp = t_1;
      	} else if (y <= -5e-109) {
      		tmp = t / fma(fma(fma((a + y), y, b), y, c), y, i);
      	} else if (y <= 5e+43) {
      		tmp = ((230661.510616 * y) + t) / ((c * y) + i);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b, c, i)
      	t_1 = fma(Float64(Float64(-1.0 * Float64(z - Float64(a * x))) / y), -1.0, x)
      	tmp = 0.0
      	if (y <= -3.3e+40)
      		tmp = t_1;
      	elseif (y <= -5e-109)
      		tmp = Float64(t / fma(fma(fma(Float64(a + y), y, b), y, c), y, i));
      	elseif (y <= 5e+43)
      		tmp = Float64(Float64(Float64(230661.510616 * y) + t) / Float64(Float64(c * y) + i));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(-1.0 * N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] * -1.0 + x), $MachinePrecision]}, If[LessEqual[y, -3.3e+40], t$95$1, If[LessEqual[y, -5e-109], N[(t / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e+43], N[(N[(N[(230661.510616 * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(c * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)\\
      \mathbf{if}\;y \leq -3.3 \cdot 10^{+40}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y \leq -5 \cdot 10^{-109}:\\
      \;\;\;\;\frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
      
      \mathbf{elif}\;y \leq 5 \cdot 10^{+43}:\\
      \;\;\;\;\frac{230661.510616 \cdot y + t}{c \cdot y + i}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y < -3.2999999999999998e40 or 5.0000000000000004e43 < y

        1. Initial program 3.5%

          \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
        2. Add Preprocessing
        3. Taylor expanded in y around -inf

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

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

            \[\leadsto \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y} \cdot -1 + x \]
          3. lower-fma.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}, \color{blue}{-1}, x\right) \]
          4. lower-/.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}, -1, x\right) \]
          5. distribute-lft-out--N/A

            \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
          6. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
          7. lower--.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
          8. lower-*.f6466.5

            \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
        5. Applied rewrites66.5%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)} \]

        if -3.2999999999999998e40 < y < -5.0000000000000002e-109

        1. Initial program 91.8%

          \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
        2. Add Preprocessing
        3. Taylor expanded in t around inf

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

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

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

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

            \[\leadsto \frac{t}{\mathsf{fma}\left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right), \color{blue}{y}, i\right)} \]
          5. +-commutativeN/A

            \[\leadsto \frac{t}{\mathsf{fma}\left(y \cdot \left(b + y \cdot \left(a + y\right)\right) + c, y, i\right)} \]
          6. *-commutativeN/A

            \[\leadsto \frac{t}{\mathsf{fma}\left(\left(b + y \cdot \left(a + y\right)\right) \cdot y + c, y, i\right)} \]
          7. +-commutativeN/A

            \[\leadsto \frac{t}{\mathsf{fma}\left(\left(b + y \cdot \left(y + a\right)\right) \cdot y + c, y, i\right)} \]
          8. *-commutativeN/A

            \[\leadsto \frac{t}{\mathsf{fma}\left(\left(b + \left(y + a\right) \cdot y\right) \cdot y + c, y, i\right)} \]
          9. +-commutativeN/A

            \[\leadsto \frac{t}{\mathsf{fma}\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c, y, i\right)} \]
          10. lower-fma.f64N/A

            \[\leadsto \frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\left(y + a\right) \cdot y + b, y, c\right), y, i\right)} \]
          11. lower-fma.f64N/A

            \[\leadsto \frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)} \]
          12. +-commutativeN/A

            \[\leadsto \frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)} \]
          13. lower-+.f6445.4

            \[\leadsto \frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)} \]
        5. Applied rewrites45.4%

          \[\leadsto \color{blue}{\frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}} \]

        if -5.0000000000000002e-109 < y < 5.0000000000000004e43

        1. Initial program 96.8%

          \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto \frac{\color{blue}{\frac{28832688827}{125000}} \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
        4. Step-by-step derivation
          1. Applied rewrites87.9%

            \[\leadsto \frac{\color{blue}{230661.510616} \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
          2. Taylor expanded in y around 0

            \[\leadsto \frac{\frac{28832688827}{125000} \cdot y + t}{\color{blue}{c} \cdot y + i} \]
          3. Step-by-step derivation
            1. Applied rewrites80.3%

              \[\leadsto \frac{230661.510616 \cdot y + t}{\color{blue}{c} \cdot y + i} \]
          4. Recombined 3 regimes into one program.
          5. Add Preprocessing

          Alternative 8: 69.5% accurate, 1.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)\\ \mathbf{if}\;y \leq -7.4 \cdot 10^{+34}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 5 \cdot 10^{+43}:\\ \;\;\;\;\frac{230661.510616 \cdot y + t}{c \cdot y + i}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z t a b c i)
           :precision binary64
           (let* ((t_1 (fma (/ (* -1.0 (- z (* a x))) y) -1.0 x)))
             (if (<= y -7.4e+34)
               t_1
               (if (<= y 5e+43) (/ (+ (* 230661.510616 y) t) (+ (* c y) i)) t_1))))
          double code(double x, double y, double z, double t, double a, double b, double c, double i) {
          	double t_1 = fma(((-1.0 * (z - (a * x))) / y), -1.0, x);
          	double tmp;
          	if (y <= -7.4e+34) {
          		tmp = t_1;
          	} else if (y <= 5e+43) {
          		tmp = ((230661.510616 * y) + t) / ((c * y) + i);
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b, c, i)
          	t_1 = fma(Float64(Float64(-1.0 * Float64(z - Float64(a * x))) / y), -1.0, x)
          	tmp = 0.0
          	if (y <= -7.4e+34)
          		tmp = t_1;
          	elseif (y <= 5e+43)
          		tmp = Float64(Float64(Float64(230661.510616 * y) + t) / Float64(Float64(c * y) + i));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(-1.0 * N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] * -1.0 + x), $MachinePrecision]}, If[LessEqual[y, -7.4e+34], t$95$1, If[LessEqual[y, 5e+43], N[(N[(N[(230661.510616 * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(c * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)\\
          \mathbf{if}\;y \leq -7.4 \cdot 10^{+34}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;y \leq 5 \cdot 10^{+43}:\\
          \;\;\;\;\frac{230661.510616 \cdot y + t}{c \cdot y + i}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if y < -7.40000000000000017e34 or 5.0000000000000004e43 < y

            1. Initial program 4.0%

              \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
            2. Add Preprocessing
            3. Taylor expanded in y around -inf

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

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

                \[\leadsto \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y} \cdot -1 + x \]
              3. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}, \color{blue}{-1}, x\right) \]
              4. lower-/.f64N/A

                \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}, -1, x\right) \]
              5. distribute-lft-out--N/A

                \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
              6. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
              7. lower--.f64N/A

                \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
              8. lower-*.f6465.9

                \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right) \]
            5. Applied rewrites65.9%

              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)} \]

            if -7.40000000000000017e34 < y < 5.0000000000000004e43

            1. Initial program 96.1%

              \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
            2. Add Preprocessing
            3. Taylor expanded in y around 0

              \[\leadsto \frac{\color{blue}{\frac{28832688827}{125000}} \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
            4. Step-by-step derivation
              1. Applied rewrites81.9%

                \[\leadsto \frac{\color{blue}{230661.510616} \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
              2. Taylor expanded in y around 0

                \[\leadsto \frac{\frac{28832688827}{125000} \cdot y + t}{\color{blue}{c} \cdot y + i} \]
              3. Step-by-step derivation
                1. Applied rewrites72.4%

                  \[\leadsto \frac{230661.510616 \cdot y + t}{\color{blue}{c} \cdot y + i} \]
              4. Recombined 2 regimes into one program.
              5. Add Preprocessing

              Alternative 9: 64.0% accurate, 1.8× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -9.4 \cdot 10^{+32}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-13}:\\ \;\;\;\;\frac{230661.510616 \cdot y + t}{c \cdot y + i}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
              (FPCore (x y z t a b c i)
               :precision binary64
               (if (<= y -9.4e+32)
                 x
                 (if (<= y 6.2e-13) (/ (+ (* 230661.510616 y) t) (+ (* c y) i)) x)))
              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
              	double tmp;
              	if (y <= -9.4e+32) {
              		tmp = x;
              	} else if (y <= 6.2e-13) {
              		tmp = ((230661.510616 * y) + t) / ((c * y) + i);
              	} else {
              		tmp = x;
              	}
              	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, i)
              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), intent (in) :: i
                  real(8) :: tmp
                  if (y <= (-9.4d+32)) then
                      tmp = x
                  else if (y <= 6.2d-13) then
                      tmp = ((230661.510616d0 * y) + t) / ((c * y) + i)
                  else
                      tmp = x
                  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 i) {
              	double tmp;
              	if (y <= -9.4e+32) {
              		tmp = x;
              	} else if (y <= 6.2e-13) {
              		tmp = ((230661.510616 * y) + t) / ((c * y) + i);
              	} else {
              		tmp = x;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b, c, i):
              	tmp = 0
              	if y <= -9.4e+32:
              		tmp = x
              	elif y <= 6.2e-13:
              		tmp = ((230661.510616 * y) + t) / ((c * y) + i)
              	else:
              		tmp = x
              	return tmp
              
              function code(x, y, z, t, a, b, c, i)
              	tmp = 0.0
              	if (y <= -9.4e+32)
              		tmp = x;
              	elseif (y <= 6.2e-13)
              		tmp = Float64(Float64(Float64(230661.510616 * y) + t) / Float64(Float64(c * y) + i));
              	else
              		tmp = x;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b, c, i)
              	tmp = 0.0;
              	if (y <= -9.4e+32)
              		tmp = x;
              	elseif (y <= 6.2e-13)
              		tmp = ((230661.510616 * y) + t) / ((c * y) + i);
              	else
              		tmp = x;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -9.4e+32], x, If[LessEqual[y, 6.2e-13], N[(N[(N[(230661.510616 * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(c * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], x]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;y \leq -9.4 \cdot 10^{+32}:\\
              \;\;\;\;x\\
              
              \mathbf{elif}\;y \leq 6.2 \cdot 10^{-13}:\\
              \;\;\;\;\frac{230661.510616 \cdot y + t}{c \cdot y + i}\\
              
              \mathbf{else}:\\
              \;\;\;\;x\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if y < -9.40000000000000047e32 or 6.1999999999999998e-13 < y

                1. Initial program 10.2%

                  \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
                2. Add Preprocessing
                3. Taylor expanded in y around inf

                  \[\leadsto \color{blue}{x} \]
                4. Step-by-step derivation
                  1. Applied rewrites49.6%

                    \[\leadsto \color{blue}{x} \]

                  if -9.40000000000000047e32 < y < 6.1999999999999998e-13

                  1. Initial program 98.4%

                    \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
                  2. Add Preprocessing
                  3. Taylor expanded in y around 0

                    \[\leadsto \frac{\color{blue}{\frac{28832688827}{125000}} \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
                  4. Step-by-step derivation
                    1. Applied rewrites86.8%

                      \[\leadsto \frac{\color{blue}{230661.510616} \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
                    2. Taylor expanded in y around 0

                      \[\leadsto \frac{\frac{28832688827}{125000} \cdot y + t}{\color{blue}{c} \cdot y + i} \]
                    3. Step-by-step derivation
                      1. Applied rewrites77.4%

                        \[\leadsto \frac{230661.510616 \cdot y + t}{\color{blue}{c} \cdot y + i} \]
                    4. Recombined 2 regimes into one program.
                    5. Add Preprocessing

                    Alternative 10: 54.3% accurate, 2.0× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -52000000:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{+28}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(27464.7644705, y, 230661.510616\right), y, t\right)}{i}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b c i)
                     :precision binary64
                     (if (<= y -52000000.0)
                       x
                       (if (<= y 4.2e+28) (/ (fma (fma 27464.7644705 y 230661.510616) y t) i) x)))
                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double tmp;
                    	if (y <= -52000000.0) {
                    		tmp = x;
                    	} else if (y <= 4.2e+28) {
                    		tmp = fma(fma(27464.7644705, y, 230661.510616), y, t) / i;
                    	} else {
                    		tmp = x;
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a, b, c, i)
                    	tmp = 0.0
                    	if (y <= -52000000.0)
                    		tmp = x;
                    	elseif (y <= 4.2e+28)
                    		tmp = Float64(fma(fma(27464.7644705, y, 230661.510616), y, t) / i);
                    	else
                    		tmp = x;
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -52000000.0], x, If[LessEqual[y, 4.2e+28], N[(N[(N[(27464.7644705 * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / i), $MachinePrecision], x]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;y \leq -52000000:\\
                    \;\;\;\;x\\
                    
                    \mathbf{elif}\;y \leq 4.2 \cdot 10^{+28}:\\
                    \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(27464.7644705, y, 230661.510616\right), y, t\right)}{i}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;x\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if y < -5.2e7 or 4.19999999999999978e28 < y

                      1. Initial program 7.4%

                        \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
                      2. Add Preprocessing
                      3. Taylor expanded in y around inf

                        \[\leadsto \color{blue}{x} \]
                      4. Step-by-step derivation
                        1. Applied rewrites51.0%

                          \[\leadsto \color{blue}{x} \]

                        if -5.2e7 < y < 4.19999999999999978e28

                        1. Initial program 98.4%

                          \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
                        2. Add Preprocessing
                        3. Taylor expanded in i around inf

                          \[\leadsto \color{blue}{\frac{t + y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot \left(z + x \cdot y\right)\right)\right)}{i}} \]
                        4. Step-by-step derivation
                          1. lower-/.f64N/A

                            \[\leadsto \frac{t + y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot \left(z + x \cdot y\right)\right)\right)}{\color{blue}{i}} \]
                        5. Applied rewrites60.8%

                          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{i}} \]
                        6. Taylor expanded in y around 0

                          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{54929528941}{2000000}, y, \frac{28832688827}{125000}\right), y, t\right)}{i} \]
                        7. Step-by-step derivation
                          1. Applied rewrites57.2%

                            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(27464.7644705, y, 230661.510616\right), y, t\right)}{i} \]
                        8. Recombined 2 regimes into one program.
                        9. Add Preprocessing

                        Alternative 11: 53.9% accurate, 2.4× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{-17}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{-17}:\\ \;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{i}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                        (FPCore (x y z t a b c i)
                         :precision binary64
                         (if (<= y -2.1e-17) x (if (<= y 2.9e-17) (/ (fma 230661.510616 y t) i) x)))
                        double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                        	double tmp;
                        	if (y <= -2.1e-17) {
                        		tmp = x;
                        	} else if (y <= 2.9e-17) {
                        		tmp = fma(230661.510616, y, t) / i;
                        	} else {
                        		tmp = x;
                        	}
                        	return tmp;
                        }
                        
                        function code(x, y, z, t, a, b, c, i)
                        	tmp = 0.0
                        	if (y <= -2.1e-17)
                        		tmp = x;
                        	elseif (y <= 2.9e-17)
                        		tmp = Float64(fma(230661.510616, y, t) / i);
                        	else
                        		tmp = x;
                        	end
                        	return tmp
                        end
                        
                        code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -2.1e-17], x, If[LessEqual[y, 2.9e-17], N[(N[(230661.510616 * y + t), $MachinePrecision] / i), $MachinePrecision], x]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;y \leq -2.1 \cdot 10^{-17}:\\
                        \;\;\;\;x\\
                        
                        \mathbf{elif}\;y \leq 2.9 \cdot 10^{-17}:\\
                        \;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{i}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;x\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if y < -2.09999999999999992e-17 or 2.9000000000000003e-17 < y

                          1. Initial program 15.9%

                            \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
                          2. Add Preprocessing
                          3. Taylor expanded in y around inf

                            \[\leadsto \color{blue}{x} \]
                          4. Step-by-step derivation
                            1. Applied rewrites46.2%

                              \[\leadsto \color{blue}{x} \]

                            if -2.09999999999999992e-17 < y < 2.9000000000000003e-17

                            1. Initial program 99.7%

                              \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
                            2. Add Preprocessing
                            3. Taylor expanded in i around inf

                              \[\leadsto \color{blue}{\frac{t + y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot \left(z + x \cdot y\right)\right)\right)}{i}} \]
                            4. Step-by-step derivation
                              1. lower-/.f64N/A

                                \[\leadsto \frac{t + y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot \left(z + x \cdot y\right)\right)\right)}{\color{blue}{i}} \]
                            5. Applied rewrites65.5%

                              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{i}} \]
                            6. Taylor expanded in y around 0

                              \[\leadsto \frac{\mathsf{fma}\left(\frac{28832688827}{125000}, y, t\right)}{i} \]
                            7. Step-by-step derivation
                              1. Applied rewrites62.4%

                                \[\leadsto \frac{\mathsf{fma}\left(230661.510616, y, t\right)}{i} \]
                            8. Recombined 2 regimes into one program.
                            9. Add Preprocessing

                            Alternative 12: 50.4% accurate, 3.0× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.32 \cdot 10^{-18}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-17}:\\ \;\;\;\;\frac{t}{i}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                            (FPCore (x y z t a b c i)
                             :precision binary64
                             (if (<= y -1.32e-18) x (if (<= y 9.5e-17) (/ t i) x)))
                            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                            	double tmp;
                            	if (y <= -1.32e-18) {
                            		tmp = x;
                            	} else if (y <= 9.5e-17) {
                            		tmp = t / i;
                            	} else {
                            		tmp = x;
                            	}
                            	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, i)
                            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), intent (in) :: i
                                real(8) :: tmp
                                if (y <= (-1.32d-18)) then
                                    tmp = x
                                else if (y <= 9.5d-17) then
                                    tmp = t / i
                                else
                                    tmp = x
                                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 i) {
                            	double tmp;
                            	if (y <= -1.32e-18) {
                            		tmp = x;
                            	} else if (y <= 9.5e-17) {
                            		tmp = t / i;
                            	} else {
                            		tmp = x;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a, b, c, i):
                            	tmp = 0
                            	if y <= -1.32e-18:
                            		tmp = x
                            	elif y <= 9.5e-17:
                            		tmp = t / i
                            	else:
                            		tmp = x
                            	return tmp
                            
                            function code(x, y, z, t, a, b, c, i)
                            	tmp = 0.0
                            	if (y <= -1.32e-18)
                            		tmp = x;
                            	elseif (y <= 9.5e-17)
                            		tmp = Float64(t / i);
                            	else
                            		tmp = x;
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t, a, b, c, i)
                            	tmp = 0.0;
                            	if (y <= -1.32e-18)
                            		tmp = x;
                            	elseif (y <= 9.5e-17)
                            		tmp = t / i;
                            	else
                            		tmp = x;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.32e-18], x, If[LessEqual[y, 9.5e-17], N[(t / i), $MachinePrecision], x]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;y \leq -1.32 \cdot 10^{-18}:\\
                            \;\;\;\;x\\
                            
                            \mathbf{elif}\;y \leq 9.5 \cdot 10^{-17}:\\
                            \;\;\;\;\frac{t}{i}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;x\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if y < -1.3199999999999999e-18 or 9.50000000000000029e-17 < y

                              1. Initial program 16.0%

                                \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
                              2. Add Preprocessing
                              3. Taylor expanded in y around inf

                                \[\leadsto \color{blue}{x} \]
                              4. Step-by-step derivation
                                1. Applied rewrites46.2%

                                  \[\leadsto \color{blue}{x} \]

                                if -1.3199999999999999e-18 < y < 9.50000000000000029e-17

                                1. Initial program 99.7%

                                  \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
                                2. Add Preprocessing
                                3. Taylor expanded in y around 0

                                  \[\leadsto \color{blue}{\frac{t}{i}} \]
                                4. Step-by-step derivation
                                  1. lower-/.f6455.1

                                    \[\leadsto \frac{t}{\color{blue}{i}} \]
                                5. Applied rewrites55.1%

                                  \[\leadsto \color{blue}{\frac{t}{i}} \]
                              5. Recombined 2 regimes into one program.
                              6. Add Preprocessing

                              Alternative 13: 26.5% accurate, 3.9× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 1.3 \cdot 10^{+198}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{a}\\ \end{array} \end{array} \]
                              (FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.3e+198) x (/ z a)))
                              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                              	double tmp;
                              	if (a <= 1.3e+198) {
                              		tmp = x;
                              	} else {
                              		tmp = z / a;
                              	}
                              	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, i)
                              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), intent (in) :: i
                                  real(8) :: tmp
                                  if (a <= 1.3d+198) then
                                      tmp = x
                                  else
                                      tmp = z / a
                                  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 i) {
                              	double tmp;
                              	if (a <= 1.3e+198) {
                              		tmp = x;
                              	} else {
                              		tmp = z / a;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t, a, b, c, i):
                              	tmp = 0
                              	if a <= 1.3e+198:
                              		tmp = x
                              	else:
                              		tmp = z / a
                              	return tmp
                              
                              function code(x, y, z, t, a, b, c, i)
                              	tmp = 0.0
                              	if (a <= 1.3e+198)
                              		tmp = x;
                              	else
                              		tmp = Float64(z / a);
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z, t, a, b, c, i)
                              	tmp = 0.0;
                              	if (a <= 1.3e+198)
                              		tmp = x;
                              	else
                              		tmp = z / a;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.3e+198], x, N[(z / a), $MachinePrecision]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;a \leq 1.3 \cdot 10^{+198}:\\
                              \;\;\;\;x\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\frac{z}{a}\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if a < 1.2999999999999999e198

                                1. Initial program 56.1%

                                  \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
                                2. Add Preprocessing
                                3. Taylor expanded in y around inf

                                  \[\leadsto \color{blue}{x} \]
                                4. Step-by-step derivation
                                  1. Applied rewrites27.3%

                                    \[\leadsto \color{blue}{x} \]

                                  if 1.2999999999999999e198 < a

                                  1. Initial program 52.9%

                                    \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in a around inf

                                    \[\leadsto \color{blue}{\frac{t + y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot \left(z + x \cdot y\right)\right)\right)}{a \cdot {y}^{3}}} \]
                                  4. Step-by-step derivation
                                    1. associate-/r*N/A

                                      \[\leadsto \frac{\frac{t + y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot \left(z + x \cdot y\right)\right)\right)}{a}}{\color{blue}{{y}^{3}}} \]
                                    2. lower-/.f64N/A

                                      \[\leadsto \frac{\frac{t + y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot \left(z + x \cdot y\right)\right)\right)}{a}}{\color{blue}{{y}^{3}}} \]
                                  5. Applied rewrites18.5%

                                    \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{a}}{{y}^{3}}} \]
                                  6. Taylor expanded in z around inf

                                    \[\leadsto \frac{z}{\color{blue}{a}} \]
                                  7. Step-by-step derivation
                                    1. lower-/.f6418.4

                                      \[\leadsto \frac{z}{a} \]
                                  8. Applied rewrites18.4%

                                    \[\leadsto \frac{z}{\color{blue}{a}} \]
                                5. Recombined 2 regimes into one program.
                                6. Add Preprocessing

                                Alternative 14: 25.8% accurate, 71.0× speedup?

                                \[\begin{array}{l} \\ x \end{array} \]
                                (FPCore (x y z t a b c i) :precision binary64 x)
                                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                	return x;
                                }
                                
                                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, i)
                                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), intent (in) :: i
                                    code = x
                                end function
                                
                                public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                	return x;
                                }
                                
                                def code(x, y, z, t, a, b, c, i):
                                	return x
                                
                                function code(x, y, z, t, a, b, c, i)
                                	return x
                                end
                                
                                function tmp = code(x, y, z, t, a, b, c, i)
                                	tmp = x;
                                end
                                
                                code[x_, y_, z_, t_, a_, b_, c_, i_] := x
                                
                                \begin{array}{l}
                                
                                \\
                                x
                                \end{array}
                                
                                Derivation
                                1. Initial program 55.8%

                                  \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
                                2. Add Preprocessing
                                3. Taylor expanded in y around inf

                                  \[\leadsto \color{blue}{x} \]
                                4. Step-by-step derivation
                                  1. Applied rewrites25.8%

                                    \[\leadsto \color{blue}{x} \]
                                  2. Add Preprocessing

                                  Reproduce

                                  ?
                                  herbie shell --seed 2025091 
                                  (FPCore (x y z t a b c i)
                                    :name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2"
                                    :precision binary64
                                    (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))