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

Percentage Accurate: 69.5% → 99.2%
Time: 4.1s
Alternatives: 10
Speedup: 2.2×

Specification

?
\[\begin{array}{l} \\ x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  x
  (/
   (*
    y
    (+
     (* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
     0.279195317918525))
   (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
double code(double x, double y, double z) {
	return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
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)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0))
end function
public static double code(double x, double y, double z) {
	return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
def code(x, y, z):
	return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304))
function code(x, y, z)
	return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304)))
end
function tmp = code(x, y, z)
	tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
end
code[x_, y_, z_] := N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}
\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 10 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: 69.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  x
  (/
   (*
    y
    (+
     (* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
     0.279195317918525))
   (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
double code(double x, double y, double z) {
	return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
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)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0))
end function
public static double code(double x, double y, double z) {
	return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
def code(x, y, z):
	return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304))
function code(x, y, z)
	return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304)))
end
function tmp = code(x, y, z)
	tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
end
code[x_, y_, z_] := N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}
\end{array}

Alternative 1: 99.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\\ t_1 := \mathsf{fma}\left(6.012459259764103 + z, z, 3.350343815022304\right)\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+249}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right), z, 0.279195317918525\right)}{t\_1} \cdot y\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+294}:\\ \;\;\;\;x + \frac{\mathsf{fma}\left(y, 0.279195317918525, \left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right) \cdot z\right) \cdot y\right)}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;x + \mathsf{fma}\left(0.0692910599291889, y, \frac{y \cdot 0.07512208616047561}{z}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0
         (/
          (*
           y
           (+
            (* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
            0.279195317918525))
          (+ (* (+ z 6.012459259764103) z) 3.350343815022304)))
        (t_1 (fma (+ 6.012459259764103 z) z 3.350343815022304)))
   (if (<= t_0 -1e+249)
     (*
      (/
       (fma (fma 0.0692910599291889 z 0.4917317610505968) z 0.279195317918525)
       t_1)
      y)
     (if (<= t_0 5e+294)
       (+
        x
        (/
         (fma
          y
          0.279195317918525
          (* (* (fma 0.0692910599291889 z 0.4917317610505968) z) y))
         t_1))
       (+ x (fma 0.0692910599291889 y (/ (* y 0.07512208616047561) z)))))))
double code(double x, double y, double z) {
	double t_0 = (y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304);
	double t_1 = fma((6.012459259764103 + z), z, 3.350343815022304);
	double tmp;
	if (t_0 <= -1e+249) {
		tmp = (fma(fma(0.0692910599291889, z, 0.4917317610505968), z, 0.279195317918525) / t_1) * y;
	} else if (t_0 <= 5e+294) {
		tmp = x + (fma(y, 0.279195317918525, ((fma(0.0692910599291889, z, 0.4917317610505968) * z) * y)) / t_1);
	} else {
		tmp = x + fma(0.0692910599291889, y, ((y * 0.07512208616047561) / z));
	}
	return tmp;
}
function code(x, y, z)
	t_0 = Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304))
	t_1 = fma(Float64(6.012459259764103 + z), z, 3.350343815022304)
	tmp = 0.0
	if (t_0 <= -1e+249)
		tmp = Float64(Float64(fma(fma(0.0692910599291889, z, 0.4917317610505968), z, 0.279195317918525) / t_1) * y);
	elseif (t_0 <= 5e+294)
		tmp = Float64(x + Float64(fma(y, 0.279195317918525, Float64(Float64(fma(0.0692910599291889, z, 0.4917317610505968) * z) * y)) / t_1));
	else
		tmp = Float64(x + fma(0.0692910599291889, y, Float64(Float64(y * 0.07512208616047561) / z)));
	end
	return tmp
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(6.012459259764103 + z), $MachinePrecision] * z + 3.350343815022304), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+249], N[(N[(N[(N[(0.0692910599291889 * z + 0.4917317610505968), $MachinePrecision] * z + 0.279195317918525), $MachinePrecision] / t$95$1), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$0, 5e+294], N[(x + N[(N[(y * 0.279195317918525 + N[(N[(N[(0.0692910599291889 * z + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.0692910599291889 * y + N[(N[(y * 0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\\
t_1 := \mathsf{fma}\left(6.012459259764103 + z, z, 3.350343815022304\right)\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{+249}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right), z, 0.279195317918525\right)}{t\_1} \cdot y\\

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+294}:\\
\;\;\;\;x + \frac{\mathsf{fma}\left(y, 0.279195317918525, \left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right) \cdot z\right) \cdot y\right)}{t\_1}\\

\mathbf{else}:\\
\;\;\;\;x + \mathsf{fma}\left(0.0692910599291889, y, \frac{y \cdot 0.07512208616047561}{z}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < -9.9999999999999992e248

    1. Initial program 69.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{y \cdot \left(\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}} \]
    3. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto y \cdot \color{blue}{\frac{\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}} \]
      2. div-addN/A

        \[\leadsto y \cdot \left(\frac{\frac{11167812716741}{40000000000000}}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \color{blue}{\frac{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}}\right) \]
      3. metadata-evalN/A

        \[\leadsto y \cdot \left(\frac{\frac{11167812716741}{40000000000000} \cdot 1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{\color{blue}{z} \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \]
      4. associate-*r/N/A

        \[\leadsto y \cdot \left(\frac{11167812716741}{40000000000000} \cdot \frac{1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{\color{blue}{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \]
      5. *-commutativeN/A

        \[\leadsto \left(\frac{11167812716741}{40000000000000} \cdot \frac{1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \cdot \color{blue}{y} \]
    4. Applied rewrites38.7%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(6.012459259764103 + z, z, 3.350343815022304\right)} \cdot y} \]

    if -9.9999999999999992e248 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < 4.9999999999999999e294

    1. Initial program 69.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{y \cdot \left(\left(z \cdot \frac{692910599291889}{10000000000000000} + \frac{307332350656623}{625000000000000}\right) \cdot z + \frac{11167812716741}{40000000000000}\right)}}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      2. lift-+.f64N/A

        \[\leadsto x + \frac{y \cdot \color{blue}{\left(\left(z \cdot \frac{692910599291889}{10000000000000000} + \frac{307332350656623}{625000000000000}\right) \cdot z + \frac{11167812716741}{40000000000000}\right)}}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{y \cdot \left(\color{blue}{\left(z \cdot \frac{692910599291889}{10000000000000000} + \frac{307332350656623}{625000000000000}\right) \cdot z} + \frac{11167812716741}{40000000000000}\right)}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      4. lift-*.f64N/A

        \[\leadsto x + \frac{y \cdot \left(\left(\color{blue}{z \cdot \frac{692910599291889}{10000000000000000}} + \frac{307332350656623}{625000000000000}\right) \cdot z + \frac{11167812716741}{40000000000000}\right)}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      5. lift-+.f64N/A

        \[\leadsto x + \frac{y \cdot \left(\color{blue}{\left(z \cdot \frac{692910599291889}{10000000000000000} + \frac{307332350656623}{625000000000000}\right)} \cdot z + \frac{11167812716741}{40000000000000}\right)}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      6. *-commutativeN/A

        \[\leadsto x + \frac{y \cdot \left(\left(\color{blue}{\frac{692910599291889}{10000000000000000} \cdot z} + \frac{307332350656623}{625000000000000}\right) \cdot z + \frac{11167812716741}{40000000000000}\right)}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      7. +-commutativeN/A

        \[\leadsto x + \frac{y \cdot \left(\color{blue}{\left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)} \cdot z + \frac{11167812716741}{40000000000000}\right)}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      8. *-commutativeN/A

        \[\leadsto x + \frac{y \cdot \left(\color{blue}{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)} + \frac{11167812716741}{40000000000000}\right)}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      9. +-commutativeN/A

        \[\leadsto x + \frac{y \cdot \color{blue}{\left(\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)\right)}}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      10. distribute-rgt-inN/A

        \[\leadsto x + \frac{\color{blue}{\frac{11167812716741}{40000000000000} \cdot y + \left(z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)\right) \cdot y}}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      11. *-commutativeN/A

        \[\leadsto x + \frac{\frac{11167812716741}{40000000000000} \cdot y + \color{blue}{\left(\left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right) \cdot z\right)} \cdot y}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      12. +-commutativeN/A

        \[\leadsto x + \frac{\frac{11167812716741}{40000000000000} \cdot y + \left(\color{blue}{\left(\frac{692910599291889}{10000000000000000} \cdot z + \frac{307332350656623}{625000000000000}\right)} \cdot z\right) \cdot y}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      13. *-commutativeN/A

        \[\leadsto x + \frac{\frac{11167812716741}{40000000000000} \cdot y + \left(\left(\color{blue}{z \cdot \frac{692910599291889}{10000000000000000}} + \frac{307332350656623}{625000000000000}\right) \cdot z\right) \cdot y}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      14. *-commutativeN/A

        \[\leadsto x + \frac{\color{blue}{y \cdot \frac{11167812716741}{40000000000000}} + \left(\left(z \cdot \frac{692910599291889}{10000000000000000} + \frac{307332350656623}{625000000000000}\right) \cdot z\right) \cdot y}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      15. lower-fma.f64N/A

        \[\leadsto x + \frac{\color{blue}{\mathsf{fma}\left(y, \frac{11167812716741}{40000000000000}, \left(\left(z \cdot \frac{692910599291889}{10000000000000000} + \frac{307332350656623}{625000000000000}\right) \cdot z\right) \cdot y\right)}}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      16. lower-*.f64N/A

        \[\leadsto x + \frac{\mathsf{fma}\left(y, \frac{11167812716741}{40000000000000}, \color{blue}{\left(\left(z \cdot \frac{692910599291889}{10000000000000000} + \frac{307332350656623}{625000000000000}\right) \cdot z\right) \cdot y}\right)}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      17. lower-*.f64N/A

        \[\leadsto x + \frac{\mathsf{fma}\left(y, \frac{11167812716741}{40000000000000}, \color{blue}{\left(\left(z \cdot \frac{692910599291889}{10000000000000000} + \frac{307332350656623}{625000000000000}\right) \cdot z\right)} \cdot y\right)}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      18. *-commutativeN/A

        \[\leadsto x + \frac{\mathsf{fma}\left(y, \frac{11167812716741}{40000000000000}, \left(\left(\color{blue}{\frac{692910599291889}{10000000000000000} \cdot z} + \frac{307332350656623}{625000000000000}\right) \cdot z\right) \cdot y\right)}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      19. lower-fma.f6469.5

        \[\leadsto x + \frac{\mathsf{fma}\left(y, 0.279195317918525, \left(\color{blue}{\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right)} \cdot z\right) \cdot y\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    3. Applied rewrites69.5%

      \[\leadsto x + \frac{\color{blue}{\mathsf{fma}\left(y, 0.279195317918525, \left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right) \cdot z\right) \cdot y\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    4. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto x + \frac{\mathsf{fma}\left(y, \frac{11167812716741}{40000000000000}, \left(\mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, z, \frac{307332350656623}{625000000000000}\right) \cdot z\right) \cdot y\right)}{\color{blue}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}}} \]
      2. lift-*.f64N/A

        \[\leadsto x + \frac{\mathsf{fma}\left(y, \frac{11167812716741}{40000000000000}, \left(\mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, z, \frac{307332350656623}{625000000000000}\right) \cdot z\right) \cdot y\right)}{\color{blue}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z} + \frac{104698244219447}{31250000000000}} \]
      3. lift-+.f64N/A

        \[\leadsto x + \frac{\mathsf{fma}\left(y, \frac{11167812716741}{40000000000000}, \left(\mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, z, \frac{307332350656623}{625000000000000}\right) \cdot z\right) \cdot y\right)}{\color{blue}{\left(z + \frac{6012459259764103}{1000000000000000}\right)} \cdot z + \frac{104698244219447}{31250000000000}} \]
      4. lower-fma.f64N/A

        \[\leadsto x + \frac{\mathsf{fma}\left(y, \frac{11167812716741}{40000000000000}, \left(\mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, z, \frac{307332350656623}{625000000000000}\right) \cdot z\right) \cdot y\right)}{\color{blue}{\mathsf{fma}\left(z + \frac{6012459259764103}{1000000000000000}, z, \frac{104698244219447}{31250000000000}\right)}} \]
      5. +-commutativeN/A

        \[\leadsto x + \frac{\mathsf{fma}\left(y, \frac{11167812716741}{40000000000000}, \left(\mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, z, \frac{307332350656623}{625000000000000}\right) \cdot z\right) \cdot y\right)}{\mathsf{fma}\left(\color{blue}{\frac{6012459259764103}{1000000000000000} + z}, z, \frac{104698244219447}{31250000000000}\right)} \]
      6. lower-+.f6469.5

        \[\leadsto x + \frac{\mathsf{fma}\left(y, 0.279195317918525, \left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right) \cdot z\right) \cdot y\right)}{\mathsf{fma}\left(\color{blue}{6.012459259764103 + z}, z, 3.350343815022304\right)} \]
    5. Applied rewrites69.5%

      \[\leadsto x + \frac{\mathsf{fma}\left(y, 0.279195317918525, \left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right) \cdot z\right) \cdot y\right)}{\color{blue}{\mathsf{fma}\left(6.012459259764103 + z, z, 3.350343815022304\right)}} \]

    if 4.9999999999999999e294 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64)))

    1. Initial program 69.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Taylor expanded in z around inf

      \[\leadsto x + \color{blue}{\left(\left(\frac{692910599291889}{10000000000000000} \cdot y + \frac{307332350656623}{625000000000000} \cdot \frac{y}{z}\right) - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot \frac{y}{z}\right)} \]
    3. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto x + \left(\frac{692910599291889}{10000000000000000} \cdot y + \color{blue}{\left(\frac{307332350656623}{625000000000000} \cdot \frac{y}{z} - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot \frac{y}{z}\right)}\right) \]
      2. lower-fma.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, \color{blue}{y}, \frac{307332350656623}{625000000000000} \cdot \frac{y}{z} - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot \frac{y}{z}\right) \]
      3. associate-*r/N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{\frac{307332350656623}{625000000000000} \cdot y}{z} - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot \frac{y}{z}\right) \]
      4. associate-*r/N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{\frac{307332350656623}{625000000000000} \cdot y}{z} - \frac{\frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot y}{z}\right) \]
      5. sub-divN/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{\frac{307332350656623}{625000000000000} \cdot y - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot y}{z}\right) \]
      6. lower-/.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{\frac{307332350656623}{625000000000000} \cdot y - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot y}{z}\right) \]
      7. distribute-rgt-out--N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{y \cdot \left(\frac{307332350656623}{625000000000000} - \frac{4166096748901211929300981260567}{10000000000000000000000000000000}\right)}{z}\right) \]
      8. lower-*.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{y \cdot \left(\frac{307332350656623}{625000000000000} - \frac{4166096748901211929300981260567}{10000000000000000000000000000000}\right)}{z}\right) \]
      9. metadata-eval64.6

        \[\leadsto x + \mathsf{fma}\left(0.0692910599291889, y, \frac{y \cdot 0.07512208616047561}{z}\right) \]
    4. Applied rewrites64.6%

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

Alternative 2: 99.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+249}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(6.012459259764103 + z, z, 3.350343815022304\right)} \cdot y\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+294}:\\ \;\;\;\;x + t\_0\\ \mathbf{else}:\\ \;\;\;\;x + \mathsf{fma}\left(0.0692910599291889, y, \frac{y \cdot 0.07512208616047561}{z}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0
         (/
          (*
           y
           (+
            (* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
            0.279195317918525))
          (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
   (if (<= t_0 -1e+249)
     (*
      (/
       (fma (fma 0.0692910599291889 z 0.4917317610505968) z 0.279195317918525)
       (fma (+ 6.012459259764103 z) z 3.350343815022304))
      y)
     (if (<= t_0 5e+294)
       (+ x t_0)
       (+ x (fma 0.0692910599291889 y (/ (* y 0.07512208616047561) z)))))))
double code(double x, double y, double z) {
	double t_0 = (y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304);
	double tmp;
	if (t_0 <= -1e+249) {
		tmp = (fma(fma(0.0692910599291889, z, 0.4917317610505968), z, 0.279195317918525) / fma((6.012459259764103 + z), z, 3.350343815022304)) * y;
	} else if (t_0 <= 5e+294) {
		tmp = x + t_0;
	} else {
		tmp = x + fma(0.0692910599291889, y, ((y * 0.07512208616047561) / z));
	}
	return tmp;
}
function code(x, y, z)
	t_0 = Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304))
	tmp = 0.0
	if (t_0 <= -1e+249)
		tmp = Float64(Float64(fma(fma(0.0692910599291889, z, 0.4917317610505968), z, 0.279195317918525) / fma(Float64(6.012459259764103 + z), z, 3.350343815022304)) * y);
	elseif (t_0 <= 5e+294)
		tmp = Float64(x + t_0);
	else
		tmp = Float64(x + fma(0.0692910599291889, y, Float64(Float64(y * 0.07512208616047561) / z)));
	end
	return tmp
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+249], N[(N[(N[(N[(0.0692910599291889 * z + 0.4917317610505968), $MachinePrecision] * z + 0.279195317918525), $MachinePrecision] / N[(N[(6.012459259764103 + z), $MachinePrecision] * z + 3.350343815022304), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$0, 5e+294], N[(x + t$95$0), $MachinePrecision], N[(x + N[(0.0692910599291889 * y + N[(N[(y * 0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{+249}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(6.012459259764103 + z, z, 3.350343815022304\right)} \cdot y\\

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+294}:\\
\;\;\;\;x + t\_0\\

\mathbf{else}:\\
\;\;\;\;x + \mathsf{fma}\left(0.0692910599291889, y, \frac{y \cdot 0.07512208616047561}{z}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < -9.9999999999999992e248

    1. Initial program 69.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{y \cdot \left(\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}} \]
    3. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto y \cdot \color{blue}{\frac{\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}} \]
      2. div-addN/A

        \[\leadsto y \cdot \left(\frac{\frac{11167812716741}{40000000000000}}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \color{blue}{\frac{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}}\right) \]
      3. metadata-evalN/A

        \[\leadsto y \cdot \left(\frac{\frac{11167812716741}{40000000000000} \cdot 1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{\color{blue}{z} \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \]
      4. associate-*r/N/A

        \[\leadsto y \cdot \left(\frac{11167812716741}{40000000000000} \cdot \frac{1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{\color{blue}{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \]
      5. *-commutativeN/A

        \[\leadsto \left(\frac{11167812716741}{40000000000000} \cdot \frac{1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \cdot \color{blue}{y} \]
    4. Applied rewrites38.7%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(6.012459259764103 + z, z, 3.350343815022304\right)} \cdot y} \]

    if -9.9999999999999992e248 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < 4.9999999999999999e294

    1. Initial program 69.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]

    if 4.9999999999999999e294 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64)))

    1. Initial program 69.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Taylor expanded in z around inf

      \[\leadsto x + \color{blue}{\left(\left(\frac{692910599291889}{10000000000000000} \cdot y + \frac{307332350656623}{625000000000000} \cdot \frac{y}{z}\right) - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot \frac{y}{z}\right)} \]
    3. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto x + \left(\frac{692910599291889}{10000000000000000} \cdot y + \color{blue}{\left(\frac{307332350656623}{625000000000000} \cdot \frac{y}{z} - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot \frac{y}{z}\right)}\right) \]
      2. lower-fma.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, \color{blue}{y}, \frac{307332350656623}{625000000000000} \cdot \frac{y}{z} - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot \frac{y}{z}\right) \]
      3. associate-*r/N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{\frac{307332350656623}{625000000000000} \cdot y}{z} - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot \frac{y}{z}\right) \]
      4. associate-*r/N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{\frac{307332350656623}{625000000000000} \cdot y}{z} - \frac{\frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot y}{z}\right) \]
      5. sub-divN/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{\frac{307332350656623}{625000000000000} \cdot y - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot y}{z}\right) \]
      6. lower-/.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{\frac{307332350656623}{625000000000000} \cdot y - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot y}{z}\right) \]
      7. distribute-rgt-out--N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{y \cdot \left(\frac{307332350656623}{625000000000000} - \frac{4166096748901211929300981260567}{10000000000000000000000000000000}\right)}{z}\right) \]
      8. lower-*.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{y \cdot \left(\frac{307332350656623}{625000000000000} - \frac{4166096748901211929300981260567}{10000000000000000000000000000000}\right)}{z}\right) \]
      9. metadata-eval64.6

        \[\leadsto x + \mathsf{fma}\left(0.0692910599291889, y, \frac{y \cdot 0.07512208616047561}{z}\right) \]
    4. Applied rewrites64.6%

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

Alternative 3: 98.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\\ t_1 := \mathsf{fma}\left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right), z, 0.279195317918525\right)\\ t_2 := \mathsf{fma}\left(6.012459259764103 + z, z, 3.350343815022304\right)\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+249}:\\ \;\;\;\;\frac{t\_1}{t\_2} \cdot y\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+294}:\\ \;\;\;\;x + \frac{t\_1 \cdot y}{t\_2}\\ \mathbf{else}:\\ \;\;\;\;x + \mathsf{fma}\left(0.0692910599291889, y, \frac{y \cdot 0.07512208616047561}{z}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0
         (/
          (*
           y
           (+
            (* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
            0.279195317918525))
          (+ (* (+ z 6.012459259764103) z) 3.350343815022304)))
        (t_1
         (fma
          (fma 0.0692910599291889 z 0.4917317610505968)
          z
          0.279195317918525))
        (t_2 (fma (+ 6.012459259764103 z) z 3.350343815022304)))
   (if (<= t_0 -1e+249)
     (* (/ t_1 t_2) y)
     (if (<= t_0 5e+294)
       (+ x (/ (* t_1 y) t_2))
       (+ x (fma 0.0692910599291889 y (/ (* y 0.07512208616047561) z)))))))
double code(double x, double y, double z) {
	double t_0 = (y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304);
	double t_1 = fma(fma(0.0692910599291889, z, 0.4917317610505968), z, 0.279195317918525);
	double t_2 = fma((6.012459259764103 + z), z, 3.350343815022304);
	double tmp;
	if (t_0 <= -1e+249) {
		tmp = (t_1 / t_2) * y;
	} else if (t_0 <= 5e+294) {
		tmp = x + ((t_1 * y) / t_2);
	} else {
		tmp = x + fma(0.0692910599291889, y, ((y * 0.07512208616047561) / z));
	}
	return tmp;
}
function code(x, y, z)
	t_0 = Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304))
	t_1 = fma(fma(0.0692910599291889, z, 0.4917317610505968), z, 0.279195317918525)
	t_2 = fma(Float64(6.012459259764103 + z), z, 3.350343815022304)
	tmp = 0.0
	if (t_0 <= -1e+249)
		tmp = Float64(Float64(t_1 / t_2) * y);
	elseif (t_0 <= 5e+294)
		tmp = Float64(x + Float64(Float64(t_1 * y) / t_2));
	else
		tmp = Float64(x + fma(0.0692910599291889, y, Float64(Float64(y * 0.07512208616047561) / z)));
	end
	return tmp
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(0.0692910599291889 * z + 0.4917317610505968), $MachinePrecision] * z + 0.279195317918525), $MachinePrecision]}, Block[{t$95$2 = N[(N[(6.012459259764103 + z), $MachinePrecision] * z + 3.350343815022304), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+249], N[(N[(t$95$1 / t$95$2), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$0, 5e+294], N[(x + N[(N[(t$95$1 * y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.0692910599291889 * y + N[(N[(y * 0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\\
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right), z, 0.279195317918525\right)\\
t_2 := \mathsf{fma}\left(6.012459259764103 + z, z, 3.350343815022304\right)\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{+249}:\\
\;\;\;\;\frac{t\_1}{t\_2} \cdot y\\

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+294}:\\
\;\;\;\;x + \frac{t\_1 \cdot y}{t\_2}\\

\mathbf{else}:\\
\;\;\;\;x + \mathsf{fma}\left(0.0692910599291889, y, \frac{y \cdot 0.07512208616047561}{z}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < -9.9999999999999992e248

    1. Initial program 69.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{y \cdot \left(\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}} \]
    3. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto y \cdot \color{blue}{\frac{\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}} \]
      2. div-addN/A

        \[\leadsto y \cdot \left(\frac{\frac{11167812716741}{40000000000000}}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \color{blue}{\frac{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}}\right) \]
      3. metadata-evalN/A

        \[\leadsto y \cdot \left(\frac{\frac{11167812716741}{40000000000000} \cdot 1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{\color{blue}{z} \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \]
      4. associate-*r/N/A

        \[\leadsto y \cdot \left(\frac{11167812716741}{40000000000000} \cdot \frac{1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{\color{blue}{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \]
      5. *-commutativeN/A

        \[\leadsto \left(\frac{11167812716741}{40000000000000} \cdot \frac{1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \cdot \color{blue}{y} \]
    4. Applied rewrites38.7%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(6.012459259764103 + z, z, 3.350343815022304\right)} \cdot y} \]

    if -9.9999999999999992e248 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < 4.9999999999999999e294

    1. Initial program 69.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{y \cdot \left(\left(z \cdot \frac{692910599291889}{10000000000000000} + \frac{307332350656623}{625000000000000}\right) \cdot z + \frac{11167812716741}{40000000000000}\right)}}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      2. lift-+.f64N/A

        \[\leadsto x + \frac{y \cdot \color{blue}{\left(\left(z \cdot \frac{692910599291889}{10000000000000000} + \frac{307332350656623}{625000000000000}\right) \cdot z + \frac{11167812716741}{40000000000000}\right)}}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{y \cdot \left(\color{blue}{\left(z \cdot \frac{692910599291889}{10000000000000000} + \frac{307332350656623}{625000000000000}\right) \cdot z} + \frac{11167812716741}{40000000000000}\right)}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      4. lift-*.f64N/A

        \[\leadsto x + \frac{y \cdot \left(\left(\color{blue}{z \cdot \frac{692910599291889}{10000000000000000}} + \frac{307332350656623}{625000000000000}\right) \cdot z + \frac{11167812716741}{40000000000000}\right)}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      5. lift-+.f64N/A

        \[\leadsto x + \frac{y \cdot \left(\color{blue}{\left(z \cdot \frac{692910599291889}{10000000000000000} + \frac{307332350656623}{625000000000000}\right)} \cdot z + \frac{11167812716741}{40000000000000}\right)}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      6. *-commutativeN/A

        \[\leadsto x + \frac{\color{blue}{\left(\left(z \cdot \frac{692910599291889}{10000000000000000} + \frac{307332350656623}{625000000000000}\right) \cdot z + \frac{11167812716741}{40000000000000}\right) \cdot y}}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      7. lower-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(\left(z \cdot \frac{692910599291889}{10000000000000000} + \frac{307332350656623}{625000000000000}\right) \cdot z + \frac{11167812716741}{40000000000000}\right) \cdot y}}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      8. lower-fma.f64N/A

        \[\leadsto x + \frac{\color{blue}{\mathsf{fma}\left(z \cdot \frac{692910599291889}{10000000000000000} + \frac{307332350656623}{625000000000000}, z, \frac{11167812716741}{40000000000000}\right)} \cdot y}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      9. *-commutativeN/A

        \[\leadsto x + \frac{\mathsf{fma}\left(\color{blue}{\frac{692910599291889}{10000000000000000} \cdot z} + \frac{307332350656623}{625000000000000}, z, \frac{11167812716741}{40000000000000}\right) \cdot y}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}} \]
      10. lower-fma.f6469.5

        \[\leadsto x + \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right)}, z, 0.279195317918525\right) \cdot y}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      11. lift-+.f64N/A

        \[\leadsto x + \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, z, \frac{307332350656623}{625000000000000}\right), z, \frac{11167812716741}{40000000000000}\right) \cdot y}{\color{blue}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z + \frac{104698244219447}{31250000000000}}} \]
      12. lift-*.f64N/A

        \[\leadsto x + \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, z, \frac{307332350656623}{625000000000000}\right), z, \frac{11167812716741}{40000000000000}\right) \cdot y}{\color{blue}{\left(z + \frac{6012459259764103}{1000000000000000}\right) \cdot z} + \frac{104698244219447}{31250000000000}} \]
      13. lift-+.f64N/A

        \[\leadsto x + \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, z, \frac{307332350656623}{625000000000000}\right), z, \frac{11167812716741}{40000000000000}\right) \cdot y}{\color{blue}{\left(z + \frac{6012459259764103}{1000000000000000}\right)} \cdot z + \frac{104698244219447}{31250000000000}} \]
      14. lower-fma.f64N/A

        \[\leadsto x + \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, z, \frac{307332350656623}{625000000000000}\right), z, \frac{11167812716741}{40000000000000}\right) \cdot y}{\color{blue}{\mathsf{fma}\left(z + \frac{6012459259764103}{1000000000000000}, z, \frac{104698244219447}{31250000000000}\right)}} \]
      15. +-commutativeN/A

        \[\leadsto x + \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, z, \frac{307332350656623}{625000000000000}\right), z, \frac{11167812716741}{40000000000000}\right) \cdot y}{\mathsf{fma}\left(\color{blue}{\frac{6012459259764103}{1000000000000000} + z}, z, \frac{104698244219447}{31250000000000}\right)} \]
      16. lower-+.f6469.5

        \[\leadsto x + \frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right), z, 0.279195317918525\right) \cdot y}{\mathsf{fma}\left(\color{blue}{6.012459259764103 + z}, z, 3.350343815022304\right)} \]
    3. Applied rewrites69.5%

      \[\leadsto x + \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right), z, 0.279195317918525\right) \cdot y}{\mathsf{fma}\left(6.012459259764103 + z, z, 3.350343815022304\right)}} \]

    if 4.9999999999999999e294 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64)))

    1. Initial program 69.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Taylor expanded in z around inf

      \[\leadsto x + \color{blue}{\left(\left(\frac{692910599291889}{10000000000000000} \cdot y + \frac{307332350656623}{625000000000000} \cdot \frac{y}{z}\right) - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot \frac{y}{z}\right)} \]
    3. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto x + \left(\frac{692910599291889}{10000000000000000} \cdot y + \color{blue}{\left(\frac{307332350656623}{625000000000000} \cdot \frac{y}{z} - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot \frac{y}{z}\right)}\right) \]
      2. lower-fma.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, \color{blue}{y}, \frac{307332350656623}{625000000000000} \cdot \frac{y}{z} - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot \frac{y}{z}\right) \]
      3. associate-*r/N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{\frac{307332350656623}{625000000000000} \cdot y}{z} - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot \frac{y}{z}\right) \]
      4. associate-*r/N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{\frac{307332350656623}{625000000000000} \cdot y}{z} - \frac{\frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot y}{z}\right) \]
      5. sub-divN/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{\frac{307332350656623}{625000000000000} \cdot y - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot y}{z}\right) \]
      6. lower-/.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{\frac{307332350656623}{625000000000000} \cdot y - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot y}{z}\right) \]
      7. distribute-rgt-out--N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{y \cdot \left(\frac{307332350656623}{625000000000000} - \frac{4166096748901211929300981260567}{10000000000000000000000000000000}\right)}{z}\right) \]
      8. lower-*.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{y \cdot \left(\frac{307332350656623}{625000000000000} - \frac{4166096748901211929300981260567}{10000000000000000000000000000000}\right)}{z}\right) \]
      9. metadata-eval64.6

        \[\leadsto x + \mathsf{fma}\left(0.0692910599291889, y, \frac{y \cdot 0.07512208616047561}{z}\right) \]
    4. Applied rewrites64.6%

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

Alternative 4: 98.4% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x + \mathsf{fma}\left(0.0692910599291889, y, \frac{y \cdot 0.07512208616047561}{z}\right)\\ \mathbf{if}\;z \leq -5.4:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 4.9:\\ \;\;\;\;x + \mathsf{fma}\left(y \cdot -0.00277777777751721, z, 0.08333333333333323 \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (+ x (fma 0.0692910599291889 y (/ (* y 0.07512208616047561) z)))))
   (if (<= z -5.4)
     t_0
     (if (<= z 4.9)
       (+ x (fma (* y -0.00277777777751721) z (* 0.08333333333333323 y)))
       t_0))))
double code(double x, double y, double z) {
	double t_0 = x + fma(0.0692910599291889, y, ((y * 0.07512208616047561) / z));
	double tmp;
	if (z <= -5.4) {
		tmp = t_0;
	} else if (z <= 4.9) {
		tmp = x + fma((y * -0.00277777777751721), z, (0.08333333333333323 * y));
	} else {
		tmp = t_0;
	}
	return tmp;
}
function code(x, y, z)
	t_0 = Float64(x + fma(0.0692910599291889, y, Float64(Float64(y * 0.07512208616047561) / z)))
	tmp = 0.0
	if (z <= -5.4)
		tmp = t_0;
	elseif (z <= 4.9)
		tmp = Float64(x + fma(Float64(y * -0.00277777777751721), z, Float64(0.08333333333333323 * y)));
	else
		tmp = t_0;
	end
	return tmp
end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(0.0692910599291889 * y + N[(N[(y * 0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.4], t$95$0, If[LessEqual[z, 4.9], N[(x + N[(N[(y * -0.00277777777751721), $MachinePrecision] * z + N[(0.08333333333333323 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x + \mathsf{fma}\left(0.0692910599291889, y, \frac{y \cdot 0.07512208616047561}{z}\right)\\
\mathbf{if}\;z \leq -5.4:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z \leq 4.9:\\
\;\;\;\;x + \mathsf{fma}\left(y \cdot -0.00277777777751721, z, 0.08333333333333323 \cdot y\right)\\

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


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

    1. Initial program 69.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Taylor expanded in z around inf

      \[\leadsto x + \color{blue}{\left(\left(\frac{692910599291889}{10000000000000000} \cdot y + \frac{307332350656623}{625000000000000} \cdot \frac{y}{z}\right) - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot \frac{y}{z}\right)} \]
    3. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto x + \left(\frac{692910599291889}{10000000000000000} \cdot y + \color{blue}{\left(\frac{307332350656623}{625000000000000} \cdot \frac{y}{z} - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot \frac{y}{z}\right)}\right) \]
      2. lower-fma.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, \color{blue}{y}, \frac{307332350656623}{625000000000000} \cdot \frac{y}{z} - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot \frac{y}{z}\right) \]
      3. associate-*r/N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{\frac{307332350656623}{625000000000000} \cdot y}{z} - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot \frac{y}{z}\right) \]
      4. associate-*r/N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{\frac{307332350656623}{625000000000000} \cdot y}{z} - \frac{\frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot y}{z}\right) \]
      5. sub-divN/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{\frac{307332350656623}{625000000000000} \cdot y - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot y}{z}\right) \]
      6. lower-/.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{\frac{307332350656623}{625000000000000} \cdot y - \frac{4166096748901211929300981260567}{10000000000000000000000000000000} \cdot y}{z}\right) \]
      7. distribute-rgt-out--N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{y \cdot \left(\frac{307332350656623}{625000000000000} - \frac{4166096748901211929300981260567}{10000000000000000000000000000000}\right)}{z}\right) \]
      8. lower-*.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{692910599291889}{10000000000000000}, y, \frac{y \cdot \left(\frac{307332350656623}{625000000000000} - \frac{4166096748901211929300981260567}{10000000000000000000000000000000}\right)}{z}\right) \]
      9. metadata-eval64.6

        \[\leadsto x + \mathsf{fma}\left(0.0692910599291889, y, \frac{y \cdot 0.07512208616047561}{z}\right) \]
    4. Applied rewrites64.6%

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

    if -5.4000000000000004 < z < 4.9000000000000004

    1. Initial program 69.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Taylor expanded in z around 0

      \[\leadsto x + \color{blue}{\left(\frac{279195317918525}{3350343815022304} \cdot y + z \cdot \left(\frac{307332350656623}{2093964884388940} \cdot y - \frac{1678650474502018223880473708075}{11224803678858206361900017468416} \cdot y\right)\right)} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x + \left(z \cdot \left(\frac{307332350656623}{2093964884388940} \cdot y - \frac{1678650474502018223880473708075}{11224803678858206361900017468416} \cdot y\right) + \color{blue}{\frac{279195317918525}{3350343815022304} \cdot y}\right) \]
      2. *-commutativeN/A

        \[\leadsto x + \left(\left(\frac{307332350656623}{2093964884388940} \cdot y - \frac{1678650474502018223880473708075}{11224803678858206361900017468416} \cdot y\right) \cdot z + \color{blue}{\frac{279195317918525}{3350343815022304}} \cdot y\right) \]
      3. lower-fma.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{307332350656623}{2093964884388940} \cdot y - \frac{1678650474502018223880473708075}{11224803678858206361900017468416} \cdot y, \color{blue}{z}, \frac{279195317918525}{3350343815022304} \cdot y\right) \]
      4. distribute-rgt-out--N/A

        \[\leadsto x + \mathsf{fma}\left(y \cdot \left(\frac{307332350656623}{2093964884388940} - \frac{1678650474502018223880473708075}{11224803678858206361900017468416}\right), z, \frac{279195317918525}{3350343815022304} \cdot y\right) \]
      5. lower-*.f64N/A

        \[\leadsto x + \mathsf{fma}\left(y \cdot \left(\frac{307332350656623}{2093964884388940} - \frac{1678650474502018223880473708075}{11224803678858206361900017468416}\right), z, \frac{279195317918525}{3350343815022304} \cdot y\right) \]
      6. metadata-evalN/A

        \[\leadsto x + \mathsf{fma}\left(y \cdot \frac{-155900051080628738716045985239}{56124018394291031809500087342080}, z, \frac{279195317918525}{3350343815022304} \cdot y\right) \]
      7. lower-*.f6465.7

        \[\leadsto x + \mathsf{fma}\left(y \cdot -0.00277777777751721, z, 0.08333333333333323 \cdot y\right) \]
    4. Applied rewrites65.7%

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

Alternative 5: 98.4% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.4:\\ \;\;\;\;\mathsf{fma}\left(0.0692910599291889, y, x\right)\\ \mathbf{elif}\;z \leq 5:\\ \;\;\;\;x + \mathsf{fma}\left(y \cdot -0.00277777777751721, z, 0.08333333333333323 \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.0692910599291889, y, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -5.4)
   (fma 0.0692910599291889 y x)
   (if (<= z 5.0)
     (+ x (fma (* y -0.00277777777751721) z (* 0.08333333333333323 y)))
     (fma 0.0692910599291889 y x))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -5.4) {
		tmp = fma(0.0692910599291889, y, x);
	} else if (z <= 5.0) {
		tmp = x + fma((y * -0.00277777777751721), z, (0.08333333333333323 * y));
	} else {
		tmp = fma(0.0692910599291889, y, x);
	}
	return tmp;
}
function code(x, y, z)
	tmp = 0.0
	if (z <= -5.4)
		tmp = fma(0.0692910599291889, y, x);
	elseif (z <= 5.0)
		tmp = Float64(x + fma(Float64(y * -0.00277777777751721), z, Float64(0.08333333333333323 * y)));
	else
		tmp = fma(0.0692910599291889, y, x);
	end
	return tmp
end
code[x_, y_, z_] := If[LessEqual[z, -5.4], N[(0.0692910599291889 * y + x), $MachinePrecision], If[LessEqual[z, 5.0], N[(x + N[(N[(y * -0.00277777777751721), $MachinePrecision] * z + N[(0.08333333333333323 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.0692910599291889 * y + x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4:\\
\;\;\;\;\mathsf{fma}\left(0.0692910599291889, y, x\right)\\

\mathbf{elif}\;z \leq 5:\\
\;\;\;\;x + \mathsf{fma}\left(y \cdot -0.00277777777751721, z, 0.08333333333333323 \cdot y\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.0692910599291889, y, x\right)\\


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

    1. Initial program 69.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Taylor expanded in z around inf

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

        \[\leadsto \frac{692910599291889}{10000000000000000} \cdot y + \color{blue}{x} \]
      2. lower-fma.f6478.8

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

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

    if -5.4000000000000004 < z < 5

    1. Initial program 69.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Taylor expanded in z around 0

      \[\leadsto x + \color{blue}{\left(\frac{279195317918525}{3350343815022304} \cdot y + z \cdot \left(\frac{307332350656623}{2093964884388940} \cdot y - \frac{1678650474502018223880473708075}{11224803678858206361900017468416} \cdot y\right)\right)} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x + \left(z \cdot \left(\frac{307332350656623}{2093964884388940} \cdot y - \frac{1678650474502018223880473708075}{11224803678858206361900017468416} \cdot y\right) + \color{blue}{\frac{279195317918525}{3350343815022304} \cdot y}\right) \]
      2. *-commutativeN/A

        \[\leadsto x + \left(\left(\frac{307332350656623}{2093964884388940} \cdot y - \frac{1678650474502018223880473708075}{11224803678858206361900017468416} \cdot y\right) \cdot z + \color{blue}{\frac{279195317918525}{3350343815022304}} \cdot y\right) \]
      3. lower-fma.f64N/A

        \[\leadsto x + \mathsf{fma}\left(\frac{307332350656623}{2093964884388940} \cdot y - \frac{1678650474502018223880473708075}{11224803678858206361900017468416} \cdot y, \color{blue}{z}, \frac{279195317918525}{3350343815022304} \cdot y\right) \]
      4. distribute-rgt-out--N/A

        \[\leadsto x + \mathsf{fma}\left(y \cdot \left(\frac{307332350656623}{2093964884388940} - \frac{1678650474502018223880473708075}{11224803678858206361900017468416}\right), z, \frac{279195317918525}{3350343815022304} \cdot y\right) \]
      5. lower-*.f64N/A

        \[\leadsto x + \mathsf{fma}\left(y \cdot \left(\frac{307332350656623}{2093964884388940} - \frac{1678650474502018223880473708075}{11224803678858206361900017468416}\right), z, \frac{279195317918525}{3350343815022304} \cdot y\right) \]
      6. metadata-evalN/A

        \[\leadsto x + \mathsf{fma}\left(y \cdot \frac{-155900051080628738716045985239}{56124018394291031809500087342080}, z, \frac{279195317918525}{3350343815022304} \cdot y\right) \]
      7. lower-*.f6465.7

        \[\leadsto x + \mathsf{fma}\left(y \cdot -0.00277777777751721, z, 0.08333333333333323 \cdot y\right) \]
    4. Applied rewrites65.7%

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

Alternative 6: 98.4% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.4:\\ \;\;\;\;\mathsf{fma}\left(0.0692910599291889, y, x\right)\\ \mathbf{elif}\;z \leq 5.8:\\ \;\;\;\;\mathsf{fma}\left(0.08333333333333323, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.0692910599291889, y, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -5.4)
   (fma 0.0692910599291889 y x)
   (if (<= z 5.8) (fma 0.08333333333333323 y x) (fma 0.0692910599291889 y x))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -5.4) {
		tmp = fma(0.0692910599291889, y, x);
	} else if (z <= 5.8) {
		tmp = fma(0.08333333333333323, y, x);
	} else {
		tmp = fma(0.0692910599291889, y, x);
	}
	return tmp;
}
function code(x, y, z)
	tmp = 0.0
	if (z <= -5.4)
		tmp = fma(0.0692910599291889, y, x);
	elseif (z <= 5.8)
		tmp = fma(0.08333333333333323, y, x);
	else
		tmp = fma(0.0692910599291889, y, x);
	end
	return tmp
end
code[x_, y_, z_] := If[LessEqual[z, -5.4], N[(0.0692910599291889 * y + x), $MachinePrecision], If[LessEqual[z, 5.8], N[(0.08333333333333323 * y + x), $MachinePrecision], N[(0.0692910599291889 * y + x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4:\\
\;\;\;\;\mathsf{fma}\left(0.0692910599291889, y, x\right)\\

\mathbf{elif}\;z \leq 5.8:\\
\;\;\;\;\mathsf{fma}\left(0.08333333333333323, y, x\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.0692910599291889, y, x\right)\\


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

    1. Initial program 69.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Taylor expanded in z around inf

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

        \[\leadsto \frac{692910599291889}{10000000000000000} \cdot y + \color{blue}{x} \]
      2. lower-fma.f6478.8

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

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

    if -5.4000000000000004 < z < 5.79999999999999982

    1. Initial program 69.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Taylor expanded in z around 0

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

        \[\leadsto \frac{279195317918525}{3350343815022304} \cdot y + \color{blue}{x} \]
      2. lower-fma.f6479.3

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

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

Alternative 7: 83.4% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\\ \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;0.0692910599291889 \cdot y\\ \mathbf{elif}\;t\_0 \leq -1 \cdot 10^{+57}:\\ \;\;\;\;0.08333333333333323 \cdot y\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+107}:\\ \;\;\;\;\mathsf{fma}\left(0.0692910599291889, y, x\right)\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+294}:\\ \;\;\;\;0.08333333333333323 \cdot y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.0692910599291889, y, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0
         (/
          (*
           y
           (+
            (* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
            0.279195317918525))
          (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
   (if (<= t_0 (- INFINITY))
     (* 0.0692910599291889 y)
     (if (<= t_0 -1e+57)
       (* 0.08333333333333323 y)
       (if (<= t_0 2e+107)
         (fma 0.0692910599291889 y x)
         (if (<= t_0 5e+294)
           (* 0.08333333333333323 y)
           (fma 0.0692910599291889 y x)))))))
double code(double x, double y, double z) {
	double t_0 = (y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304);
	double tmp;
	if (t_0 <= -((double) INFINITY)) {
		tmp = 0.0692910599291889 * y;
	} else if (t_0 <= -1e+57) {
		tmp = 0.08333333333333323 * y;
	} else if (t_0 <= 2e+107) {
		tmp = fma(0.0692910599291889, y, x);
	} else if (t_0 <= 5e+294) {
		tmp = 0.08333333333333323 * y;
	} else {
		tmp = fma(0.0692910599291889, y, x);
	}
	return tmp;
}
function code(x, y, z)
	t_0 = Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304))
	tmp = 0.0
	if (t_0 <= Float64(-Inf))
		tmp = Float64(0.0692910599291889 * y);
	elseif (t_0 <= -1e+57)
		tmp = Float64(0.08333333333333323 * y);
	elseif (t_0 <= 2e+107)
		tmp = fma(0.0692910599291889, y, x);
	elseif (t_0 <= 5e+294)
		tmp = Float64(0.08333333333333323 * y);
	else
		tmp = fma(0.0692910599291889, y, x);
	end
	return tmp
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.0692910599291889 * y), $MachinePrecision], If[LessEqual[t$95$0, -1e+57], N[(0.08333333333333323 * y), $MachinePrecision], If[LessEqual[t$95$0, 2e+107], N[(0.0692910599291889 * y + x), $MachinePrecision], If[LessEqual[t$95$0, 5e+294], N[(0.08333333333333323 * y), $MachinePrecision], N[(0.0692910599291889 * y + x), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;0.0692910599291889 \cdot y\\

\mathbf{elif}\;t\_0 \leq -1 \cdot 10^{+57}:\\
\;\;\;\;0.08333333333333323 \cdot y\\

\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+107}:\\
\;\;\;\;\mathsf{fma}\left(0.0692910599291889, y, x\right)\\

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+294}:\\
\;\;\;\;0.08333333333333323 \cdot y\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.0692910599291889, y, x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < -inf.0

    1. Initial program 69.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{y \cdot \left(\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}} \]
    3. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto y \cdot \color{blue}{\frac{\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}} \]
      2. div-addN/A

        \[\leadsto y \cdot \left(\frac{\frac{11167812716741}{40000000000000}}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \color{blue}{\frac{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}}\right) \]
      3. metadata-evalN/A

        \[\leadsto y \cdot \left(\frac{\frac{11167812716741}{40000000000000} \cdot 1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{\color{blue}{z} \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \]
      4. associate-*r/N/A

        \[\leadsto y \cdot \left(\frac{11167812716741}{40000000000000} \cdot \frac{1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{\color{blue}{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \]
      5. *-commutativeN/A

        \[\leadsto \left(\frac{11167812716741}{40000000000000} \cdot \frac{1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \cdot \color{blue}{y} \]
    4. Applied rewrites38.7%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(6.012459259764103 + z, z, 3.350343815022304\right)} \cdot y} \]
    5. Taylor expanded in z around inf

      \[\leadsto \frac{692910599291889}{10000000000000000} \cdot y \]
    6. Step-by-step derivation
      1. Applied rewrites31.3%

        \[\leadsto 0.0692910599291889 \cdot y \]

      if -inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < -1.00000000000000005e57 or 1.9999999999999999e107 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < 4.9999999999999999e294

      1. Initial program 69.5%

        \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      2. Taylor expanded in x around 0

        \[\leadsto \color{blue}{\frac{y \cdot \left(\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}} \]
      3. Step-by-step derivation
        1. associate-/l*N/A

          \[\leadsto y \cdot \color{blue}{\frac{\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}} \]
        2. div-addN/A

          \[\leadsto y \cdot \left(\frac{\frac{11167812716741}{40000000000000}}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \color{blue}{\frac{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}}\right) \]
        3. metadata-evalN/A

          \[\leadsto y \cdot \left(\frac{\frac{11167812716741}{40000000000000} \cdot 1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{\color{blue}{z} \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \]
        4. associate-*r/N/A

          \[\leadsto y \cdot \left(\frac{11167812716741}{40000000000000} \cdot \frac{1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{\color{blue}{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \]
        5. *-commutativeN/A

          \[\leadsto \left(\frac{11167812716741}{40000000000000} \cdot \frac{1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \cdot \color{blue}{y} \]
      4. Applied rewrites38.7%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(6.012459259764103 + z, z, 3.350343815022304\right)} \cdot y} \]
      5. Taylor expanded in z around 0

        \[\leadsto \frac{279195317918525}{3350343815022304} \cdot y \]
      6. Step-by-step derivation
        1. Applied rewrites31.7%

          \[\leadsto 0.08333333333333323 \cdot y \]

        if -1.00000000000000005e57 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < 1.9999999999999999e107 or 4.9999999999999999e294 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64)))

        1. Initial program 69.5%

          \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
        2. Taylor expanded in z around inf

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

            \[\leadsto \frac{692910599291889}{10000000000000000} \cdot y + \color{blue}{x} \]
          2. lower-fma.f6478.8

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

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

      Alternative 8: 63.8% accurate, 0.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\\ \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;0.0692910599291889 \cdot y\\ \mathbf{elif}\;t\_0 \leq -5 \cdot 10^{+21}:\\ \;\;\;\;0.08333333333333323 \cdot y\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-92}:\\ \;\;\;\;1 \cdot x\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+294}:\\ \;\;\;\;0.08333333333333323 \cdot y\\ \mathbf{else}:\\ \;\;\;\;0.0692910599291889 \cdot y\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (let* ((t_0
               (/
                (*
                 y
                 (+
                  (* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
                  0.279195317918525))
                (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
         (if (<= t_0 (- INFINITY))
           (* 0.0692910599291889 y)
           (if (<= t_0 -5e+21)
             (* 0.08333333333333323 y)
             (if (<= t_0 2e-92)
               (* 1.0 x)
               (if (<= t_0 5e+294)
                 (* 0.08333333333333323 y)
                 (* 0.0692910599291889 y)))))))
      double code(double x, double y, double z) {
      	double t_0 = (y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304);
      	double tmp;
      	if (t_0 <= -((double) INFINITY)) {
      		tmp = 0.0692910599291889 * y;
      	} else if (t_0 <= -5e+21) {
      		tmp = 0.08333333333333323 * y;
      	} else if (t_0 <= 2e-92) {
      		tmp = 1.0 * x;
      	} else if (t_0 <= 5e+294) {
      		tmp = 0.08333333333333323 * y;
      	} else {
      		tmp = 0.0692910599291889 * y;
      	}
      	return tmp;
      }
      
      public static double code(double x, double y, double z) {
      	double t_0 = (y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304);
      	double tmp;
      	if (t_0 <= -Double.POSITIVE_INFINITY) {
      		tmp = 0.0692910599291889 * y;
      	} else if (t_0 <= -5e+21) {
      		tmp = 0.08333333333333323 * y;
      	} else if (t_0 <= 2e-92) {
      		tmp = 1.0 * x;
      	} else if (t_0 <= 5e+294) {
      		tmp = 0.08333333333333323 * y;
      	} else {
      		tmp = 0.0692910599291889 * y;
      	}
      	return tmp;
      }
      
      def code(x, y, z):
      	t_0 = (y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304)
      	tmp = 0
      	if t_0 <= -math.inf:
      		tmp = 0.0692910599291889 * y
      	elif t_0 <= -5e+21:
      		tmp = 0.08333333333333323 * y
      	elif t_0 <= 2e-92:
      		tmp = 1.0 * x
      	elif t_0 <= 5e+294:
      		tmp = 0.08333333333333323 * y
      	else:
      		tmp = 0.0692910599291889 * y
      	return tmp
      
      function code(x, y, z)
      	t_0 = Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304))
      	tmp = 0.0
      	if (t_0 <= Float64(-Inf))
      		tmp = Float64(0.0692910599291889 * y);
      	elseif (t_0 <= -5e+21)
      		tmp = Float64(0.08333333333333323 * y);
      	elseif (t_0 <= 2e-92)
      		tmp = Float64(1.0 * x);
      	elseif (t_0 <= 5e+294)
      		tmp = Float64(0.08333333333333323 * y);
      	else
      		tmp = Float64(0.0692910599291889 * y);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z)
      	t_0 = (y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304);
      	tmp = 0.0;
      	if (t_0 <= -Inf)
      		tmp = 0.0692910599291889 * y;
      	elseif (t_0 <= -5e+21)
      		tmp = 0.08333333333333323 * y;
      	elseif (t_0 <= 2e-92)
      		tmp = 1.0 * x;
      	elseif (t_0 <= 5e+294)
      		tmp = 0.08333333333333323 * y;
      	else
      		tmp = 0.0692910599291889 * y;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_] := Block[{t$95$0 = N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.0692910599291889 * y), $MachinePrecision], If[LessEqual[t$95$0, -5e+21], N[(0.08333333333333323 * y), $MachinePrecision], If[LessEqual[t$95$0, 2e-92], N[(1.0 * x), $MachinePrecision], If[LessEqual[t$95$0, 5e+294], N[(0.08333333333333323 * y), $MachinePrecision], N[(0.0692910599291889 * y), $MachinePrecision]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\\
      \mathbf{if}\;t\_0 \leq -\infty:\\
      \;\;\;\;0.0692910599291889 \cdot y\\
      
      \mathbf{elif}\;t\_0 \leq -5 \cdot 10^{+21}:\\
      \;\;\;\;0.08333333333333323 \cdot y\\
      
      \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-92}:\\
      \;\;\;\;1 \cdot x\\
      
      \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+294}:\\
      \;\;\;\;0.08333333333333323 \cdot y\\
      
      \mathbf{else}:\\
      \;\;\;\;0.0692910599291889 \cdot y\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < -inf.0 or 4.9999999999999999e294 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64)))

        1. Initial program 69.5%

          \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
        2. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{y \cdot \left(\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}} \]
        3. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto y \cdot \color{blue}{\frac{\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}} \]
          2. div-addN/A

            \[\leadsto y \cdot \left(\frac{\frac{11167812716741}{40000000000000}}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \color{blue}{\frac{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}}\right) \]
          3. metadata-evalN/A

            \[\leadsto y \cdot \left(\frac{\frac{11167812716741}{40000000000000} \cdot 1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{\color{blue}{z} \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \]
          4. associate-*r/N/A

            \[\leadsto y \cdot \left(\frac{11167812716741}{40000000000000} \cdot \frac{1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{\color{blue}{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \]
          5. *-commutativeN/A

            \[\leadsto \left(\frac{11167812716741}{40000000000000} \cdot \frac{1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \cdot \color{blue}{y} \]
        4. Applied rewrites38.7%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(6.012459259764103 + z, z, 3.350343815022304\right)} \cdot y} \]
        5. Taylor expanded in z around inf

          \[\leadsto \frac{692910599291889}{10000000000000000} \cdot y \]
        6. Step-by-step derivation
          1. Applied rewrites31.3%

            \[\leadsto 0.0692910599291889 \cdot y \]

          if -inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < -5e21 or 1.99999999999999998e-92 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < 4.9999999999999999e294

          1. Initial program 69.5%

            \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
          2. Taylor expanded in x around 0

            \[\leadsto \color{blue}{\frac{y \cdot \left(\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}} \]
          3. Step-by-step derivation
            1. associate-/l*N/A

              \[\leadsto y \cdot \color{blue}{\frac{\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}} \]
            2. div-addN/A

              \[\leadsto y \cdot \left(\frac{\frac{11167812716741}{40000000000000}}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \color{blue}{\frac{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}}\right) \]
            3. metadata-evalN/A

              \[\leadsto y \cdot \left(\frac{\frac{11167812716741}{40000000000000} \cdot 1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{\color{blue}{z} \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \]
            4. associate-*r/N/A

              \[\leadsto y \cdot \left(\frac{11167812716741}{40000000000000} \cdot \frac{1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{\color{blue}{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \]
            5. *-commutativeN/A

              \[\leadsto \left(\frac{11167812716741}{40000000000000} \cdot \frac{1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \cdot \color{blue}{y} \]
          4. Applied rewrites38.7%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(6.012459259764103 + z, z, 3.350343815022304\right)} \cdot y} \]
          5. Taylor expanded in z around 0

            \[\leadsto \frac{279195317918525}{3350343815022304} \cdot y \]
          6. Step-by-step derivation
            1. Applied rewrites31.7%

              \[\leadsto 0.08333333333333323 \cdot y \]

            if -5e21 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < 1.99999999999999998e-92

            1. Initial program 69.5%

              \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
            2. Taylor expanded in x around inf

              \[\leadsto \color{blue}{x \cdot \left(1 + \frac{y \cdot \left(\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)\right)}{x \cdot \left(\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)\right)}\right)} \]
            3. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \left(1 + \frac{y \cdot \left(\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)\right)}{x \cdot \left(\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)\right)}\right) \cdot \color{blue}{x} \]
              2. lower-*.f64N/A

                \[\leadsto \left(1 + \frac{y \cdot \left(\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)\right)}{x \cdot \left(\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)\right)}\right) \cdot \color{blue}{x} \]
            4. Applied rewrites65.4%

              \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(6.012459259764103 + z, z, 3.350343815022304\right) \cdot x}, 1\right) \cdot x} \]
            5. Taylor expanded in x around inf

              \[\leadsto 1 \cdot x \]
            6. Step-by-step derivation
              1. Applied rewrites49.8%

                \[\leadsto 1 \cdot x \]
            7. Recombined 3 regimes into one program.
            8. Add Preprocessing

            Alternative 9: 59.5% accurate, 2.6× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{+44}:\\ \;\;\;\;0.0692910599291889 \cdot y\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{+134}:\\ \;\;\;\;1 \cdot x\\ \mathbf{else}:\\ \;\;\;\;0.0692910599291889 \cdot y\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<= y -2.1e+44)
               (* 0.0692910599291889 y)
               (if (<= y 1.05e+134) (* 1.0 x) (* 0.0692910599291889 y))))
            double code(double x, double y, double z) {
            	double tmp;
            	if (y <= -2.1e+44) {
            		tmp = 0.0692910599291889 * y;
            	} else if (y <= 1.05e+134) {
            		tmp = 1.0 * x;
            	} else {
            		tmp = 0.0692910599291889 * y;
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(x, y, z)
            use fmin_fmax_functions
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8) :: tmp
                if (y <= (-2.1d+44)) then
                    tmp = 0.0692910599291889d0 * y
                else if (y <= 1.05d+134) then
                    tmp = 1.0d0 * x
                else
                    tmp = 0.0692910599291889d0 * y
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z) {
            	double tmp;
            	if (y <= -2.1e+44) {
            		tmp = 0.0692910599291889 * y;
            	} else if (y <= 1.05e+134) {
            		tmp = 1.0 * x;
            	} else {
            		tmp = 0.0692910599291889 * y;
            	}
            	return tmp;
            }
            
            def code(x, y, z):
            	tmp = 0
            	if y <= -2.1e+44:
            		tmp = 0.0692910599291889 * y
            	elif y <= 1.05e+134:
            		tmp = 1.0 * x
            	else:
            		tmp = 0.0692910599291889 * y
            	return tmp
            
            function code(x, y, z)
            	tmp = 0.0
            	if (y <= -2.1e+44)
            		tmp = Float64(0.0692910599291889 * y);
            	elseif (y <= 1.05e+134)
            		tmp = Float64(1.0 * x);
            	else
            		tmp = Float64(0.0692910599291889 * y);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z)
            	tmp = 0.0;
            	if (y <= -2.1e+44)
            		tmp = 0.0692910599291889 * y;
            	elseif (y <= 1.05e+134)
            		tmp = 1.0 * x;
            	else
            		tmp = 0.0692910599291889 * y;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_] := If[LessEqual[y, -2.1e+44], N[(0.0692910599291889 * y), $MachinePrecision], If[LessEqual[y, 1.05e+134], N[(1.0 * x), $MachinePrecision], N[(0.0692910599291889 * y), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;y \leq -2.1 \cdot 10^{+44}:\\
            \;\;\;\;0.0692910599291889 \cdot y\\
            
            \mathbf{elif}\;y \leq 1.05 \cdot 10^{+134}:\\
            \;\;\;\;1 \cdot x\\
            
            \mathbf{else}:\\
            \;\;\;\;0.0692910599291889 \cdot y\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if y < -2.09999999999999987e44 or 1.05e134 < y

              1. Initial program 69.5%

                \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
              2. Taylor expanded in x around 0

                \[\leadsto \color{blue}{\frac{y \cdot \left(\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}} \]
              3. Step-by-step derivation
                1. associate-/l*N/A

                  \[\leadsto y \cdot \color{blue}{\frac{\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}} \]
                2. div-addN/A

                  \[\leadsto y \cdot \left(\frac{\frac{11167812716741}{40000000000000}}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \color{blue}{\frac{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}}\right) \]
                3. metadata-evalN/A

                  \[\leadsto y \cdot \left(\frac{\frac{11167812716741}{40000000000000} \cdot 1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{\color{blue}{z} \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \]
                4. associate-*r/N/A

                  \[\leadsto y \cdot \left(\frac{11167812716741}{40000000000000} \cdot \frac{1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{\color{blue}{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \]
                5. *-commutativeN/A

                  \[\leadsto \left(\frac{11167812716741}{40000000000000} \cdot \frac{1}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)} + \frac{z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)}{\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)}\right) \cdot \color{blue}{y} \]
              4. Applied rewrites38.7%

                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(6.012459259764103 + z, z, 3.350343815022304\right)} \cdot y} \]
              5. Taylor expanded in z around inf

                \[\leadsto \frac{692910599291889}{10000000000000000} \cdot y \]
              6. Step-by-step derivation
                1. Applied rewrites31.3%

                  \[\leadsto 0.0692910599291889 \cdot y \]

                if -2.09999999999999987e44 < y < 1.05e134

                1. Initial program 69.5%

                  \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
                2. Taylor expanded in x around inf

                  \[\leadsto \color{blue}{x \cdot \left(1 + \frac{y \cdot \left(\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)\right)}{x \cdot \left(\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)\right)}\right)} \]
                3. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \left(1 + \frac{y \cdot \left(\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)\right)}{x \cdot \left(\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)\right)}\right) \cdot \color{blue}{x} \]
                  2. lower-*.f64N/A

                    \[\leadsto \left(1 + \frac{y \cdot \left(\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)\right)}{x \cdot \left(\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)\right)}\right) \cdot \color{blue}{x} \]
                4. Applied rewrites65.4%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(6.012459259764103 + z, z, 3.350343815022304\right) \cdot x}, 1\right) \cdot x} \]
                5. Taylor expanded in x around inf

                  \[\leadsto 1 \cdot x \]
                6. Step-by-step derivation
                  1. Applied rewrites49.8%

                    \[\leadsto 1 \cdot x \]
                7. Recombined 2 regimes into one program.
                8. Add Preprocessing

                Alternative 10: 49.8% accurate, 7.5× speedup?

                \[\begin{array}{l} \\ 1 \cdot x \end{array} \]
                (FPCore (x y z) :precision binary64 (* 1.0 x))
                double code(double x, double y, double z) {
                	return 1.0 * x;
                }
                
                module fmin_fmax_functions
                    implicit none
                    private
                    public fmax
                    public fmin
                
                    interface fmax
                        module procedure fmax88
                        module procedure fmax44
                        module procedure fmax84
                        module procedure fmax48
                    end interface
                    interface fmin
                        module procedure fmin88
                        module procedure fmin44
                        module procedure fmin84
                        module procedure fmin48
                    end interface
                contains
                    real(8) function fmax88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmax44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmax84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmax48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                    end function
                    real(8) function fmin88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmin44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmin84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmin48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                    end function
                end module
                
                real(8) function code(x, y, z)
                use fmin_fmax_functions
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    real(8), intent (in) :: z
                    code = 1.0d0 * x
                end function
                
                public static double code(double x, double y, double z) {
                	return 1.0 * x;
                }
                
                def code(x, y, z):
                	return 1.0 * x
                
                function code(x, y, z)
                	return Float64(1.0 * x)
                end
                
                function tmp = code(x, y, z)
                	tmp = 1.0 * x;
                end
                
                code[x_, y_, z_] := N[(1.0 * x), $MachinePrecision]
                
                \begin{array}{l}
                
                \\
                1 \cdot x
                \end{array}
                
                Derivation
                1. Initial program 69.5%

                  \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
                2. Taylor expanded in x around inf

                  \[\leadsto \color{blue}{x \cdot \left(1 + \frac{y \cdot \left(\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)\right)}{x \cdot \left(\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)\right)}\right)} \]
                3. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \left(1 + \frac{y \cdot \left(\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)\right)}{x \cdot \left(\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)\right)}\right) \cdot \color{blue}{x} \]
                  2. lower-*.f64N/A

                    \[\leadsto \left(1 + \frac{y \cdot \left(\frac{11167812716741}{40000000000000} + z \cdot \left(\frac{307332350656623}{625000000000000} + \frac{692910599291889}{10000000000000000} \cdot z\right)\right)}{x \cdot \left(\frac{104698244219447}{31250000000000} + z \cdot \left(\frac{6012459259764103}{1000000000000000} + z\right)\right)}\right) \cdot \color{blue}{x} \]
                4. Applied rewrites65.4%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(6.012459259764103 + z, z, 3.350343815022304\right) \cdot x}, 1\right) \cdot x} \]
                5. Taylor expanded in x around inf

                  \[\leadsto 1 \cdot x \]
                6. Step-by-step derivation
                  1. Applied rewrites49.8%

                    \[\leadsto 1 \cdot x \]
                  2. Add Preprocessing

                  Reproduce

                  ?
                  herbie shell --seed 2025142 
                  (FPCore (x y z)
                    :name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, B"
                    :precision binary64
                    (+ x (/ (* y (+ (* (+ (* z 0.0692910599291889) 0.4917317610505968) z) 0.279195317918525)) (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))