Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2

Percentage Accurate: 56.7% → 83.0%
Time: 10.8s
Alternatives: 15
Speedup: 2.0×

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 15 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.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (/
  (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t)
  (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i):
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 83.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{+52} \lor \neg \left(y \leq 7 \cdot 10^{+61}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{-\left(z - a \cdot x\right)}{y}, -1, x\right)\\

\mathbf{else}:\\
\;\;\;\;\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}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.25e52 or 7.00000000000000036e61 < y

    1. Initial program 3.1%

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

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

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

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

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

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

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

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

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

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

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

    if -2.25e52 < y < 7.00000000000000036e61

    1. Initial program 90.9%

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

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

Alternative 2: 83.1% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)\\
\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 \infty:\\
\;\;\;\;\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}, \frac{t}{t\_1}\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{-\left(z - a \cdot x\right)}{y}, -1, x\right)\\


\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)) < +inf.0

    1. Initial program 85.5%

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

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

    if +inf.0 < (/.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.0%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1 \cdot \left(z - a \cdot x\right)}{y}, -1, x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification80.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 \infty:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right), y, 230661.510616\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}, \frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-\left(z - a \cdot x\right)}{y}, -1, x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 83.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{+52} \lor \neg \left(y \leq 7 \cdot 10^{+61}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{-\left(z - a \cdot x\right)}{y}, -1, x\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, 230661.510616, \left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right) \cdot y\right) \cdot y\right) + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.25e52 or 7.00000000000000036e61 < y

    1. Initial program 3.1%

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

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

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

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

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

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

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

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

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

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

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

    if -2.25e52 < y < 7.00000000000000036e61

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(\color{blue}{y \cdot \left(\frac{54929528941}{2000000} + y \cdot \left(z + x \cdot y\right)\right)} + \frac{28832688827}{125000}\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      12. +-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}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      13. *-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}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      14. distribute-rgt-inN/A

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

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

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

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

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

Alternative 4: 79.4% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{+52} \lor \neg \left(y \leq 6.4 \cdot 10^{+61}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{-\left(z - a \cdot x\right)}{y}, -1, x\right)\\

\mathbf{else}:\\
\;\;\;\;\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)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, y, b\right), y, c\right), y, i\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.25e52 or 6.3999999999999997e61 < y

    1. Initial program 3.1%

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

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

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

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

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

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

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

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

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

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

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

    if -2.25e52 < y < 6.3999999999999997e61

    1. Initial program 90.9%

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

      \[\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 + y \cdot \left(c + y \cdot \left(b + {y}^{2}\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

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

      \[\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)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, y, b\right), y, c\right), y, i\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification78.7%

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

Alternative 5: 79.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.16 \cdot 10^{+52} \lor \neg \left(y \leq 6.4 \cdot 10^{+61}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{-\left(z - a \cdot x\right)}{y}, -1, x\right)\\

\mathbf{else}:\\
\;\;\;\;\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)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.15999999999999993e52 or 6.3999999999999997e61 < y

    1. Initial program 3.1%

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

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

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

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

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

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

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

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

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

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

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

    if -2.15999999999999993e52 < y < 6.3999999999999997e61

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, y, \frac{54929528941}{2000000}\right), y, \frac{28832688827}{125000}\right), y, t\right)}{y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) + \color{blue}{i}} \]
    5. Applied rewrites83.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)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification77.4%

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

Alternative 6: 73.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+49} \lor \neg \left(y \leq 8.8 \cdot 10^{+43}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{-\left(z - a \cdot x\right)}{y}, -1, x\right)\\

\mathbf{else}:\\
\;\;\;\;\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(c, y, i\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.1e49 or 8.80000000000000002e43 < y

    1. Initial program 4.7%

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

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

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

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

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

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

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

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

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

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

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

    if -1.1e49 < y < 8.80000000000000002e43

    1. Initial program 92.7%

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

      \[\leadsto \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}{i + c \cdot y}} \]
    4. Step-by-step derivation
      1. +-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}{c \cdot y + \color{blue}{i}} \]
      2. lower-fma.f6478.0

        \[\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(c, \color{blue}{y}, i\right)} \]
    5. Applied rewrites78.0%

      \[\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(c, y, i\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification72.8%

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

Alternative 7: 73.2% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+49} \lor \neg \left(y \leq 8.8 \cdot 10^{+43}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{-\left(z - a \cdot x\right)}{y}, -1, x\right)\\

\mathbf{else}:\\
\;\;\;\;\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)}{\mathsf{fma}\left(c, y, i\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.1e49 or 8.80000000000000002e43 < y

    1. Initial program 4.7%

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

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

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

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

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

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

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

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

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

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

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

    if -1.1e49 < y < 8.80000000000000002e43

    1. Initial program 92.7%

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

      \[\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 + y \cdot \left(c + {y}^{2} \cdot \left(a + y\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

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

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

        \[\leadsto \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)}{\mathsf{fma}\left(c, y, i\right)} \]
    8. Recombined 2 regimes into one program.
    9. Final simplification72.8%

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

    Alternative 8: 74.6% accurate, 1.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

      if -2.55e14 < y < 7.99999999999999963e37

      1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.55 \cdot 10^{+14} \lor \neg \left(y \leq 8 \cdot 10^{+37}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{-\left(z - a \cdot x\right)}{y}, -1, x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}\\ \end{array} \]
      7. Add Preprocessing

      Alternative 9: 72.8% accurate, 1.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

        if -2.55e14 < y < 7.99999999999999963e37

        1. Initial program 96.7%

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

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

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.55 \cdot 10^{+14} \lor \neg \left(y \leq 8 \cdot 10^{+37}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{-\left(z - a \cdot x\right)}{y}, -1, x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{230661.510616 \cdot y + t}{\left(b \cdot y + c\right) \cdot y + i}\\ \end{array} \]
          6. Add Preprocessing

          Alternative 10: 72.8% accurate, 1.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

            if -2.55e14 < y < 7.99999999999999963e37

            1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]
              4. 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}{b}, y, c\right), y, i\right)} \]
              5. Step-by-step derivation
                1. Applied rewrites79.1%

                  \[\leadsto \frac{\mathsf{fma}\left(230661.510616, y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{b}, y, c\right), y, i\right)} \]
              6. Recombined 2 regimes into one program.
              7. Final simplification70.9%

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

              Alternative 11: 68.1% accurate, 1.7× speedup?

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

                1. Initial program 8.2%

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

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

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

                  if -3.9e17 < y < 9.6e16

                  1. Initial program 99.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 \frac{\color{blue}{\frac{28832688827}{125000}} \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
                  4. Step-by-step derivation
                    1. Applied rewrites83.5%

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]
                    4. 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}{b}, y, c\right), y, i\right)} \]
                    5. Step-by-step derivation
                      1. Applied rewrites81.6%

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

                    Alternative 12: 64.6% accurate, 2.0× speedup?

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

                      1. Initial program 10.8%

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

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

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

                        if -1.02e6 < y < 1.8e6

                        1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{\mathsf{fma}\left(\frac{28832688827}{125000}, y, t\right)}{\mathsf{fma}\left(\color{blue}{c}, y, i\right)} \]
                          5. Step-by-step derivation
                            1. Applied rewrites77.6%

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

                          Alternative 13: 54.7% accurate, 2.4× speedup?

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

                            1. Initial program 13.3%

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

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

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

                              if -0.0140000000000000003 < y < 0.00220000000000000013

                              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 \frac{\color{blue}{\frac{28832688827}{125000}} \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
                              4. Step-by-step derivation
                                1. Applied rewrites88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 14: 51.4% accurate, 3.0× speedup?

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

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

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

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

                                    if -3.9e15 < y < 1.75

                                    1. Initial program 99.7%

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

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

                                        \[\leadsto \frac{t}{\color{blue}{i}} \]
                                    5. Applied rewrites52.6%

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

                                  Alternative 15: 25.4% accurate, 71.0× speedup?

                                  \[\begin{array}{l} \\ x \end{array} \]
                                  (FPCore (x y z t a b c i) :precision binary64 x)
                                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                  	return x;
                                  }
                                  
                                  module fmin_fmax_functions
                                      implicit none
                                      private
                                      public fmax
                                      public fmin
                                  
                                      interface fmax
                                          module procedure fmax88
                                          module procedure fmax44
                                          module procedure fmax84
                                          module procedure fmax48
                                      end interface
                                      interface fmin
                                          module procedure fmin88
                                          module procedure fmin44
                                          module procedure fmin84
                                          module procedure fmin48
                                      end interface
                                  contains
                                      real(8) function fmax88(x, y) result (res)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                      end function
                                      real(4) function fmax44(x, y) result (res)
                                          real(4), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                      end function
                                      real(8) function fmax84(x, y) result(res)
                                          real(8), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                      end function
                                      real(8) function fmax48(x, y) result(res)
                                          real(4), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                      end function
                                      real(8) function fmin88(x, y) result (res)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                      end function
                                      real(4) function fmin44(x, y) result (res)
                                          real(4), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                      end function
                                      real(8) function fmin84(x, y) result(res)
                                          real(8), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                      end function
                                      real(8) function fmin48(x, y) result(res)
                                          real(4), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                      end function
                                  end module
                                  
                                  real(8) function code(x, y, z, t, a, b, c, i)
                                  use fmin_fmax_functions
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      real(8), intent (in) :: z
                                      real(8), intent (in) :: t
                                      real(8), intent (in) :: a
                                      real(8), intent (in) :: b
                                      real(8), intent (in) :: c
                                      real(8), intent (in) :: i
                                      code = x
                                  end function
                                  
                                  public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                  	return x;
                                  }
                                  
                                  def code(x, y, z, t, a, b, c, i):
                                  	return x
                                  
                                  function code(x, y, z, t, a, b, c, i)
                                  	return x
                                  end
                                  
                                  function tmp = code(x, y, z, t, a, b, c, i)
                                  	tmp = x;
                                  end
                                  
                                  code[x_, y_, z_, t_, a_, b_, c_, i_] := x
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  x
                                  \end{array}
                                  
                                  Derivation
                                  1. Initial program 51.1%

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

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

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

                                    Reproduce

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