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

?

Percentage Accurate: 57.8% → 98.4%
Time: 24.0s
Precision: binary64
Cost: 42308

?

\[\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 := \left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)\\ t_1 := \frac{t_0}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\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)} \cdot \left(x \cdot \left(x + -2\right)\right)\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+300}:\\ \;\;\;\;\frac{t_0}{47.066876606 + x \cdot \left(313.399215894 + \left(43.3400022514 \cdot {x}^{2} + \left(x \cdot 263.505074721 + {x}^{3}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) + \frac{y - 130977.50649958357}{x \cdot x}\right) + -110.1139242984811\\ \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
         (*
          (- x 2.0)
          (+
           (*
            x
            (+
             (*
              x
              (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
             y))
           z)))
        (t_1
         (/
          t_0
          (+
           47.066876606
           (*
            x
            (+
             313.399215894
             (* x (+ 263.505074721 (* x (+ x 43.3400022514))))))))))
   (if (<= t_1 (- INFINITY))
     (*
      (/
       (fma x (fma x (fma x 4.16438922228 78.6994924154) 137.519416416) y)
       (fma
        x
        (fma x (fma x (+ x 43.3400022514) 263.505074721) 313.399215894)
        47.066876606))
      (* x (+ x -2.0)))
     (if (<= t_1 5e+300)
       (/
        t_0
        (+
         47.066876606
         (*
          x
          (+
           313.399215894
           (+
            (* 43.3400022514 (pow x 2.0))
            (+ (* x 263.505074721) (pow x 3.0)))))))
       (+
        (+
         (fma x 4.16438922228 (/ 3655.1204654076414 x))
         (/ (- y 130977.50649958357) (* x x)))
        -110.1139242984811)))))
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 = (x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z);
	double t_1 = t_0 / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = (fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y) / fma(x, fma(x, fma(x, (x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606)) * (x * (x + -2.0));
	} else if (t_1 <= 5e+300) {
		tmp = t_0 / (47.066876606 + (x * (313.399215894 + ((43.3400022514 * pow(x, 2.0)) + ((x * 263.505074721) + pow(x, 3.0))))));
	} else {
		tmp = (fma(x, 4.16438922228, (3655.1204654076414 / x)) + ((y - 130977.50649958357) / (x * x))) + -110.1139242984811;
	}
	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(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z))
	t_1 = Float64(t_0 / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * Float64(x + 43.3400022514))))))))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y) / fma(x, fma(x, fma(x, Float64(x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606)) * Float64(x * Float64(x + -2.0)));
	elseif (t_1 <= 5e+300)
		tmp = Float64(t_0 / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(Float64(43.3400022514 * (x ^ 2.0)) + Float64(Float64(x * 263.505074721) + (x ^ 3.0)))))));
	else
		tmp = Float64(Float64(fma(x, 4.16438922228, Float64(3655.1204654076414 / x)) + Float64(Float64(y - 130977.50649958357) / Float64(x * x))) + -110.1139242984811);
	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[(x - 2.0), $MachinePrecision] * 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]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(x * N[(x * N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] + 137.519416416), $MachinePrecision] + y), $MachinePrecision] / N[(x * N[(x * N[(x * N[(x + 43.3400022514), $MachinePrecision] + 263.505074721), $MachinePrecision] + 313.399215894), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision] * N[(x * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+300], N[(t$95$0 / N[(47.066876606 + N[(x * N[(313.399215894 + N[(N[(43.3400022514 * N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(x * 263.505074721), $MachinePrecision] + N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 4.16438922228 + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(y - 130977.50649958357), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -110.1139242984811), $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 := \left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)\\
t_1 := \frac{t_0}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\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)} \cdot \left(x \cdot \left(x + -2\right)\right)\\

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+300}:\\
\;\;\;\;\frac{t_0}{47.066876606 + x \cdot \left(313.399215894 + \left(43.3400022514 \cdot {x}^{2} + \left(x \cdot 263.505074721 + {x}^{3}\right)\right)\right)}\\

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


\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.

Herbie found 22 alternatives:

AlternativeAccuracySpeedup

Accuracy vs Speed

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.

Bogosity?

Bogosity

Target

Original57.8%
Target98.8%
Herbie98.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 3 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.2%

      \[\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. Simplified67.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)}} \]
      Step-by-step derivation

      [Start]4.2%

      \[ \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} \]

      associate-*r/ [<=]67.2%

      \[ \color{blue}{\left(x - 2\right) \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(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}} \]

      sub-neg [=>]67.2%

      \[ \color{blue}{\left(x + \left(-2\right)\right)} \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(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]

      metadata-eval [=>]67.2%

      \[ \left(x + \color{blue}{-2}\right) \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(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]

      *-commutative [=>]67.2%

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

      fma-def [=>]67.2%

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

      *-commutative [=>]67.2%

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

      fma-def [=>]67.2%

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

      *-commutative [=>]67.2%

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

      fma-def [=>]67.2%

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

      fma-def [=>]67.2%

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

      *-commutative [=>]67.2%

      \[ \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)}{\color{blue}{x \cdot \left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right)} + 47.066876606} \]
    3. Taylor expanded in z around 0 4.2%

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\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)} \cdot \left(x \cdot \left(x + -2\right)\right)} \]
      Step-by-step derivation

      [Start]4.2%

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

      associate-/l* [=>]99.5%

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

      associate-/r/ [=>]99.7%

      \[ \color{blue}{\frac{\left(137.519416416 + \left(78.6994924154 + 4.16438922228 \cdot x\right) \cdot x\right) \cdot x + y}{\left(313.399215894 + \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right) \cdot x\right) \cdot x + 47.066876606} \cdot \left(x \cdot \left(x - 2\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)) < 5.00000000000000026e300

    1. Initial program 99.5%

      \[\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. Taylor expanded in x around 0 99.6%

      \[\leadsto \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(\color{blue}{\left(43.3400022514 \cdot {x}^{2} + \left(263.505074721 \cdot x + {x}^{3}\right)\right)} + 313.399215894\right) \cdot x + 47.066876606} \]

    if 5.00000000000000026e300 < (/.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 0.2%

      \[\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. Simplified4.7%

      \[\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)}} \]
      Step-by-step derivation

      [Start]0.2%

      \[ \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} \]

      associate-*r/ [<=]4.7%

      \[ \color{blue}{\left(x - 2\right) \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(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}} \]

      sub-neg [=>]4.7%

      \[ \color{blue}{\left(x + \left(-2\right)\right)} \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(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]

      metadata-eval [=>]4.7%

      \[ \left(x + \color{blue}{-2}\right) \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(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]

      *-commutative [=>]4.7%

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

      fma-def [=>]4.7%

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

      *-commutative [=>]4.7%

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

      fma-def [=>]4.7%

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

      *-commutative [=>]4.7%

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

      fma-def [=>]4.7%

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

      fma-def [=>]4.7%

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

      *-commutative [=>]4.7%

      \[ \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)}{\color{blue}{x \cdot \left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right)} + 47.066876606} \]
    3. Taylor expanded in x around -inf 99.0%

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

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) - \frac{130977.50649958357 - y}{x \cdot x}\right) + -110.1139242984811} \]
      Step-by-step derivation

      [Start]99.0%

      \[ \left(-1 \cdot \frac{130977.50649958357 + -1 \cdot y}{{x}^{2}} + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]

      sub-neg [=>]99.0%

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

      +-commutative [=>]99.0%

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

      mul-1-neg [=>]99.0%

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

      unsub-neg [=>]99.0%

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

      *-commutative [=>]99.0%

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

      fma-def [=>]99.0%

      \[ \left(\color{blue}{\mathsf{fma}\left(x, 4.16438922228, 3655.1204654076414 \cdot \frac{1}{x}\right)} - \frac{130977.50649958357 + -1 \cdot y}{{x}^{2}}\right) + \left(-110.1139242984811\right) \]

      associate-*r/ [=>]99.0%

      \[ \left(\mathsf{fma}\left(x, 4.16438922228, \color{blue}{\frac{3655.1204654076414 \cdot 1}{x}}\right) - \frac{130977.50649958357 + -1 \cdot y}{{x}^{2}}\right) + \left(-110.1139242984811\right) \]

      metadata-eval [=>]99.0%

      \[ \left(\mathsf{fma}\left(x, 4.16438922228, \frac{\color{blue}{3655.1204654076414}}{x}\right) - \frac{130977.50649958357 + -1 \cdot y}{{x}^{2}}\right) + \left(-110.1139242984811\right) \]

      mul-1-neg [=>]99.0%

      \[ \left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) - \frac{130977.50649958357 + \color{blue}{\left(-y\right)}}{{x}^{2}}\right) + \left(-110.1139242984811\right) \]

      unsub-neg [=>]99.0%

      \[ \left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) - \frac{\color{blue}{130977.50649958357 - y}}{{x}^{2}}\right) + \left(-110.1139242984811\right) \]

      unpow2 [=>]99.0%

      \[ \left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) - \frac{130977.50649958357 - y}{\color{blue}{x \cdot x}}\right) + \left(-110.1139242984811\right) \]

      metadata-eval [=>]99.0%

      \[ \left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) - \frac{130977.50649958357 - y}{x \cdot x}\right) + \color{blue}{-110.1139242984811} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)} \leq -\infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\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)} \cdot \left(x \cdot \left(x + -2\right)\right)\\ \mathbf{elif}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)} \leq 5 \cdot 10^{+300}:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{47.066876606 + x \cdot \left(313.399215894 + \left(43.3400022514 \cdot {x}^{2} + \left(x \cdot 263.505074721 + {x}^{3}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) + \frac{y - 130977.50649958357}{x \cdot x}\right) + -110.1139242984811\\ \end{array} \]

Alternatives

Alternative 1
Accuracy98.4%
Cost42308
\[\begin{array}{l} t_0 := \left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)\\ t_1 := \frac{t_0}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\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)} \cdot \left(x \cdot \left(x + -2\right)\right)\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+300}:\\ \;\;\;\;\frac{t_0}{47.066876606 + x \cdot \left(313.399215894 + \left(43.3400022514 \cdot {x}^{2} + \left(x \cdot 263.505074721 + {x}^{3}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) + \frac{y - 130977.50649958357}{x \cdot x}\right) + -110.1139242984811\\ \end{array} \]
Alternative 2
Accuracy98.4%
Cost48708
\[\begin{array}{l} \mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)} \leq 5 \cdot 10^{+300}:\\ \;\;\;\;\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)}\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) + \frac{y - 130977.50649958357}{x \cdot x}\right) + -110.1139242984811\\ \end{array} \]
Alternative 3
Accuracy98.4%
Cost20168
\[\begin{array}{l} t_0 := \left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)\\ t_1 := \frac{t_0}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{4752.4581585918595}{x} + \left(\mathsf{fma}\left(x, 4.16438922228, \frac{\frac{y}{x}}{x}\right) + \left(-110.1139242984811 - \frac{207551.7024428275}{x \cdot x}\right)\right)\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+300}:\\ \;\;\;\;\frac{t_0}{47.066876606 + x \cdot \left(313.399215894 + \left(43.3400022514 \cdot {x}^{2} + \left(x \cdot 263.505074721 + {x}^{3}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) + \frac{y - 130977.50649958357}{x \cdot x}\right) + -110.1139242984811\\ \end{array} \]
Alternative 4
Accuracy98.4%
Cost14152
\[\begin{array}{l} t_0 := 47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)\\ t_1 := \frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{t_0}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{4752.4581585918595}{x} + \left(\mathsf{fma}\left(x, 4.16438922228, \frac{\frac{y}{x}}{x}\right) + \left(-110.1139242984811 - \frac{207551.7024428275}{x \cdot x}\right)\right)\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+300}:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + \sqrt[3]{\left(x \cdot 4.16438922228\right) \cdot \left(\left(x \cdot 4.16438922228\right) \cdot \left(x \cdot 4.16438922228\right)\right)}\right)\right)\right)\right)}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) + \frac{y - 130977.50649958357}{x \cdot x}\right) + -110.1139242984811\\ \end{array} \]
Alternative 5
Accuracy98.4%
Cost13512
\[\begin{array}{l} t_0 := \left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)\\ t_1 := \frac{t_0}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{4752.4581585918595}{x} + \left(\mathsf{fma}\left(x, 4.16438922228, \frac{\frac{y}{x}}{x}\right) + \left(-110.1139242984811 - \frac{207551.7024428275}{x \cdot x}\right)\right)\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+300}:\\ \;\;\;\;\frac{t_0}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) + \frac{y - 130977.50649958357}{x \cdot x}\right) + -110.1139242984811\\ \end{array} \]
Alternative 6
Accuracy98.4%
Cost12233
\[\begin{array}{l} t_0 := \frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\\ \mathbf{if}\;t_0 \leq -\infty \lor \neg \left(t_0 \leq 5 \cdot 10^{+300}\right):\\ \;\;\;\;\left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) + \frac{y - 130977.50649958357}{x \cdot x}\right) + -110.1139242984811\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 7
Accuracy98.4%
Cost12232
\[\begin{array}{l} t_0 := \frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\\ \mathbf{if}\;t_0 \leq -\infty:\\ \;\;\;\;\frac{4752.4581585918595}{x} + \left(\mathsf{fma}\left(x, 4.16438922228, \frac{\frac{y}{x}}{x}\right) + \left(-110.1139242984811 - \frac{207551.7024428275}{x \cdot x}\right)\right)\\ \mathbf{elif}\;t_0 \leq 5 \cdot 10^{+300}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) + \frac{y - 130977.50649958357}{x \cdot x}\right) + -110.1139242984811\\ \end{array} \]
Alternative 8
Accuracy96.0%
Cost4804
\[\begin{array}{l} t_0 := \frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\\ \mathbf{if}\;t_0 \leq 5 \cdot 10^{+300}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\ \end{array} \]
Alternative 9
Accuracy94.6%
Cost2121
\[\begin{array}{l} \mathbf{if}\;x \leq -3 \cdot 10^{+32} \lor \neg \left(x \leq 5.7 \cdot 10^{+26}\right):\\ \;\;\;\;\frac{x + -2}{0.24013125253755718}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\\ \end{array} \]
Alternative 10
Accuracy92.9%
Cost1740
\[\begin{array}{l} \mathbf{if}\;x \leq -1.35:\\ \;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\ \mathbf{elif}\;x \leq 0.00028:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot 313.399215894}\\ \mathbf{elif}\;x \leq 4.6 \cdot 10^{+25}:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot z}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + -2}{0.24013125253755718}\\ \end{array} \]
Alternative 11
Accuracy92.9%
Cost1740
\[\begin{array}{l} \mathbf{if}\;x \leq -1.35:\\ \;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\ \mathbf{elif}\;x \leq 0.0031:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot 313.399215894}\\ \mathbf{elif}\;x \leq 2.4 \cdot 10^{+26}:\\ \;\;\;\;\frac{x + -2}{\frac{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}{z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + -2}{0.24013125253755718}\\ \end{array} \]
Alternative 12
Accuracy92.5%
Cost1480
\[\begin{array}{l} \mathbf{if}\;x \leq -1.35:\\ \;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{+19}:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot 313.399215894}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + -2}{0.24013125253755718}\\ \end{array} \]
Alternative 13
Accuracy89.8%
Cost1096
\[\begin{array}{l} \mathbf{if}\;x \leq -980:\\ \;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\ \mathbf{elif}\;x \leq 32:\\ \;\;\;\;x \cdot \left(y \cdot -0.0424927283095952 - z \cdot -0.28294182010212804\right) + z \cdot -0.0424927283095952\\ \mathbf{else}:\\ \;\;\;\;\frac{x + -2}{0.24013125253755718}\\ \end{array} \]
Alternative 14
Accuracy75.8%
Cost972
\[\begin{array}{l} t_0 := \frac{x + -2}{0.24013125253755718}\\ \mathbf{if}\;x \leq -1850000:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 3 \cdot 10^{-116}:\\ \;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\ \mathbf{elif}\;x \leq 115:\\ \;\;\;\;\left(x + -2\right) \cdot \left(y \cdot \left(x \cdot 0.0212463641547976\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 15
Accuracy89.1%
Cost841
\[\begin{array}{l} \mathbf{if}\;x \leq -1850000 \lor \neg \left(x \leq 3.4 \cdot 10^{-18}\right):\\ \;\;\;\;\frac{x + -2}{0.24013125253755718}\\ \mathbf{else}:\\ \;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right) + z \cdot -0.0424927283095952\\ \end{array} \]
Alternative 16
Accuracy89.2%
Cost841
\[\begin{array}{l} \mathbf{if}\;x \leq -12800 \lor \neg \left(x \leq 3.4 \cdot 10^{-18}\right):\\ \;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\ \mathbf{else}:\\ \;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right) + z \cdot -0.0424927283095952\\ \end{array} \]
Alternative 17
Accuracy76.7%
Cost713
\[\begin{array}{l} \mathbf{if}\;x \leq -5.5 \lor \neg \left(x \leq 160\right):\\ \;\;\;\;\frac{x + -2}{0.24013125253755718}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-0.0424927283095952 + \frac{x}{47.066876606}\right)\\ \end{array} \]
Alternative 18
Accuracy76.7%
Cost713
\[\begin{array}{l} \mathbf{if}\;x \leq -2300 \lor \neg \left(x \leq 80\right):\\ \;\;\;\;\frac{x + -2}{0.24013125253755718}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\ \end{array} \]
Alternative 19
Accuracy76.1%
Cost585
\[\begin{array}{l} \mathbf{if}\;x \leq -5.5 \lor \neg \left(x \leq 6.2 \cdot 10^{-28}\right):\\ \;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\ \mathbf{else}:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \end{array} \]
Alternative 20
Accuracy76.2%
Cost585
\[\begin{array}{l} \mathbf{if}\;x \leq -5.5 \lor \neg \left(x \leq 6.2 \cdot 10^{-28}\right):\\ \;\;\;\;\frac{x + -2}{0.24013125253755718}\\ \mathbf{else}:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \end{array} \]
Alternative 21
Accuracy76.4%
Cost456
\[\begin{array}{l} \mathbf{if}\;x \leq -5.5:\\ \;\;\;\;x \cdot 4.16438922228\\ \mathbf{elif}\;x \leq 2:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \]
Alternative 22
Accuracy45.4%
Cost192
\[x \cdot 4.16438922228 \]

Reproduce?

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