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

Percentage Accurate: 58.3% → 98.6%
Time: 19.6s
Alternatives: 21
Speedup: 5.2×

Specification

?
\[\begin{array}{l} \\ \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} \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)))
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);
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
public static 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);
}
def code(x, y, 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)
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 tmp = code(x, y, z)
	tmp = ((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);
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]
\begin{array}{l}

\\
\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}
\end{array}

Sampling outcomes in binary64 precision:

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 21 alternatives:

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

Initial Program: 58.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \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} \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)))
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);
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
public static 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);
}
def code(x, y, 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)
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 tmp = code(x, y, z)
	tmp = ((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);
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]
\begin{array}{l}

\\
\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}
\end{array}

Alternative 1: 98.6% accurate, 0.0× speedup?

\[\begin{array}{l} \\ \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)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq \infty:\\ \;\;\;\;\frac{x + -2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{{x}^{2} \cdot 17.342137594641823 + -6193.6101064416025}{\mathsf{fma}\left(x, 4.16438922228, -78.6994924154\right)}, x, 137.519416416\right), x, y\right), x, z\right)}}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - \mathsf{fma}\left(y, -1, 130977.50649958357\right) \cdot {x}^{-2}\right) - 110.1139242984811\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<=
      (/
       (*
        (- x 2.0)
        (+
         (*
          x
          (+
           (* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
           y))
         z))
       (+
        (*
         x
         (+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
        47.066876606))
      INFINITY)
   (/
    (+ x -2.0)
    (/
     (fma
      (fma (fma (+ x 43.3400022514) x 263.505074721) x 313.399215894)
      x
      47.066876606)
     (fma
      (fma
       (fma
        (/
         (+ (* (pow x 2.0) 17.342137594641823) -6193.6101064416025)
         (fma x 4.16438922228 -78.6994924154))
        x
        137.519416416)
       x
       y)
      x
      z)))
   (-
    (-
     (+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
     (* (fma y -1.0 130977.50649958357) (pow x -2.0)))
    110.1139242984811)))
double code(double x, double y, double z) {
	double tmp;
	if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= ((double) INFINITY)) {
		tmp = (x + -2.0) / (fma(fma(fma((x + 43.3400022514), x, 263.505074721), x, 313.399215894), x, 47.066876606) / fma(fma(fma((((pow(x, 2.0) * 17.342137594641823) + -6193.6101064416025) / fma(x, 4.16438922228, -78.6994924154)), x, 137.519416416), x, y), x, z));
	} else {
		tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - (fma(y, -1.0, 130977.50649958357) * pow(x, -2.0))) - 110.1139242984811;
	}
	return tmp;
}
function code(x, y, z)
	tmp = 0.0
	if (Float64(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)) / 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(fma(fma(fma(Float64(x + 43.3400022514), x, 263.505074721), x, 313.399215894), x, 47.066876606) / fma(fma(fma(Float64(Float64(Float64((x ^ 2.0) * 17.342137594641823) + -6193.6101064416025) / fma(x, 4.16438922228, -78.6994924154)), x, 137.519416416), x, y), x, z)));
	else
		tmp = Float64(Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) - Float64(fma(y, -1.0, 130977.50649958357) * (x ^ -2.0))) - 110.1139242984811);
	end
	return tmp
end
code[x_, y_, z_] := If[LessEqual[N[(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] / 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[(N[(N[(x + 43.3400022514), $MachinePrecision] * x + 263.505074721), $MachinePrecision] * x + 313.399215894), $MachinePrecision] * x + 47.066876606), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[Power[x, 2.0], $MachinePrecision] * 17.342137594641823), $MachinePrecision] + -6193.6101064416025), $MachinePrecision] / N[(x * 4.16438922228 + -78.6994924154), $MachinePrecision]), $MachinePrecision] * x + 137.519416416), $MachinePrecision] * x + y), $MachinePrecision] * x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * -1.0 + 130977.50649958357), $MachinePrecision] * N[Power[x, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]
\begin{array}{l}

\\
\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)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq \infty:\\
\;\;\;\;\frac{x + -2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{{x}^{2} \cdot 17.342137594641823 + -6193.6101064416025}{\mathsf{fma}\left(x, 4.16438922228, -78.6994924154\right)}, x, 137.519416416\right), x, y\right), x, z\right)}}\\

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 2: 98.5% accurate, 0.0× speedup?

\[\begin{array}{l} \\ \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)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq \infty:\\ \;\;\;\;\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 \frac{x + -2}{\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(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - \mathsf{fma}\left(y, -1, 130977.50649958357\right) \cdot {x}^{-2}\right) - 110.1139242984811\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<=
      (/
       (*
        (- x 2.0)
        (+
         (*
          x
          (+
           (* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
           y))
         z))
       (+
        (*
         x
         (+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
        47.066876606))
      INFINITY)
   (*
    (fma
     x
     (fma x (fma x (fma x 4.16438922228 78.6994924154) 137.519416416) y)
     z)
    (/
     (+ x -2.0)
     (fma
      x
      (fma x (fma x (+ x 43.3400022514) 263.505074721) 313.399215894)
      47.066876606)))
   (-
    (-
     (+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
     (* (fma y -1.0 130977.50649958357) (pow x -2.0)))
    110.1139242984811)))
double code(double x, double y, double z) {
	double tmp;
	if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= ((double) INFINITY)) {
		tmp = fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) * ((x + -2.0) / fma(x, fma(x, fma(x, (x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606));
	} else {
		tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - (fma(y, -1.0, 130977.50649958357) * pow(x, -2.0))) - 110.1139242984811;
	}
	return tmp;
}
function code(x, y, z)
	tmp = 0.0
	if (Float64(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)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= Inf)
		tmp = Float64(fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) * Float64(Float64(x + -2.0) / fma(x, fma(x, fma(x, Float64(x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606)));
	else
		tmp = Float64(Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) - Float64(fma(y, -1.0, 130977.50649958357) * (x ^ -2.0))) - 110.1139242984811);
	end
	return tmp
end
code[x_, y_, z_] := If[LessEqual[N[(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] / 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 * N[(x * N[(x * N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] + 137.519416416), $MachinePrecision] + y), $MachinePrecision] + z), $MachinePrecision] * N[(N[(x + -2.0), $MachinePrecision] / N[(x * N[(x * N[(x * N[(x + 43.3400022514), $MachinePrecision] + 263.505074721), $MachinePrecision] + 313.399215894), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * -1.0 + 130977.50649958357), $MachinePrecision] * N[Power[x, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]
\begin{array}{l}

\\
\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)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq \infty:\\
\;\;\;\;\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 \frac{x + -2}{\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(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - \mathsf{fma}\left(y, -1, 130977.50649958357\right) \cdot {x}^{-2}\right) - 110.1139242984811\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 3: 98.6% accurate, 0.0× speedup?

\[\begin{array}{l} \\ \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)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq \infty:\\ \;\;\;\;\frac{x + -2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), x, 137.519416416\right), x, y\right), x, z\right)}}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - \mathsf{fma}\left(y, -1, 130977.50649958357\right) \cdot {x}^{-2}\right) - 110.1139242984811\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<=
      (/
       (*
        (- x 2.0)
        (+
         (*
          x
          (+
           (* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
           y))
         z))
       (+
        (*
         x
         (+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
        47.066876606))
      INFINITY)
   (/
    (+ x -2.0)
    (/
     (fma
      (fma (fma (+ x 43.3400022514) x 263.505074721) x 313.399215894)
      x
      47.066876606)
     (fma
      (fma (fma (fma x 4.16438922228 78.6994924154) x 137.519416416) x y)
      x
      z)))
   (-
    (-
     (+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
     (* (fma y -1.0 130977.50649958357) (pow x -2.0)))
    110.1139242984811)))
double code(double x, double y, double z) {
	double tmp;
	if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= ((double) INFINITY)) {
		tmp = (x + -2.0) / (fma(fma(fma((x + 43.3400022514), x, 263.505074721), x, 313.399215894), x, 47.066876606) / fma(fma(fma(fma(x, 4.16438922228, 78.6994924154), x, 137.519416416), x, y), x, z));
	} else {
		tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - (fma(y, -1.0, 130977.50649958357) * pow(x, -2.0))) - 110.1139242984811;
	}
	return tmp;
}
function code(x, y, z)
	tmp = 0.0
	if (Float64(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)) / 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(fma(fma(fma(Float64(x + 43.3400022514), x, 263.505074721), x, 313.399215894), x, 47.066876606) / fma(fma(fma(fma(x, 4.16438922228, 78.6994924154), x, 137.519416416), x, y), x, z)));
	else
		tmp = Float64(Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) - Float64(fma(y, -1.0, 130977.50649958357) * (x ^ -2.0))) - 110.1139242984811);
	end
	return tmp
end
code[x_, y_, z_] := If[LessEqual[N[(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] / 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[(N[(N[(x + 43.3400022514), $MachinePrecision] * x + 263.505074721), $MachinePrecision] * x + 313.399215894), $MachinePrecision] * x + 47.066876606), $MachinePrecision] / N[(N[(N[(N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] * x + 137.519416416), $MachinePrecision] * x + y), $MachinePrecision] * x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * -1.0 + 130977.50649958357), $MachinePrecision] * N[Power[x, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]
\begin{array}{l}

\\
\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)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq \infty:\\
\;\;\;\;\frac{x + -2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), x, 137.519416416\right), x, y\right), x, z\right)}}\\

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 4: 95.8% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \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)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq \infty:\\ \;\;\;\;\frac{x + -2}{\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 \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228 \cdot {x}^{2}, y\right), z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - \mathsf{fma}\left(y, -1, 130977.50649958357\right) \cdot {x}^{-2}\right) - 110.1139242984811\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<=
      (/
       (*
        (- x 2.0)
        (+
         (*
          x
          (+
           (* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
           y))
         z))
       (+
        (*
         x
         (+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
        47.066876606))
      INFINITY)
   (*
    (/
     (+ x -2.0)
     (fma
      x
      (fma x (fma x (+ x 43.3400022514) 263.505074721) 313.399215894)
      47.066876606))
    (fma x (fma x (* 4.16438922228 (pow x 2.0)) y) z))
   (-
    (-
     (+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
     (* (fma y -1.0 130977.50649958357) (pow x -2.0)))
    110.1139242984811)))
double code(double x, double y, double z) {
	double tmp;
	if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= ((double) INFINITY)) {
		tmp = ((x + -2.0) / fma(x, fma(x, fma(x, (x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606)) * fma(x, fma(x, (4.16438922228 * pow(x, 2.0)), y), z);
	} else {
		tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - (fma(y, -1.0, 130977.50649958357) * pow(x, -2.0))) - 110.1139242984811;
	}
	return tmp;
}
function code(x, y, z)
	tmp = 0.0
	if (Float64(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)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= Inf)
		tmp = Float64(Float64(Float64(x + -2.0) / fma(x, fma(x, fma(x, Float64(x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606)) * fma(x, fma(x, Float64(4.16438922228 * (x ^ 2.0)), y), z));
	else
		tmp = Float64(Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) - Float64(fma(y, -1.0, 130977.50649958357) * (x ^ -2.0))) - 110.1139242984811);
	end
	return tmp
end
code[x_, y_, z_] := If[LessEqual[N[(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] / 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[(N[(x + -2.0), $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 * N[(4.16438922228 * N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * -1.0 + 130977.50649958357), $MachinePrecision] * N[Power[x, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]
\begin{array}{l}

\\
\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)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq \infty:\\
\;\;\;\;\frac{x + -2}{\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 \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228 \cdot {x}^{2}, y\right), z\right)\\

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 5: 98.3% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\ t_1 := x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\\ \mathbf{if}\;x \leq -2.45 \cdot 10^{+54}:\\ \;\;\;\;\left(t_1 - \mathsf{fma}\left(y, -1, 130977.50649958357\right) \cdot {x}^{-2}\right) - 110.1139242984811\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{+41}:\\ \;\;\;\;z \cdot \left(\frac{x}{t_0} - 2 \cdot \frac{1}{t_0}\right) + \frac{x \cdot \left(\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right)\right)}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\left(t_1 + \frac{y}{{x}^{2}}\right) - 110.1139242984811\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0
         (+
          (*
           x
           (+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
          47.066876606))
        (t_1 (+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))))
   (if (<= x -2.45e+54)
     (-
      (- t_1 (* (fma y -1.0 130977.50649958357) (pow x -2.0)))
      110.1139242984811)
     (if (<= x 1.3e+41)
       (+
        (* z (- (/ x t_0) (* 2.0 (/ 1.0 t_0))))
        (/
         (*
          x
          (*
           (- x 2.0)
           (+
            (* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
            y)))
         t_0))
       (- (+ t_1 (/ y (pow x 2.0))) 110.1139242984811)))))
double code(double x, double y, double z) {
	double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
	double t_1 = (x * 4.16438922228) + (3655.1204654076414 * (1.0 / x));
	double tmp;
	if (x <= -2.45e+54) {
		tmp = (t_1 - (fma(y, -1.0, 130977.50649958357) * pow(x, -2.0))) - 110.1139242984811;
	} else if (x <= 1.3e+41) {
		tmp = (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) + ((x * ((x - 2.0) * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y))) / t_0);
	} else {
		tmp = (t_1 + (y / pow(x, 2.0))) - 110.1139242984811;
	}
	return tmp;
}
function code(x, y, z)
	t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)
	t_1 = Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x)))
	tmp = 0.0
	if (x <= -2.45e+54)
		tmp = Float64(Float64(t_1 - Float64(fma(y, -1.0, 130977.50649958357) * (x ^ -2.0))) - 110.1139242984811);
	elseif (x <= 1.3e+41)
		tmp = Float64(Float64(z * Float64(Float64(x / t_0) - Float64(2.0 * Float64(1.0 / t_0)))) + Float64(Float64(x * Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y))) / t_0));
	else
		tmp = Float64(Float64(t_1 + Float64(y / (x ^ 2.0))) - 110.1139242984811);
	end
	return tmp
end
code[x_, y_, z_] := Block[{t$95$0 = 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]}, Block[{t$95$1 = N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.45e+54], N[(N[(t$95$1 - N[(N[(y * -1.0 + 130977.50649958357), $MachinePrecision] * N[Power[x, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision], If[LessEqual[x, 1.3e+41], N[(N[(z * N[(N[(x / t$95$0), $MachinePrecision] - N[(2.0 * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 + N[(y / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
t_1 := x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\\
\mathbf{if}\;x \leq -2.45 \cdot 10^{+54}:\\
\;\;\;\;\left(t_1 - \mathsf{fma}\left(y, -1, 130977.50649958357\right) \cdot {x}^{-2}\right) - 110.1139242984811\\

\mathbf{elif}\;x \leq 1.3 \cdot 10^{+41}:\\
\;\;\;\;z \cdot \left(\frac{x}{t_0} - 2 \cdot \frac{1}{t_0}\right) + \frac{x \cdot \left(\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right)\right)}{t_0}\\

\mathbf{else}:\\
\;\;\;\;\left(t_1 + \frac{y}{{x}^{2}}\right) - 110.1139242984811\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 6: 98.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\ \mathbf{if}\;x \leq -2.15 \cdot 10^{+55} \lor \neg \left(x \leq 2.2 \cdot 10^{+42}\right):\\ \;\;\;\;\left(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) + \frac{y}{{x}^{2}}\right) - 110.1139242984811\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\frac{x}{t_0} - 2 \cdot \frac{1}{t_0}\right) + \frac{x \cdot \left(\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right)\right)}{t_0}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0
         (+
          (*
           x
           (+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
          47.066876606)))
   (if (or (<= x -2.15e+55) (not (<= x 2.2e+42)))
     (-
      (+
       (+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
       (/ y (pow x 2.0)))
      110.1139242984811)
     (+
      (* z (- (/ x t_0) (* 2.0 (/ 1.0 t_0))))
      (/
       (*
        x
        (*
         (- x 2.0)
         (+
          (* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
          y)))
       t_0)))))
double code(double x, double y, double z) {
	double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
	double tmp;
	if ((x <= -2.15e+55) || !(x <= 2.2e+42)) {
		tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) + (y / pow(x, 2.0))) - 110.1139242984811;
	} else {
		tmp = (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) + ((x * ((x - 2.0) * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y))) / t_0);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
    if ((x <= (-2.15d+55)) .or. (.not. (x <= 2.2d+42))) then
        tmp = (((x * 4.16438922228d0) + (3655.1204654076414d0 * (1.0d0 / x))) + (y / (x ** 2.0d0))) - 110.1139242984811d0
    else
        tmp = (z * ((x / t_0) - (2.0d0 * (1.0d0 / t_0)))) + ((x * ((x - 2.0d0) * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y))) / t_0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
	double tmp;
	if ((x <= -2.15e+55) || !(x <= 2.2e+42)) {
		tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) + (y / Math.pow(x, 2.0))) - 110.1139242984811;
	} else {
		tmp = (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) + ((x * ((x - 2.0) * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y))) / t_0);
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606
	tmp = 0
	if (x <= -2.15e+55) or not (x <= 2.2e+42):
		tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) + (y / math.pow(x, 2.0))) - 110.1139242984811
	else:
		tmp = (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) + ((x * ((x - 2.0) * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y))) / t_0)
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)
	tmp = 0.0
	if ((x <= -2.15e+55) || !(x <= 2.2e+42))
		tmp = Float64(Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) + Float64(y / (x ^ 2.0))) - 110.1139242984811);
	else
		tmp = Float64(Float64(z * Float64(Float64(x / t_0) - Float64(2.0 * Float64(1.0 / t_0)))) + Float64(Float64(x * Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y))) / t_0));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
	tmp = 0.0;
	if ((x <= -2.15e+55) || ~((x <= 2.2e+42)))
		tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) + (y / (x ^ 2.0))) - 110.1139242984811;
	else
		tmp = (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) + ((x * ((x - 2.0) * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y))) / t_0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = 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]}, If[Or[LessEqual[x, -2.15e+55], N[Not[LessEqual[x, 2.2e+42]], $MachinePrecision]], N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision], N[(N[(z * N[(N[(x / t$95$0), $MachinePrecision] - N[(2.0 * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
\mathbf{if}\;x \leq -2.15 \cdot 10^{+55} \lor \neg \left(x \leq 2.2 \cdot 10^{+42}\right):\\
\;\;\;\;\left(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) + \frac{y}{{x}^{2}}\right) - 110.1139242984811\\

\mathbf{else}:\\
\;\;\;\;z \cdot \left(\frac{x}{t_0} - 2 \cdot \frac{1}{t_0}\right) + \frac{x \cdot \left(\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right)\right)}{t_0}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 7: 97.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\ 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 -1.2 \cdot 10^{+291} \lor \neg \left(t_1 \leq 5 \cdot 10^{+297}\right):\\ \;\;\;\;x \cdot 4.16438922228 + z \cdot \left(\frac{x}{t_0} - 2 \cdot \frac{1}{t_0}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0
         (+
          (*
           x
           (+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
          47.066876606))
        (t_1
         (/
          (*
           (- x 2.0)
           (+
            (*
             x
             (+
              (*
               x
               (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
              y))
            z))
          t_0)))
   (if (or (<= t_1 -1.2e+291) (not (<= t_1 5e+297)))
     (+ (* x 4.16438922228) (* z (- (/ x t_0) (* 2.0 (/ 1.0 t_0)))))
     t_1)))
double code(double x, double y, double z) {
	double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
	double t_1 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0;
	double tmp;
	if ((t_1 <= -1.2e+291) || !(t_1 <= 5e+297)) {
		tmp = (x * 4.16438922228) + (z * ((x / t_0) - (2.0 * (1.0 / t_0))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = (x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
    t_1 = ((x - 2.0d0) * ((x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)) + z)) / t_0
    if ((t_1 <= (-1.2d+291)) .or. (.not. (t_1 <= 5d+297))) then
        tmp = (x * 4.16438922228d0) + (z * ((x / t_0) - (2.0d0 * (1.0d0 / t_0))))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
	double t_1 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0;
	double tmp;
	if ((t_1 <= -1.2e+291) || !(t_1 <= 5e+297)) {
		tmp = (x * 4.16438922228) + (z * ((x / t_0) - (2.0 * (1.0 / t_0))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606
	t_1 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0
	tmp = 0
	if (t_1 <= -1.2e+291) or not (t_1 <= 5e+297):
		tmp = (x * 4.16438922228) + (z * ((x / t_0) - (2.0 * (1.0 / t_0))))
	else:
		tmp = t_1
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)
	t_1 = Float64(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_0)
	tmp = 0.0
	if ((t_1 <= -1.2e+291) || !(t_1 <= 5e+297))
		tmp = Float64(Float64(x * 4.16438922228) + Float64(z * Float64(Float64(x / t_0) - Float64(2.0 * Float64(1.0 / t_0)))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
	t_1 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0;
	tmp = 0.0;
	if ((t_1 <= -1.2e+291) || ~((t_1 <= 5e+297)))
		tmp = (x * 4.16438922228) + (z * ((x / t_0) - (2.0 * (1.0 / t_0))));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = 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]}, Block[{t$95$1 = N[(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] / t$95$0), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1.2e+291], N[Not[LessEqual[t$95$1, 5e+297]], $MachinePrecision]], N[(N[(x * 4.16438922228), $MachinePrecision] + N[(z * N[(N[(x / t$95$0), $MachinePrecision] - N[(2.0 * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
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 -1.2 \cdot 10^{+291} \lor \neg \left(t_1 \leq 5 \cdot 10^{+297}\right):\\
\;\;\;\;x \cdot 4.16438922228 + z \cdot \left(\frac{x}{t_0} - 2 \cdot \frac{1}{t_0}\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 8: 95.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\ t_1 := x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\\ \mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot t_1 + z\right)}{t_0} \leq \infty:\\ \;\;\;\;z \cdot \left(\frac{x}{t_0} - 2 \cdot \frac{1}{t_0}\right) + \frac{x \cdot \left(\left(x - 2\right) \cdot t_1\right)}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + -2}{0.24013125253755718}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0
         (+
          (*
           x
           (+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
          47.066876606))
        (t_1
         (+
          (* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
          y)))
   (if (<= (/ (* (- x 2.0) (+ (* x t_1) z)) t_0) INFINITY)
     (+
      (* z (- (/ x t_0) (* 2.0 (/ 1.0 t_0))))
      (/ (* x (* (- x 2.0) t_1)) t_0))
     (/ (+ x -2.0) 0.24013125253755718))))
double code(double x, double y, double z) {
	double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
	double t_1 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y;
	double tmp;
	if ((((x - 2.0) * ((x * t_1) + z)) / t_0) <= ((double) INFINITY)) {
		tmp = (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0);
	} else {
		tmp = (x + -2.0) / 0.24013125253755718;
	}
	return tmp;
}
public static double code(double x, double y, double z) {
	double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
	double t_1 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y;
	double tmp;
	if ((((x - 2.0) * ((x * t_1) + z)) / t_0) <= Double.POSITIVE_INFINITY) {
		tmp = (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0);
	} else {
		tmp = (x + -2.0) / 0.24013125253755718;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606
	t_1 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y
	tmp = 0
	if (((x - 2.0) * ((x * t_1) + z)) / t_0) <= math.inf:
		tmp = (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0)
	else:
		tmp = (x + -2.0) / 0.24013125253755718
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)
	t_1 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)
	tmp = 0.0
	if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * t_1) + z)) / t_0) <= Inf)
		tmp = Float64(Float64(z * Float64(Float64(x / t_0) - Float64(2.0 * Float64(1.0 / t_0)))) + Float64(Float64(x * Float64(Float64(x - 2.0) * t_1)) / t_0));
	else
		tmp = Float64(Float64(x + -2.0) / 0.24013125253755718);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
	t_1 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y;
	tmp = 0.0;
	if ((((x - 2.0) * ((x * t_1) + z)) / t_0) <= Inf)
		tmp = (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0);
	else
		tmp = (x + -2.0) / 0.24013125253755718;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = 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]}, Block[{t$95$1 = N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * t$95$1), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], Infinity], N[(N[(z * N[(N[(x / t$95$0), $MachinePrecision] - N[(2.0 * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * N[(N[(x - 2.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
t_1 := x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot t_1 + z\right)}{t_0} \leq \infty:\\
\;\;\;\;z \cdot \left(\frac{x}{t_0} - 2 \cdot \frac{1}{t_0}\right) + \frac{x \cdot \left(\left(x - 2\right) \cdot t_1\right)}{t_0}\\

\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 9: 96.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \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)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\ \mathbf{if}\;t_0 \leq 5 \cdot 10^{+303}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{x + -2}{0.24013125253755718}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0
         (/
          (*
           (- x 2.0)
           (+
            (*
             x
             (+
              (*
               x
               (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
              y))
            z))
          (+
           (*
            x
            (+
             (* x (+ (* x (+ x 43.3400022514)) 263.505074721))
             313.399215894))
           47.066876606))))
   (if (<= t_0 5e+303) t_0 (/ (+ x -2.0) 0.24013125253755718))))
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)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
	double tmp;
	if (t_0 <= 5e+303) {
		tmp = t_0;
	} else {
		tmp = (x + -2.0) / 0.24013125253755718;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: tmp
    t_0 = ((x - 2.0d0) * ((x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
    if (t_0 <= 5d+303) then
        tmp = t_0
    else
        tmp = (x + (-2.0d0)) / 0.24013125253755718d0
    end if
    code = tmp
end function
public static 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)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
	double tmp;
	if (t_0 <= 5e+303) {
		tmp = t_0;
	} else {
		tmp = (x + -2.0) / 0.24013125253755718;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)
	tmp = 0
	if t_0 <= 5e+303:
		tmp = t_0
	else:
		tmp = (x + -2.0) / 0.24013125253755718
	return tmp
function code(x, y, z)
	t_0 = Float64(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)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606))
	tmp = 0.0
	if (t_0 <= 5e+303)
		tmp = t_0;
	else
		tmp = Float64(Float64(x + -2.0) / 0.24013125253755718);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
	tmp = 0.0;
	if (t_0 <= 5e+303)
		tmp = t_0;
	else
		tmp = (x + -2.0) / 0.24013125253755718;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(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] / 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]}, If[LessEqual[t$95$0, 5e+303], t$95$0, N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]
\begin{array}{l}

\\
\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)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\mathbf{if}\;t_0 \leq 5 \cdot 10^{+303}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 10: 95.1% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x + -2}{0.24013125253755718}\\ t_1 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\ \mathbf{if}\;x \leq -2.55 \cdot 10^{+39}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 45000:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{t_1}\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{+75}:\\ \;\;\;\;\frac{x + -2}{\frac{t_1}{x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right)}}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (/ (+ x -2.0) 0.24013125253755718))
        (t_1
         (+
          (*
           x
           (+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
          47.066876606)))
   (if (<= x -2.55e+39)
     t_0
     (if (<= x 45000.0)
       (/ (* (- x 2.0) (+ z (* x (+ y (* x 137.519416416))))) t_1)
       (if (<= x 5.2e+75)
         (/
          (+ x -2.0)
          (/
           t_1
           (*
            x
            (+
             (*
              x
              (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
             y))))
         t_0)))))
double code(double x, double y, double z) {
	double t_0 = (x + -2.0) / 0.24013125253755718;
	double t_1 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
	double tmp;
	if (x <= -2.55e+39) {
		tmp = t_0;
	} else if (x <= 45000.0) {
		tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_1;
	} else if (x <= 5.2e+75) {
		tmp = (x + -2.0) / (t_1 / (x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)));
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = (x + (-2.0d0)) / 0.24013125253755718d0
    t_1 = (x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
    if (x <= (-2.55d+39)) then
        tmp = t_0
    else if (x <= 45000.0d0) then
        tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / t_1
    else if (x <= 5.2d+75) then
        tmp = (x + (-2.0d0)) / (t_1 / (x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)))
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (x + -2.0) / 0.24013125253755718;
	double t_1 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
	double tmp;
	if (x <= -2.55e+39) {
		tmp = t_0;
	} else if (x <= 45000.0) {
		tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_1;
	} else if (x <= 5.2e+75) {
		tmp = (x + -2.0) / (t_1 / (x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (x + -2.0) / 0.24013125253755718
	t_1 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606
	tmp = 0
	if x <= -2.55e+39:
		tmp = t_0
	elif x <= 45000.0:
		tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_1
	elif x <= 5.2e+75:
		tmp = (x + -2.0) / (t_1 / (x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)))
	else:
		tmp = t_0
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(x + -2.0) / 0.24013125253755718)
	t_1 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)
	tmp = 0.0
	if (x <= -2.55e+39)
		tmp = t_0;
	elseif (x <= 45000.0)
		tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / t_1);
	elseif (x <= 5.2e+75)
		tmp = Float64(Float64(x + -2.0) / Float64(t_1 / Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y))));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (x + -2.0) / 0.24013125253755718;
	t_1 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
	tmp = 0.0;
	if (x <= -2.55e+39)
		tmp = t_0;
	elseif (x <= 45000.0)
		tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_1;
	elseif (x <= 5.2e+75)
		tmp = (x + -2.0) / (t_1 / (x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]}, Block[{t$95$1 = 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]}, If[LessEqual[x, -2.55e+39], t$95$0, If[LessEqual[x, 45000.0], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[x, 5.2e+75], N[(N[(x + -2.0), $MachinePrecision] / N[(t$95$1 / 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]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x + -2}{0.24013125253755718}\\
t_1 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
\mathbf{if}\;x \leq -2.55 \cdot 10^{+39}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;x \leq 45000:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{t_1}\\

\mathbf{elif}\;x \leq 5.2 \cdot 10^{+75}:\\
\;\;\;\;\frac{x + -2}{\frac{t_1}{x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right)}}\\

\mathbf{else}:\\
\;\;\;\;t_0\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 11: 94.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -5.3 \cdot 10^{+39} \lor \neg \left(x \leq 5 \cdot 10^{+40}\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)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= x -5.3e+39) (not (<= x 5e+40)))
   (/ (+ x -2.0) 0.24013125253755718)
   (/
    (* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
    (+
     (* x (+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
     47.066876606))))
double code(double x, double y, double z) {
	double tmp;
	if ((x <= -5.3e+39) || !(x <= 5e+40)) {
		tmp = (x + -2.0) / 0.24013125253755718;
	} else {
		tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((x <= (-5.3d+39)) .or. (.not. (x <= 5d+40))) then
        tmp = (x + (-2.0d0)) / 0.24013125253755718d0
    else
        tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((x <= -5.3e+39) || !(x <= 5e+40)) {
		tmp = (x + -2.0) / 0.24013125253755718;
	} else {
		tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (x <= -5.3e+39) or not (x <= 5e+40):
		tmp = (x + -2.0) / 0.24013125253755718
	else:
		tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((x <= -5.3e+39) || !(x <= 5e+40))
		tmp = Float64(Float64(x + -2.0) / 0.24013125253755718);
	else
		tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((x <= -5.3e+39) || ~((x <= 5e+40)))
		tmp = (x + -2.0) / 0.24013125253755718;
	else
		tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[x, -5.3e+39], N[Not[LessEqual[x, 5e+40]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.3 \cdot 10^{+39} \lor \neg \left(x \leq 5 \cdot 10^{+40}\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)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 12: 90.1% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8 \cdot 10^{+40}:\\ \;\;\;\;\frac{x + -2}{0.24013125253755718}\\ \mathbf{elif}\;x \leq -1.36 \cdot 10^{-5}:\\ \;\;\;\;\frac{x + -2}{\frac{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}{z}}\\ \mathbf{elif}\;x \leq 0.14:\\ \;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(y \cdot -0.0424927283095952 - z \cdot -0.3041881842569256\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x -8e+40)
   (/ (+ x -2.0) 0.24013125253755718)
   (if (<= x -1.36e-5)
     (/
      (+ x -2.0)
      (/
       (+
        (*
         x
         (+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
        47.066876606)
       z))
     (if (<= x 0.14)
       (+
        (* z -0.0424927283095952)
        (* x (- (* y -0.0424927283095952) (* z -0.3041881842569256))))
       (/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= -8e+40) {
		tmp = (x + -2.0) / 0.24013125253755718;
	} else if (x <= -1.36e-5) {
		tmp = (x + -2.0) / (((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) / z);
	} else if (x <= 0.14) {
		tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) - (z * -0.3041881842569256)));
	} else {
		tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (x <= (-8d+40)) then
        tmp = (x + (-2.0d0)) / 0.24013125253755718d0
    else if (x <= (-1.36d-5)) then
        tmp = (x + (-2.0d0)) / (((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0) / z)
    else if (x <= 0.14d0) then
        tmp = (z * (-0.0424927283095952d0)) + (x * ((y * (-0.0424927283095952d0)) - (z * (-0.3041881842569256d0))))
    else
        tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= -8e+40) {
		tmp = (x + -2.0) / 0.24013125253755718;
	} else if (x <= -1.36e-5) {
		tmp = (x + -2.0) / (((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) / z);
	} else if (x <= 0.14) {
		tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) - (z * -0.3041881842569256)));
	} else {
		tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= -8e+40:
		tmp = (x + -2.0) / 0.24013125253755718
	elif x <= -1.36e-5:
		tmp = (x + -2.0) / (((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) / z)
	elif x <= 0.14:
		tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) - (z * -0.3041881842569256)))
	else:
		tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= -8e+40)
		tmp = Float64(Float64(x + -2.0) / 0.24013125253755718);
	elseif (x <= -1.36e-5)
		tmp = Float64(Float64(x + -2.0) / Float64(Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) / z));
	elseif (x <= 0.14)
		tmp = Float64(Float64(z * -0.0424927283095952) + Float64(x * Float64(Float64(y * -0.0424927283095952) - Float64(z * -0.3041881842569256))));
	else
		tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= -8e+40)
		tmp = (x + -2.0) / 0.24013125253755718;
	elseif (x <= -1.36e-5)
		tmp = (x + -2.0) / (((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) / z);
	elseif (x <= 0.14)
		tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) - (z * -0.3041881842569256)));
	else
		tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, -8e+40], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, -1.36e-5], N[(N[(x + -2.0), $MachinePrecision] / N[(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] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.14], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(x * N[(N[(y * -0.0424927283095952), $MachinePrecision] - N[(z * -0.3041881842569256), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{+40}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\

\mathbf{elif}\;x \leq -1.36 \cdot 10^{-5}:\\
\;\;\;\;\frac{x + -2}{\frac{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}{z}}\\

\mathbf{elif}\;x \leq 0.14:\\
\;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(y \cdot -0.0424927283095952 - z \cdot -0.3041881842569256\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 13: 90.2% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -720000 \lor \neg \left(x \leq 0.2\right):\\ \;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\ \mathbf{else}:\\ \;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(y \cdot -0.0424927283095952 - z \cdot -0.3041881842569256\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= x -720000.0) (not (<= x 0.2)))
   (/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
   (+
    (* z -0.0424927283095952)
    (* x (- (* y -0.0424927283095952) (* z -0.3041881842569256))))))
double code(double x, double y, double z) {
	double tmp;
	if ((x <= -720000.0) || !(x <= 0.2)) {
		tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
	} else {
		tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) - (z * -0.3041881842569256)));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((x <= (-720000.0d0)) .or. (.not. (x <= 0.2d0))) then
        tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
    else
        tmp = (z * (-0.0424927283095952d0)) + (x * ((y * (-0.0424927283095952d0)) - (z * (-0.3041881842569256d0))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((x <= -720000.0) || !(x <= 0.2)) {
		tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
	} else {
		tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) - (z * -0.3041881842569256)));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (x <= -720000.0) or not (x <= 0.2):
		tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x))
	else:
		tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) - (z * -0.3041881842569256)))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((x <= -720000.0) || !(x <= 0.2))
		tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x)));
	else
		tmp = Float64(Float64(z * -0.0424927283095952) + Float64(x * Float64(Float64(y * -0.0424927283095952) - Float64(z * -0.3041881842569256))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((x <= -720000.0) || ~((x <= 0.2)))
		tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
	else
		tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) - (z * -0.3041881842569256)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[x, -720000.0], N[Not[LessEqual[x, 0.2]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(x * N[(N[(y * -0.0424927283095952), $MachinePrecision] - N[(z * -0.3041881842569256), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -720000 \lor \neg \left(x \leq 0.2\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\

\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(y \cdot -0.0424927283095952 - z \cdot -0.3041881842569256\right)\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 14: 78.3% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -36 \lor \neg \left(x \leq 15\right):\\ \;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{\frac{47.066876606 + x \cdot 313.399215894}{x + -2}}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= x -36.0) (not (<= x 15.0)))
   (/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
   (/ z (/ (+ 47.066876606 (* x 313.399215894)) (+ x -2.0)))))
double code(double x, double y, double z) {
	double tmp;
	if ((x <= -36.0) || !(x <= 15.0)) {
		tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
	} else {
		tmp = z / ((47.066876606 + (x * 313.399215894)) / (x + -2.0));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((x <= (-36.0d0)) .or. (.not. (x <= 15.0d0))) then
        tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
    else
        tmp = z / ((47.066876606d0 + (x * 313.399215894d0)) / (x + (-2.0d0)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((x <= -36.0) || !(x <= 15.0)) {
		tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
	} else {
		tmp = z / ((47.066876606 + (x * 313.399215894)) / (x + -2.0));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (x <= -36.0) or not (x <= 15.0):
		tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x))
	else:
		tmp = z / ((47.066876606 + (x * 313.399215894)) / (x + -2.0))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((x <= -36.0) || !(x <= 15.0))
		tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x)));
	else
		tmp = Float64(z / Float64(Float64(47.066876606 + Float64(x * 313.399215894)) / Float64(x + -2.0)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((x <= -36.0) || ~((x <= 15.0)))
		tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
	else
		tmp = z / ((47.066876606 + (x * 313.399215894)) / (x + -2.0));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[x, -36.0], N[Not[LessEqual[x, 15.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / N[(N[(47.066876606 + N[(x * 313.399215894), $MachinePrecision]), $MachinePrecision] / N[(x + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -36 \lor \neg \left(x \leq 15\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\

\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{47.066876606 + x \cdot 313.399215894}{x + -2}}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 15: 78.3% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -36 \lor \neg \left(x \leq 1.9\right):\\ \;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{x \cdot -168.4663270985 - 23.533438303}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= x -36.0) (not (<= x 1.9)))
   (/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
   (/ z (- (* x -168.4663270985) 23.533438303))))
double code(double x, double y, double z) {
	double tmp;
	if ((x <= -36.0) || !(x <= 1.9)) {
		tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
	} else {
		tmp = z / ((x * -168.4663270985) - 23.533438303);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((x <= (-36.0d0)) .or. (.not. (x <= 1.9d0))) then
        tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
    else
        tmp = z / ((x * (-168.4663270985d0)) - 23.533438303d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((x <= -36.0) || !(x <= 1.9)) {
		tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
	} else {
		tmp = z / ((x * -168.4663270985) - 23.533438303);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (x <= -36.0) or not (x <= 1.9):
		tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x))
	else:
		tmp = z / ((x * -168.4663270985) - 23.533438303)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((x <= -36.0) || !(x <= 1.9))
		tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x)));
	else
		tmp = Float64(z / Float64(Float64(x * -168.4663270985) - 23.533438303));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((x <= -36.0) || ~((x <= 1.9)))
		tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
	else
		tmp = z / ((x * -168.4663270985) - 23.533438303);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[x, -36.0], N[Not[LessEqual[x, 1.9]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / N[(N[(x * -168.4663270985), $MachinePrecision] - 23.533438303), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -36 \lor \neg \left(x \leq 1.9\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\

\mathbf{else}:\\
\;\;\;\;\frac{z}{x \cdot -168.4663270985 - 23.533438303}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 16: 78.1% accurate, 3.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -36 \lor \neg \left(x \leq 1.65\right):\\ \;\;\;\;\frac{x + -2}{0.24013125253755718}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{x \cdot -168.4663270985 - 23.533438303}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= x -36.0) (not (<= x 1.65)))
   (/ (+ x -2.0) 0.24013125253755718)
   (/ z (- (* x -168.4663270985) 23.533438303))))
double code(double x, double y, double z) {
	double tmp;
	if ((x <= -36.0) || !(x <= 1.65)) {
		tmp = (x + -2.0) / 0.24013125253755718;
	} else {
		tmp = z / ((x * -168.4663270985) - 23.533438303);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((x <= (-36.0d0)) .or. (.not. (x <= 1.65d0))) then
        tmp = (x + (-2.0d0)) / 0.24013125253755718d0
    else
        tmp = z / ((x * (-168.4663270985d0)) - 23.533438303d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((x <= -36.0) || !(x <= 1.65)) {
		tmp = (x + -2.0) / 0.24013125253755718;
	} else {
		tmp = z / ((x * -168.4663270985) - 23.533438303);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (x <= -36.0) or not (x <= 1.65):
		tmp = (x + -2.0) / 0.24013125253755718
	else:
		tmp = z / ((x * -168.4663270985) - 23.533438303)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((x <= -36.0) || !(x <= 1.65))
		tmp = Float64(Float64(x + -2.0) / 0.24013125253755718);
	else
		tmp = Float64(z / Float64(Float64(x * -168.4663270985) - 23.533438303));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((x <= -36.0) || ~((x <= 1.65)))
		tmp = (x + -2.0) / 0.24013125253755718;
	else
		tmp = z / ((x * -168.4663270985) - 23.533438303);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[x, -36.0], N[Not[LessEqual[x, 1.65]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], N[(z / N[(N[(x * -168.4663270985), $MachinePrecision] - 23.533438303), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -36 \lor \neg \left(x \leq 1.65\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\

\mathbf{else}:\\
\;\;\;\;\frac{z}{x \cdot -168.4663270985 - 23.533438303}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 17: 77.7% accurate, 4.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -720000 \lor \neg \left(x \leq 2.9\right):\\ \;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{-23.533438303}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= x -720000.0) (not (<= x 2.9)))
   (- (* x 4.16438922228) 110.1139242984811)
   (/ z -23.533438303)))
double code(double x, double y, double z) {
	double tmp;
	if ((x <= -720000.0) || !(x <= 2.9)) {
		tmp = (x * 4.16438922228) - 110.1139242984811;
	} else {
		tmp = z / -23.533438303;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((x <= (-720000.0d0)) .or. (.not. (x <= 2.9d0))) then
        tmp = (x * 4.16438922228d0) - 110.1139242984811d0
    else
        tmp = z / (-23.533438303d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((x <= -720000.0) || !(x <= 2.9)) {
		tmp = (x * 4.16438922228) - 110.1139242984811;
	} else {
		tmp = z / -23.533438303;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (x <= -720000.0) or not (x <= 2.9):
		tmp = (x * 4.16438922228) - 110.1139242984811
	else:
		tmp = z / -23.533438303
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((x <= -720000.0) || !(x <= 2.9))
		tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811);
	else
		tmp = Float64(z / -23.533438303);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((x <= -720000.0) || ~((x <= 2.9)))
		tmp = (x * 4.16438922228) - 110.1139242984811;
	else
		tmp = z / -23.533438303;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[x, -720000.0], N[Not[LessEqual[x, 2.9]], $MachinePrecision]], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision], N[(z / -23.533438303), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -720000 \lor \neg \left(x \leq 2.9\right):\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\

\mathbf{else}:\\
\;\;\;\;\frac{z}{-23.533438303}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 18: 77.9% accurate, 4.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1700000 \lor \neg \left(x \leq 2\right):\\ \;\;\;\;\frac{x + -2}{0.24013125253755718}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{-23.533438303}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= x -1700000.0) (not (<= x 2.0)))
   (/ (+ x -2.0) 0.24013125253755718)
   (/ z -23.533438303)))
double code(double x, double y, double z) {
	double tmp;
	if ((x <= -1700000.0) || !(x <= 2.0)) {
		tmp = (x + -2.0) / 0.24013125253755718;
	} else {
		tmp = z / -23.533438303;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((x <= (-1700000.0d0)) .or. (.not. (x <= 2.0d0))) then
        tmp = (x + (-2.0d0)) / 0.24013125253755718d0
    else
        tmp = z / (-23.533438303d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((x <= -1700000.0) || !(x <= 2.0)) {
		tmp = (x + -2.0) / 0.24013125253755718;
	} else {
		tmp = z / -23.533438303;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (x <= -1700000.0) or not (x <= 2.0):
		tmp = (x + -2.0) / 0.24013125253755718
	else:
		tmp = z / -23.533438303
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((x <= -1700000.0) || !(x <= 2.0))
		tmp = Float64(Float64(x + -2.0) / 0.24013125253755718);
	else
		tmp = Float64(z / -23.533438303);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((x <= -1700000.0) || ~((x <= 2.0)))
		tmp = (x + -2.0) / 0.24013125253755718;
	else
		tmp = z / -23.533438303;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[x, -1700000.0], N[Not[LessEqual[x, 2.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], N[(z / -23.533438303), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1700000 \lor \neg \left(x \leq 2\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\

\mathbf{else}:\\
\;\;\;\;\frac{z}{-23.533438303}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 19: 77.5% accurate, 5.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -720000 \lor \neg \left(x \leq 2\right):\\ \;\;\;\;x \cdot 4.16438922228\\ \mathbf{else}:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= x -720000.0) (not (<= x 2.0)))
   (* x 4.16438922228)
   (* z -0.0424927283095952)))
double code(double x, double y, double z) {
	double tmp;
	if ((x <= -720000.0) || !(x <= 2.0)) {
		tmp = x * 4.16438922228;
	} else {
		tmp = z * -0.0424927283095952;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((x <= (-720000.0d0)) .or. (.not. (x <= 2.0d0))) then
        tmp = x * 4.16438922228d0
    else
        tmp = z * (-0.0424927283095952d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((x <= -720000.0) || !(x <= 2.0)) {
		tmp = x * 4.16438922228;
	} else {
		tmp = z * -0.0424927283095952;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (x <= -720000.0) or not (x <= 2.0):
		tmp = x * 4.16438922228
	else:
		tmp = z * -0.0424927283095952
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((x <= -720000.0) || !(x <= 2.0))
		tmp = Float64(x * 4.16438922228);
	else
		tmp = Float64(z * -0.0424927283095952);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((x <= -720000.0) || ~((x <= 2.0)))
		tmp = x * 4.16438922228;
	else
		tmp = z * -0.0424927283095952;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[x, -720000.0], N[Not[LessEqual[x, 2.0]], $MachinePrecision]], N[(x * 4.16438922228), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -720000 \lor \neg \left(x \leq 2\right):\\
\;\;\;\;x \cdot 4.16438922228\\

\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 20: 77.6% accurate, 5.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -720000 \lor \neg \left(x \leq 2\right):\\ \;\;\;\;x \cdot 4.16438922228\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{-23.533438303}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= x -720000.0) (not (<= x 2.0)))
   (* x 4.16438922228)
   (/ z -23.533438303)))
double code(double x, double y, double z) {
	double tmp;
	if ((x <= -720000.0) || !(x <= 2.0)) {
		tmp = x * 4.16438922228;
	} else {
		tmp = z / -23.533438303;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((x <= (-720000.0d0)) .or. (.not. (x <= 2.0d0))) then
        tmp = x * 4.16438922228d0
    else
        tmp = z / (-23.533438303d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((x <= -720000.0) || !(x <= 2.0)) {
		tmp = x * 4.16438922228;
	} else {
		tmp = z / -23.533438303;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (x <= -720000.0) or not (x <= 2.0):
		tmp = x * 4.16438922228
	else:
		tmp = z / -23.533438303
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((x <= -720000.0) || !(x <= 2.0))
		tmp = Float64(x * 4.16438922228);
	else
		tmp = Float64(z / -23.533438303);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((x <= -720000.0) || ~((x <= 2.0)))
		tmp = x * 4.16438922228;
	else
		tmp = z / -23.533438303;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[x, -720000.0], N[Not[LessEqual[x, 2.0]], $MachinePrecision]], N[(x * 4.16438922228), $MachinePrecision], N[(z / -23.533438303), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -720000 \lor \neg \left(x \leq 2\right):\\
\;\;\;\;x \cdot 4.16438922228\\

\mathbf{else}:\\
\;\;\;\;\frac{z}{-23.533438303}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 21: 35.5% accurate, 12.3× speedup?

\[\begin{array}{l} \\ z \cdot -0.0424927283095952 \end{array} \]
(FPCore (x y z) :precision binary64 (* z -0.0424927283095952))
double code(double x, double y, double z) {
	return z * -0.0424927283095952;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = z * (-0.0424927283095952d0)
end function
public static double code(double x, double y, double z) {
	return z * -0.0424927283095952;
}
def code(x, y, z):
	return z * -0.0424927283095952
function code(x, y, z)
	return Float64(z * -0.0424927283095952)
end
function tmp = code(x, y, z)
	tmp = z * -0.0424927283095952;
end
code[x_, y_, z_] := N[(z * -0.0424927283095952), $MachinePrecision]
\begin{array}{l}

\\
z \cdot -0.0424927283095952
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Developer target: 98.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\frac{y}{x \cdot x} + 4.16438922228 \cdot x\right) - 110.1139242984811\\ \mathbf{if}\;x < -3.326128725870005 \cdot 10^{+62}:\\ \;\;\;\;t_0\\ \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}:\\ \;\;\;\;t_0\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811)))
   (if (< x -3.326128725870005e+62)
     t_0
     (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)))
       t_0))))
double code(double x, double y, double z) {
	double t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811;
	double tmp;
	if (x < -3.326128725870005e+62) {
		tmp = t_0;
	} else if (x < 9.429991714554673e+55) {
		tmp = ((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));
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: tmp
    t_0 = ((y / (x * x)) + (4.16438922228d0 * x)) - 110.1139242984811d0
    if (x < (-3.326128725870005d+62)) then
        tmp = t_0
    else if (x < 9.429991714554673d+55) then
        tmp = ((x - 2.0d0) / 1.0d0) * (((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z) / (((((263.505074721d0 * x) + ((43.3400022514d0 * (x * x)) + (x * (x * x)))) + 313.399215894d0) * x) + 47.066876606d0))
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811;
	double tmp;
	if (x < -3.326128725870005e+62) {
		tmp = t_0;
	} else if (x < 9.429991714554673e+55) {
		tmp = ((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));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811
	tmp = 0
	if x < -3.326128725870005e+62:
		tmp = t_0
	elif x < 9.429991714554673e+55:
		tmp = ((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))
	else:
		tmp = t_0
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(Float64(y / Float64(x * x)) + Float64(4.16438922228 * x)) - 110.1139242984811)
	tmp = 0.0
	if (x < -3.326128725870005e+62)
		tmp = t_0;
	elseif (x < 9.429991714554673e+55)
		tmp = Float64(Float64(Float64(x - 2.0) / 1.0) * Float64(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(263.505074721 * x) + Float64(Float64(43.3400022514 * Float64(x * x)) + Float64(x * Float64(x * x)))) + 313.399215894) * x) + 47.066876606)));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811;
	tmp = 0.0;
	if (x < -3.326128725870005e+62)
		tmp = t_0;
	elseif (x < 9.429991714554673e+55)
		tmp = ((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));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(4.16438922228 * x), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]}, If[Less[x, -3.326128725870005e+62], t$95$0, If[Less[x, 9.429991714554673e+55], N[(N[(N[(x - 2.0), $MachinePrecision] / 1.0), $MachinePrecision] * N[(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] / N[(N[(N[(N[(N[(263.505074721 * x), $MachinePrecision] + N[(N[(43.3400022514 * N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(\frac{y}{x \cdot x} + 4.16438922228 \cdot x\right) - 110.1139242984811\\
\mathbf{if}\;x < -3.326128725870005 \cdot 10^{+62}:\\
\;\;\;\;t_0\\

\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}:\\
\;\;\;\;t_0\\


\end{array}
\end{array}

Reproduce

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