Average Error: 27.0 → 0.4
Time: 15.4s
Precision: binary64
\[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
\[\begin{array}{l} t_0 := {x}^{4} + \left(47.066876606 + \mathsf{fma}\left(x \cdot x, 263.505074721, \mathsf{fma}\left({x}^{3}, 43.3400022514, x \cdot 313.399215894\right)\right)\right)\\ t_1 := \frac{t_0}{x}\\ \mathbf{if}\;\frac{\left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right) \cdot \left(x + -2\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq \infty:\\ \;\;\;\;\left(x + -2\right) \cdot \left(\left(\frac{z}{{x}^{4} + \left(47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot 43.3400022514\right)\right)\right)} + \mathsf{fma}\left(137.519416416, \frac{x}{t_1}, 78.6994924154 \cdot \frac{{x}^{3}}{t_0}\right)\right) + \mathsf{fma}\left(4.16438922228, \frac{{x}^{4}}{t_0}, \frac{y}{t_1}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{x \cdot x} + \left(\left(x \cdot 4.16438922228 + \frac{3655.1204654076414}{x}\right) + \left(-110.1139242984811 + \frac{-130977.50649958357}{x \cdot x}\right)\right)\\ \end{array} \]
(FPCore (x y z)
 :precision binary64
 (/
  (*
   (- x 2.0)
   (+
    (*
     (+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y)
     x)
    z))
  (+
   (* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x)
   47.066876606)))
(FPCore (x y z)
 :precision binary64
 (let* ((t_0
         (+
          (pow x 4.0)
          (+
           47.066876606
           (fma
            (* x x)
            263.505074721
            (fma (pow x 3.0) 43.3400022514 (* x 313.399215894))))))
        (t_1 (/ t_0 x)))
   (if (<=
        (/
         (*
          (+
           (*
            x
            (+
             (*
              x
              (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
             y))
           z)
          (+ x -2.0))
         (+
          (*
           x
           (+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
          47.066876606))
        INFINITY)
     (*
      (+ x -2.0)
      (+
       (+
        (/
         z
         (+
          (pow x 4.0)
          (+
           47.066876606
           (*
            x
            (+ 313.399215894 (* x (+ 263.505074721 (* x 43.3400022514))))))))
        (fma 137.519416416 (/ x t_1) (* 78.6994924154 (/ (pow x 3.0) t_0))))
       (fma 4.16438922228 (/ (pow x 4.0) t_0) (/ y t_1))))
     (+
      (/ y (* x x))
      (+
       (+ (* x 4.16438922228) (/ 3655.1204654076414 x))
       (+ -110.1139242984811 (/ -130977.50649958357 (* x x))))))))
double code(double x, double y, double z) {
	return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
double code(double x, double y, double z) {
	double t_0 = pow(x, 4.0) + (47.066876606 + fma((x * x), 263.505074721, fma(pow(x, 3.0), 43.3400022514, (x * 313.399215894))));
	double t_1 = t_0 / x;
	double tmp;
	if (((((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z) * (x + -2.0)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= ((double) INFINITY)) {
		tmp = (x + -2.0) * (((z / (pow(x, 4.0) + (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * 43.3400022514)))))))) + fma(137.519416416, (x / t_1), (78.6994924154 * (pow(x, 3.0) / t_0)))) + fma(4.16438922228, (pow(x, 4.0) / t_0), (y / t_1)));
	} else {
		tmp = (y / (x * x)) + (((x * 4.16438922228) + (3655.1204654076414 / x)) + (-110.1139242984811 + (-130977.50649958357 / (x * x))));
	}
	return tmp;
}
function code(x, y, z)
	return Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606))
end
function code(x, y, z)
	t_0 = Float64((x ^ 4.0) + Float64(47.066876606 + fma(Float64(x * x), 263.505074721, fma((x ^ 3.0), 43.3400022514, Float64(x * 313.399215894)))))
	t_1 = Float64(t_0 / x)
	tmp = 0.0
	if (Float64(Float64(Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z) * Float64(x + -2.0)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= Inf)
		tmp = Float64(Float64(x + -2.0) * Float64(Float64(Float64(z / Float64((x ^ 4.0) + Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * 43.3400022514)))))))) + fma(137.519416416, Float64(x / t_1), Float64(78.6994924154 * Float64((x ^ 3.0) / t_0)))) + fma(4.16438922228, Float64((x ^ 4.0) / t_0), Float64(y / t_1))));
	else
		tmp = Float64(Float64(y / Float64(x * x)) + Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 / x)) + Float64(-110.1139242984811 + Float64(-130977.50649958357 / Float64(x * x)))));
	end
	return tmp
end
code[x_, y_, z_] := N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x), $MachinePrecision] + 263.505074721), $MachinePrecision] * x), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Power[x, 4.0], $MachinePrecision] + N[(47.066876606 + N[(N[(x * x), $MachinePrecision] * 263.505074721 + N[(N[Power[x, 3.0], $MachinePrecision] * 43.3400022514 + N[(x * 313.399215894), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / x), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] * N[(x + -2.0), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(N[(z / N[(N[Power[x, 4.0], $MachinePrecision] + N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(137.519416416 * N[(x / t$95$1), $MachinePrecision] + N[(78.6994924154 * N[(N[Power[x, 3.0], $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.16438922228 * N[(N[Power[x, 4.0], $MachinePrecision] / t$95$0), $MachinePrecision] + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] + N[(-110.1139242984811 + N[(-130977.50649958357 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\begin{array}{l}
t_0 := {x}^{4} + \left(47.066876606 + \mathsf{fma}\left(x \cdot x, 263.505074721, \mathsf{fma}\left({x}^{3}, 43.3400022514, x \cdot 313.399215894\right)\right)\right)\\
t_1 := \frac{t_0}{x}\\
\mathbf{if}\;\frac{\left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right) \cdot \left(x + -2\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq \infty:\\
\;\;\;\;\left(x + -2\right) \cdot \left(\left(\frac{z}{{x}^{4} + \left(47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot 43.3400022514\right)\right)\right)} + \mathsf{fma}\left(137.519416416, \frac{x}{t_1}, 78.6994924154 \cdot \frac{{x}^{3}}{t_0}\right)\right) + \mathsf{fma}\left(4.16438922228, \frac{{x}^{4}}{t_0}, \frac{y}{t_1}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{y}{x \cdot x} + \left(\left(x \cdot 4.16438922228 + \frac{3655.1204654076414}{x}\right) + \left(-110.1139242984811 + \frac{-130977.50649958357}{x \cdot x}\right)\right)\\


\end{array}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

Original27.0
Target0.8
Herbie0.4
\[\begin{array}{l} \mathbf{if}\;x < -3.326128725870005 \cdot 10^{+62}:\\ \;\;\;\;\left(\frac{y}{x \cdot x} + 4.16438922228 \cdot x\right) - 110.1139242984811\\ \mathbf{elif}\;x < 9.429991714554673 \cdot 10^{+55}:\\ \;\;\;\;\frac{x - 2}{1} \cdot \frac{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}{\left(\left(263.505074721 \cdot x + \left(43.3400022514 \cdot \left(x \cdot x\right) + x \cdot \left(x \cdot x\right)\right)\right) + 313.399215894\right) \cdot x + 47.066876606}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{y}{x \cdot x} + 4.16438922228 \cdot x\right) - 110.1139242984811\\ \end{array} \]

Derivation

  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < +inf.0

    1. Initial program 4.4

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Simplified1.2

      \[\leadsto \color{blue}{\left(x + -2\right) \cdot \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}} \]
    3. Taylor expanded in y around 0 1.1

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 \cdot \frac{{x}^{4}}{{x}^{4} + \left(47.066876606 + \left(263.505074721 \cdot {x}^{2} + \left(43.3400022514 \cdot {x}^{3} + 313.399215894 \cdot x\right)\right)\right)} + \left(\frac{y \cdot x}{{x}^{4} + \left(47.066876606 + \left(263.505074721 \cdot {x}^{2} + \left(43.3400022514 \cdot {x}^{3} + 313.399215894 \cdot x\right)\right)\right)} + \left(\frac{z}{{x}^{4} + \left(47.066876606 + \left(263.505074721 \cdot {x}^{2} + \left(43.3400022514 \cdot {x}^{3} + 313.399215894 \cdot x\right)\right)\right)} + \left(137.519416416 \cdot \frac{{x}^{2}}{{x}^{4} + \left(47.066876606 + \left(263.505074721 \cdot {x}^{2} + \left(43.3400022514 \cdot {x}^{3} + 313.399215894 \cdot x\right)\right)\right)} + 78.6994924154 \cdot \frac{{x}^{3}}{{x}^{4} + \left(47.066876606 + \left(263.505074721 \cdot {x}^{2} + \left(43.3400022514 \cdot {x}^{3} + 313.399215894 \cdot x\right)\right)\right)}\right)\right)\right)\right)} \]
    4. Simplified0.3

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(\left(\frac{z}{{x}^{4} + \left(47.066876606 + \mathsf{fma}\left(x \cdot x, 263.505074721, \mathsf{fma}\left({x}^{3}, 43.3400022514, x \cdot 313.399215894\right)\right)\right)} + \mathsf{fma}\left(137.519416416, \frac{x}{\frac{{x}^{4} + \left(47.066876606 + \mathsf{fma}\left(x \cdot x, 263.505074721, \mathsf{fma}\left({x}^{3}, 43.3400022514, x \cdot 313.399215894\right)\right)\right)}{x}}, 78.6994924154 \cdot \frac{{x}^{3}}{{x}^{4} + \left(47.066876606 + \mathsf{fma}\left(x \cdot x, 263.505074721, \mathsf{fma}\left({x}^{3}, 43.3400022514, x \cdot 313.399215894\right)\right)\right)}\right)\right) + \mathsf{fma}\left(4.16438922228, \frac{{x}^{4}}{{x}^{4} + \left(47.066876606 + \mathsf{fma}\left(x \cdot x, 263.505074721, \mathsf{fma}\left({x}^{3}, 43.3400022514, x \cdot 313.399215894\right)\right)\right)}, \frac{y}{\frac{{x}^{4} + \left(47.066876606 + \mathsf{fma}\left(x \cdot x, 263.505074721, \mathsf{fma}\left({x}^{3}, 43.3400022514, x \cdot 313.399215894\right)\right)\right)}{x}}\right)\right)} \]
    5. Taylor expanded in x around 0 0.3

      \[\leadsto \left(x + -2\right) \cdot \left(\left(\frac{z}{{x}^{4} + \left(47.066876606 + \color{blue}{\left(263.505074721 \cdot {x}^{2} + \left(43.3400022514 \cdot {x}^{3} + 313.399215894 \cdot x\right)\right)}\right)} + \mathsf{fma}\left(137.519416416, \frac{x}{\frac{{x}^{4} + \left(47.066876606 + \mathsf{fma}\left(x \cdot x, 263.505074721, \mathsf{fma}\left({x}^{3}, 43.3400022514, x \cdot 313.399215894\right)\right)\right)}{x}}, 78.6994924154 \cdot \frac{{x}^{3}}{{x}^{4} + \left(47.066876606 + \mathsf{fma}\left(x \cdot x, 263.505074721, \mathsf{fma}\left({x}^{3}, 43.3400022514, x \cdot 313.399215894\right)\right)\right)}\right)\right) + \mathsf{fma}\left(4.16438922228, \frac{{x}^{4}}{{x}^{4} + \left(47.066876606 + \mathsf{fma}\left(x \cdot x, 263.505074721, \mathsf{fma}\left({x}^{3}, 43.3400022514, x \cdot 313.399215894\right)\right)\right)}, \frac{y}{\frac{{x}^{4} + \left(47.066876606 + \mathsf{fma}\left(x \cdot x, 263.505074721, \mathsf{fma}\left({x}^{3}, 43.3400022514, x \cdot 313.399215894\right)\right)\right)}{x}}\right)\right) \]
    6. Simplified0.3

      \[\leadsto \left(x + -2\right) \cdot \left(\left(\frac{z}{{x}^{4} + \left(47.066876606 + \color{blue}{x \cdot \left(313.399215894 + x \cdot \left(x \cdot 43.3400022514 + 263.505074721\right)\right)}\right)} + \mathsf{fma}\left(137.519416416, \frac{x}{\frac{{x}^{4} + \left(47.066876606 + \mathsf{fma}\left(x \cdot x, 263.505074721, \mathsf{fma}\left({x}^{3}, 43.3400022514, x \cdot 313.399215894\right)\right)\right)}{x}}, 78.6994924154 \cdot \frac{{x}^{3}}{{x}^{4} + \left(47.066876606 + \mathsf{fma}\left(x \cdot x, 263.505074721, \mathsf{fma}\left({x}^{3}, 43.3400022514, x \cdot 313.399215894\right)\right)\right)}\right)\right) + \mathsf{fma}\left(4.16438922228, \frac{{x}^{4}}{{x}^{4} + \left(47.066876606 + \mathsf{fma}\left(x \cdot x, 263.505074721, \mathsf{fma}\left({x}^{3}, 43.3400022514, x \cdot 313.399215894\right)\right)\right)}, \frac{y}{\frac{{x}^{4} + \left(47.066876606 + \mathsf{fma}\left(x \cdot x, 263.505074721, \mathsf{fma}\left({x}^{3}, 43.3400022514, x \cdot 313.399215894\right)\right)\right)}{x}}\right)\right) \]

    if +inf.0 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000))

    1. Initial program 64.0

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Simplified64.0

      \[\leadsto \color{blue}{\left(x + -2\right) \cdot \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}} \]
    3. Applied egg-rr64.0

      \[\leadsto \color{blue}{\frac{1 \cdot \mathsf{fma}\left(x, x, -4\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)} \cdot \left(x - -2\right)}} \]
    4. Applied egg-rr64.0

      \[\leadsto \frac{1 \cdot \mathsf{fma}\left(x, x, -4\right)}{\color{blue}{\left(\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right) \cdot \frac{1}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)}\right)} \cdot \left(x - -2\right)} \]
    5. Taylor expanded in x around inf 0.6

      \[\leadsto \color{blue}{\left(\frac{y}{{x}^{2}} + \left(3655.1204654076414 \cdot \frac{1}{x} + 4.16438922228 \cdot x\right)\right) - \left(110.1139242984811 + 130977.50649958357 \cdot \frac{1}{{x}^{2}}\right)} \]
    6. Simplified0.6

      \[\leadsto \color{blue}{\frac{y}{x \cdot x} + \left(\left(x \cdot 4.16438922228 + \frac{3655.1204654076414}{x}\right) - \left(110.1139242984811 + \frac{130977.50649958357}{x \cdot x}\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.4

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right) \cdot \left(x + -2\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq \infty:\\ \;\;\;\;\left(x + -2\right) \cdot \left(\left(\frac{z}{{x}^{4} + \left(47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot 43.3400022514\right)\right)\right)} + \mathsf{fma}\left(137.519416416, \frac{x}{\frac{{x}^{4} + \left(47.066876606 + \mathsf{fma}\left(x \cdot x, 263.505074721, \mathsf{fma}\left({x}^{3}, 43.3400022514, x \cdot 313.399215894\right)\right)\right)}{x}}, 78.6994924154 \cdot \frac{{x}^{3}}{{x}^{4} + \left(47.066876606 + \mathsf{fma}\left(x \cdot x, 263.505074721, \mathsf{fma}\left({x}^{3}, 43.3400022514, x \cdot 313.399215894\right)\right)\right)}\right)\right) + \mathsf{fma}\left(4.16438922228, \frac{{x}^{4}}{{x}^{4} + \left(47.066876606 + \mathsf{fma}\left(x \cdot x, 263.505074721, \mathsf{fma}\left({x}^{3}, 43.3400022514, x \cdot 313.399215894\right)\right)\right)}, \frac{y}{\frac{{x}^{4} + \left(47.066876606 + \mathsf{fma}\left(x \cdot x, 263.505074721, \mathsf{fma}\left({x}^{3}, 43.3400022514, x \cdot 313.399215894\right)\right)\right)}{x}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{x \cdot x} + \left(\left(x \cdot 4.16438922228 + \frac{3655.1204654076414}{x}\right) + \left(-110.1139242984811 + \frac{-130977.50649958357}{x \cdot x}\right)\right)\\ \end{array} \]

Reproduce

herbie shell --seed 2022150 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, C"
  :precision binary64

  :herbie-target
  (if (< x -3.326128725870005e+62) (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811) (if (< x 9.429991714554673e+55) (* (/ (- x 2.0) 1.0) (/ (+ (* (+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y) x) z) (+ (* (+ (+ (* 263.505074721 x) (+ (* 43.3400022514 (* x x)) (* x (* x x)))) 313.399215894) x) 47.066876606))) (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811)))

  (/ (* (- x 2.0) (+ (* (+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y) x) z)) (+ (* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x) 47.066876606)))