Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2

Percentage Accurate: 56.1% → 81.3%
Time: 12.5s
Alternatives: 13
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}

Sampling outcomes in binary64 precision:

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 13 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: 56.1% 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: 81.3% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x + \frac{z - a \cdot x}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 9.99999999999999981e295

    1. Initial program 92.6%

      \[\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. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999981e295 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i))

    1. Initial program 0.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 0

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

        \[\leadsto \color{blue}{\frac{t}{i}} \]
    5. Applied rewrites3.9%

      \[\leadsto \color{blue}{\frac{t}{i}} \]
    6. Taylor expanded in y around -inf

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

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

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

        \[\leadsto x + \color{blue}{\left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right)} \]
      4. distribute-lft-out--N/A

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

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

        \[\leadsto x + \left(-\frac{\color{blue}{\mathsf{neg}\left(\left(z - a \cdot x\right)\right)}}{y}\right) \]
      7. lower-neg.f64N/A

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

        \[\leadsto x + \left(-\frac{-\color{blue}{\left(z - a \cdot x\right)}}{y}\right) \]
      9. lower-*.f6457.5

        \[\leadsto x + \left(-\frac{-\left(z - \color{blue}{a \cdot x}\right)}{y}\right) \]
    8. Applied rewrites57.5%

      \[\leadsto \color{blue}{x + \left(-\frac{-\left(z - a \cdot x\right)}{y}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification80.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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} \leq 10^{+296}:\\ \;\;\;\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right) \cdot y, y, c \cdot y\right) + i}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z - a \cdot x}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 81.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_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}\\ \mathbf{if}\;t\_1 \leq 10^{+296}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z - a \cdot x}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1
         (/
          (+
           (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
           t)
          (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))))
   (if (<= t_1 1e+296) t_1 (+ x (/ (- z (* a x)) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
	double tmp;
	if (t_1 <= 1e+296) {
		tmp = t_1;
	} else {
		tmp = x + ((z - (a * x)) / y);
	}
	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) :: t_1
    real(8) :: tmp
    t_1 = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
    if (t_1 <= 1d+296) then
        tmp = t_1
    else
        tmp = x + ((z - (a * x)) / y)
    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 t_1 = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
	double tmp;
	if (t_1 <= 1e+296) {
		tmp = t_1;
	} else {
		tmp = x + ((z - (a * x)) / y);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
	tmp = 0
	if t_1 <= 1e+296:
		tmp = t_1
	else:
		tmp = x + ((z - (a * x)) / y)
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = 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))
	tmp = 0.0
	if (t_1 <= 1e+296)
		tmp = t_1;
	else
		tmp = Float64(x + Float64(Float64(z - Float64(a * x)) / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
	tmp = 0.0;
	if (t_1 <= 1e+296)
		tmp = t_1;
	else
		tmp = x + ((z - (a * x)) / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, 1e+296], t$95$1, N[(x + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_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}\\
\mathbf{if}\;t\_1 \leq 10^{+296}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x + \frac{z - a \cdot x}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 9.99999999999999981e295

    1. Initial program 92.6%

      \[\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

    if 9.99999999999999981e295 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i))

    1. Initial program 0.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 0

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

        \[\leadsto \color{blue}{\frac{t}{i}} \]
    5. Applied rewrites3.9%

      \[\leadsto \color{blue}{\frac{t}{i}} \]
    6. Taylor expanded in y around -inf

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

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

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

        \[\leadsto x + \color{blue}{\left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right)} \]
      4. distribute-lft-out--N/A

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

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

        \[\leadsto x + \left(-\frac{\color{blue}{\mathsf{neg}\left(\left(z - a \cdot x\right)\right)}}{y}\right) \]
      7. lower-neg.f64N/A

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

        \[\leadsto x + \left(-\frac{-\color{blue}{\left(z - a \cdot x\right)}}{y}\right) \]
      9. lower-*.f6457.5

        \[\leadsto x + \left(-\frac{-\left(z - \color{blue}{a \cdot x}\right)}{y}\right) \]
    8. Applied rewrites57.5%

      \[\leadsto \color{blue}{x + \left(-\frac{-\left(z - a \cdot x\right)}{y}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification80.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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} \leq 10^{+296}:\\ \;\;\;\;\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}:\\ \;\;\;\;x + \frac{z - a \cdot x}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 77.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\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} \leq 10^{+296}:\\ \;\;\;\;\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}:\\ \;\;\;\;x + \frac{z - a \cdot x}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<=
      (/
       (+
        (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
        t)
       (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
      1e+296)
   (/
    (fma (fma (fma z y 27464.7644705) y 230661.510616) y t)
    (fma (fma (fma (+ a y) y b) y c) y i))
   (+ x (/ (- z (* a x)) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= 1e+296) {
		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 = x + ((z - (a * x)) / y);
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (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)) <= 1e+296)
		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 = Float64(x + Float64(Float64(z - Float64(a * x)) / y));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[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], 1e+296], 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], N[(x + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\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} \leq 10^{+296}:\\
\;\;\;\;\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}:\\
\;\;\;\;x + \frac{z - a \cdot x}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 9.99999999999999981e295

    1. Initial program 92.6%

      \[\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 \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)}} \]
      2. +-commutativeN/A

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

        \[\leadsto \frac{\color{blue}{\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{\color{blue}{\mathsf{fma}\left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right), y, t\right)}}{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(\color{blue}{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(\color{blue}{\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(\color{blue}{\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(\color{blue}{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(\color{blue}{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(\color{blue}{\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)}{\color{blue}{y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) + i}} \]
      12. *-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)}{\color{blue}{\left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) \cdot y} + i} \]
      13. 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)}{\color{blue}{\mathsf{fma}\left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right), y, i\right)}} \]
    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)}} \]

    if 9.99999999999999981e295 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i))

    1. Initial program 0.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 0

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

        \[\leadsto \color{blue}{\frac{t}{i}} \]
    5. Applied rewrites3.9%

      \[\leadsto \color{blue}{\frac{t}{i}} \]
    6. Taylor expanded in y around -inf

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

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

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

        \[\leadsto x + \color{blue}{\left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right)} \]
      4. distribute-lft-out--N/A

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

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

        \[\leadsto x + \left(-\frac{\color{blue}{\mathsf{neg}\left(\left(z - a \cdot x\right)\right)}}{y}\right) \]
      7. lower-neg.f64N/A

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

        \[\leadsto x + \left(-\frac{-\color{blue}{\left(z - a \cdot x\right)}}{y}\right) \]
      9. lower-*.f6457.5

        \[\leadsto x + \left(-\frac{-\left(z - \color{blue}{a \cdot x}\right)}{y}\right) \]
    8. Applied rewrites57.5%

      \[\leadsto \color{blue}{x + \left(-\frac{-\left(z - a \cdot x\right)}{y}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification77.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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} \leq 10^{+296}:\\ \;\;\;\;\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}:\\ \;\;\;\;x + \frac{z - a \cdot x}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 69.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\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} \leq 10^{+296}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\left(y \cdot y\right) \cdot z, 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}:\\ \;\;\;\;x + \frac{z - a \cdot x}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<=
      (/
       (+
        (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
        t)
       (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
      1e+296)
   (/ (fma (* (* y y) z) y t) (fma (fma (fma (+ a y) y b) y c) y i))
   (+ x (/ (- z (* a x)) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= 1e+296) {
		tmp = fma(((y * y) * z), y, t) / fma(fma(fma((a + y), y, b), y, c), y, i);
	} else {
		tmp = x + ((z - (a * x)) / y);
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (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)) <= 1e+296)
		tmp = Float64(fma(Float64(Float64(y * y) * z), y, t) / fma(fma(fma(Float64(a + y), y, b), y, c), y, i));
	else
		tmp = Float64(x + Float64(Float64(z - Float64(a * x)) / y));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[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], 1e+296], N[(N[(N[(N[(y * y), $MachinePrecision] * z), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\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} \leq 10^{+296}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\left(y \cdot y\right) \cdot z, 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}:\\
\;\;\;\;x + \frac{z - a \cdot x}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 9.99999999999999981e295

    1. Initial program 92.6%

      \[\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 \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)}} \]
      2. +-commutativeN/A

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

        \[\leadsto \frac{\color{blue}{\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{\color{blue}{\mathsf{fma}\left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right), y, t\right)}}{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(\color{blue}{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(\color{blue}{\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(\color{blue}{\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(\color{blue}{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(\color{blue}{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(\color{blue}{\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)}{\color{blue}{y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) + i}} \]
      12. *-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)}{\color{blue}{\left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) \cdot y} + i} \]
      13. 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)}{\color{blue}{\mathsf{fma}\left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right), y, i\right)}} \]
    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)}} \]
    6. Taylor expanded in y around inf

      \[\leadsto \frac{\mathsf{fma}\left({y}^{2} \cdot z, y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(a + y, y, b\right)}, y, c\right), y, i\right)} \]
    7. Step-by-step derivation
      1. Applied rewrites80.0%

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

      if 9.99999999999999981e295 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i))

      1. Initial program 0.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 0

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

          \[\leadsto \color{blue}{\frac{t}{i}} \]
      5. Applied rewrites3.9%

        \[\leadsto \color{blue}{\frac{t}{i}} \]
      6. Taylor expanded in y around -inf

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

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

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

          \[\leadsto x + \color{blue}{\left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right)} \]
        4. distribute-lft-out--N/A

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

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

          \[\leadsto x + \left(-\frac{\color{blue}{\mathsf{neg}\left(\left(z - a \cdot x\right)\right)}}{y}\right) \]
        7. lower-neg.f64N/A

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

          \[\leadsto x + \left(-\frac{-\color{blue}{\left(z - a \cdot x\right)}}{y}\right) \]
        9. lower-*.f6457.5

          \[\leadsto x + \left(-\frac{-\left(z - \color{blue}{a \cdot x}\right)}{y}\right) \]
      8. Applied rewrites57.5%

        \[\leadsto \color{blue}{x + \left(-\frac{-\left(z - a \cdot x\right)}{y}\right)} \]
    8. Recombined 2 regimes into one program.
    9. Final simplification72.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\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} \leq 10^{+296}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\left(y \cdot y\right) \cdot z, 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}:\\ \;\;\;\;x + \frac{z - a \cdot x}{y}\\ \end{array} \]
    10. Add Preprocessing

    Alternative 5: 72.0% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\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} \leq 10^{+296}:\\ \;\;\;\;\frac{\mathsf{fma}\left(230661.510616, 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}:\\ \;\;\;\;x + \frac{z - a \cdot x}{y}\\ \end{array} \end{array} \]
    (FPCore (x y z t a b c i)
     :precision binary64
     (if (<=
          (/
           (+
            (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
            t)
           (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
          1e+296)
       (/ (fma 230661.510616 y t) (fma (fma (fma (+ a y) y b) y c) y i))
       (+ x (/ (- z (* a x)) y))))
    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
    	double tmp;
    	if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= 1e+296) {
    		tmp = fma(230661.510616, y, t) / fma(fma(fma((a + y), y, b), y, c), y, i);
    	} else {
    		tmp = x + ((z - (a * x)) / y);
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b, c, i)
    	tmp = 0.0
    	if (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)) <= 1e+296)
    		tmp = Float64(fma(230661.510616, y, t) / fma(fma(fma(Float64(a + y), y, b), y, c), y, i));
    	else
    		tmp = Float64(x + Float64(Float64(z - Float64(a * x)) / y));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[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], 1e+296], N[(N[(230661.510616 * y + t), $MachinePrecision] / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;\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} \leq 10^{+296}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(230661.510616, 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}:\\
    \;\;\;\;x + \frac{z - a \cdot x}{y}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 9.99999999999999981e295

      1. Initial program 92.6%

        \[\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 \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)}} \]
        2. +-commutativeN/A

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

          \[\leadsto \frac{\color{blue}{\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{\color{blue}{\mathsf{fma}\left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right), y, t\right)}}{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(\color{blue}{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(\color{blue}{\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(\color{blue}{\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(\color{blue}{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(\color{blue}{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(\color{blue}{\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)}{\color{blue}{y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) + i}} \]
        12. *-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)}{\color{blue}{\left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) \cdot y} + i} \]
        13. 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)}{\color{blue}{\mathsf{fma}\left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right), y, i\right)}} \]
      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)}} \]
      6. Taylor expanded in y around 0

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

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

        if 9.99999999999999981e295 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i))

        1. Initial program 0.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 0

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

            \[\leadsto \color{blue}{\frac{t}{i}} \]
        5. Applied rewrites3.9%

          \[\leadsto \color{blue}{\frac{t}{i}} \]
        6. Taylor expanded in y around -inf

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

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

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

            \[\leadsto x + \color{blue}{\left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right)} \]
          4. distribute-lft-out--N/A

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

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

            \[\leadsto x + \left(-\frac{\color{blue}{\mathsf{neg}\left(\left(z - a \cdot x\right)\right)}}{y}\right) \]
          7. lower-neg.f64N/A

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

            \[\leadsto x + \left(-\frac{-\color{blue}{\left(z - a \cdot x\right)}}{y}\right) \]
          9. lower-*.f6457.5

            \[\leadsto x + \left(-\frac{-\left(z - \color{blue}{a \cdot x}\right)}{y}\right) \]
        8. Applied rewrites57.5%

          \[\leadsto \color{blue}{x + \left(-\frac{-\left(z - a \cdot x\right)}{y}\right)} \]
      8. Recombined 2 regimes into one program.
      9. Final simplification70.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\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} \leq 10^{+296}:\\ \;\;\;\;\frac{\mathsf{fma}\left(230661.510616, 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}:\\ \;\;\;\;x + \frac{z - a \cdot x}{y}\\ \end{array} \]
      10. Add Preprocessing

      Alternative 6: 65.1% accurate, 0.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\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} \leq 10^{+296}:\\ \;\;\;\;\frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z - a \cdot x}{y}\\ \end{array} \end{array} \]
      (FPCore (x y z t a b c i)
       :precision binary64
       (if (<=
            (/
             (+
              (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
              t)
             (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
            1e+296)
         (/ t (fma (fma (fma (+ a y) y b) y c) y i))
         (+ x (/ (- z (* a x)) y))))
      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
      	double tmp;
      	if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= 1e+296) {
      		tmp = t / fma(fma(fma((a + y), y, b), y, c), y, i);
      	} else {
      		tmp = x + ((z - (a * x)) / y);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b, c, i)
      	tmp = 0.0
      	if (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)) <= 1e+296)
      		tmp = Float64(t / fma(fma(fma(Float64(a + y), y, b), y, c), y, i));
      	else
      		tmp = Float64(x + Float64(Float64(z - Float64(a * x)) / y));
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[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], 1e+296], N[(t / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;\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} \leq 10^{+296}:\\
      \;\;\;\;\frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;x + \frac{z - a \cdot x}{y}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 9.99999999999999981e295

        1. Initial program 92.6%

          \[\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 \color{blue}{\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
          2. +-commutativeN/A

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

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

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

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

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

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

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

            \[\leadsto \frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(a + y, y, b\right)}, y, c\right), y, i\right)} \]
          11. lower-+.f6468.8

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

          \[\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 9.99999999999999981e295 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i))

        1. Initial program 0.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 0

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

            \[\leadsto \color{blue}{\frac{t}{i}} \]
        5. Applied rewrites3.9%

          \[\leadsto \color{blue}{\frac{t}{i}} \]
        6. Taylor expanded in y around -inf

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

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

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

            \[\leadsto x + \color{blue}{\left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right)} \]
          4. distribute-lft-out--N/A

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

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

            \[\leadsto x + \left(-\frac{\color{blue}{\mathsf{neg}\left(\left(z - a \cdot x\right)\right)}}{y}\right) \]
          7. lower-neg.f64N/A

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

            \[\leadsto x + \left(-\frac{-\color{blue}{\left(z - a \cdot x\right)}}{y}\right) \]
          9. lower-*.f6457.5

            \[\leadsto x + \left(-\frac{-\left(z - \color{blue}{a \cdot x}\right)}{y}\right) \]
        8. Applied rewrites57.5%

          \[\leadsto \color{blue}{x + \left(-\frac{-\left(z - a \cdot x\right)}{y}\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification64.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\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} \leq 10^{+296}:\\ \;\;\;\;\frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z - a \cdot x}{y}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 7: 44.2% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\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} \leq 10^{+296}:\\ \;\;\;\;\frac{t}{i}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t} \cdot t\\ \end{array} \end{array} \]
      (FPCore (x y z t a b c i)
       :precision binary64
       (if (<=
            (/
             (+
              (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
              t)
             (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
            1e+296)
         (/ t i)
         (* (/ x t) t)))
      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
      	double tmp;
      	if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= 1e+296) {
      		tmp = t / i;
      	} else {
      		tmp = (x / t) * t;
      	}
      	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 ((((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= 1d+296) then
              tmp = t / i
          else
              tmp = (x / t) * t
          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 ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= 1e+296) {
      		tmp = t / i;
      	} else {
      		tmp = (x / t) * t;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b, c, i):
      	tmp = 0
      	if (((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= 1e+296:
      		tmp = t / i
      	else:
      		tmp = (x / t) * t
      	return tmp
      
      function code(x, y, z, t, a, b, c, i)
      	tmp = 0.0
      	if (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)) <= 1e+296)
      		tmp = Float64(t / i);
      	else
      		tmp = Float64(Float64(x / t) * t);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b, c, i)
      	tmp = 0.0;
      	if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= 1e+296)
      		tmp = t / i;
      	else
      		tmp = (x / t) * t;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[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], 1e+296], N[(t / i), $MachinePrecision], N[(N[(x / t), $MachinePrecision] * t), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;\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} \leq 10^{+296}:\\
      \;\;\;\;\frac{t}{i}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{x}{t} \cdot t\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 9.99999999999999981e295

        1. Initial program 92.6%

          \[\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-/.f6453.0

            \[\leadsto \color{blue}{\frac{t}{i}} \]
        5. Applied rewrites53.0%

          \[\leadsto \color{blue}{\frac{t}{i}} \]

        if 9.99999999999999981e295 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i))

        1. Initial program 0.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 t around inf

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

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

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

          \[\leadsto \color{blue}{\frac{\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}, 1\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)} \cdot t} \]
        6. Taylor expanded in y around inf

          \[\leadsto \frac{x}{t} \cdot t \]
        7. Step-by-step derivation
          1. Applied rewrites43.4%

            \[\leadsto \frac{x}{t} \cdot t \]
        8. Recombined 2 regimes into one program.
        9. Add Preprocessing

        Alternative 8: 70.5% accurate, 1.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -80000000000000 \lor \neg \left(y \leq 200000000000\right):\\ \;\;\;\;x + \frac{z - a \cdot x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{i + c \cdot y}\\ \end{array} \end{array} \]
        (FPCore (x y z t a b c i)
         :precision binary64
         (if (or (<= y -80000000000000.0) (not (<= y 200000000000.0)))
           (+ x (/ (- z (* a x)) y))
           (/ (fma (fma (fma z y 27464.7644705) y 230661.510616) y t) (+ i (* c y)))))
        double code(double x, double y, double z, double t, double a, double b, double c, double i) {
        	double tmp;
        	if ((y <= -80000000000000.0) || !(y <= 200000000000.0)) {
        		tmp = x + ((z - (a * x)) / y);
        	} else {
        		tmp = fma(fma(fma(z, y, 27464.7644705), y, 230661.510616), y, t) / (i + (c * y));
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b, c, i)
        	tmp = 0.0
        	if ((y <= -80000000000000.0) || !(y <= 200000000000.0))
        		tmp = Float64(x + Float64(Float64(z - Float64(a * x)) / y));
        	else
        		tmp = Float64(fma(fma(fma(z, y, 27464.7644705), y, 230661.510616), y, t) / Float64(i + Float64(c * y)));
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -80000000000000.0], N[Not[LessEqual[y, 200000000000.0]], $MachinePrecision]], N[(x + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(z * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(i + N[(c * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;y \leq -80000000000000 \lor \neg \left(y \leq 200000000000\right):\\
        \;\;\;\;x + \frac{z - a \cdot x}{y}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{i + c \cdot y}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < -8e13 or 2e11 < y

          1. Initial program 14.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 0

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

              \[\leadsto \color{blue}{\frac{t}{i}} \]
          5. Applied rewrites3.8%

            \[\leadsto \color{blue}{\frac{t}{i}} \]
          6. Taylor expanded in y around -inf

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

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

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

              \[\leadsto x + \color{blue}{\left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right)} \]
            4. distribute-lft-out--N/A

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

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

              \[\leadsto x + \left(-\frac{\color{blue}{\mathsf{neg}\left(\left(z - a \cdot x\right)\right)}}{y}\right) \]
            7. lower-neg.f64N/A

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

              \[\leadsto x + \left(-\frac{-\color{blue}{\left(z - a \cdot x\right)}}{y}\right) \]
            9. lower-*.f6449.5

              \[\leadsto x + \left(-\frac{-\left(z - \color{blue}{a \cdot x}\right)}{y}\right) \]
          8. Applied rewrites49.5%

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

          if -8e13 < y < 2e11

          1. Initial program 99.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 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 \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)}} \]
            2. +-commutativeN/A

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

              \[\leadsto \frac{\color{blue}{\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{\color{blue}{\mathsf{fma}\left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right), y, t\right)}}{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(\color{blue}{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(\color{blue}{\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(\color{blue}{\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(\color{blue}{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(\color{blue}{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(\color{blue}{\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)}{\color{blue}{y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) + i}} \]
            12. *-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)}{\color{blue}{\left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) \cdot y} + i} \]
            13. 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)}{\color{blue}{\mathsf{fma}\left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right), y, i\right)}} \]
          5. Applied rewrites95.8%

            \[\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)}} \]
          6. Taylor expanded in y around 0

            \[\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 + \color{blue}{c \cdot y}} \]
          7. Step-by-step derivation
            1. Applied rewrites86.1%

              \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{i + \color{blue}{c \cdot y}} \]
          8. Recombined 2 regimes into one program.
          9. Final simplification69.6%

            \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -80000000000000 \lor \neg \left(y \leq 200000000000\right):\\ \;\;\;\;x + \frac{z - a \cdot x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{i + c \cdot y}\\ \end{array} \]
          10. Add Preprocessing

          Alternative 9: 59.2% accurate, 1.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.65 \cdot 10^{-37} \lor \neg \left(y \leq 4.5 \cdot 10^{+15}\right):\\ \;\;\;\;x + \frac{z - a \cdot x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(27464.7644705 + y \cdot z, y, 230661.510616\right), y, t\right)}{i}\\ \end{array} \end{array} \]
          (FPCore (x y z t a b c i)
           :precision binary64
           (if (or (<= y -1.65e-37) (not (<= y 4.5e+15)))
             (+ x (/ (- z (* a x)) y))
             (/ (fma (fma (+ 27464.7644705 (* y z)) y 230661.510616) y t) i)))
          double code(double x, double y, double z, double t, double a, double b, double c, double i) {
          	double tmp;
          	if ((y <= -1.65e-37) || !(y <= 4.5e+15)) {
          		tmp = x + ((z - (a * x)) / y);
          	} else {
          		tmp = fma(fma((27464.7644705 + (y * z)), y, 230661.510616), y, t) / i;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b, c, i)
          	tmp = 0.0
          	if ((y <= -1.65e-37) || !(y <= 4.5e+15))
          		tmp = Float64(x + Float64(Float64(z - Float64(a * x)) / y));
          	else
          		tmp = Float64(fma(fma(Float64(27464.7644705 + Float64(y * z)), y, 230661.510616), y, t) / i);
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.65e-37], N[Not[LessEqual[y, 4.5e+15]], $MachinePrecision]], N[(x + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / i), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;y \leq -1.65 \cdot 10^{-37} \lor \neg \left(y \leq 4.5 \cdot 10^{+15}\right):\\
          \;\;\;\;x + \frac{z - a \cdot x}{y}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(27464.7644705 + y \cdot z, y, 230661.510616\right), y, t\right)}{i}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if y < -1.64999999999999991e-37 or 4.5e15 < y

            1. Initial program 18.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 \color{blue}{\frac{t}{i}} \]
            4. Step-by-step derivation
              1. lower-/.f643.7

                \[\leadsto \color{blue}{\frac{t}{i}} \]
            5. Applied rewrites3.7%

              \[\leadsto \color{blue}{\frac{t}{i}} \]
            6. Taylor expanded in y around -inf

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

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

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

                \[\leadsto x + \color{blue}{\left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right)} \]
              4. distribute-lft-out--N/A

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

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

                \[\leadsto x + \left(-\frac{\color{blue}{\mathsf{neg}\left(\left(z - a \cdot x\right)\right)}}{y}\right) \]
              7. lower-neg.f64N/A

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

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

                \[\leadsto x + \left(-\frac{-\left(z - \color{blue}{a \cdot x}\right)}{y}\right) \]
            8. Applied rewrites47.3%

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

            if -1.64999999999999991e-37 < y < 4.5e15

            1. Initial program 99.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 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 \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}} \]
              2. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{y \cdot x} + z, y, \frac{54929528941}{2000000}\right), y, \frac{28832688827}{125000}\right), y, t\right)}{i} \]
              13. lower-fma.f6474.0

                \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(y, x, z\right)}, y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{i} \]
            5. Applied rewrites74.0%

              \[\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 x around 0

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

                \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(27464.7644705 + y \cdot z, y, 230661.510616\right), y, t\right)}{i} \]
            8. Recombined 2 regimes into one program.
            9. Final simplification61.1%

              \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.65 \cdot 10^{-37} \lor \neg \left(y \leq 4.5 \cdot 10^{+15}\right):\\ \;\;\;\;x + \frac{z - a \cdot x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(27464.7644705 + y \cdot z, y, 230661.510616\right), y, t\right)}{i}\\ \end{array} \]
            10. Add Preprocessing

            Alternative 10: 58.3% accurate, 1.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.65 \cdot 10^{-37} \lor \neg \left(y \leq 4.5 \cdot 10^{+15}\right):\\ \;\;\;\;x + \frac{z - a \cdot x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + 27464.7644705 \cdot y\right)}{i}\\ \end{array} \end{array} \]
            (FPCore (x y z t a b c i)
             :precision binary64
             (if (or (<= y -1.65e-37) (not (<= y 4.5e+15)))
               (+ x (/ (- z (* a x)) y))
               (/ (+ t (* y (+ 230661.510616 (* 27464.7644705 y)))) i)))
            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
            	double tmp;
            	if ((y <= -1.65e-37) || !(y <= 4.5e+15)) {
            		tmp = x + ((z - (a * x)) / y);
            	} else {
            		tmp = (t + (y * (230661.510616 + (27464.7644705 * y)))) / i;
            	}
            	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.65d-37)) .or. (.not. (y <= 4.5d+15))) then
                    tmp = x + ((z - (a * x)) / y)
                else
                    tmp = (t + (y * (230661.510616d0 + (27464.7644705d0 * y)))) / i
                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.65e-37) || !(y <= 4.5e+15)) {
            		tmp = x + ((z - (a * x)) / y);
            	} else {
            		tmp = (t + (y * (230661.510616 + (27464.7644705 * y)))) / i;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b, c, i):
            	tmp = 0
            	if (y <= -1.65e-37) or not (y <= 4.5e+15):
            		tmp = x + ((z - (a * x)) / y)
            	else:
            		tmp = (t + (y * (230661.510616 + (27464.7644705 * y)))) / i
            	return tmp
            
            function code(x, y, z, t, a, b, c, i)
            	tmp = 0.0
            	if ((y <= -1.65e-37) || !(y <= 4.5e+15))
            		tmp = Float64(x + Float64(Float64(z - Float64(a * x)) / y));
            	else
            		tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(27464.7644705 * y)))) / i);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a, b, c, i)
            	tmp = 0.0;
            	if ((y <= -1.65e-37) || ~((y <= 4.5e+15)))
            		tmp = x + ((z - (a * x)) / y);
            	else
            		tmp = (t + (y * (230661.510616 + (27464.7644705 * y)))) / i;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.65e-37], N[Not[LessEqual[y, 4.5e+15]], $MachinePrecision]], N[(x + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(27464.7644705 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;y \leq -1.65 \cdot 10^{-37} \lor \neg \left(y \leq 4.5 \cdot 10^{+15}\right):\\
            \;\;\;\;x + \frac{z - a \cdot x}{y}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{t + y \cdot \left(230661.510616 + 27464.7644705 \cdot y\right)}{i}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if y < -1.64999999999999991e-37 or 4.5e15 < y

              1. Initial program 18.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 \color{blue}{\frac{t}{i}} \]
              4. Step-by-step derivation
                1. lower-/.f643.7

                  \[\leadsto \color{blue}{\frac{t}{i}} \]
              5. Applied rewrites3.7%

                \[\leadsto \color{blue}{\frac{t}{i}} \]
              6. Taylor expanded in y around -inf

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

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

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

                  \[\leadsto x + \color{blue}{\left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right)} \]
                4. distribute-lft-out--N/A

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

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

                  \[\leadsto x + \left(-\frac{\color{blue}{\mathsf{neg}\left(\left(z - a \cdot x\right)\right)}}{y}\right) \]
                7. lower-neg.f64N/A

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

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

                  \[\leadsto x + \left(-\frac{-\left(z - \color{blue}{a \cdot x}\right)}{y}\right) \]
              8. Applied rewrites47.3%

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

              if -1.64999999999999991e-37 < y < 4.5e15

              1. Initial program 99.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 \color{blue}{y \cdot \left(\left(\frac{28832688827}{125000} \cdot \frac{1}{i} + y \cdot \left(\frac{54929528941}{2000000} \cdot \frac{1}{i} - \left(\frac{b \cdot t}{{i}^{2}} + \frac{c \cdot \left(\frac{28832688827}{125000} \cdot \frac{1}{i} - \frac{c \cdot t}{{i}^{2}}\right)}{i}\right)\right)\right) - \frac{c \cdot t}{{i}^{2}}\right) + \frac{t}{i}} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

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

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\frac{28832688827}{125000} \cdot \frac{1}{i} + y \cdot \left(\frac{54929528941}{2000000} \cdot \frac{1}{i} - \left(\frac{b \cdot t}{{i}^{2}} + \frac{c \cdot \left(\frac{28832688827}{125000} \cdot \frac{1}{i} - \frac{c \cdot t}{{i}^{2}}\right)}{i}\right)\right)\right) - \frac{c \cdot t}{{i}^{2}}, y, \frac{t}{i}\right)} \]
              5. Applied rewrites62.6%

                \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\frac{27464.7644705}{i} - \mathsf{fma}\left(c, \frac{\frac{230661.510616}{i} - \frac{c}{i} \cdot \frac{t}{i}}{i}, \frac{b}{i} \cdot \frac{t}{i}\right), y, \frac{230661.510616}{i}\right) - \frac{c}{i} \cdot \frac{t}{i}, y, \frac{t}{i}\right)} \]
              6. Taylor expanded in i around inf

                \[\leadsto \frac{t + y \cdot \left(\frac{28832688827}{125000} + \frac{54929528941}{2000000} \cdot y\right)}{\color{blue}{i}} \]
              7. Step-by-step derivation
                1. Applied rewrites72.1%

                  \[\leadsto \frac{t + y \cdot \left(230661.510616 + 27464.7644705 \cdot y\right)}{\color{blue}{i}} \]
              8. Recombined 2 regimes into one program.
              9. Final simplification60.4%

                \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.65 \cdot 10^{-37} \lor \neg \left(y \leq 4.5 \cdot 10^{+15}\right):\\ \;\;\;\;x + \frac{z - a \cdot x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + 27464.7644705 \cdot y\right)}{i}\\ \end{array} \]
              10. Add Preprocessing

              Alternative 11: 55.2% accurate, 2.0× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.5 \cdot 10^{-10} \lor \neg \left(y \leq 75000000000\right):\\ \;\;\;\;x + \frac{z - a \cdot x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{i}\\ \end{array} \end{array} \]
              (FPCore (x y z t a b c i)
               :precision binary64
               (if (or (<= y -4.5e-10) (not (<= y 75000000000.0)))
                 (+ x (/ (- z (* a x)) y))
                 (/ t i)))
              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
              	double tmp;
              	if ((y <= -4.5e-10) || !(y <= 75000000000.0)) {
              		tmp = x + ((z - (a * x)) / y);
              	} else {
              		tmp = t / i;
              	}
              	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 <= (-4.5d-10)) .or. (.not. (y <= 75000000000.0d0))) then
                      tmp = x + ((z - (a * x)) / y)
                  else
                      tmp = t / i
                  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 <= -4.5e-10) || !(y <= 75000000000.0)) {
              		tmp = x + ((z - (a * x)) / y);
              	} else {
              		tmp = t / i;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b, c, i):
              	tmp = 0
              	if (y <= -4.5e-10) or not (y <= 75000000000.0):
              		tmp = x + ((z - (a * x)) / y)
              	else:
              		tmp = t / i
              	return tmp
              
              function code(x, y, z, t, a, b, c, i)
              	tmp = 0.0
              	if ((y <= -4.5e-10) || !(y <= 75000000000.0))
              		tmp = Float64(x + Float64(Float64(z - Float64(a * x)) / y));
              	else
              		tmp = Float64(t / i);
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b, c, i)
              	tmp = 0.0;
              	if ((y <= -4.5e-10) || ~((y <= 75000000000.0)))
              		tmp = x + ((z - (a * x)) / y);
              	else
              		tmp = t / i;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -4.5e-10], N[Not[LessEqual[y, 75000000000.0]], $MachinePrecision]], N[(x + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(t / i), $MachinePrecision]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;y \leq -4.5 \cdot 10^{-10} \lor \neg \left(y \leq 75000000000\right):\\
              \;\;\;\;x + \frac{z - a \cdot x}{y}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{t}{i}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if y < -4.5e-10 or 7.5e10 < y

                1. Initial program 15.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 \color{blue}{\frac{t}{i}} \]
                4. Step-by-step derivation
                  1. lower-/.f643.7

                    \[\leadsto \color{blue}{\frac{t}{i}} \]
                5. Applied rewrites3.7%

                  \[\leadsto \color{blue}{\frac{t}{i}} \]
                6. Taylor expanded in y around -inf

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

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

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

                    \[\leadsto x + \color{blue}{\left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right)} \]
                  4. distribute-lft-out--N/A

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

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

                    \[\leadsto x + \left(-\frac{\color{blue}{\mathsf{neg}\left(\left(z - a \cdot x\right)\right)}}{y}\right) \]
                  7. lower-neg.f64N/A

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

                    \[\leadsto x + \left(-\frac{-\color{blue}{\left(z - a \cdot x\right)}}{y}\right) \]
                  9. lower-*.f6448.8

                    \[\leadsto x + \left(-\frac{-\left(z - \color{blue}{a \cdot x}\right)}{y}\right) \]
                8. Applied rewrites48.8%

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

                if -4.5e-10 < y < 7.5e10

                1. Initial program 99.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 \color{blue}{\frac{t}{i}} \]
                4. Step-by-step derivation
                  1. lower-/.f6463.7

                    \[\leadsto \color{blue}{\frac{t}{i}} \]
                5. Applied rewrites63.7%

                  \[\leadsto \color{blue}{\frac{t}{i}} \]
              3. Recombined 2 regimes into one program.
              4. Final simplification56.9%

                \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.5 \cdot 10^{-10} \lor \neg \left(y \leq 75000000000\right):\\ \;\;\;\;x + \frac{z - a \cdot x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{i}\\ \end{array} \]
              5. Add Preprocessing

              Alternative 12: 32.6% accurate, 3.9× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 75000000000:\\ \;\;\;\;\frac{t}{i}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{y}\\ \end{array} \end{array} \]
              (FPCore (x y z t a b c i)
               :precision binary64
               (if (<= y 75000000000.0) (/ t i) (/ z y)))
              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
              	double tmp;
              	if (y <= 75000000000.0) {
              		tmp = t / i;
              	} else {
              		tmp = z / y;
              	}
              	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 <= 75000000000.0d0) then
                      tmp = t / i
                  else
                      tmp = z / y
                  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 <= 75000000000.0) {
              		tmp = t / i;
              	} else {
              		tmp = z / y;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b, c, i):
              	tmp = 0
              	if y <= 75000000000.0:
              		tmp = t / i
              	else:
              		tmp = z / y
              	return tmp
              
              function code(x, y, z, t, a, b, c, i)
              	tmp = 0.0
              	if (y <= 75000000000.0)
              		tmp = Float64(t / i);
              	else
              		tmp = Float64(z / y);
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b, c, i)
              	tmp = 0.0;
              	if (y <= 75000000000.0)
              		tmp = t / i;
              	else
              		tmp = z / y;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 75000000000.0], N[(t / i), $MachinePrecision], N[(z / y), $MachinePrecision]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;y \leq 75000000000:\\
              \;\;\;\;\frac{t}{i}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{z}{y}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if y < 7.5e10

                1. Initial program 72.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 \color{blue}{\frac{t}{i}} \]
                4. Step-by-step derivation
                  1. lower-/.f6446.0

                    \[\leadsto \color{blue}{\frac{t}{i}} \]
                5. Applied rewrites46.0%

                  \[\leadsto \color{blue}{\frac{t}{i}} \]

                if 7.5e10 < y

                1. Initial program 21.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 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 \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)}} \]
                  2. +-commutativeN/A

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

                    \[\leadsto \frac{\color{blue}{\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{\color{blue}{\mathsf{fma}\left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right), y, t\right)}}{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(\color{blue}{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(\color{blue}{\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(\color{blue}{\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(\color{blue}{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(\color{blue}{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(\color{blue}{\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)}{\color{blue}{y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) + i}} \]
                  12. *-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)}{\color{blue}{\left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) \cdot y} + i} \]
                  13. 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)}{\color{blue}{\mathsf{fma}\left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right), y, i\right)}} \]
                5. Applied rewrites18.1%

                  \[\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)}} \]
                6. Taylor expanded in y around inf

                  \[\leadsto \frac{z}{\color{blue}{y}} \]
                7. Step-by-step derivation
                  1. Applied rewrites20.4%

                    \[\leadsto \frac{z}{\color{blue}{y}} \]
                8. Recombined 2 regimes into one program.
                9. Add Preprocessing

                Alternative 13: 10.6% accurate, 5.9× speedup?

                \[\begin{array}{l} \\ \frac{z}{y} \end{array} \]
                (FPCore (x y z t a b c i) :precision binary64 (/ z y))
                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                	return z / y;
                }
                
                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 = z / y
                end function
                
                public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                	return z / y;
                }
                
                def code(x, y, z, t, a, b, c, i):
                	return z / y
                
                function code(x, y, z, t, a, b, c, i)
                	return Float64(z / y)
                end
                
                function tmp = code(x, y, z, t, a, b, c, i)
                	tmp = z / y;
                end
                
                code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(z / y), $MachinePrecision]
                
                \begin{array}{l}
                
                \\
                \frac{z}{y}
                \end{array}
                
                Derivation
                1. Initial program 61.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 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 \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)}} \]
                  2. +-commutativeN/A

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

                    \[\leadsto \frac{\color{blue}{\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{\color{blue}{\mathsf{fma}\left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right), y, t\right)}}{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(\color{blue}{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(\color{blue}{\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(\color{blue}{\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(\color{blue}{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(\color{blue}{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(\color{blue}{\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)}{\color{blue}{y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) + i}} \]
                  12. *-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)}{\color{blue}{\left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) \cdot y} + i} \]
                  13. 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)}{\color{blue}{\mathsf{fma}\left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right), y, i\right)}} \]
                5. Applied rewrites58.2%

                  \[\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)}} \]
                6. Taylor expanded in y around inf

                  \[\leadsto \frac{z}{\color{blue}{y}} \]
                7. Step-by-step derivation
                  1. Applied rewrites9.4%

                    \[\leadsto \frac{z}{\color{blue}{y}} \]
                  2. Add Preprocessing

                  Reproduce

                  ?
                  herbie shell --seed 2025017 
                  (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)))