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

Percentage Accurate: 58.6% → 98.5%
Time: 6.7s
Alternatives: 15
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 15 alternatives:

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

Initial Program: 58.6% 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.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, \left(-\frac{\left(-\frac{\left(\left(-\frac{\left(-a\right) - \mathsf{fma}\left(-15.234687407, 457.9610022158428 + t, 1112.0901850848957\right)}{z}\right) + t\right) + 457.9610022158428}{z}\right) + 36.52704169880642}{z}\right) + 3.13060547623, x\right)\\ \mathbf{if}\;z \leq -17000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{+31}:\\ \;\;\;\;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}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1
         (fma
          y
          (+
           (-
            (/
             (+
              (-
               (/
                (+
                 (+
                  (-
                   (/
                    (-
                     (- a)
                     (fma
                      -15.234687407
                      (+ 457.9610022158428 t)
                      1112.0901850848957))
                    z))
                  t)
                 457.9610022158428)
                z))
              36.52704169880642)
             z))
           3.13060547623)
          x)))
   (if (<= z -17000000.0)
     t_1
     (if (<= z 3.9e+31)
       (+
        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)))
       t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = fma(y, (-((-(((-((-a - fma(-15.234687407, (457.9610022158428 + t), 1112.0901850848957)) / z) + t) + 457.9610022158428) / z) + 36.52704169880642) / z) + 3.13060547623), x);
	double tmp;
	if (z <= -17000000.0) {
		tmp = t_1;
	} else if (z <= 3.9e+31) {
		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));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = fma(y, Float64(Float64(-Float64(Float64(Float64(-Float64(Float64(Float64(Float64(-Float64(Float64(Float64(-a) - fma(-15.234687407, Float64(457.9610022158428 + t), 1112.0901850848957)) / z)) + t) + 457.9610022158428) / z)) + 36.52704169880642) / z)) + 3.13060547623), x)
	tmp = 0.0
	if (z <= -17000000.0)
		tmp = t_1;
	elseif (z <= 3.9e+31)
		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)) / 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[(y * N[((-N[(N[((-N[(N[(N[((-N[(N[((-a) - N[(-15.234687407 * N[(457.9610022158428 + t), $MachinePrecision] + 1112.0901850848957), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]) + t), $MachinePrecision] + 457.9610022158428), $MachinePrecision] / z), $MachinePrecision]) + 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]) + 3.13060547623), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -17000000.0], t$95$1, If[LessEqual[z, 3.9e+31], 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], t$95$1]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 3.9 \cdot 10^{+31}:\\
\;\;\;\;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}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.7e7 or 3.89999999999999999e31 < z

    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 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}{{z}^{4}}} \]
    3. Step-by-step derivation
      1. metadata-evalN/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)}{{z}^{\left(2 + \color{blue}{2}\right)}} \]
      2. pow-prod-upN/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
      3. lower-*.f64N/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
      4. unpow2N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
      5. lower-*.f64N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
      6. unpow2N/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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
      7. lower-*.f6419.9

        \[\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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
    4. Applied rewrites19.9%

      \[\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}{\left(z \cdot z\right) \cdot \left(z \cdot z\right)}} \]
    5. Applied rewrites21.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)}{\left(\left(z \cdot z\right) \cdot z\right) \cdot z}, x\right)} \]
    6. Taylor expanded in z around -inf

      \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{313060547623}{100000000000} + -1 \cdot \frac{\frac{3652704169880641883561}{100000000000000000000} + -1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + \left(t + -1 \cdot \frac{-1 \cdot a - \left(\frac{1112090185084895700201045470302189}{1000000000000000000000000000000} + \frac{-15234687407}{1000000000} \cdot \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t\right)\right)}{z}\right)}{z}}{z}}, x\right) \]
    7. Applied rewrites56.2%

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

    if -1.7e7 < z < 3.89999999999999999e31

    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} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 97.9% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;z \leq 0.004:\\
\;\;\;\;\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(11.9400905721, z, 0.607771387771\right)}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -12.5 or 0.0040000000000000001 < z

    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 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}{{z}^{4}}} \]
    3. Step-by-step derivation
      1. metadata-evalN/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)}{{z}^{\left(2 + \color{blue}{2}\right)}} \]
      2. pow-prod-upN/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
      3. lower-*.f64N/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
      4. unpow2N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
      5. lower-*.f64N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
      6. unpow2N/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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
      7. lower-*.f6419.9

        \[\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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
    4. Applied rewrites19.9%

      \[\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}{\left(z \cdot z\right) \cdot \left(z \cdot z\right)}} \]
    5. Applied rewrites21.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)}{\left(\left(z \cdot z\right) \cdot z\right) \cdot z}, x\right)} \]
    6. Taylor expanded in z around -inf

      \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{313060547623}{100000000000} + -1 \cdot \frac{\frac{3652704169880641883561}{100000000000000000000} + -1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + \left(t + -1 \cdot \frac{-1 \cdot a - \left(\frac{1112090185084895700201045470302189}{1000000000000000000000000000000} + \frac{-15234687407}{1000000000} \cdot \left(\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t\right)\right)}{z}\right)}{z}}{z}}, x\right) \]
    7. Applied rewrites56.2%

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

    if -12.5 < z < 0.0040000000000000001

    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 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}{{z}^{4}}} \]
    3. Step-by-step derivation
      1. metadata-evalN/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)}{{z}^{\left(2 + \color{blue}{2}\right)}} \]
      2. pow-prod-upN/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
      3. lower-*.f64N/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
      4. unpow2N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
      5. lower-*.f64N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
      6. unpow2N/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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
      7. lower-*.f6419.9

        \[\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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
    4. Applied rewrites19.9%

      \[\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}{\left(z \cdot z\right) \cdot \left(z \cdot z\right)}} \]
    5. Applied rewrites21.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)}{\left(\left(z \cdot z\right) \cdot z\right) \cdot z}, x\right)} \]
    6. Taylor expanded in z around 0

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

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

        \[\leadsto \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(11.9400905721, \color{blue}{z}, 0.607771387771\right)}, x\right) \]
    8. Applied rewrites54.4%

      \[\leadsto \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)}{\color{blue}{\mathsf{fma}\left(11.9400905721, z, 0.607771387771\right)}}, x\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 3: 96.3% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -12.5:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \left(\frac{457.9610022158428 + t}{z \cdot z} - \frac{36.52704169880642}{z}\right), x\right)\\ \mathbf{elif}\;z \leq 60:\\ \;\;\;\;\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(11.9400905721, z, 0.607771387771\right)}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \left(-\frac{\left(-\frac{457.9610022158428 + t}{z}\right) + 36.52704169880642}{z}\right) + 3.13060547623, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= z -12.5)
   (fma
    y
    (+
     3.13060547623
     (- (/ (+ 457.9610022158428 t) (* z z)) (/ 36.52704169880642 z)))
    x)
   (if (<= z 60.0)
     (fma
      y
      (/
       (fma (fma (fma (fma 3.13060547623 z 11.1667541262) z t) z a) z b)
       (fma 11.9400905721 z 0.607771387771))
      x)
     (fma
      y
      (+
       (- (/ (+ (- (/ (+ 457.9610022158428 t) z)) 36.52704169880642) z))
       3.13060547623)
      x))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -12.5) {
		tmp = fma(y, (3.13060547623 + (((457.9610022158428 + t) / (z * z)) - (36.52704169880642 / z))), x);
	} else if (z <= 60.0) {
		tmp = fma(y, (fma(fma(fma(fma(3.13060547623, z, 11.1667541262), z, t), z, a), z, b) / fma(11.9400905721, z, 0.607771387771)), x);
	} else {
		tmp = fma(y, (-((-((457.9610022158428 + t) / z) + 36.52704169880642) / z) + 3.13060547623), x);
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= -12.5)
		tmp = fma(y, Float64(3.13060547623 + Float64(Float64(Float64(457.9610022158428 + t) / Float64(z * z)) - Float64(36.52704169880642 / z))), x);
	elseif (z <= 60.0)
		tmp = fma(y, Float64(fma(fma(fma(fma(3.13060547623, z, 11.1667541262), z, t), z, a), z, b) / fma(11.9400905721, z, 0.607771387771)), x);
	else
		tmp = fma(y, Float64(Float64(-Float64(Float64(Float64(-Float64(Float64(457.9610022158428 + t) / z)) + 36.52704169880642) / z)) + 3.13060547623), x);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -12.5], N[(y * N[(3.13060547623 + N[(N[(N[(457.9610022158428 + t), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision] - N[(36.52704169880642 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 60.0], N[(y * N[(N[(N[(N[(N[(3.13060547623 * z + 11.1667541262), $MachinePrecision] * z + t), $MachinePrecision] * z + a), $MachinePrecision] * z + b), $MachinePrecision] / N[(11.9400905721 * z + 0.607771387771), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(y * N[((-N[(N[((-N[(N[(457.9610022158428 + t), $MachinePrecision] / z), $MachinePrecision]) + 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]) + 3.13060547623), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 60:\\
\;\;\;\;\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(11.9400905721, z, 0.607771387771\right)}, x\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \left(-\frac{\left(-\frac{457.9610022158428 + t}{z}\right) + 36.52704169880642}{z}\right) + 3.13060547623, x\right)\\


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

    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 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}{{z}^{4}}} \]
    3. Step-by-step derivation
      1. metadata-evalN/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)}{{z}^{\left(2 + \color{blue}{2}\right)}} \]
      2. pow-prod-upN/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
      3. lower-*.f64N/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
      4. unpow2N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
      5. lower-*.f64N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
      6. unpow2N/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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
      7. lower-*.f6419.9

        \[\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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
    4. Applied rewrites19.9%

      \[\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}{\left(z \cdot z\right) \cdot \left(z \cdot z\right)}} \]
    5. Applied rewrites21.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)}{\left(\left(z \cdot z\right) \cdot z\right) \cdot z}, x\right)} \]
    6. Taylor expanded in z around inf

      \[\leadsto \mathsf{fma}\left(y, \color{blue}{\left(\frac{313060547623}{100000000000} + \left(\frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000}}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}}, x\right) \]
    7. Step-by-step derivation
      1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

    if -12.5 < z < 60

    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 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}{{z}^{4}}} \]
    3. Step-by-step derivation
      1. metadata-evalN/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)}{{z}^{\left(2 + \color{blue}{2}\right)}} \]
      2. pow-prod-upN/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
      3. lower-*.f64N/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
      4. unpow2N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
      5. lower-*.f64N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
      6. unpow2N/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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
      7. lower-*.f6419.9

        \[\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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
    4. Applied rewrites19.9%

      \[\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}{\left(z \cdot z\right) \cdot \left(z \cdot z\right)}} \]
    5. Applied rewrites21.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)}{\left(\left(z \cdot z\right) \cdot z\right) \cdot z}, x\right)} \]
    6. Taylor expanded in z around 0

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

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

        \[\leadsto \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(11.9400905721, \color{blue}{z}, 0.607771387771\right)}, x\right) \]
    8. Applied rewrites54.4%

      \[\leadsto \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)}{\color{blue}{\mathsf{fma}\left(11.9400905721, z, 0.607771387771\right)}}, x\right) \]

    if 60 < z

    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 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}{{z}^{4}}} \]
    3. Step-by-step derivation
      1. metadata-evalN/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)}{{z}^{\left(2 + \color{blue}{2}\right)}} \]
      2. pow-prod-upN/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
      3. lower-*.f64N/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
      4. unpow2N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
      5. lower-*.f64N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
      6. unpow2N/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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
      7. lower-*.f6419.9

        \[\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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
    4. Applied rewrites19.9%

      \[\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}{\left(z \cdot z\right) \cdot \left(z \cdot z\right)}} \]
    5. Applied rewrites21.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)}{\left(\left(z \cdot z\right) \cdot z\right) \cdot z}, x\right)} \]
    6. Taylor expanded in z around -inf

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, \left(-\frac{\left(-\frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{z}\right) + \frac{3652704169880641883561}{100000000000000000000}}{z}\right) + \frac{313060547623}{100000000000}, x\right) \]
      11. lower-+.f6455.9

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

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

Alternative 4: 96.0% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -62000:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \left(\frac{457.9610022158428 + t}{z \cdot z} - \frac{36.52704169880642}{z}\right), x\right)\\ \mathbf{elif}\;z \leq 48:\\ \;\;\;\;\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)}{0.607771387771}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \left(-\frac{\left(-\frac{457.9610022158428 + t}{z}\right) + 36.52704169880642}{z}\right) + 3.13060547623, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= z -62000.0)
   (fma
    y
    (+
     3.13060547623
     (- (/ (+ 457.9610022158428 t) (* z z)) (/ 36.52704169880642 z)))
    x)
   (if (<= z 48.0)
     (fma
      y
      (/
       (fma (fma (fma (fma 3.13060547623 z 11.1667541262) z t) z a) z b)
       0.607771387771)
      x)
     (fma
      y
      (+
       (- (/ (+ (- (/ (+ 457.9610022158428 t) z)) 36.52704169880642) z))
       3.13060547623)
      x))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -62000.0) {
		tmp = fma(y, (3.13060547623 + (((457.9610022158428 + t) / (z * z)) - (36.52704169880642 / z))), x);
	} else if (z <= 48.0) {
		tmp = fma(y, (fma(fma(fma(fma(3.13060547623, z, 11.1667541262), z, t), z, a), z, b) / 0.607771387771), x);
	} else {
		tmp = fma(y, (-((-((457.9610022158428 + t) / z) + 36.52704169880642) / z) + 3.13060547623), x);
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= -62000.0)
		tmp = fma(y, Float64(3.13060547623 + Float64(Float64(Float64(457.9610022158428 + t) / Float64(z * z)) - Float64(36.52704169880642 / z))), x);
	elseif (z <= 48.0)
		tmp = fma(y, Float64(fma(fma(fma(fma(3.13060547623, z, 11.1667541262), z, t), z, a), z, b) / 0.607771387771), x);
	else
		tmp = fma(y, Float64(Float64(-Float64(Float64(Float64(-Float64(Float64(457.9610022158428 + t) / z)) + 36.52704169880642) / z)) + 3.13060547623), x);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -62000.0], N[(y * N[(3.13060547623 + N[(N[(N[(457.9610022158428 + t), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision] - N[(36.52704169880642 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 48.0], N[(y * N[(N[(N[(N[(N[(3.13060547623 * z + 11.1667541262), $MachinePrecision] * z + t), $MachinePrecision] * z + a), $MachinePrecision] * z + b), $MachinePrecision] / 0.607771387771), $MachinePrecision] + x), $MachinePrecision], N[(y * N[((-N[(N[((-N[(N[(457.9610022158428 + t), $MachinePrecision] / z), $MachinePrecision]) + 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]) + 3.13060547623), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 48:\\
\;\;\;\;\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)}{0.607771387771}, x\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \left(-\frac{\left(-\frac{457.9610022158428 + t}{z}\right) + 36.52704169880642}{z}\right) + 3.13060547623, x\right)\\


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

    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 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}{{z}^{4}}} \]
    3. Step-by-step derivation
      1. metadata-evalN/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)}{{z}^{\left(2 + \color{blue}{2}\right)}} \]
      2. pow-prod-upN/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
      3. lower-*.f64N/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
      4. unpow2N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
      5. lower-*.f64N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
      6. unpow2N/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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
      7. lower-*.f6419.9

        \[\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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
    4. Applied rewrites19.9%

      \[\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}{\left(z \cdot z\right) \cdot \left(z \cdot z\right)}} \]
    5. Applied rewrites21.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)}{\left(\left(z \cdot z\right) \cdot z\right) \cdot z}, x\right)} \]
    6. Taylor expanded in z around inf

      \[\leadsto \mathsf{fma}\left(y, \color{blue}{\left(\frac{313060547623}{100000000000} + \left(\frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000}}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}}, x\right) \]
    7. Step-by-step derivation
      1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

    if -62000 < z < 48

    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 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}{{z}^{4}}} \]
    3. Step-by-step derivation
      1. metadata-evalN/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)}{{z}^{\left(2 + \color{blue}{2}\right)}} \]
      2. pow-prod-upN/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
      3. lower-*.f64N/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
      4. unpow2N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
      5. lower-*.f64N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
      6. unpow2N/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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
      7. lower-*.f6419.9

        \[\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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
    4. Applied rewrites19.9%

      \[\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}{\left(z \cdot z\right) \cdot \left(z \cdot z\right)}} \]
    5. Applied rewrites21.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)}{\left(\left(z \cdot z\right) \cdot z\right) \cdot z}, x\right)} \]
    6. Taylor expanded in z around 0

      \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{313060547623}{100000000000}, z, \frac{55833770631}{5000000000}\right), z, t\right), z, a\right), z, b\right)}{\color{blue}{\frac{607771387771}{1000000000000}}}, x\right) \]
    7. Step-by-step derivation
      1. Applied rewrites55.1%

        \[\leadsto \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)}{\color{blue}{0.607771387771}}, x\right) \]

      if 48 < z

      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 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}{{z}^{4}}} \]
      3. Step-by-step derivation
        1. metadata-evalN/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)}{{z}^{\left(2 + \color{blue}{2}\right)}} \]
        2. pow-prod-upN/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
        3. lower-*.f64N/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
        4. unpow2N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
        5. lower-*.f64N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
        6. unpow2N/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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
        7. lower-*.f6419.9

          \[\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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
      4. Applied rewrites19.9%

        \[\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}{\left(z \cdot z\right) \cdot \left(z \cdot z\right)}} \]
      5. Applied rewrites21.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)}{\left(\left(z \cdot z\right) \cdot z\right) \cdot z}, x\right)} \]
      6. Taylor expanded in z around -inf

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(y, \left(-\frac{\left(-\frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{z}\right) + \frac{3652704169880641883561}{100000000000000000000}}{z}\right) + \frac{313060547623}{100000000000}, x\right) \]
        11. lower-+.f6455.9

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

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\left(-\frac{\left(-\frac{457.9610022158428 + t}{z}\right) + 36.52704169880642}{z}\right) + 3.13060547623}, x\right) \]
    8. Recombined 3 regimes into one program.
    9. Add Preprocessing

    Alternative 5: 87.6% accurate, 1.5× speedup?

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

      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 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}{{z}^{4}}} \]
      3. Step-by-step derivation
        1. metadata-evalN/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)}{{z}^{\left(2 + \color{blue}{2}\right)}} \]
        2. pow-prod-upN/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
        3. lower-*.f64N/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
        4. unpow2N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
        5. lower-*.f64N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
        6. unpow2N/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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
        7. lower-*.f6419.9

          \[\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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
      4. Applied rewrites19.9%

        \[\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}{\left(z \cdot z\right) \cdot \left(z \cdot z\right)}} \]
      5. Applied rewrites21.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)}{\left(\left(z \cdot z\right) \cdot z\right) \cdot z}, x\right)} \]
      6. Taylor expanded in z around inf

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\left(\frac{313060547623}{100000000000} + \left(\frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000}}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}}, x\right) \]
      7. Step-by-step derivation
        1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

      if -240 < z < 0.012

      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 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 rewrites52.3%

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

      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 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}{{z}^{4}}} \]
      3. Step-by-step derivation
        1. metadata-evalN/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)}{{z}^{\left(2 + \color{blue}{2}\right)}} \]
        2. pow-prod-upN/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
        3. lower-*.f64N/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
        4. unpow2N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
        5. lower-*.f64N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
        6. unpow2N/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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
        7. lower-*.f6419.9

          \[\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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
      4. Applied rewrites19.9%

        \[\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}{\left(z \cdot z\right) \cdot \left(z \cdot z\right)}} \]
      5. Applied rewrites21.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)}{\left(\left(z \cdot z\right) \cdot z\right) \cdot z}, x\right)} \]
      6. Taylor expanded in z around -inf

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(y, \left(-\frac{\left(-\frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{z}\right) + \frac{3652704169880641883561}{100000000000000000000}}{z}\right) + \frac{313060547623}{100000000000}, x\right) \]
        11. lower-+.f6455.9

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

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

    Alternative 6: 86.9% accurate, 1.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -19:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \left(\frac{457.9610022158428 + t}{z \cdot z} - \frac{36.52704169880642}{z}\right), x\right)\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-13}:\\ \;\;\;\;x + \frac{y \cdot b}{\left(11.9400905721 - -31.4690115749 \cdot z\right) \cdot z + 0.607771387771}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \left(-\frac{\left(-\frac{457.9610022158428 + t}{z}\right) + 36.52704169880642}{z}\right) + 3.13060547623, x\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= z -19.0)
       (fma
        y
        (+
         3.13060547623
         (- (/ (+ 457.9610022158428 t) (* z z)) (/ 36.52704169880642 z)))
        x)
       (if (<= z 6.8e-13)
         (+
          x
          (/
           (* y b)
           (+ (* (- 11.9400905721 (* -31.4690115749 z)) z) 0.607771387771)))
         (fma
          y
          (+
           (- (/ (+ (- (/ (+ 457.9610022158428 t) z)) 36.52704169880642) z))
           3.13060547623)
          x))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (z <= -19.0) {
    		tmp = fma(y, (3.13060547623 + (((457.9610022158428 + t) / (z * z)) - (36.52704169880642 / z))), x);
    	} else if (z <= 6.8e-13) {
    		tmp = x + ((y * b) / (((11.9400905721 - (-31.4690115749 * z)) * z) + 0.607771387771));
    	} else {
    		tmp = fma(y, (-((-((457.9610022158428 + t) / z) + 36.52704169880642) / z) + 3.13060547623), x);
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (z <= -19.0)
    		tmp = fma(y, Float64(3.13060547623 + Float64(Float64(Float64(457.9610022158428 + t) / Float64(z * z)) - Float64(36.52704169880642 / z))), x);
    	elseif (z <= 6.8e-13)
    		tmp = Float64(x + Float64(Float64(y * b) / Float64(Float64(Float64(11.9400905721 - Float64(-31.4690115749 * z)) * z) + 0.607771387771)));
    	else
    		tmp = fma(y, Float64(Float64(-Float64(Float64(Float64(-Float64(Float64(457.9610022158428 + t) / z)) + 36.52704169880642) / z)) + 3.13060547623), x);
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -19.0], N[(y * N[(3.13060547623 + N[(N[(N[(457.9610022158428 + t), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision] - N[(36.52704169880642 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 6.8e-13], N[(x + N[(N[(y * b), $MachinePrecision] / N[(N[(N[(11.9400905721 - N[(-31.4690115749 * z), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[((-N[(N[((-N[(N[(457.9610022158428 + t), $MachinePrecision] / z), $MachinePrecision]) + 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]) + 3.13060547623), $MachinePrecision] + x), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;z \leq -19:\\
    \;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \left(\frac{457.9610022158428 + t}{z \cdot z} - \frac{36.52704169880642}{z}\right), x\right)\\
    
    \mathbf{elif}\;z \leq 6.8 \cdot 10^{-13}:\\
    \;\;\;\;x + \frac{y \cdot b}{\left(11.9400905721 - -31.4690115749 \cdot z\right) \cdot z + 0.607771387771}\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(y, \left(-\frac{\left(-\frac{457.9610022158428 + t}{z}\right) + 36.52704169880642}{z}\right) + 3.13060547623, x\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if z < -19

      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 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}{{z}^{4}}} \]
      3. Step-by-step derivation
        1. metadata-evalN/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)}{{z}^{\left(2 + \color{blue}{2}\right)}} \]
        2. pow-prod-upN/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
        3. lower-*.f64N/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
        4. unpow2N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
        5. lower-*.f64N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
        6. unpow2N/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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
        7. lower-*.f6419.9

          \[\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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
      4. Applied rewrites19.9%

        \[\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}{\left(z \cdot z\right) \cdot \left(z \cdot z\right)}} \]
      5. Applied rewrites21.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)}{\left(\left(z \cdot z\right) \cdot z\right) \cdot z}, x\right)} \]
      6. Taylor expanded in z around inf

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\left(\frac{313060547623}{100000000000} + \left(\frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000}}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}}, x\right) \]
      7. Step-by-step derivation
        1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

      if -19 < z < 6.80000000000000031e-13

      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 0

        \[\leadsto x + \frac{y \cdot \color{blue}{b}}{\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. Applied rewrites64.8%

          \[\leadsto x + \frac{y \cdot \color{blue}{b}}{\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 b}{\color{blue}{\left(\frac{119400905721}{10000000000} + \frac{314690115749}{10000000000} \cdot z\right)} \cdot z + \frac{607771387771}{1000000000000}} \]
        3. Step-by-step derivation
          1. fp-cancel-sign-sub-invN/A

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

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

            \[\leadsto x + \frac{y \cdot b}{\left(\frac{119400905721}{10000000000} - \left(\mathsf{neg}\left(\frac{314690115749}{10000000000}\right)\right) \cdot \color{blue}{z}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          4. metadata-eval64.0

            \[\leadsto x + \frac{y \cdot b}{\left(11.9400905721 - -31.4690115749 \cdot z\right) \cdot z + 0.607771387771} \]
        4. Applied rewrites64.0%

          \[\leadsto x + \frac{y \cdot b}{\color{blue}{\left(11.9400905721 - -31.4690115749 \cdot z\right)} \cdot z + 0.607771387771} \]

        if 6.80000000000000031e-13 < z

        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 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}{{z}^{4}}} \]
        3. Step-by-step derivation
          1. metadata-evalN/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)}{{z}^{\left(2 + \color{blue}{2}\right)}} \]
          2. pow-prod-upN/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
          3. lower-*.f64N/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
          4. unpow2N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
          5. lower-*.f64N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
          6. unpow2N/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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
          7. lower-*.f6419.9

            \[\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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
        4. Applied rewrites19.9%

          \[\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}{\left(z \cdot z\right) \cdot \left(z \cdot z\right)}} \]
        5. Applied rewrites21.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)}{\left(\left(z \cdot z\right) \cdot z\right) \cdot z}, x\right)} \]
        6. Taylor expanded in z around -inf

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(y, \left(-\frac{\left(-\frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{z}\right) + \frac{3652704169880641883561}{100000000000000000000}}{z}\right) + \frac{313060547623}{100000000000}, x\right) \]
          11. lower-+.f6455.9

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

          \[\leadsto \mathsf{fma}\left(y, \color{blue}{\left(-\frac{\left(-\frac{457.9610022158428 + t}{z}\right) + 36.52704169880642}{z}\right) + 3.13060547623}, x\right) \]
      4. Recombined 3 regimes into one program.
      5. Add Preprocessing

      Alternative 7: 86.9% accurate, 1.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, \left(-\frac{\left(-\frac{457.9610022158428 + t}{z}\right) + 36.52704169880642}{z}\right) + 3.13060547623, x\right)\\ \mathbf{if}\;z \leq -19:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-13}:\\ \;\;\;\;x + \frac{y \cdot b}{\left(11.9400905721 - -31.4690115749 \cdot z\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
               (fma
                y
                (+
                 (- (/ (+ (- (/ (+ 457.9610022158428 t) z)) 36.52704169880642) z))
                 3.13060547623)
                x)))
         (if (<= z -19.0)
           t_1
           (if (<= z 6.8e-13)
             (+
              x
              (/
               (* y b)
               (+ (* (- 11.9400905721 (* -31.4690115749 z)) z) 0.607771387771)))
             t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = fma(y, (-((-((457.9610022158428 + t) / z) + 36.52704169880642) / z) + 3.13060547623), x);
      	double tmp;
      	if (z <= -19.0) {
      		tmp = t_1;
      	} else if (z <= 6.8e-13) {
      		tmp = x + ((y * b) / (((11.9400905721 - (-31.4690115749 * z)) * z) + 0.607771387771));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	t_1 = fma(y, Float64(Float64(-Float64(Float64(Float64(-Float64(Float64(457.9610022158428 + t) / z)) + 36.52704169880642) / z)) + 3.13060547623), x)
      	tmp = 0.0
      	if (z <= -19.0)
      		tmp = t_1;
      	elseif (z <= 6.8e-13)
      		tmp = Float64(x + Float64(Float64(y * b) / Float64(Float64(Float64(11.9400905721 - Float64(-31.4690115749 * z)) * z) + 0.607771387771)));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[((-N[(N[((-N[(N[(457.9610022158428 + t), $MachinePrecision] / z), $MachinePrecision]) + 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]) + 3.13060547623), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -19.0], t$95$1, If[LessEqual[z, 6.8e-13], N[(x + N[(N[(y * b), $MachinePrecision] / N[(N[(N[(11.9400905721 - N[(-31.4690115749 * z), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \mathsf{fma}\left(y, \left(-\frac{\left(-\frac{457.9610022158428 + t}{z}\right) + 36.52704169880642}{z}\right) + 3.13060547623, x\right)\\
      \mathbf{if}\;z \leq -19:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 6.8 \cdot 10^{-13}:\\
      \;\;\;\;x + \frac{y \cdot b}{\left(11.9400905721 - -31.4690115749 \cdot z\right) \cdot z + 0.607771387771}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -19 or 6.80000000000000031e-13 < z

        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 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}{{z}^{4}}} \]
        3. Step-by-step derivation
          1. metadata-evalN/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)}{{z}^{\left(2 + \color{blue}{2}\right)}} \]
          2. pow-prod-upN/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
          3. lower-*.f64N/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
          4. unpow2N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
          5. lower-*.f64N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
          6. unpow2N/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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
          7. lower-*.f6419.9

            \[\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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
        4. Applied rewrites19.9%

          \[\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}{\left(z \cdot z\right) \cdot \left(z \cdot z\right)}} \]
        5. Applied rewrites21.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)}{\left(\left(z \cdot z\right) \cdot z\right) \cdot z}, x\right)} \]
        6. Taylor expanded in z around -inf

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(y, \left(-\frac{\left(-\frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{z}\right) + \frac{3652704169880641883561}{100000000000000000000}}{z}\right) + \frac{313060547623}{100000000000}, x\right) \]
          11. lower-+.f6455.9

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

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

        if -19 < z < 6.80000000000000031e-13

        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 0

          \[\leadsto x + \frac{y \cdot \color{blue}{b}}{\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. Applied rewrites64.8%

            \[\leadsto x + \frac{y \cdot \color{blue}{b}}{\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 b}{\color{blue}{\left(\frac{119400905721}{10000000000} + \frac{314690115749}{10000000000} \cdot z\right)} \cdot z + \frac{607771387771}{1000000000000}} \]
          3. Step-by-step derivation
            1. fp-cancel-sign-sub-invN/A

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

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

              \[\leadsto x + \frac{y \cdot b}{\left(\frac{119400905721}{10000000000} - \left(\mathsf{neg}\left(\frac{314690115749}{10000000000}\right)\right) \cdot \color{blue}{z}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
            4. metadata-eval64.0

              \[\leadsto x + \frac{y \cdot b}{\left(11.9400905721 - -31.4690115749 \cdot z\right) \cdot z + 0.607771387771} \]
          4. Applied rewrites64.0%

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

        Alternative 8: 86.9% accurate, 1.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, \left(-\left(-\frac{t}{z \cdot z}\right)\right) + 3.13060547623, x\right)\\ \mathbf{if}\;z \leq -19:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-13}:\\ \;\;\;\;x + \frac{y \cdot b}{\left(11.9400905721 - -31.4690115749 \cdot z\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 (fma y (+ (- (- (/ t (* z z)))) 3.13060547623) x)))
           (if (<= z -19.0)
             t_1
             (if (<= z 6.8e-13)
               (+
                x
                (/
                 (* y b)
                 (+ (* (- 11.9400905721 (* -31.4690115749 z)) z) 0.607771387771)))
               t_1))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = fma(y, (-(-(t / (z * z))) + 3.13060547623), x);
        	double tmp;
        	if (z <= -19.0) {
        		tmp = t_1;
        	} else if (z <= 6.8e-13) {
        		tmp = x + ((y * b) / (((11.9400905721 - (-31.4690115749 * z)) * z) + 0.607771387771));
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	t_1 = fma(y, Float64(Float64(-Float64(-Float64(t / Float64(z * z)))) + 3.13060547623), x)
        	tmp = 0.0
        	if (z <= -19.0)
        		tmp = t_1;
        	elseif (z <= 6.8e-13)
        		tmp = Float64(x + Float64(Float64(y * b) / Float64(Float64(Float64(11.9400905721 - Float64(-31.4690115749 * z)) * z) + 0.607771387771)));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[((-(-N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision])) + 3.13060547623), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -19.0], t$95$1, If[LessEqual[z, 6.8e-13], N[(x + N[(N[(y * b), $MachinePrecision] / N[(N[(N[(11.9400905721 - N[(-31.4690115749 * z), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \mathsf{fma}\left(y, \left(-\left(-\frac{t}{z \cdot z}\right)\right) + 3.13060547623, x\right)\\
        \mathbf{if}\;z \leq -19:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;z \leq 6.8 \cdot 10^{-13}:\\
        \;\;\;\;x + \frac{y \cdot b}{\left(11.9400905721 - -31.4690115749 \cdot z\right) \cdot z + 0.607771387771}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -19 or 6.80000000000000031e-13 < z

          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 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}{{z}^{4}}} \]
          3. Step-by-step derivation
            1. metadata-evalN/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)}{{z}^{\left(2 + \color{blue}{2}\right)}} \]
            2. pow-prod-upN/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
            3. lower-*.f64N/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
            4. unpow2N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
            5. lower-*.f64N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
            6. unpow2N/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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
            7. lower-*.f6419.9

              \[\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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
          4. Applied rewrites19.9%

            \[\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}{\left(z \cdot z\right) \cdot \left(z \cdot z\right)}} \]
          5. Applied rewrites21.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)}{\left(\left(z \cdot z\right) \cdot z\right) \cdot z}, x\right)} \]
          6. Taylor expanded in z around -inf

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(y, \left(-\frac{\left(-\frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{z}\right) + \frac{3652704169880641883561}{100000000000000000000}}{z}\right) + \frac{313060547623}{100000000000}, x\right) \]
            11. lower-+.f6455.9

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(y, \left(-\left(-\frac{t}{z \cdot z}\right)\right) + \frac{313060547623}{100000000000}, x\right) \]
            5. lift-*.f6456.7

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

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

          if -19 < z < 6.80000000000000031e-13

          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 0

            \[\leadsto x + \frac{y \cdot \color{blue}{b}}{\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. Applied rewrites64.8%

              \[\leadsto x + \frac{y \cdot \color{blue}{b}}{\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 b}{\color{blue}{\left(\frac{119400905721}{10000000000} + \frac{314690115749}{10000000000} \cdot z\right)} \cdot z + \frac{607771387771}{1000000000000}} \]
            3. Step-by-step derivation
              1. fp-cancel-sign-sub-invN/A

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

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

                \[\leadsto x + \frac{y \cdot b}{\left(\frac{119400905721}{10000000000} - \left(\mathsf{neg}\left(\frac{314690115749}{10000000000}\right)\right) \cdot \color{blue}{z}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
              4. metadata-eval64.0

                \[\leadsto x + \frac{y \cdot b}{\left(11.9400905721 - -31.4690115749 \cdot z\right) \cdot z + 0.607771387771} \]
            4. Applied rewrites64.0%

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

          Alternative 9: 86.9% accurate, 2.1× speedup?

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

            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 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}{{z}^{4}}} \]
            3. Step-by-step derivation
              1. metadata-evalN/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)}{{z}^{\left(2 + \color{blue}{2}\right)}} \]
              2. pow-prod-upN/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
              3. lower-*.f64N/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
              4. unpow2N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
              5. lower-*.f64N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
              6. unpow2N/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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
              7. lower-*.f6419.9

                \[\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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
            4. Applied rewrites19.9%

              \[\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}{\left(z \cdot z\right) \cdot \left(z \cdot z\right)}} \]
            5. Applied rewrites21.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)}{\left(\left(z \cdot z\right) \cdot z\right) \cdot z}, x\right)} \]
            6. Taylor expanded in z around -inf

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(y, \left(-\frac{\left(-\frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{z}\right) + \frac{3652704169880641883561}{100000000000000000000}}{z}\right) + \frac{313060547623}{100000000000}, x\right) \]
              11. lower-+.f6455.9

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(y, \left(-\left(-\frac{t}{z \cdot z}\right)\right) + \frac{313060547623}{100000000000}, x\right) \]
              5. lift-*.f6456.7

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

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

            if -19 < z < 6.80000000000000031e-13

            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 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-*.f6460.8

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

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

          Alternative 10: 84.2% accurate, 2.2× speedup?

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

            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 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}{{z}^{4}}} \]
            3. Step-by-step derivation
              1. metadata-evalN/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)}{{z}^{\left(2 + \color{blue}{2}\right)}} \]
              2. pow-prod-upN/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
              3. lower-*.f64N/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
              4. unpow2N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
              5. lower-*.f64N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
              6. unpow2N/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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
              7. lower-*.f6419.9

                \[\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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
            4. Applied rewrites19.9%

              \[\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}{\left(z \cdot z\right) \cdot \left(z \cdot z\right)}} \]
            5. Applied rewrites21.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)}{\left(\left(z \cdot z\right) \cdot z\right) \cdot z}, x\right)} \]
            6. Taylor expanded in z around inf

              \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{313060547623}{100000000000} - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}}, x\right) \]
            7. Step-by-step derivation
              1. lower--.f64N/A

                \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \color{blue}{\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}}, x\right) \]
              2. associate-*r/N/A

                \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \frac{\frac{3652704169880641883561}{100000000000000000000} \cdot 1}{\color{blue}{z}}, x\right) \]
              3. metadata-evalN/A

                \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \frac{\frac{3652704169880641883561}{100000000000000000000}}{z}, x\right) \]
              4. lower-/.f6459.6

                \[\leadsto \mathsf{fma}\left(y, 3.13060547623 - \frac{36.52704169880642}{\color{blue}{z}}, x\right) \]
            8. Applied rewrites59.6%

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

            if -6e4 < z < 6.80000000000000031e-13

            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 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-*.f6460.8

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

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

            if 6.80000000000000031e-13 < z < 1.6999999999999999e50

            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 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}{{z}^{4}}} \]
            3. Step-by-step derivation
              1. metadata-evalN/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)}{{z}^{\left(2 + \color{blue}{2}\right)}} \]
              2. pow-prod-upN/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
              3. lower-*.f64N/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
              4. unpow2N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
              5. lower-*.f64N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
              6. unpow2N/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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
              7. lower-*.f6419.9

                \[\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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
            4. Applied rewrites19.9%

              \[\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}{\left(z \cdot z\right) \cdot \left(z \cdot z\right)}} \]
            5. Applied rewrites21.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)}{\left(\left(z \cdot z\right) \cdot z\right) \cdot z}, x\right)} \]
            6. Taylor expanded in z around -inf

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(y, \left(-\frac{\left(-\frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{z}\right) + \frac{3652704169880641883561}{100000000000000000000}}{z}\right) + \frac{313060547623}{100000000000}, x\right) \]
              11. lower-+.f6455.9

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

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

              \[\leadsto \mathsf{fma}\left(y, \frac{t}{\color{blue}{{z}^{2}}}, x\right) \]
            10. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \mathsf{fma}\left(y, \frac{t}{{z}^{\color{blue}{2}}}, x\right) \]
              2. pow2N/A

                \[\leadsto \mathsf{fma}\left(y, \frac{t}{z \cdot z}, x\right) \]
              3. lift-*.f6436.9

                \[\leadsto \mathsf{fma}\left(y, \frac{t}{z \cdot z}, x\right) \]
            11. Applied rewrites36.9%

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

          Alternative 11: 83.9% accurate, 2.7× speedup?

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

            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 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}{{z}^{4}}} \]
            3. Step-by-step derivation
              1. metadata-evalN/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)}{{z}^{\left(2 + \color{blue}{2}\right)}} \]
              2. pow-prod-upN/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
              3. lower-*.f64N/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)}{{z}^{2} \cdot \color{blue}{{z}^{2}}} \]
              4. unpow2N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
              5. lower-*.f64N/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)}{\left(z \cdot z\right) \cdot {\color{blue}{z}}^{2}} \]
              6. unpow2N/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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
              7. lower-*.f6419.9

                \[\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)}{\left(z \cdot z\right) \cdot \left(z \cdot \color{blue}{z}\right)} \]
            4. Applied rewrites19.9%

              \[\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}{\left(z \cdot z\right) \cdot \left(z \cdot z\right)}} \]
            5. Applied rewrites21.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)}{\left(\left(z \cdot z\right) \cdot z\right) \cdot z}, x\right)} \]
            6. Taylor expanded in z around inf

              \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{313060547623}{100000000000} - \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}}, x\right) \]
            7. Step-by-step derivation
              1. lower--.f64N/A

                \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \color{blue}{\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}}, x\right) \]
              2. associate-*r/N/A

                \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \frac{\frac{3652704169880641883561}{100000000000000000000} \cdot 1}{\color{blue}{z}}, x\right) \]
              3. metadata-evalN/A

                \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \frac{\frac{3652704169880641883561}{100000000000000000000}}{z}, x\right) \]
              4. lower-/.f6459.6

                \[\leadsto \mathsf{fma}\left(y, 3.13060547623 - \frac{36.52704169880642}{\color{blue}{z}}, x\right) \]
            8. Applied rewrites59.6%

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

            if -6e4 < z < 3.80000000000000011e-9

            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 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-*.f6460.8

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

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

          Alternative 12: 83.9% accurate, 3.2× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -17000000:\\ \;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\ \mathbf{elif}\;z \leq 0.004:\\ \;\;\;\;\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 -17000000.0)
             (fma 3.13060547623 y x)
             (if (<= z 0.004)
               (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 <= -17000000.0) {
          		tmp = fma(3.13060547623, y, x);
          	} else if (z <= 0.004) {
          		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 <= -17000000.0)
          		tmp = fma(3.13060547623, y, x);
          	elseif (z <= 0.004)
          		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, -17000000.0], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 0.004], 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 -17000000:\\
          \;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
          
          \mathbf{elif}\;z \leq 0.004:\\
          \;\;\;\;\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 < -1.7e7 or 0.0040000000000000001 < z

            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.f6463.5

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

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

            if -1.7e7 < z < 0.0040000000000000001

            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 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-*.f6460.8

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

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

          Alternative 13: 83.9% accurate, 3.2× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -17000000:\\ \;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\ \mathbf{elif}\;z \leq 0.004:\\ \;\;\;\;\mathsf{fma}\left(1.6453555072203998 \cdot b, y, 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 -17000000.0)
             (fma 3.13060547623 y x)
             (if (<= z 0.004)
               (fma (* 1.6453555072203998 b) y x)
               (fma 3.13060547623 y x))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if (z <= -17000000.0) {
          		tmp = fma(3.13060547623, y, x);
          	} else if (z <= 0.004) {
          		tmp = fma((1.6453555072203998 * b), y, x);
          	} else {
          		tmp = fma(3.13060547623, y, x);
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b)
          	tmp = 0.0
          	if (z <= -17000000.0)
          		tmp = fma(3.13060547623, y, x);
          	elseif (z <= 0.004)
          		tmp = fma(Float64(1.6453555072203998 * b), y, x);
          	else
          		tmp = fma(3.13060547623, y, x);
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -17000000.0], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 0.004], N[(N[(1.6453555072203998 * b), $MachinePrecision] * y + x), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -17000000:\\
          \;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
          
          \mathbf{elif}\;z \leq 0.004:\\
          \;\;\;\;\mathsf{fma}\left(1.6453555072203998 \cdot b, y, 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 < -1.7e7 or 0.0040000000000000001 < z

            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.f6463.5

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

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

            if -1.7e7 < z < 0.0040000000000000001

            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.f6463.5

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

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

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

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

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

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

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

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

          Alternative 14: 63.5% 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 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.f6463.5

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

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

          Alternative 15: 22.3% accurate, 13.3× speedup?

          \[\begin{array}{l} \\ 3.13060547623 \cdot y \end{array} \]
          (FPCore (x y z t a b) :precision binary64 (* 3.13060547623 y))
          double code(double x, double y, double z, double t, double a, double b) {
          	return 3.13060547623 * y;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(x, y, z, t, a, b)
          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 = 3.13060547623d0 * y
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b) {
          	return 3.13060547623 * y;
          }
          
          def code(x, y, z, t, a, b):
          	return 3.13060547623 * y
          
          function code(x, y, z, t, a, b)
          	return Float64(3.13060547623 * y)
          end
          
          function tmp = code(x, y, z, t, a, b)
          	tmp = 3.13060547623 * y;
          end
          
          code[x_, y_, z_, t_, a_, b_] := N[(3.13060547623 * y), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          3.13060547623 \cdot y
          \end{array}
          
          Derivation
          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.f6463.5

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

            \[\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. lift-*.f6422.3

              \[\leadsto 3.13060547623 \cdot y \]
          7. Applied rewrites22.3%

            \[\leadsto 3.13060547623 \cdot \color{blue}{y} \]
          8. Add Preprocessing

          Reproduce

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