Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, D

Percentage Accurate: 59.1% → 98.2%
Time: 6.6s
Alternatives: 16
Speedup: 8.8×

Specification

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

\\
x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}
\end{array}

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 59.1% accurate, 1.0× speedup?

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

\\
x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}
\end{array}

Alternative 1: 98.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \left(\left(3.13060547623 + \mathsf{fma}\left(457.9610022158428, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - 36.52704169880642 \cdot \frac{1}{z}\right)\\ \mathbf{if}\;z \leq -5.7 \cdot 10^{+41}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{+26}:\\ \;\;\;\;x + \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(3.13060547623, z, 11.1667541262\right), z, t\right), z, a\right), z, b\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(15.234687407 + z, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)} \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1
         (+
          x
          (*
           y
           (-
            (+
             3.13060547623
             (fma 457.9610022158428 (/ 1.0 (* z z)) (/ t (* z z))))
            (* 36.52704169880642 (/ 1.0 z)))))))
   (if (<= z -5.7e+41)
     t_1
     (if (<= z 2.15e+26)
       (+
        x
        (*
         (/
          (fma (fma (fma (fma 3.13060547623 z 11.1667541262) z t) z a) z b)
          (fma
           (fma (fma (+ 15.234687407 z) z 31.4690115749) z 11.9400905721)
           z
           0.607771387771))
         y))
       t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (y * ((3.13060547623 + fma(457.9610022158428, (1.0 / (z * z)), (t / (z * z)))) - (36.52704169880642 * (1.0 / z))));
	double tmp;
	if (z <= -5.7e+41) {
		tmp = t_1;
	} else if (z <= 2.15e+26) {
		tmp = x + ((fma(fma(fma(fma(3.13060547623, z, 11.1667541262), z, t), z, a), z, b) / fma(fma(fma((15.234687407 + z), z, 31.4690115749), z, 11.9400905721), z, 0.607771387771)) * y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(y * Float64(Float64(3.13060547623 + fma(457.9610022158428, Float64(1.0 / Float64(z * z)), Float64(t / Float64(z * z)))) - Float64(36.52704169880642 * Float64(1.0 / z)))))
	tmp = 0.0
	if (z <= -5.7e+41)
		tmp = t_1;
	elseif (z <= 2.15e+26)
		tmp = Float64(x + Float64(Float64(fma(fma(fma(fma(3.13060547623, z, 11.1667541262), z, t), z, a), z, b) / fma(fma(fma(Float64(15.234687407 + z), z, 31.4690115749), z, 11.9400905721), z, 0.607771387771)) * y));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(3.13060547623 + N[(457.9610022158428 * N[(1.0 / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(36.52704169880642 * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.7e+41], t$95$1, If[LessEqual[z, 2.15e+26], N[(x + N[(N[(N[(N[(N[(N[(3.13060547623 * z + 11.1667541262), $MachinePrecision] * z + t), $MachinePrecision] * z + a), $MachinePrecision] * z + b), $MachinePrecision] / N[(N[(N[(N[(15.234687407 + z), $MachinePrecision] * z + 31.4690115749), $MachinePrecision] * z + 11.9400905721), $MachinePrecision] * z + 0.607771387771), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 2.15 \cdot 10^{+26}:\\
\;\;\;\;x + \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(3.13060547623, z, 11.1667541262\right), z, t\right), z, a\right), z, b\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(15.234687407 + z, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)} \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.70000000000000021e41 or 2.1499999999999999e26 < z

    1. Initial program 8.9%

      \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    2. Taylor expanded in z around -inf

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z} + \frac{313060547623}{100000000000} \cdot y\right)} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x + \left(\frac{313060547623}{100000000000} \cdot y + \color{blue}{-1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}}\right) \]
      2. lower-fma.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, \color{blue}{y}, -1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
      3. mul-1-negN/A

        \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, \mathsf{neg}\left(\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right)\right) \]
      4. lower-neg.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
      5. lower-/.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
    4. Applied rewrites85.6%

      \[\leadsto x + \color{blue}{\mathsf{fma}\left(3.13060547623, y, -\frac{\mathsf{fma}\left(-11.1667541262, y, -\frac{t \cdot y - \mathsf{fma}\left(-15.234687407, y \cdot 36.52704169880642, 98.5170599679272 \cdot y\right)}{z}\right) - -47.69379582500642 \cdot y}{z}\right)} \]
    5. Taylor expanded in y around inf

      \[\leadsto x + y \cdot \color{blue}{\left(\left(\frac{313060547623}{100000000000} + \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \color{blue}{\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}}\right) \]
      2. lower--.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \color{blue}{\frac{1}{z}}\right) \]
      3. lower-+.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{\color{blue}{1}}{z}\right) \]
      4. lower-fma.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{{z}^{2}}, \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      5. lower-/.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{{z}^{2}}, \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      6. unpow2N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      7. lower-*.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      8. lower-/.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      9. unpow2N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      10. lower-*.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      11. lower-*.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{\color{blue}{z}}\right) \]
      12. lower-/.f6496.8

        \[\leadsto x + y \cdot \left(\left(3.13060547623 + \mathsf{fma}\left(457.9610022158428, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - 36.52704169880642 \cdot \frac{1}{z}\right) \]
    7. Applied rewrites96.8%

      \[\leadsto x + y \cdot \color{blue}{\left(\left(3.13060547623 + \mathsf{fma}\left(457.9610022158428, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - 36.52704169880642 \cdot \frac{1}{z}\right)} \]

    if -5.70000000000000021e41 < z < 2.1499999999999999e26

    1. Initial program 98.3%

      \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    2. Applied rewrites99.2%

      \[\leadsto x + \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(3.13060547623, z, 11.1667541262\right), z, t\right), z, a\right), z, b\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(15.234687407 + z, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)} \cdot y} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 96.9% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \left(\left(3.13060547623 + \mathsf{fma}\left(457.9610022158428, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - 36.52704169880642 \cdot \frac{1}{z}\right)\\ \mathbf{if}\;z \leq -7.5 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+21}:\\ \;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(\mathsf{fma}\left(t, z, a\right), z, b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1
         (+
          x
          (*
           y
           (-
            (+
             3.13060547623
             (fma 457.9610022158428 (/ 1.0 (* z z)) (/ t (* z z))))
            (* 36.52704169880642 (/ 1.0 z)))))))
   (if (<= z -7.5e+40)
     t_1
     (if (<= z 8.5e+21)
       (+
        x
        (/
         (* y (fma (fma t z a) z b))
         (+
          (*
           (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
           z)
          0.607771387771)))
       t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (y * ((3.13060547623 + fma(457.9610022158428, (1.0 / (z * z)), (t / (z * z)))) - (36.52704169880642 * (1.0 / z))));
	double tmp;
	if (z <= -7.5e+40) {
		tmp = t_1;
	} else if (z <= 8.5e+21) {
		tmp = x + ((y * fma(fma(t, z, a), z, b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(y * Float64(Float64(3.13060547623 + fma(457.9610022158428, Float64(1.0 / Float64(z * z)), Float64(t / Float64(z * z)))) - Float64(36.52704169880642 * Float64(1.0 / z)))))
	tmp = 0.0
	if (z <= -7.5e+40)
		tmp = t_1;
	elseif (z <= 8.5e+21)
		tmp = Float64(x + Float64(Float64(y * fma(fma(t, z, a), z, b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(3.13060547623 + N[(457.9610022158428 * N[(1.0 / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(36.52704169880642 * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e+40], t$95$1, If[LessEqual[z, 8.5e+21], N[(x + N[(N[(y * N[(N[(t * z + a), $MachinePrecision] * z + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 8.5 \cdot 10^{+21}:\\
\;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(\mathsf{fma}\left(t, z, a\right), z, b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.4999999999999996e40 or 8.5e21 < z

    1. Initial program 9.6%

      \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    2. Taylor expanded in z around -inf

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z} + \frac{313060547623}{100000000000} \cdot y\right)} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x + \left(\frac{313060547623}{100000000000} \cdot y + \color{blue}{-1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}}\right) \]
      2. lower-fma.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, \color{blue}{y}, -1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
      3. mul-1-negN/A

        \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, \mathsf{neg}\left(\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right)\right) \]
      4. lower-neg.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
      5. lower-/.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
    4. Applied rewrites85.3%

      \[\leadsto x + \color{blue}{\mathsf{fma}\left(3.13060547623, y, -\frac{\mathsf{fma}\left(-11.1667541262, y, -\frac{t \cdot y - \mathsf{fma}\left(-15.234687407, y \cdot 36.52704169880642, 98.5170599679272 \cdot y\right)}{z}\right) - -47.69379582500642 \cdot y}{z}\right)} \]
    5. Taylor expanded in y around inf

      \[\leadsto x + y \cdot \color{blue}{\left(\left(\frac{313060547623}{100000000000} + \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \color{blue}{\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}}\right) \]
      2. lower--.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \color{blue}{\frac{1}{z}}\right) \]
      3. lower-+.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{\color{blue}{1}}{z}\right) \]
      4. lower-fma.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{{z}^{2}}, \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      5. lower-/.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{{z}^{2}}, \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      6. unpow2N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      7. lower-*.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      8. lower-/.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      9. unpow2N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      10. lower-*.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      11. lower-*.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{\color{blue}{z}}\right) \]
      12. lower-/.f6496.5

        \[\leadsto x + y \cdot \left(\left(3.13060547623 + \mathsf{fma}\left(457.9610022158428, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - 36.52704169880642 \cdot \frac{1}{z}\right) \]
    7. Applied rewrites96.5%

      \[\leadsto x + y \cdot \color{blue}{\left(\left(3.13060547623 + \mathsf{fma}\left(457.9610022158428, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - 36.52704169880642 \cdot \frac{1}{z}\right)} \]

    if -7.4999999999999996e40 < z < 8.5e21

    1. Initial program 98.5%

      \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    2. Taylor expanded in z around 0

      \[\leadsto x + \frac{y \cdot \color{blue}{\left(b + z \cdot \left(a + t \cdot z\right)\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x + \frac{y \cdot \left(z \cdot \left(a + t \cdot z\right) + \color{blue}{b}\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
      2. *-commutativeN/A

        \[\leadsto x + \frac{y \cdot \left(\left(a + t \cdot z\right) \cdot z + b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
      3. lower-fma.f64N/A

        \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(a + t \cdot z, \color{blue}{z}, b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
      4. +-commutativeN/A

        \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(t \cdot z + a, z, b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
      5. lower-fma.f6497.2

        \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(\mathsf{fma}\left(t, z, a\right), z, b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    4. Applied rewrites97.2%

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

Alternative 3: 96.4% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \left(\left(3.13060547623 + \mathsf{fma}\left(457.9610022158428, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - 36.52704169880642 \cdot \frac{1}{z}\right)\\ \mathbf{if}\;z \leq -13:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 265000000:\\ \;\;\;\;x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\mathsf{fma}\left(11.9400905721, z, 0.607771387771\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1
         (+
          x
          (*
           y
           (-
            (+
             3.13060547623
             (fma 457.9610022158428 (/ 1.0 (* z z)) (/ t (* z z))))
            (* 36.52704169880642 (/ 1.0 z)))))))
   (if (<= z -13.0)
     t_1
     (if (<= z 265000000.0)
       (+
        x
        (/
         (*
          y
          (+
           (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
           b))
         (fma 11.9400905721 z 0.607771387771)))
       t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (y * ((3.13060547623 + fma(457.9610022158428, (1.0 / (z * z)), (t / (z * z)))) - (36.52704169880642 * (1.0 / z))));
	double tmp;
	if (z <= -13.0) {
		tmp = t_1;
	} else if (z <= 265000000.0) {
		tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / fma(11.9400905721, z, 0.607771387771));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(y * Float64(Float64(3.13060547623 + fma(457.9610022158428, Float64(1.0 / Float64(z * z)), Float64(t / Float64(z * z)))) - Float64(36.52704169880642 * Float64(1.0 / z)))))
	tmp = 0.0
	if (z <= -13.0)
		tmp = t_1;
	elseif (z <= 265000000.0)
		tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / fma(11.9400905721, z, 0.607771387771)));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(3.13060547623 + N[(457.9610022158428 * N[(1.0 / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(36.52704169880642 * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -13.0], t$95$1, If[LessEqual[z, 265000000.0], N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(11.9400905721 * z + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + y \cdot \left(\left(3.13060547623 + \mathsf{fma}\left(457.9610022158428, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - 36.52704169880642 \cdot \frac{1}{z}\right)\\
\mathbf{if}\;z \leq -13:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 265000000:\\
\;\;\;\;x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\mathsf{fma}\left(11.9400905721, z, 0.607771387771\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -13 or 2.65e8 < z

    1. Initial program 16.1%

      \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    2. Taylor expanded in z around -inf

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z} + \frac{313060547623}{100000000000} \cdot y\right)} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x + \left(\frac{313060547623}{100000000000} \cdot y + \color{blue}{-1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}}\right) \]
      2. lower-fma.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, \color{blue}{y}, -1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
      3. mul-1-negN/A

        \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, \mathsf{neg}\left(\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right)\right) \]
      4. lower-neg.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
      5. lower-/.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
    4. Applied rewrites83.7%

      \[\leadsto x + \color{blue}{\mathsf{fma}\left(3.13060547623, y, -\frac{\mathsf{fma}\left(-11.1667541262, y, -\frac{t \cdot y - \mathsf{fma}\left(-15.234687407, y \cdot 36.52704169880642, 98.5170599679272 \cdot y\right)}{z}\right) - -47.69379582500642 \cdot y}{z}\right)} \]
    5. Taylor expanded in y around inf

      \[\leadsto x + y \cdot \color{blue}{\left(\left(\frac{313060547623}{100000000000} + \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \color{blue}{\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}}\right) \]
      2. lower--.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \color{blue}{\frac{1}{z}}\right) \]
      3. lower-+.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{\color{blue}{1}}{z}\right) \]
      4. lower-fma.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{{z}^{2}}, \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      5. lower-/.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{{z}^{2}}, \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      6. unpow2N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      7. lower-*.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      8. lower-/.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      9. unpow2N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      10. lower-*.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      11. lower-*.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{\color{blue}{z}}\right) \]
      12. lower-/.f6494.1

        \[\leadsto x + y \cdot \left(\left(3.13060547623 + \mathsf{fma}\left(457.9610022158428, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - 36.52704169880642 \cdot \frac{1}{z}\right) \]
    7. Applied rewrites94.1%

      \[\leadsto x + y \cdot \color{blue}{\left(\left(3.13060547623 + \mathsf{fma}\left(457.9610022158428, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - 36.52704169880642 \cdot \frac{1}{z}\right)} \]

    if -13 < z < 2.65e8

    1. Initial program 99.7%

      \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    2. Taylor expanded in z around 0

      \[\leadsto x + \frac{y \cdot \left(\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\color{blue}{\frac{607771387771}{1000000000000} + \frac{119400905721}{10000000000} \cdot z}} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x + \frac{y \cdot \left(\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\frac{119400905721}{10000000000} \cdot z + \color{blue}{\frac{607771387771}{1000000000000}}} \]
      2. lower-fma.f6498.5

        \[\leadsto x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\mathsf{fma}\left(11.9400905721, \color{blue}{z}, 0.607771387771\right)} \]
    4. Applied rewrites98.5%

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

Alternative 4: 96.2% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \left(\left(3.13060547623 + \mathsf{fma}\left(457.9610022158428, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - 36.52704169880642 \cdot \frac{1}{z}\right)\\ \mathbf{if}\;z \leq -112000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 265000000:\\ \;\;\;\;x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{0.607771387771}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1
         (+
          x
          (*
           y
           (-
            (+
             3.13060547623
             (fma 457.9610022158428 (/ 1.0 (* z z)) (/ t (* z z))))
            (* 36.52704169880642 (/ 1.0 z)))))))
   (if (<= z -112000000000.0)
     t_1
     (if (<= z 265000000.0)
       (+
        x
        (/
         (*
          y
          (+
           (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
           b))
         0.607771387771))
       t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (y * ((3.13060547623 + fma(457.9610022158428, (1.0 / (z * z)), (t / (z * z)))) - (36.52704169880642 * (1.0 / z))));
	double tmp;
	if (z <= -112000000000.0) {
		tmp = t_1;
	} else if (z <= 265000000.0) {
		tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / 0.607771387771);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(y * Float64(Float64(3.13060547623 + fma(457.9610022158428, Float64(1.0 / Float64(z * z)), Float64(t / Float64(z * z)))) - Float64(36.52704169880642 * Float64(1.0 / z)))))
	tmp = 0.0
	if (z <= -112000000000.0)
		tmp = t_1;
	elseif (z <= 265000000.0)
		tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / 0.607771387771));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(3.13060547623 + N[(457.9610022158428 * N[(1.0 / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(36.52704169880642 * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -112000000000.0], t$95$1, If[LessEqual[z, 265000000.0], N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / 0.607771387771), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + y \cdot \left(\left(3.13060547623 + \mathsf{fma}\left(457.9610022158428, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - 36.52704169880642 \cdot \frac{1}{z}\right)\\
\mathbf{if}\;z \leq -112000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 265000000:\\
\;\;\;\;x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{0.607771387771}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.12e11 or 2.65e8 < z

    1. Initial program 14.7%

      \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    2. Taylor expanded in z around -inf

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z} + \frac{313060547623}{100000000000} \cdot y\right)} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x + \left(\frac{313060547623}{100000000000} \cdot y + \color{blue}{-1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}}\right) \]
      2. lower-fma.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, \color{blue}{y}, -1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
      3. mul-1-negN/A

        \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, \mathsf{neg}\left(\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right)\right) \]
      4. lower-neg.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
      5. lower-/.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
    4. Applied rewrites84.2%

      \[\leadsto x + \color{blue}{\mathsf{fma}\left(3.13060547623, y, -\frac{\mathsf{fma}\left(-11.1667541262, y, -\frac{t \cdot y - \mathsf{fma}\left(-15.234687407, y \cdot 36.52704169880642, 98.5170599679272 \cdot y\right)}{z}\right) - -47.69379582500642 \cdot y}{z}\right)} \]
    5. Taylor expanded in y around inf

      \[\leadsto x + y \cdot \color{blue}{\left(\left(\frac{313060547623}{100000000000} + \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \color{blue}{\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}}\right) \]
      2. lower--.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \color{blue}{\frac{1}{z}}\right) \]
      3. lower-+.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{\color{blue}{1}}{z}\right) \]
      4. lower-fma.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{{z}^{2}}, \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      5. lower-/.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{{z}^{2}}, \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      6. unpow2N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      7. lower-*.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      8. lower-/.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      9. unpow2N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      10. lower-*.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right) \]
      11. lower-*.f64N/A

        \[\leadsto x + y \cdot \left(\left(\frac{313060547623}{100000000000} + \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{\color{blue}{z}}\right) \]
      12. lower-/.f6494.8

        \[\leadsto x + y \cdot \left(\left(3.13060547623 + \mathsf{fma}\left(457.9610022158428, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - 36.52704169880642 \cdot \frac{1}{z}\right) \]
    7. Applied rewrites94.8%

      \[\leadsto x + y \cdot \color{blue}{\left(\left(3.13060547623 + \mathsf{fma}\left(457.9610022158428, \frac{1}{z \cdot z}, \frac{t}{z \cdot z}\right)\right) - 36.52704169880642 \cdot \frac{1}{z}\right)} \]

    if -1.12e11 < z < 2.65e8

    1. Initial program 99.6%

      \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    2. Taylor expanded in z around 0

      \[\leadsto x + \frac{y \cdot \left(\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\color{blue}{\frac{607771387771}{1000000000000}}} \]
    3. Step-by-step derivation
      1. Applied rewrites97.4%

        \[\leadsto x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\color{blue}{0.607771387771}} \]
    4. Recombined 2 regimes into one program.
    5. Add Preprocessing

    Alternative 5: 95.2% accurate, 1.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \mathsf{fma}\left(3.13060547623, y, -\frac{y \cdot \left(36.52704169880642 - \frac{t}{z}\right)}{z}\right)\\ \mathbf{if}\;z \leq -112000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 265000000:\\ \;\;\;\;x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{0.607771387771}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1
             (+
              x
              (fma
               3.13060547623
               y
               (- (/ (* y (- 36.52704169880642 (/ t z))) z))))))
       (if (<= z -112000000000.0)
         t_1
         (if (<= z 265000000.0)
           (+
            x
            (/
             (*
              y
              (+
               (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
               b))
             0.607771387771))
           t_1))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = x + fma(3.13060547623, y, -((y * (36.52704169880642 - (t / z))) / z));
    	double tmp;
    	if (z <= -112000000000.0) {
    		tmp = t_1;
    	} else if (z <= 265000000.0) {
    		tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / 0.607771387771);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(x + fma(3.13060547623, y, Float64(-Float64(Float64(y * Float64(36.52704169880642 - Float64(t / z))) / z))))
    	tmp = 0.0
    	if (z <= -112000000000.0)
    		tmp = t_1;
    	elseif (z <= 265000000.0)
    		tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / 0.607771387771));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(3.13060547623 * y + (-N[(N[(y * N[(36.52704169880642 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -112000000000.0], t$95$1, If[LessEqual[z, 265000000.0], N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / 0.607771387771), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := x + \mathsf{fma}\left(3.13060547623, y, -\frac{y \cdot \left(36.52704169880642 - \frac{t}{z}\right)}{z}\right)\\
    \mathbf{if}\;z \leq -112000000000:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq 265000000:\\
    \;\;\;\;x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{0.607771387771}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -1.12e11 or 2.65e8 < z

      1. Initial program 14.7%

        \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
      2. Taylor expanded in z around -inf

        \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z} + \frac{313060547623}{100000000000} \cdot y\right)} \]
      3. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto x + \left(\frac{313060547623}{100000000000} \cdot y + \color{blue}{-1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}}\right) \]
        2. lower-fma.f64N/A

          \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, \color{blue}{y}, -1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
        3. mul-1-negN/A

          \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, \mathsf{neg}\left(\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right)\right) \]
        4. lower-neg.f64N/A

          \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
        5. lower-/.f64N/A

          \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
      4. Applied rewrites84.2%

        \[\leadsto x + \color{blue}{\mathsf{fma}\left(3.13060547623, y, -\frac{\mathsf{fma}\left(-11.1667541262, y, -\frac{t \cdot y - \mathsf{fma}\left(-15.234687407, y \cdot 36.52704169880642, 98.5170599679272 \cdot y\right)}{z}\right) - -47.69379582500642 \cdot y}{z}\right)} \]
      5. Taylor expanded in y around inf

        \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{y \cdot \left(\frac{3652704169880641883561}{100000000000000000000} - \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{z} + \frac{t}{z}\right)\right)}{z}\right) \]
      6. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{y \cdot \left(\frac{3652704169880641883561}{100000000000000000000} - \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{z} + \frac{t}{z}\right)\right)}{z}\right) \]
        2. lower--.f64N/A

          \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{y \cdot \left(\frac{3652704169880641883561}{100000000000000000000} - \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{z} + \frac{t}{z}\right)\right)}{z}\right) \]
        3. lower-fma.f64N/A

          \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{y \cdot \left(\frac{3652704169880641883561}{100000000000000000000} - \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z}, \frac{t}{z}\right)\right)}{z}\right) \]
        4. lower-/.f64N/A

          \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{y \cdot \left(\frac{3652704169880641883561}{100000000000000000000} - \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z}, \frac{t}{z}\right)\right)}{z}\right) \]
        5. lower-/.f6492.8

          \[\leadsto x + \mathsf{fma}\left(3.13060547623, y, -\frac{y \cdot \left(36.52704169880642 - \mathsf{fma}\left(457.9610022158428, \frac{1}{z}, \frac{t}{z}\right)\right)}{z}\right) \]
      7. Applied rewrites92.8%

        \[\leadsto x + \mathsf{fma}\left(3.13060547623, y, -\frac{y \cdot \left(36.52704169880642 - \mathsf{fma}\left(457.9610022158428, \frac{1}{z}, \frac{t}{z}\right)\right)}{z}\right) \]
      8. Taylor expanded in t around inf

        \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{y \cdot \left(\frac{3652704169880641883561}{100000000000000000000} - \frac{t}{z}\right)}{z}\right) \]
      9. Step-by-step derivation
        1. lift-/.f6492.8

          \[\leadsto x + \mathsf{fma}\left(3.13060547623, y, -\frac{y \cdot \left(36.52704169880642 - \frac{t}{z}\right)}{z}\right) \]
      10. Applied rewrites92.8%

        \[\leadsto x + \mathsf{fma}\left(3.13060547623, y, -\frac{y \cdot \left(36.52704169880642 - \frac{t}{z}\right)}{z}\right) \]

      if -1.12e11 < z < 2.65e8

      1. Initial program 99.6%

        \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
      2. Taylor expanded in z around 0

        \[\leadsto x + \frac{y \cdot \left(\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\color{blue}{\frac{607771387771}{1000000000000}}} \]
      3. Step-by-step derivation
        1. Applied rewrites97.4%

          \[\leadsto x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\color{blue}{0.607771387771}} \]
      4. Recombined 2 regimes into one program.
      5. Add Preprocessing

      Alternative 6: 87.9% accurate, 1.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \mathsf{fma}\left(3.13060547623, y, -\frac{y \cdot \left(36.52704169880642 - \frac{t}{z}\right)}{z}\right)\\ \mathbf{if}\;z \leq -210000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-161}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(1.6453555072203998 \cdot a, y, -32.324150453290734 \cdot \left(b \cdot y\right)\right), z, \left(b \cdot y\right) \cdot 1.6453555072203998\right) + x\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-12}:\\ \;\;\;\;x + b \cdot \left(1.6453555072203998 \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1
               (+
                x
                (fma
                 3.13060547623
                 y
                 (- (/ (* y (- 36.52704169880642 (/ t z))) z))))))
         (if (<= z -210000.0)
           t_1
           (if (<= z -1.35e-161)
             (+
              (fma
               (fma (* 1.6453555072203998 a) y (* -32.324150453290734 (* b y)))
               z
               (* (* b y) 1.6453555072203998))
              x)
             (if (<= z 6.2e-12) (+ x (* b (* 1.6453555072203998 y))) t_1)))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x + fma(3.13060547623, y, -((y * (36.52704169880642 - (t / z))) / z));
      	double tmp;
      	if (z <= -210000.0) {
      		tmp = t_1;
      	} else if (z <= -1.35e-161) {
      		tmp = fma(fma((1.6453555072203998 * a), y, (-32.324150453290734 * (b * y))), z, ((b * y) * 1.6453555072203998)) + x;
      	} else if (z <= 6.2e-12) {
      		tmp = x + (b * (1.6453555072203998 * y));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(x + fma(3.13060547623, y, Float64(-Float64(Float64(y * Float64(36.52704169880642 - Float64(t / z))) / z))))
      	tmp = 0.0
      	if (z <= -210000.0)
      		tmp = t_1;
      	elseif (z <= -1.35e-161)
      		tmp = Float64(fma(fma(Float64(1.6453555072203998 * a), y, Float64(-32.324150453290734 * Float64(b * y))), z, Float64(Float64(b * y) * 1.6453555072203998)) + x);
      	elseif (z <= 6.2e-12)
      		tmp = Float64(x + Float64(b * Float64(1.6453555072203998 * y)));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(3.13060547623 * y + (-N[(N[(y * N[(36.52704169880642 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -210000.0], t$95$1, If[LessEqual[z, -1.35e-161], N[(N[(N[(N[(1.6453555072203998 * a), $MachinePrecision] * y + N[(-32.324150453290734 * N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * z + N[(N[(b * y), $MachinePrecision] * 1.6453555072203998), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 6.2e-12], N[(x + N[(b * N[(1.6453555072203998 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x + \mathsf{fma}\left(3.13060547623, y, -\frac{y \cdot \left(36.52704169880642 - \frac{t}{z}\right)}{z}\right)\\
      \mathbf{if}\;z \leq -210000:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq -1.35 \cdot 10^{-161}:\\
      \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(1.6453555072203998 \cdot a, y, -32.324150453290734 \cdot \left(b \cdot y\right)\right), z, \left(b \cdot y\right) \cdot 1.6453555072203998\right) + x\\
      
      \mathbf{elif}\;z \leq 6.2 \cdot 10^{-12}:\\
      \;\;\;\;x + b \cdot \left(1.6453555072203998 \cdot y\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if z < -2.1e5 or 6.2000000000000002e-12 < z

        1. Initial program 18.2%

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. Taylor expanded in z around -inf

          \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z} + \frac{313060547623}{100000000000} \cdot y\right)} \]
        3. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x + \left(\frac{313060547623}{100000000000} \cdot y + \color{blue}{-1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}}\right) \]
          2. lower-fma.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, \color{blue}{y}, -1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
          3. mul-1-negN/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, \mathsf{neg}\left(\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right)\right) \]
          4. lower-neg.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
          5. lower-/.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
        4. Applied rewrites82.9%

          \[\leadsto x + \color{blue}{\mathsf{fma}\left(3.13060547623, y, -\frac{\mathsf{fma}\left(-11.1667541262, y, -\frac{t \cdot y - \mathsf{fma}\left(-15.234687407, y \cdot 36.52704169880642, 98.5170599679272 \cdot y\right)}{z}\right) - -47.69379582500642 \cdot y}{z}\right)} \]
        5. Taylor expanded in y around inf

          \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{y \cdot \left(\frac{3652704169880641883561}{100000000000000000000} - \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{z} + \frac{t}{z}\right)\right)}{z}\right) \]
        6. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{y \cdot \left(\frac{3652704169880641883561}{100000000000000000000} - \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{z} + \frac{t}{z}\right)\right)}{z}\right) \]
          2. lower--.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{y \cdot \left(\frac{3652704169880641883561}{100000000000000000000} - \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{z} + \frac{t}{z}\right)\right)}{z}\right) \]
          3. lower-fma.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{y \cdot \left(\frac{3652704169880641883561}{100000000000000000000} - \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z}, \frac{t}{z}\right)\right)}{z}\right) \]
          4. lower-/.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{y \cdot \left(\frac{3652704169880641883561}{100000000000000000000} - \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z}, \frac{t}{z}\right)\right)}{z}\right) \]
          5. lower-/.f6491.1

            \[\leadsto x + \mathsf{fma}\left(3.13060547623, y, -\frac{y \cdot \left(36.52704169880642 - \mathsf{fma}\left(457.9610022158428, \frac{1}{z}, \frac{t}{z}\right)\right)}{z}\right) \]
        7. Applied rewrites91.1%

          \[\leadsto x + \mathsf{fma}\left(3.13060547623, y, -\frac{y \cdot \left(36.52704169880642 - \mathsf{fma}\left(457.9610022158428, \frac{1}{z}, \frac{t}{z}\right)\right)}{z}\right) \]
        8. Taylor expanded in t around inf

          \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{y \cdot \left(\frac{3652704169880641883561}{100000000000000000000} - \frac{t}{z}\right)}{z}\right) \]
        9. Step-by-step derivation
          1. lift-/.f6491.0

            \[\leadsto x + \mathsf{fma}\left(3.13060547623, y, -\frac{y \cdot \left(36.52704169880642 - \frac{t}{z}\right)}{z}\right) \]
        10. Applied rewrites91.0%

          \[\leadsto x + \mathsf{fma}\left(3.13060547623, y, -\frac{y \cdot \left(36.52704169880642 - \frac{t}{z}\right)}{z}\right) \]

        if -2.1e5 < z < -1.35e-161

        1. Initial program 99.6%

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. Taylor expanded in z around 0

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

            \[\leadsto \left(\frac{1000000000000}{607771387771} \cdot \left(b \cdot y\right) + z \cdot \left(\frac{1000000000000}{607771387771} \cdot \left(a \cdot y\right) - \frac{11940090572100000000000000}{369386059793087248348441} \cdot \left(b \cdot y\right)\right)\right) + \color{blue}{x} \]
          2. lower-+.f64N/A

            \[\leadsto \left(\frac{1000000000000}{607771387771} \cdot \left(b \cdot y\right) + z \cdot \left(\frac{1000000000000}{607771387771} \cdot \left(a \cdot y\right) - \frac{11940090572100000000000000}{369386059793087248348441} \cdot \left(b \cdot y\right)\right)\right) + \color{blue}{x} \]
        4. Applied rewrites84.2%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(1.6453555072203998 \cdot a, y, -32.324150453290734 \cdot \left(b \cdot y\right)\right), z, \left(b \cdot y\right) \cdot 1.6453555072203998\right) + x} \]

        if -1.35e-161 < z < 6.2000000000000002e-12

        1. Initial program 99.7%

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. Taylor expanded in b around inf

          \[\leadsto x + \color{blue}{\frac{b \cdot y}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
        3. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x + b \cdot \color{blue}{\frac{y}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
          2. lower-*.f64N/A

            \[\leadsto x + b \cdot \color{blue}{\frac{y}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
          3. lower-/.f64N/A

            \[\leadsto x + b \cdot \frac{y}{\color{blue}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
          4. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right) + \color{blue}{\frac{607771387771}{1000000000000}}} \]
          5. *-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          6. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right) + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          7. *-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          8. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(z \cdot \left(\frac{15234687407}{1000000000} + z\right) + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          9. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(z \cdot \left(z + \frac{15234687407}{1000000000}\right) + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          10. *-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        4. Applied rewrites85.0%

          \[\leadsto x + \color{blue}{b \cdot \frac{y}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(15.234687407 + z, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)}} \]
        5. Taylor expanded in z around 0

          \[\leadsto x + b \cdot \left(\frac{1000000000000}{607771387771} \cdot \color{blue}{y}\right) \]
        6. Step-by-step derivation
          1. lower-*.f6485.1

            \[\leadsto x + b \cdot \left(1.6453555072203998 \cdot y\right) \]
        7. Applied rewrites85.1%

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

      Alternative 7: 86.2% accurate, 1.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \mathsf{fma}\left(3.13060547623, y, -\frac{y \cdot \left(36.52704169880642 - \frac{t}{z}\right)}{z}\right)\\ \mathbf{if}\;z \leq -9.5 \cdot 10^{-9}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-12}:\\ \;\;\;\;x + b \cdot \left(1.6453555072203998 \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1
               (+
                x
                (fma
                 3.13060547623
                 y
                 (- (/ (* y (- 36.52704169880642 (/ t z))) z))))))
         (if (<= z -9.5e-9)
           t_1
           (if (<= z 6.2e-12) (+ x (* b (* 1.6453555072203998 y))) t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x + fma(3.13060547623, y, -((y * (36.52704169880642 - (t / z))) / z));
      	double tmp;
      	if (z <= -9.5e-9) {
      		tmp = t_1;
      	} else if (z <= 6.2e-12) {
      		tmp = x + (b * (1.6453555072203998 * y));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(x + fma(3.13060547623, y, Float64(-Float64(Float64(y * Float64(36.52704169880642 - Float64(t / z))) / z))))
      	tmp = 0.0
      	if (z <= -9.5e-9)
      		tmp = t_1;
      	elseif (z <= 6.2e-12)
      		tmp = Float64(x + Float64(b * Float64(1.6453555072203998 * y)));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(3.13060547623 * y + (-N[(N[(y * N[(36.52704169880642 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.5e-9], t$95$1, If[LessEqual[z, 6.2e-12], N[(x + N[(b * N[(1.6453555072203998 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x + \mathsf{fma}\left(3.13060547623, y, -\frac{y \cdot \left(36.52704169880642 - \frac{t}{z}\right)}{z}\right)\\
      \mathbf{if}\;z \leq -9.5 \cdot 10^{-9}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 6.2 \cdot 10^{-12}:\\
      \;\;\;\;x + b \cdot \left(1.6453555072203998 \cdot y\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -9.5000000000000007e-9 or 6.2000000000000002e-12 < z

        1. Initial program 20.1%

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. Taylor expanded in z around -inf

          \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z} + \frac{313060547623}{100000000000} \cdot y\right)} \]
        3. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x + \left(\frac{313060547623}{100000000000} \cdot y + \color{blue}{-1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}}\right) \]
          2. lower-fma.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, \color{blue}{y}, -1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
          3. mul-1-negN/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, \mathsf{neg}\left(\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right)\right) \]
          4. lower-neg.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
          5. lower-/.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
        4. Applied rewrites82.1%

          \[\leadsto x + \color{blue}{\mathsf{fma}\left(3.13060547623, y, -\frac{\mathsf{fma}\left(-11.1667541262, y, -\frac{t \cdot y - \mathsf{fma}\left(-15.234687407, y \cdot 36.52704169880642, 98.5170599679272 \cdot y\right)}{z}\right) - -47.69379582500642 \cdot y}{z}\right)} \]
        5. Taylor expanded in y around inf

          \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{y \cdot \left(\frac{3652704169880641883561}{100000000000000000000} - \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{z} + \frac{t}{z}\right)\right)}{z}\right) \]
        6. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{y \cdot \left(\frac{3652704169880641883561}{100000000000000000000} - \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{z} + \frac{t}{z}\right)\right)}{z}\right) \]
          2. lower--.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{y \cdot \left(\frac{3652704169880641883561}{100000000000000000000} - \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} \cdot \frac{1}{z} + \frac{t}{z}\right)\right)}{z}\right) \]
          3. lower-fma.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{y \cdot \left(\frac{3652704169880641883561}{100000000000000000000} - \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z}, \frac{t}{z}\right)\right)}{z}\right) \]
          4. lower-/.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{y \cdot \left(\frac{3652704169880641883561}{100000000000000000000} - \mathsf{fma}\left(\frac{45796100221584283915100827016327}{100000000000000000000000000000}, \frac{1}{z}, \frac{t}{z}\right)\right)}{z}\right) \]
          5. lower-/.f6490.2

            \[\leadsto x + \mathsf{fma}\left(3.13060547623, y, -\frac{y \cdot \left(36.52704169880642 - \mathsf{fma}\left(457.9610022158428, \frac{1}{z}, \frac{t}{z}\right)\right)}{z}\right) \]
        7. Applied rewrites90.2%

          \[\leadsto x + \mathsf{fma}\left(3.13060547623, y, -\frac{y \cdot \left(36.52704169880642 - \mathsf{fma}\left(457.9610022158428, \frac{1}{z}, \frac{t}{z}\right)\right)}{z}\right) \]
        8. Taylor expanded in t around inf

          \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{y \cdot \left(\frac{3652704169880641883561}{100000000000000000000} - \frac{t}{z}\right)}{z}\right) \]
        9. Step-by-step derivation
          1. lift-/.f6490.1

            \[\leadsto x + \mathsf{fma}\left(3.13060547623, y, -\frac{y \cdot \left(36.52704169880642 - \frac{t}{z}\right)}{z}\right) \]
        10. Applied rewrites90.1%

          \[\leadsto x + \mathsf{fma}\left(3.13060547623, y, -\frac{y \cdot \left(36.52704169880642 - \frac{t}{z}\right)}{z}\right) \]

        if -9.5000000000000007e-9 < z < 6.2000000000000002e-12

        1. Initial program 99.7%

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. Taylor expanded in b around inf

          \[\leadsto x + \color{blue}{\frac{b \cdot y}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
        3. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x + b \cdot \color{blue}{\frac{y}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
          2. lower-*.f64N/A

            \[\leadsto x + b \cdot \color{blue}{\frac{y}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
          3. lower-/.f64N/A

            \[\leadsto x + b \cdot \frac{y}{\color{blue}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
          4. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right) + \color{blue}{\frac{607771387771}{1000000000000}}} \]
          5. *-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          6. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right) + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          7. *-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          8. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(z \cdot \left(\frac{15234687407}{1000000000} + z\right) + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          9. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(z \cdot \left(z + \frac{15234687407}{1000000000}\right) + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          10. *-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        4. Applied rewrites82.1%

          \[\leadsto x + \color{blue}{b \cdot \frac{y}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(15.234687407 + z, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)}} \]
        5. Taylor expanded in z around 0

          \[\leadsto x + b \cdot \left(\frac{1000000000000}{607771387771} \cdot \color{blue}{y}\right) \]
        6. Step-by-step derivation
          1. lower-*.f6482.1

            \[\leadsto x + b \cdot \left(1.6453555072203998 \cdot y\right) \]
        7. Applied rewrites82.1%

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

      Alternative 8: 84.0% accurate, 0.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+114}:\\ \;\;\;\;y \cdot \mathsf{fma}\left(1.6453555072203998, b, z \cdot \mathsf{fma}\left(-32.324150453290734, b, 1.6453555072203998 \cdot a\right)\right)\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;x + b \cdot \frac{y}{\mathsf{fma}\left(\left(z \cdot z\right) \cdot z, z, 0.607771387771\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1
               (/
                (*
                 y
                 (+
                  (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
                  b))
                (+
                 (*
                  (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
                  z)
                 0.607771387771))))
         (if (<= t_1 -5e+114)
           (*
            y
            (fma
             1.6453555072203998
             b
             (* z (fma -32.324150453290734 b (* 1.6453555072203998 a)))))
           (if (<= t_1 INFINITY)
             (+ x (* b (/ y (fma (* (* z z) z) z 0.607771387771))))
             (fma 3.13060547623 y x)))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = (y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771);
      	double tmp;
      	if (t_1 <= -5e+114) {
      		tmp = y * fma(1.6453555072203998, b, (z * fma(-32.324150453290734, b, (1.6453555072203998 * a))));
      	} else if (t_1 <= ((double) INFINITY)) {
      		tmp = x + (b * (y / fma(((z * z) * z), z, 0.607771387771)));
      	} else {
      		tmp = fma(3.13060547623, y, x);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))
      	tmp = 0.0
      	if (t_1 <= -5e+114)
      		tmp = Float64(y * fma(1.6453555072203998, b, Float64(z * fma(-32.324150453290734, b, Float64(1.6453555072203998 * a)))));
      	elseif (t_1 <= Inf)
      		tmp = Float64(x + Float64(b * Float64(y / fma(Float64(Float64(z * z) * z), z, 0.607771387771))));
      	else
      		tmp = fma(3.13060547623, y, x);
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+114], N[(y * N[(1.6453555072203998 * b + N[(z * N[(-32.324150453290734 * b + N[(1.6453555072203998 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(x + N[(b * N[(y / N[(N[(N[(z * z), $MachinePrecision] * z), $MachinePrecision] * z + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}\\
      \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+114}:\\
      \;\;\;\;y \cdot \mathsf{fma}\left(1.6453555072203998, b, z \cdot \mathsf{fma}\left(-32.324150453290734, b, 1.6453555072203998 \cdot a\right)\right)\\
      
      \mathbf{elif}\;t\_1 \leq \infty:\\
      \;\;\;\;x + b \cdot \frac{y}{\mathsf{fma}\left(\left(z \cdot z\right) \cdot z, z, 0.607771387771\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < -5.0000000000000001e114

        1. Initial program 85.9%

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. Taylor expanded in z around 0

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

            \[\leadsto \left(\frac{1000000000000}{607771387771} \cdot \left(b \cdot y\right) + z \cdot \left(\frac{1000000000000}{607771387771} \cdot \left(a \cdot y\right) - \frac{11940090572100000000000000}{369386059793087248348441} \cdot \left(b \cdot y\right)\right)\right) + \color{blue}{x} \]
          2. lower-+.f64N/A

            \[\leadsto \left(\frac{1000000000000}{607771387771} \cdot \left(b \cdot y\right) + z \cdot \left(\frac{1000000000000}{607771387771} \cdot \left(a \cdot y\right) - \frac{11940090572100000000000000}{369386059793087248348441} \cdot \left(b \cdot y\right)\right)\right) + \color{blue}{x} \]
        4. Applied rewrites53.0%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(1.6453555072203998 \cdot a, y, -32.324150453290734 \cdot \left(b \cdot y\right)\right), z, \left(b \cdot y\right) \cdot 1.6453555072203998\right) + x} \]
        5. Taylor expanded in y around inf

          \[\leadsto y \cdot \color{blue}{\left(\frac{1000000000000}{607771387771} \cdot b + z \cdot \left(\frac{-11940090572100000000000000}{369386059793087248348441} \cdot b + \frac{1000000000000}{607771387771} \cdot a\right)\right)} \]
        6. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto y \cdot \left(\frac{1000000000000}{607771387771} \cdot b + \color{blue}{z \cdot \left(\frac{-11940090572100000000000000}{369386059793087248348441} \cdot b + \frac{1000000000000}{607771387771} \cdot a\right)}\right) \]
          2. lower-fma.f64N/A

            \[\leadsto y \cdot \mathsf{fma}\left(\frac{1000000000000}{607771387771}, b, z \cdot \left(\frac{-11940090572100000000000000}{369386059793087248348441} \cdot b + \frac{1000000000000}{607771387771} \cdot a\right)\right) \]
          3. lower-*.f64N/A

            \[\leadsto y \cdot \mathsf{fma}\left(\frac{1000000000000}{607771387771}, b, z \cdot \left(\frac{-11940090572100000000000000}{369386059793087248348441} \cdot b + \frac{1000000000000}{607771387771} \cdot a\right)\right) \]
          4. lower-fma.f64N/A

            \[\leadsto y \cdot \mathsf{fma}\left(\frac{1000000000000}{607771387771}, b, z \cdot \mathsf{fma}\left(\frac{-11940090572100000000000000}{369386059793087248348441}, b, \frac{1000000000000}{607771387771} \cdot a\right)\right) \]
          5. lift-*.f6464.8

            \[\leadsto y \cdot \mathsf{fma}\left(1.6453555072203998, b, z \cdot \mathsf{fma}\left(-32.324150453290734, b, 1.6453555072203998 \cdot a\right)\right) \]
        7. Applied rewrites64.8%

          \[\leadsto y \cdot \color{blue}{\mathsf{fma}\left(1.6453555072203998, b, z \cdot \mathsf{fma}\left(-32.324150453290734, b, 1.6453555072203998 \cdot a\right)\right)} \]

        if -5.0000000000000001e114 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < +inf.0

        1. Initial program 96.2%

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. Taylor expanded in b around inf

          \[\leadsto x + \color{blue}{\frac{b \cdot y}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
        3. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x + b \cdot \color{blue}{\frac{y}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
          2. lower-*.f64N/A

            \[\leadsto x + b \cdot \color{blue}{\frac{y}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
          3. lower-/.f64N/A

            \[\leadsto x + b \cdot \frac{y}{\color{blue}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
          4. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right) + \color{blue}{\frac{607771387771}{1000000000000}}} \]
          5. *-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          6. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right) + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          7. *-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          8. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(z \cdot \left(\frac{15234687407}{1000000000} + z\right) + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          9. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(z \cdot \left(z + \frac{15234687407}{1000000000}\right) + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          10. *-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        4. Applied rewrites79.1%

          \[\leadsto x + \color{blue}{b \cdot \frac{y}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(15.234687407 + z, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)}} \]
        5. Taylor expanded in z around inf

          \[\leadsto x + b \cdot \frac{y}{\mathsf{fma}\left({z}^{3}, z, \frac{607771387771}{1000000000000}\right)} \]
        6. Step-by-step derivation
          1. unpow3N/A

            \[\leadsto x + b \cdot \frac{y}{\mathsf{fma}\left(\left(z \cdot z\right) \cdot z, z, \frac{607771387771}{1000000000000}\right)} \]
          2. unpow2N/A

            \[\leadsto x + b \cdot \frac{y}{\mathsf{fma}\left({z}^{2} \cdot z, z, \frac{607771387771}{1000000000000}\right)} \]
          3. lower-*.f64N/A

            \[\leadsto x + b \cdot \frac{y}{\mathsf{fma}\left({z}^{2} \cdot z, z, \frac{607771387771}{1000000000000}\right)} \]
          4. unpow2N/A

            \[\leadsto x + b \cdot \frac{y}{\mathsf{fma}\left(\left(z \cdot z\right) \cdot z, z, \frac{607771387771}{1000000000000}\right)} \]
          5. lower-*.f6478.6

            \[\leadsto x + b \cdot \frac{y}{\mathsf{fma}\left(\left(z \cdot z\right) \cdot z, z, 0.607771387771\right)} \]
        7. Applied rewrites78.6%

          \[\leadsto x + b \cdot \frac{y}{\mathsf{fma}\left(\left(z \cdot z\right) \cdot z, z, 0.607771387771\right)} \]

        if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64)))

        1. Initial program 0.0%

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. Taylor expanded in z around inf

          \[\leadsto \color{blue}{x + \frac{313060547623}{100000000000} \cdot y} \]
        3. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \frac{313060547623}{100000000000} \cdot y + \color{blue}{x} \]
          2. lower-fma.f6496.9

            \[\leadsto \mathsf{fma}\left(3.13060547623, \color{blue}{y}, x\right) \]
        4. Applied rewrites96.9%

          \[\leadsto \color{blue}{\mathsf{fma}\left(3.13060547623, y, x\right)} \]
      3. Recombined 3 regimes into one program.
      4. Add Preprocessing

      Alternative 9: 84.0% accurate, 2.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \mathsf{fma}\left(3.13060547623, y, \frac{t \cdot y}{z \cdot z}\right)\\ \mathbf{if}\;z \leq -9.5 \cdot 10^{-9}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-7}:\\ \;\;\;\;x + b \cdot \left(1.6453555072203998 \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (+ x (fma 3.13060547623 y (/ (* t y) (* z z))))))
         (if (<= z -9.5e-9)
           t_1
           (if (<= z 2.6e-7) (+ x (* b (* 1.6453555072203998 y))) t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x + fma(3.13060547623, y, ((t * y) / (z * z)));
      	double tmp;
      	if (z <= -9.5e-9) {
      		tmp = t_1;
      	} else if (z <= 2.6e-7) {
      		tmp = x + (b * (1.6453555072203998 * y));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(x + fma(3.13060547623, y, Float64(Float64(t * y) / Float64(z * z))))
      	tmp = 0.0
      	if (z <= -9.5e-9)
      		tmp = t_1;
      	elseif (z <= 2.6e-7)
      		tmp = Float64(x + Float64(b * Float64(1.6453555072203998 * y)));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(3.13060547623 * y + N[(N[(t * y), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.5e-9], t$95$1, If[LessEqual[z, 2.6e-7], N[(x + N[(b * N[(1.6453555072203998 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x + \mathsf{fma}\left(3.13060547623, y, \frac{t \cdot y}{z \cdot z}\right)\\
      \mathbf{if}\;z \leq -9.5 \cdot 10^{-9}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 2.6 \cdot 10^{-7}:\\
      \;\;\;\;x + b \cdot \left(1.6453555072203998 \cdot y\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -9.5000000000000007e-9 or 2.59999999999999999e-7 < z

        1. Initial program 19.5%

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. Taylor expanded in z around -inf

          \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z} + \frac{313060547623}{100000000000} \cdot y\right)} \]
        3. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x + \left(\frac{313060547623}{100000000000} \cdot y + \color{blue}{-1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}}\right) \]
          2. lower-fma.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, \color{blue}{y}, -1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
          3. mul-1-negN/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, \mathsf{neg}\left(\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right)\right) \]
          4. lower-neg.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
          5. lower-/.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
        4. Applied rewrites82.3%

          \[\leadsto x + \color{blue}{\mathsf{fma}\left(3.13060547623, y, -\frac{\mathsf{fma}\left(-11.1667541262, y, -\frac{t \cdot y - \mathsf{fma}\left(-15.234687407, y \cdot 36.52704169880642, 98.5170599679272 \cdot y\right)}{z}\right) - -47.69379582500642 \cdot y}{z}\right)} \]
        5. Taylor expanded in t around inf

          \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, \frac{t \cdot y}{{z}^{2}}\right) \]
        6. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, \frac{t \cdot y}{{z}^{2}}\right) \]
          2. lift-*.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, \frac{t \cdot y}{{z}^{2}}\right) \]
          3. unpow2N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, \frac{t \cdot y}{z \cdot z}\right) \]
          4. lower-*.f6482.2

            \[\leadsto x + \mathsf{fma}\left(3.13060547623, y, \frac{t \cdot y}{z \cdot z}\right) \]
        7. Applied rewrites82.2%

          \[\leadsto x + \mathsf{fma}\left(3.13060547623, y, \frac{t \cdot y}{z \cdot z}\right) \]

        if -9.5000000000000007e-9 < z < 2.59999999999999999e-7

        1. Initial program 99.7%

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. Taylor expanded in b around inf

          \[\leadsto x + \color{blue}{\frac{b \cdot y}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
        3. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x + b \cdot \color{blue}{\frac{y}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
          2. lower-*.f64N/A

            \[\leadsto x + b \cdot \color{blue}{\frac{y}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
          3. lower-/.f64N/A

            \[\leadsto x + b \cdot \frac{y}{\color{blue}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
          4. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right) + \color{blue}{\frac{607771387771}{1000000000000}}} \]
          5. *-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          6. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right) + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          7. *-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          8. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(z \cdot \left(\frac{15234687407}{1000000000} + z\right) + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          9. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(z \cdot \left(z + \frac{15234687407}{1000000000}\right) + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          10. *-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        4. Applied rewrites82.0%

          \[\leadsto x + \color{blue}{b \cdot \frac{y}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(15.234687407 + z, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)}} \]
        5. Taylor expanded in z around 0

          \[\leadsto x + b \cdot \left(\frac{1000000000000}{607771387771} \cdot \color{blue}{y}\right) \]
        6. Step-by-step derivation
          1. lower-*.f6481.9

            \[\leadsto x + b \cdot \left(1.6453555072203998 \cdot y\right) \]
        7. Applied rewrites81.9%

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

      Alternative 10: 83.9% accurate, 2.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5200000:\\ \;\;\;\;x + \mathsf{fma}\left(3.13060547623, y, -\frac{y \cdot 36.52704169880642}{z}\right)\\ \mathbf{elif}\;z \leq 225:\\ \;\;\;\;x + b \cdot \left(1.6453555072203998 \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= z -5200000.0)
         (+ x (fma 3.13060547623 y (- (/ (* y 36.52704169880642) z))))
         (if (<= z 225.0)
           (+ x (* b (* 1.6453555072203998 y)))
           (fma 3.13060547623 y x))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (z <= -5200000.0) {
      		tmp = x + fma(3.13060547623, y, -((y * 36.52704169880642) / z));
      	} else if (z <= 225.0) {
      		tmp = x + (b * (1.6453555072203998 * y));
      	} else {
      		tmp = fma(3.13060547623, y, x);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if (z <= -5200000.0)
      		tmp = Float64(x + fma(3.13060547623, y, Float64(-Float64(Float64(y * 36.52704169880642) / z))));
      	elseif (z <= 225.0)
      		tmp = Float64(x + Float64(b * Float64(1.6453555072203998 * y)));
      	else
      		tmp = fma(3.13060547623, y, x);
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5200000.0], N[(x + N[(3.13060547623 * y + (-N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 225.0], N[(x + N[(b * N[(1.6453555072203998 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;z \leq -5200000:\\
      \;\;\;\;x + \mathsf{fma}\left(3.13060547623, y, -\frac{y \cdot 36.52704169880642}{z}\right)\\
      
      \mathbf{elif}\;z \leq 225:\\
      \;\;\;\;x + b \cdot \left(1.6453555072203998 \cdot y\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if z < -5.2e6

        1. Initial program 15.4%

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. Taylor expanded in z around -inf

          \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z} + \frac{313060547623}{100000000000} \cdot y\right)} \]
        3. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x + \left(\frac{313060547623}{100000000000} \cdot y + \color{blue}{-1 \cdot \frac{\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}}\right) \]
          2. lower-fma.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, \color{blue}{y}, -1 \cdot \frac{\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
          3. mul-1-negN/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, \mathsf{neg}\left(\frac{\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right)\right) \]
          4. lower-neg.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
          5. lower-/.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right) \]
          6. distribute-rgt-out--N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{y \cdot \left(\frac{-55833770631}{5000000000} - \frac{-4769379582500641883561}{100000000000000000000}\right)}{z}\right) \]
          7. lower-*.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\frac{313060547623}{100000000000}, y, -\frac{y \cdot \left(\frac{-55833770631}{5000000000} - \frac{-4769379582500641883561}{100000000000000000000}\right)}{z}\right) \]
          8. metadata-eval87.8

            \[\leadsto x + \mathsf{fma}\left(3.13060547623, y, -\frac{y \cdot 36.52704169880642}{z}\right) \]
        4. Applied rewrites87.8%

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

        if -5.2e6 < z < 225

        1. Initial program 99.7%

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. Taylor expanded in b around inf

          \[\leadsto x + \color{blue}{\frac{b \cdot y}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
        3. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x + b \cdot \color{blue}{\frac{y}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
          2. lower-*.f64N/A

            \[\leadsto x + b \cdot \color{blue}{\frac{y}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
          3. lower-/.f64N/A

            \[\leadsto x + b \cdot \frac{y}{\color{blue}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
          4. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right) + \color{blue}{\frac{607771387771}{1000000000000}}} \]
          5. *-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          6. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right) + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          7. *-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          8. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(z \cdot \left(\frac{15234687407}{1000000000} + z\right) + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          9. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(z \cdot \left(z + \frac{15234687407}{1000000000}\right) + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          10. *-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        4. Applied rewrites81.1%

          \[\leadsto x + \color{blue}{b \cdot \frac{y}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(15.234687407 + z, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)}} \]
        5. Taylor expanded in z around 0

          \[\leadsto x + b \cdot \left(\frac{1000000000000}{607771387771} \cdot \color{blue}{y}\right) \]
        6. Step-by-step derivation
          1. lower-*.f6480.7

            \[\leadsto x + b \cdot \left(1.6453555072203998 \cdot y\right) \]
        7. Applied rewrites80.7%

          \[\leadsto x + b \cdot \left(1.6453555072203998 \cdot \color{blue}{y}\right) \]

        if 225 < z

        1. Initial program 17.0%

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. Taylor expanded in z around inf

          \[\leadsto \color{blue}{x + \frac{313060547623}{100000000000} \cdot y} \]
        3. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \frac{313060547623}{100000000000} \cdot y + \color{blue}{x} \]
          2. lower-fma.f6487.0

            \[\leadsto \mathsf{fma}\left(3.13060547623, \color{blue}{y}, x\right) \]
        4. Applied rewrites87.0%

          \[\leadsto \color{blue}{\mathsf{fma}\left(3.13060547623, y, x\right)} \]
      3. Recombined 3 regimes into one program.
      4. Add Preprocessing

      Alternative 11: 83.9% accurate, 3.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5200000:\\ \;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\ \mathbf{elif}\;z \leq 225:\\ \;\;\;\;x + b \cdot \left(1.6453555072203998 \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= z -5200000.0)
         (fma 3.13060547623 y x)
         (if (<= z 225.0)
           (+ x (* b (* 1.6453555072203998 y)))
           (fma 3.13060547623 y x))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (z <= -5200000.0) {
      		tmp = fma(3.13060547623, y, x);
      	} else if (z <= 225.0) {
      		tmp = x + (b * (1.6453555072203998 * y));
      	} else {
      		tmp = fma(3.13060547623, y, x);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if (z <= -5200000.0)
      		tmp = fma(3.13060547623, y, x);
      	elseif (z <= 225.0)
      		tmp = Float64(x + Float64(b * Float64(1.6453555072203998 * y)));
      	else
      		tmp = fma(3.13060547623, y, x);
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5200000.0], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 225.0], N[(x + N[(b * N[(1.6453555072203998 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;z \leq -5200000:\\
      \;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
      
      \mathbf{elif}\;z \leq 225:\\
      \;\;\;\;x + b \cdot \left(1.6453555072203998 \cdot y\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -5.2e6 or 225 < z

        1. Initial program 16.2%

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. Taylor expanded in z around inf

          \[\leadsto \color{blue}{x + \frac{313060547623}{100000000000} \cdot y} \]
        3. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \frac{313060547623}{100000000000} \cdot y + \color{blue}{x} \]
          2. lower-fma.f6487.4

            \[\leadsto \mathsf{fma}\left(3.13060547623, \color{blue}{y}, x\right) \]
        4. Applied rewrites87.4%

          \[\leadsto \color{blue}{\mathsf{fma}\left(3.13060547623, y, x\right)} \]

        if -5.2e6 < z < 225

        1. Initial program 99.7%

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. Taylor expanded in b around inf

          \[\leadsto x + \color{blue}{\frac{b \cdot y}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
        3. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x + b \cdot \color{blue}{\frac{y}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
          2. lower-*.f64N/A

            \[\leadsto x + b \cdot \color{blue}{\frac{y}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
          3. lower-/.f64N/A

            \[\leadsto x + b \cdot \frac{y}{\color{blue}{\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)}} \]
          4. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right) + \color{blue}{\frac{607771387771}{1000000000000}}} \]
          5. *-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          6. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right) + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          7. *-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          8. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(z \cdot \left(\frac{15234687407}{1000000000} + z\right) + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          9. +-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(z \cdot \left(z + \frac{15234687407}{1000000000}\right) + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          10. *-commutativeN/A

            \[\leadsto x + b \cdot \frac{y}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        4. Applied rewrites81.1%

          \[\leadsto x + \color{blue}{b \cdot \frac{y}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(15.234687407 + z, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)}} \]
        5. Taylor expanded in z around 0

          \[\leadsto x + b \cdot \left(\frac{1000000000000}{607771387771} \cdot \color{blue}{y}\right) \]
        6. Step-by-step derivation
          1. lower-*.f6480.7

            \[\leadsto x + b \cdot \left(1.6453555072203998 \cdot y\right) \]
        7. Applied rewrites80.7%

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

      Alternative 12: 83.4% accurate, 3.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5200000:\\ \;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\ \mathbf{elif}\;z \leq 225:\\ \;\;\;\;x - \left(-1.6453555072203998 \cdot b\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= z -5200000.0)
         (fma 3.13060547623 y x)
         (if (<= z 225.0)
           (- x (* (* -1.6453555072203998 b) y))
           (fma 3.13060547623 y x))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (z <= -5200000.0) {
      		tmp = fma(3.13060547623, y, x);
      	} else if (z <= 225.0) {
      		tmp = x - ((-1.6453555072203998 * b) * y);
      	} else {
      		tmp = fma(3.13060547623, y, x);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if (z <= -5200000.0)
      		tmp = fma(3.13060547623, y, x);
      	elseif (z <= 225.0)
      		tmp = Float64(x - Float64(Float64(-1.6453555072203998 * b) * y));
      	else
      		tmp = fma(3.13060547623, y, x);
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5200000.0], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 225.0], N[(x - N[(N[(-1.6453555072203998 * b), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;z \leq -5200000:\\
      \;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
      
      \mathbf{elif}\;z \leq 225:\\
      \;\;\;\;x - \left(-1.6453555072203998 \cdot b\right) \cdot y\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -5.2e6 or 225 < z

        1. Initial program 16.2%

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. Taylor expanded in z around inf

          \[\leadsto \color{blue}{x + \frac{313060547623}{100000000000} \cdot y} \]
        3. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \frac{313060547623}{100000000000} \cdot y + \color{blue}{x} \]
          2. lower-fma.f6487.4

            \[\leadsto \mathsf{fma}\left(3.13060547623, \color{blue}{y}, x\right) \]
        4. Applied rewrites87.4%

          \[\leadsto \color{blue}{\mathsf{fma}\left(3.13060547623, y, x\right)} \]

        if -5.2e6 < z < 225

        1. Initial program 99.7%

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. Taylor expanded in x around inf

          \[\leadsto \color{blue}{x \cdot \left(1 + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(\frac{55833770631}{5000000000} + \frac{313060547623}{100000000000} \cdot z\right)\right)\right)\right)}{x \cdot \left(\frac{607771387771}{1000000000000} + z \cdot \left(\frac{119400905721}{10000000000} + z \cdot \left(\frac{314690115749}{10000000000} + z \cdot \left(\frac{15234687407}{1000000000} + z\right)\right)\right)\right)}\right)} \]
        3. Applied rewrites84.6%

          \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(3.13060547623, z, 11.1667541262\right), z, t\right), z, a\right), z, b\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(15.234687407 + z, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right) \cdot x}, 1\right) \cdot x} \]
        4. Taylor expanded in z around inf

          \[\leadsto \mathsf{fma}\left(y, \frac{\frac{313060547623}{100000000000}}{x}, 1\right) \cdot x \]
        5. Step-by-step derivation
          1. lower-/.f6441.6

            \[\leadsto \mathsf{fma}\left(y, \frac{3.13060547623}{x}, 1\right) \cdot x \]
        6. Applied rewrites41.6%

          \[\leadsto \mathsf{fma}\left(y, \frac{3.13060547623}{x}, 1\right) \cdot x \]
        7. Taylor expanded in z around 0

          \[\leadsto \color{blue}{x + \frac{1000000000000}{607771387771} \cdot \left(b \cdot y\right)} \]
        8. Step-by-step derivation
          1. fp-cancel-sign-sub-invN/A

            \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\frac{1000000000000}{607771387771}\right)\right) \cdot \left(b \cdot y\right)} \]
          2. metadata-evalN/A

            \[\leadsto x - \frac{-1000000000000}{607771387771} \cdot \left(\color{blue}{b} \cdot y\right) \]
          3. lower--.f64N/A

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

            \[\leadsto x - \left(\frac{-1000000000000}{607771387771} \cdot b\right) \cdot \color{blue}{y} \]
          5. lower-*.f64N/A

            \[\leadsto x - \left(\frac{-1000000000000}{607771387771} \cdot b\right) \cdot \color{blue}{y} \]
          6. lower-*.f6480.6

            \[\leadsto x - \left(-1.6453555072203998 \cdot b\right) \cdot y \]
        9. Applied rewrites80.6%

          \[\leadsto \color{blue}{x - \left(-1.6453555072203998 \cdot b\right) \cdot y} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 13: 82.1% accurate, 3.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5200000:\\ \;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\ \mathbf{elif}\;z \leq 225:\\ \;\;\;\;\mathsf{fma}\left(b \cdot y, 1.6453555072203998, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= z -5200000.0)
         (fma 3.13060547623 y x)
         (if (<= z 225.0)
           (fma (* b y) 1.6453555072203998 x)
           (fma 3.13060547623 y x))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (z <= -5200000.0) {
      		tmp = fma(3.13060547623, y, x);
      	} else if (z <= 225.0) {
      		tmp = fma((b * y), 1.6453555072203998, x);
      	} else {
      		tmp = fma(3.13060547623, y, x);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if (z <= -5200000.0)
      		tmp = fma(3.13060547623, y, x);
      	elseif (z <= 225.0)
      		tmp = fma(Float64(b * y), 1.6453555072203998, x);
      	else
      		tmp = fma(3.13060547623, y, x);
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5200000.0], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 225.0], N[(N[(b * y), $MachinePrecision] * 1.6453555072203998 + x), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;z \leq -5200000:\\
      \;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
      
      \mathbf{elif}\;z \leq 225:\\
      \;\;\;\;\mathsf{fma}\left(b \cdot y, 1.6453555072203998, x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -5.2e6 or 225 < z

        1. Initial program 16.2%

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. Taylor expanded in z around inf

          \[\leadsto \color{blue}{x + \frac{313060547623}{100000000000} \cdot y} \]
        3. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \frac{313060547623}{100000000000} \cdot y + \color{blue}{x} \]
          2. lower-fma.f6487.4

            \[\leadsto \mathsf{fma}\left(3.13060547623, \color{blue}{y}, x\right) \]
        4. Applied rewrites87.4%

          \[\leadsto \color{blue}{\mathsf{fma}\left(3.13060547623, y, x\right)} \]

        if -5.2e6 < z < 225

        1. Initial program 99.7%

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. Taylor expanded in z around 0

          \[\leadsto \color{blue}{x + \frac{1000000000000}{607771387771} \cdot \left(b \cdot y\right)} \]
        3. Step-by-step derivation
          1. +-commutativeN/A

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

            \[\leadsto \left(b \cdot y\right) \cdot \frac{1000000000000}{607771387771} + x \]
          3. lower-fma.f64N/A

            \[\leadsto \mathsf{fma}\left(b \cdot y, \color{blue}{\frac{1000000000000}{607771387771}}, x\right) \]
          4. lower-*.f6480.7

            \[\leadsto \mathsf{fma}\left(b \cdot y, 1.6453555072203998, x\right) \]
        4. Applied rewrites80.7%

          \[\leadsto \color{blue}{\mathsf{fma}\left(b \cdot y, 1.6453555072203998, x\right)} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 14: 62.4% accurate, 8.8× speedup?

      \[\begin{array}{l} \\ \mathsf{fma}\left(3.13060547623, y, x\right) \end{array} \]
      (FPCore (x y z t a b) :precision binary64 (fma 3.13060547623 y x))
      double code(double x, double y, double z, double t, double a, double b) {
      	return fma(3.13060547623, y, x);
      }
      
      function code(x, y, z, t, a, b)
      	return fma(3.13060547623, y, x)
      end
      
      code[x_, y_, z_, t_, a_, b_] := N[(3.13060547623 * y + x), $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      \mathsf{fma}\left(3.13060547623, y, x\right)
      \end{array}
      
      Derivation
      1. Initial program 59.1%

        \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
      2. Taylor expanded in z around inf

        \[\leadsto \color{blue}{x + \frac{313060547623}{100000000000} \cdot y} \]
      3. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \frac{313060547623}{100000000000} \cdot y + \color{blue}{x} \]
        2. lower-fma.f6462.4

          \[\leadsto \mathsf{fma}\left(3.13060547623, \color{blue}{y}, x\right) \]
      4. Applied rewrites62.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(3.13060547623, y, x\right)} \]
      5. Add Preprocessing

      Alternative 15: 51.0% accurate, 4.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.8 \cdot 10^{-40}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{-52}:\\ \;\;\;\;3.13060547623 \cdot y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= x -3.8e-40) x (if (<= x 1.8e-52) (* 3.13060547623 y) x)))
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (x <= -3.8e-40) {
      		tmp = x;
      	} else if (x <= 1.8e-52) {
      		tmp = 3.13060547623 * y;
      	} 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)
      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) :: tmp
          if (x <= (-3.8d-40)) then
              tmp = x
          else if (x <= 1.8d-52) then
              tmp = 3.13060547623d0 * y
          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 tmp;
      	if (x <= -3.8e-40) {
      		tmp = x;
      	} else if (x <= 1.8e-52) {
      		tmp = 3.13060547623 * y;
      	} else {
      		tmp = x;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	tmp = 0
      	if x <= -3.8e-40:
      		tmp = x
      	elif x <= 1.8e-52:
      		tmp = 3.13060547623 * y
      	else:
      		tmp = x
      	return tmp
      
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if (x <= -3.8e-40)
      		tmp = x;
      	elseif (x <= 1.8e-52)
      		tmp = Float64(3.13060547623 * y);
      	else
      		tmp = x;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	tmp = 0.0;
      	if (x <= -3.8e-40)
      		tmp = x;
      	elseif (x <= 1.8e-52)
      		tmp = 3.13060547623 * y;
      	else
      		tmp = x;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -3.8e-40], x, If[LessEqual[x, 1.8e-52], N[(3.13060547623 * y), $MachinePrecision], x]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;x \leq -3.8 \cdot 10^{-40}:\\
      \;\;\;\;x\\
      
      \mathbf{elif}\;x \leq 1.8 \cdot 10^{-52}:\\
      \;\;\;\;3.13060547623 \cdot y\\
      
      \mathbf{else}:\\
      \;\;\;\;x\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < -3.7999999999999999e-40 or 1.79999999999999994e-52 < x

        1. Initial program 59.5%

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. Taylor expanded in x around inf

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

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

          if -3.7999999999999999e-40 < x < 1.79999999999999994e-52

          1. Initial program 58.6%

            \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
          2. Taylor expanded in z around inf

            \[\leadsto \color{blue}{x + \frac{313060547623}{100000000000} \cdot y} \]
          3. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \frac{313060547623}{100000000000} \cdot y + \color{blue}{x} \]
            2. lower-fma.f6447.4

              \[\leadsto \mathsf{fma}\left(3.13060547623, \color{blue}{y}, x\right) \]
          4. Applied rewrites47.4%

            \[\leadsto \color{blue}{\mathsf{fma}\left(3.13060547623, y, x\right)} \]
          5. Taylor expanded in x around 0

            \[\leadsto \frac{313060547623}{100000000000} \cdot \color{blue}{y} \]
          6. Step-by-step derivation
            1. lower-*.f6432.8

              \[\leadsto 3.13060547623 \cdot y \]
          7. Applied rewrites32.8%

            \[\leadsto 3.13060547623 \cdot \color{blue}{y} \]
        4. Recombined 2 regimes into one program.
        5. Add Preprocessing

        Alternative 16: 45.5% accurate, 52.6× speedup?

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

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. Taylor expanded in x around inf

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

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

          Reproduce

          ?
          herbie shell --seed 2025120 
          (FPCore (x y z t a b)
            :name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, D"
            :precision binary64
            (+ x (/ (* y (+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b)) (+ (* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z) 0.607771387771))))