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

Percentage Accurate: 57.9% → 98.4%
Time: 14.7s
Alternatives: 16
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 16 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: 57.9% 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.4% 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{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \frac{6193.6101064416025 - {x}^{2} \cdot 17.342137594641823}{78.6994924154 + x \cdot -4.16438922228}, 137.519416416\right), y\right), z\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{0.24013125253755718}{x}\right)}^{-1}\\ \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
       (/
        (- 6193.6101064416025 (* (pow x 2.0) 17.342137594641823))
        (+ 78.6994924154 (* x -4.16438922228)))
       137.519416416)
      y)
     z)
    (/
     (fma
      x
      (fma x (fma x (+ x 43.3400022514) 263.505074721) 313.399215894)
      47.066876606)
     (+ x -2.0)))
   (pow (/ 0.24013125253755718 x) -1.0)))
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, ((6193.6101064416025 - (pow(x, 2.0) * 17.342137594641823)) / (78.6994924154 + (x * -4.16438922228))), 137.519416416), y), z) / (fma(x, fma(x, fma(x, (x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606) / (x + -2.0));
	} else {
		tmp = pow((0.24013125253755718 / x), -1.0);
	}
	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, Float64(Float64(6193.6101064416025 - Float64((x ^ 2.0) * 17.342137594641823)) / Float64(78.6994924154 + Float64(x * -4.16438922228))), 137.519416416), y), z) / Float64(fma(x, fma(x, fma(x, Float64(x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606) / Float64(x + -2.0)));
	else
		tmp = Float64(0.24013125253755718 / x) ^ -1.0;
	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[(N[(6193.6101064416025 - N[(N[Power[x, 2.0], $MachinePrecision] * 17.342137594641823), $MachinePrecision]), $MachinePrecision] / N[(78.6994924154 + N[(x * -4.16438922228), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision] + y), $MachinePrecision] + z), $MachinePrecision] / N[(N[(x * N[(x * N[(x * N[(x + 43.3400022514), $MachinePrecision] + 263.505074721), $MachinePrecision] + 313.399215894), $MachinePrecision] + 47.066876606), $MachinePrecision] / N[(x + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(0.24013125253755718 / x), $MachinePrecision], -1.0], $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{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \frac{6193.6101064416025 - {x}^{2} \cdot 17.342137594641823}{78.6994924154 + x \cdot -4.16438922228}, 137.519416416\right), y\right), z\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}}\\

\mathbf{else}:\\
\;\;\;\;{\left(\frac{0.24013125253755718}{x}\right)}^{-1}\\


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

    1. Initial program 92.9%

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}}} \]
    3. Step-by-step derivation
      1. fma-def98.5%

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \frac{-\left({\left(x \cdot 4.16438922228\right)}^{2} + \left(-\color{blue}{6193.6101064416025}\right)\right)}{-\left(x \cdot 4.16438922228 - 78.6994924154\right)}, 137.519416416\right), y\right), z\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}} \]
      7. metadata-eval98.5%

        \[\leadsto \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \frac{-\left({\left(x \cdot 4.16438922228\right)}^{2} + \color{blue}{-6193.6101064416025}\right)}{-\left(x \cdot 4.16438922228 - 78.6994924154\right)}, 137.519416416\right), y\right), z\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}} \]
      8. fma-neg98.5%

        \[\leadsto \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \frac{-\left({\left(x \cdot 4.16438922228\right)}^{2} + -6193.6101064416025\right)}{-\color{blue}{\mathsf{fma}\left(x, 4.16438922228, -78.6994924154\right)}}, 137.519416416\right), y\right), z\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}} \]
      9. metadata-eval98.5%

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

      \[\leadsto \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \color{blue}{\frac{-\left({\left(x \cdot 4.16438922228\right)}^{2} + -6193.6101064416025\right)}{-\mathsf{fma}\left(x, 4.16438922228, -78.6994924154\right)}}, 137.519416416\right), y\right), z\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}} \]
    5. Step-by-step derivation
      1. +-commutative98.5%

        \[\leadsto \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \frac{-\color{blue}{\left(-6193.6101064416025 + {\left(x \cdot 4.16438922228\right)}^{2}\right)}}{-\mathsf{fma}\left(x, 4.16438922228, -78.6994924154\right)}, 137.519416416\right), y\right), z\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}} \]
      2. distribute-neg-in98.5%

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \frac{6193.6101064416025 - {\left(x \cdot 4.16438922228\right)}^{2}}{-\color{blue}{\left(x \cdot 4.16438922228 + -78.6994924154\right)}}, 137.519416416\right), y\right), z\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}} \]
      6. distribute-neg-in98.5%

        \[\leadsto \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \frac{6193.6101064416025 - {\left(x \cdot 4.16438922228\right)}^{2}}{\color{blue}{\left(-x \cdot 4.16438922228\right) + \left(--78.6994924154\right)}}, 137.519416416\right), y\right), z\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}} \]
      7. metadata-eval98.5%

        \[\leadsto \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \frac{6193.6101064416025 - {\left(x \cdot 4.16438922228\right)}^{2}}{\left(-x \cdot 4.16438922228\right) + \color{blue}{78.6994924154}}, 137.519416416\right), y\right), z\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}} \]
      8. +-commutative98.5%

        \[\leadsto \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \frac{6193.6101064416025 - {\left(x \cdot 4.16438922228\right)}^{2}}{\color{blue}{78.6994924154 + \left(-x \cdot 4.16438922228\right)}}, 137.519416416\right), y\right), z\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}} \]
      9. sub-neg98.5%

        \[\leadsto \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \frac{6193.6101064416025 - {\left(x \cdot 4.16438922228\right)}^{2}}{\color{blue}{78.6994924154 - x \cdot 4.16438922228}}, 137.519416416\right), y\right), z\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}} \]
      10. unpow298.5%

        \[\leadsto \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \frac{6193.6101064416025 - \color{blue}{\left(x \cdot 4.16438922228\right) \cdot \left(x \cdot 4.16438922228\right)}}{78.6994924154 - x \cdot 4.16438922228}, 137.519416416\right), y\right), z\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}} \]
      11. swap-sqr98.4%

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

        \[\leadsto \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \frac{6193.6101064416025 - \color{blue}{{x}^{2}} \cdot \left(4.16438922228 \cdot 4.16438922228\right)}{78.6994924154 - x \cdot 4.16438922228}, 137.519416416\right), y\right), z\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}} \]
      13. metadata-eval98.5%

        \[\leadsto \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \frac{6193.6101064416025 - {x}^{2} \cdot \color{blue}{17.342137594641823}}{78.6994924154 - x \cdot 4.16438922228}, 137.519416416\right), y\right), z\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}} \]
      14. sub-neg98.5%

        \[\leadsto \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \frac{6193.6101064416025 - {x}^{2} \cdot 17.342137594641823}{\color{blue}{78.6994924154 + \left(-x \cdot 4.16438922228\right)}}, 137.519416416\right), y\right), z\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}} \]
      15. distribute-rgt-neg-in98.5%

        \[\leadsto \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \frac{6193.6101064416025 - {x}^{2} \cdot 17.342137594641823}{78.6994924154 + \color{blue}{x \cdot \left(-4.16438922228\right)}}, 137.519416416\right), y\right), z\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}} \]
      16. metadata-eval98.5%

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

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

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

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}}} \]
    3. Step-by-step derivation
      1. clear-num0.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}}{\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)}}} \]
      2. inv-pow0.0%

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

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

      \[\leadsto {\color{blue}{\left(\frac{0.24013125253755718}{x}\right)}}^{-1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.7%

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

Alternative 2: 98.4% 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{\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)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{0.24013125253755718}{x}\right)}^{-1}\\ \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)
    (/
     (fma
      x
      (fma x (fma x (+ x 43.3400022514) 263.505074721) 313.399215894)
      47.066876606)
     (+ x -2.0)))
   (pow (/ 0.24013125253755718 x) -1.0)))
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) / (fma(x, fma(x, fma(x, (x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606) / (x + -2.0));
	} else {
		tmp = pow((0.24013125253755718 / x), -1.0);
	}
	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(fma(x, fma(x, fma(x, Float64(x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606) / Float64(x + -2.0)));
	else
		tmp = Float64(0.24013125253755718 / x) ^ -1.0;
	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 * N[(x * N[(x * N[(x + 43.3400022514), $MachinePrecision] + 263.505074721), $MachinePrecision] + 313.399215894), $MachinePrecision] + 47.066876606), $MachinePrecision] / N[(x + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(0.24013125253755718 / x), $MachinePrecision], -1.0], $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{\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)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}}\\

\mathbf{else}:\\
\;\;\;\;{\left(\frac{0.24013125253755718}{x}\right)}^{-1}\\


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

    1. Initial program 92.9%

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

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

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

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}}} \]
    3. Step-by-step derivation
      1. clear-num0.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}}{\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)}}} \]
      2. inv-pow0.0%

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

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

      \[\leadsto {\color{blue}{\left(\frac{0.24013125253755718}{x}\right)}}^{-1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.7%

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

Alternative 3: 97.1% 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 \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 2 \cdot 10^{+306}:\\ \;\;\;\;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}:\\ \;\;\;\;\left(\frac{y - 130977.50649958357}{{x}^{2}} + \left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right)\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 (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
          y)))
   (if (<= (/ (* (- x 2.0) (+ (* x t_1) z)) t_0) 2e+306)
     (+
      (* z (+ (/ x t_0) (* 2.0 (/ -1.0 t_0))))
      (/ (* x (* (- x 2.0) t_1)) t_0))
     (-
      (+
       (/ (- y 130977.50649958357) (pow x 2.0))
       (+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x))))
      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 * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y;
	double tmp;
	if ((((x - 2.0) * ((x * t_1) + z)) / t_0) <= 2e+306) {
		tmp = (z * ((x / t_0) + (2.0 * (-1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0);
	} else {
		tmp = (((y - 130977.50649958357) / pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
	}
	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 * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y
    if ((((x - 2.0d0) * ((x * t_1) + z)) / t_0) <= 2d+306) then
        tmp = (z * ((x / t_0) + (2.0d0 * ((-1.0d0) / t_0)))) + ((x * ((x - 2.0d0) * t_1)) / t_0)
    else
        tmp = (((y - 130977.50649958357d0) / (x ** 2.0d0)) + ((x * 4.16438922228d0) + (3655.1204654076414d0 * (1.0d0 / x)))) - 110.1139242984811d0
    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 * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y;
	double tmp;
	if ((((x - 2.0) * ((x * t_1) + z)) / t_0) <= 2e+306) {
		tmp = (z * ((x / t_0) + (2.0 * (-1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0);
	} else {
		tmp = (((y - 130977.50649958357) / Math.pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
	}
	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) <= 2e+306:
		tmp = (z * ((x / t_0) + (2.0 * (-1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0)
	else:
		tmp = (((y - 130977.50649958357) / math.pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 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 * 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) <= 2e+306)
		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(Float64(Float64(y - 130977.50649958357) / (x ^ 2.0)) + Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x)))) - 110.1139242984811);
	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) <= 2e+306)
		tmp = (z * ((x / t_0) + (2.0 * (-1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0);
	else
		tmp = (((y - 130977.50649958357) / (x ^ 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
	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], 2e+306], 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[(N[(N[(y - 130977.50649958357), $MachinePrecision] / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $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 \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 2 \cdot 10^{+306}:\\
\;\;\;\;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}:\\
\;\;\;\;\left(\frac{y - 130977.50649958357}{{x}^{2}} + \left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 2.00000000000000003e306

    1. Initial program 96.1%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in z around 0 97.1%

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

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

    1. Initial program 0.3%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around -inf 97.8%

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

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

Alternative 4: 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 -\infty \lor \neg \left(t_1 \leq 10^{+290}\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 (- INFINITY)) (not (<= t_1 1e+290)))
     (+ (* 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 <= -((double) INFINITY)) || !(t_1 <= 1e+290)) {
		tmp = (x * 4.16438922228) + (z * ((x / t_0) + (2.0 * (-1.0 / t_0))));
	} else {
		tmp = t_1;
	}
	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 - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0;
	double tmp;
	if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 1e+290)) {
		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 <= -math.inf) or not (t_1 <= 1e+290):
		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 <= Float64(-Inf)) || !(t_1 <= 1e+290))
		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 <= -Inf) || ~((t_1 <= 1e+290)))
		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, (-Infinity)], N[Not[LessEqual[t$95$1, 1e+290]], $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 -\infty \lor \neg \left(t_1 \leq 10^{+290}\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
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < -inf.0 or 1.00000000000000006e290 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000))

    1. Initial program 1.5%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in z around 0 3.4%

      \[\leadsto \color{blue}{z \cdot \left(\frac{x}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)} - 2 \cdot \frac{1}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)}\right) + \frac{x \cdot \left(\left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + 4.16438922228 \cdot x\right)\right)\right) \cdot \left(x - 2\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)}} \]
    3. Taylor expanded in x around inf 96.1%

      \[\leadsto z \cdot \left(\frac{x}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)} - 2 \cdot \frac{1}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)}\right) + \color{blue}{4.16438922228 \cdot x} \]
    4. Step-by-step derivation
      1. *-commutative96.1%

        \[\leadsto z \cdot \left(\frac{x}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)} - 2 \cdot \frac{1}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)}\right) + \color{blue}{x \cdot 4.16438922228} \]
    5. Simplified96.1%

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

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

    1. Initial program 99.6%

      \[\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} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq -\infty \lor \neg \left(\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 10^{+290}\right):\\ \;\;\;\;x \cdot 4.16438922228 + z \cdot \left(\frac{x}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} + 2 \cdot \frac{-1}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\right)\\ \mathbf{else}:\\ \;\;\;\;\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}\\ \end{array} \]

Alternative 5: 96.5% 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 := z \cdot \left(\frac{x}{t_0} + 2 \cdot \frac{-1}{t_0}\right)\\ t_2 := 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_2 + z\right)}{t_0} \leq 10^{+290}:\\ \;\;\;\;t_1 + \frac{x \cdot \left(\left(x - 2\right) \cdot t_2\right)}{t_0}\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228 + 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 (* z (+ (/ x t_0) (* 2.0 (/ -1.0 t_0)))))
        (t_2
         (+
          (* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
          y)))
   (if (<= (/ (* (- x 2.0) (+ (* x t_2) z)) t_0) 1e+290)
     (+ t_1 (/ (* x (* (- x 2.0) t_2)) t_0))
     (+ (* x 4.16438922228) 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 = z * ((x / t_0) + (2.0 * (-1.0 / t_0)));
	double t_2 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y;
	double tmp;
	if ((((x - 2.0) * ((x * t_2) + z)) / t_0) <= 1e+290) {
		tmp = t_1 + ((x * ((x - 2.0) * t_2)) / t_0);
	} else {
		tmp = (x * 4.16438922228) + 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) :: t_2
    real(8) :: tmp
    t_0 = (x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
    t_1 = z * ((x / t_0) + (2.0d0 * ((-1.0d0) / t_0)))
    t_2 = (x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y
    if ((((x - 2.0d0) * ((x * t_2) + z)) / t_0) <= 1d+290) then
        tmp = t_1 + ((x * ((x - 2.0d0) * t_2)) / t_0)
    else
        tmp = (x * 4.16438922228d0) + 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 = z * ((x / t_0) + (2.0 * (-1.0 / t_0)));
	double t_2 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y;
	double tmp;
	if ((((x - 2.0) * ((x * t_2) + z)) / t_0) <= 1e+290) {
		tmp = t_1 + ((x * ((x - 2.0) * t_2)) / t_0);
	} else {
		tmp = (x * 4.16438922228) + 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 = z * ((x / t_0) + (2.0 * (-1.0 / t_0)))
	t_2 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y
	tmp = 0
	if (((x - 2.0) * ((x * t_2) + z)) / t_0) <= 1e+290:
		tmp = t_1 + ((x * ((x - 2.0) * t_2)) / t_0)
	else:
		tmp = (x * 4.16438922228) + 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(z * Float64(Float64(x / t_0) + Float64(2.0 * Float64(-1.0 / t_0))))
	t_2 = 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_2) + z)) / t_0) <= 1e+290)
		tmp = Float64(t_1 + Float64(Float64(x * Float64(Float64(x - 2.0) * t_2)) / t_0));
	else
		tmp = Float64(Float64(x * 4.16438922228) + 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 = z * ((x / t_0) + (2.0 * (-1.0 / t_0)));
	t_2 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y;
	tmp = 0.0;
	if ((((x - 2.0) * ((x * t_2) + z)) / t_0) <= 1e+290)
		tmp = t_1 + ((x * ((x - 2.0) * t_2)) / t_0);
	else
		tmp = (x * 4.16438922228) + 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[(z * N[(N[(x / t$95$0), $MachinePrecision] + N[(2.0 * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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$2), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], 1e+290], N[(t$95$1 + N[(N[(x * N[(N[(x - 2.0), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(x * 4.16438922228), $MachinePrecision] + t$95$1), $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 := z \cdot \left(\frac{x}{t_0} + 2 \cdot \frac{-1}{t_0}\right)\\
t_2 := 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_2 + z\right)}{t_0} \leq 10^{+290}:\\
\;\;\;\;t_1 + \frac{x \cdot \left(\left(x - 2\right) \cdot t_2\right)}{t_0}\\

\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 + t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 1.00000000000000006e290

    1. Initial program 96.1%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in z around 0 97.1%

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

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

    1. Initial program 1.3%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in z around 0 1.3%

      \[\leadsto \color{blue}{z \cdot \left(\frac{x}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)} - 2 \cdot \frac{1}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)}\right) + \frac{x \cdot \left(\left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + 4.16438922228 \cdot x\right)\right)\right) \cdot \left(x - 2\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)}} \]
    3. Taylor expanded in x around inf 96.9%

      \[\leadsto z \cdot \left(\frac{x}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)} - 2 \cdot \frac{1}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)}\right) + \color{blue}{4.16438922228 \cdot x} \]
    4. Step-by-step derivation
      1. *-commutative96.9%

        \[\leadsto z \cdot \left(\frac{x}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)} - 2 \cdot \frac{1}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)}\right) + \color{blue}{x \cdot 4.16438922228} \]
    5. Simplified96.9%

      \[\leadsto z \cdot \left(\frac{x}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)} - 2 \cdot \frac{1}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)}\right) + \color{blue}{x \cdot 4.16438922228} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification97.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq 10^{+290}:\\ \;\;\;\;z \cdot \left(\frac{x}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} + 2 \cdot \frac{-1}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\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)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228 + z \cdot \left(\frac{x}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} + 2 \cdot \frac{-1}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\right)\\ \end{array} \]

Alternative 6: 96.1% 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 2 \cdot 10^{+306}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \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 2e+306) t_0 (* x 4.16438922228))))
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 <= 2e+306) {
		tmp = t_0;
	} else {
		tmp = x * 4.16438922228;
	}
	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 <= 2d+306) then
        tmp = t_0
    else
        tmp = x * 4.16438922228d0
    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 <= 2e+306) {
		tmp = t_0;
	} else {
		tmp = x * 4.16438922228;
	}
	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 <= 2e+306:
		tmp = t_0
	else:
		tmp = x * 4.16438922228
	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 <= 2e+306)
		tmp = t_0;
	else
		tmp = Float64(x * 4.16438922228);
	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 <= 2e+306)
		tmp = t_0;
	else
		tmp = x * 4.16438922228;
	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, 2e+306], t$95$0, N[(x * 4.16438922228), $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 2 \cdot 10^{+306}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 2.00000000000000003e306

    1. Initial program 96.1%

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

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

    1. Initial program 0.3%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around inf 95.8%

      \[\leadsto \color{blue}{4.16438922228 \cdot x} \]
    3. Step-by-step derivation
      1. *-commutative95.8%

        \[\leadsto \color{blue}{x \cdot 4.16438922228} \]
    4. Simplified95.8%

      \[\leadsto \color{blue}{x \cdot 4.16438922228} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification96.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq 2 \cdot 10^{+306}:\\ \;\;\;\;\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{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \]

Alternative 7: 94.0% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -26500000000000:\\ \;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\ \mathbf{elif}\;x \leq 4.7 \cdot 10^{+42}:\\ \;\;\;\;\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}\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x -26500000000000.0)
   (- (* x 4.16438922228) 110.1139242984811)
   (if (<= x 4.7e+42)
     (/
      (* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
      (+
       (*
        x
        (+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
       47.066876606))
     (* x 4.16438922228))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= -26500000000000.0) {
		tmp = (x * 4.16438922228) - 110.1139242984811;
	} else if (x <= 4.7e+42) {
		tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
	} else {
		tmp = x * 4.16438922228;
	}
	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 <= (-26500000000000.0d0)) then
        tmp = (x * 4.16438922228d0) - 110.1139242984811d0
    else if (x <= 4.7d+42) then
        tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
    else
        tmp = x * 4.16438922228d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= -26500000000000.0) {
		tmp = (x * 4.16438922228) - 110.1139242984811;
	} else if (x <= 4.7e+42) {
		tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
	} else {
		tmp = x * 4.16438922228;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= -26500000000000.0:
		tmp = (x * 4.16438922228) - 110.1139242984811
	elif x <= 4.7e+42:
		tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)
	else:
		tmp = x * 4.16438922228
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= -26500000000000.0)
		tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811);
	elseif (x <= 4.7e+42)
		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));
	else
		tmp = Float64(x * 4.16438922228);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= -26500000000000.0)
		tmp = (x * 4.16438922228) - 110.1139242984811;
	elseif (x <= 4.7e+42)
		tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
	else
		tmp = x * 4.16438922228;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, -26500000000000.0], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision], If[LessEqual[x, 4.7e+42], 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], N[(x * 4.16438922228), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -26500000000000:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\

\mathbf{elif}\;x \leq 4.7 \cdot 10^{+42}:\\
\;\;\;\;\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}\\

\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.65e13

    1. Initial program 13.9%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around inf 95.3%

      \[\leadsto \color{blue}{4.16438922228 \cdot x - 110.1139242984811} \]

    if -2.65e13 < x < 4.69999999999999986e42

    1. Initial program 97.8%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around 0 96.8%

      \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\color{blue}{137.519416416 \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} \]
    3. Step-by-step derivation
      1. *-commutative96.8%

        \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\color{blue}{x \cdot 137.519416416} + 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} \]
    4. Simplified96.8%

      \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\color{blue}{x \cdot 137.519416416} + 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} \]

    if 4.69999999999999986e42 < x

    1. Initial program 4.2%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around inf 93.7%

      \[\leadsto \color{blue}{4.16438922228 \cdot x} \]
    3. Step-by-step derivation
      1. *-commutative93.7%

        \[\leadsto \color{blue}{x \cdot 4.16438922228} \]
    4. Simplified93.7%

      \[\leadsto \color{blue}{x \cdot 4.16438922228} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification95.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -26500000000000:\\ \;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\ \mathbf{elif}\;x \leq 4.7 \cdot 10^{+42}:\\ \;\;\;\;\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}\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \]

Alternative 8: 89.2% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4600000000:\\ \;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{+21}:\\ \;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(y \cdot -0.0424927283095952 + z \cdot 0.3041881842569256\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x -4600000000.0)
   (- (* x 4.16438922228) 110.1139242984811)
   (if (<= x 1.45e+21)
     (+
      (* z -0.0424927283095952)
      (* x (+ (* y -0.0424927283095952) (* z 0.3041881842569256))))
     (* x 4.16438922228))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= -4600000000.0) {
		tmp = (x * 4.16438922228) - 110.1139242984811;
	} else if (x <= 1.45e+21) {
		tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256)));
	} else {
		tmp = x * 4.16438922228;
	}
	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 <= (-4600000000.0d0)) then
        tmp = (x * 4.16438922228d0) - 110.1139242984811d0
    else if (x <= 1.45d+21) then
        tmp = (z * (-0.0424927283095952d0)) + (x * ((y * (-0.0424927283095952d0)) + (z * 0.3041881842569256d0)))
    else
        tmp = x * 4.16438922228d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= -4600000000.0) {
		tmp = (x * 4.16438922228) - 110.1139242984811;
	} else if (x <= 1.45e+21) {
		tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256)));
	} else {
		tmp = x * 4.16438922228;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= -4600000000.0:
		tmp = (x * 4.16438922228) - 110.1139242984811
	elif x <= 1.45e+21:
		tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256)))
	else:
		tmp = x * 4.16438922228
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= -4600000000.0)
		tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811);
	elseif (x <= 1.45e+21)
		tmp = Float64(Float64(z * -0.0424927283095952) + Float64(x * Float64(Float64(y * -0.0424927283095952) + Float64(z * 0.3041881842569256))));
	else
		tmp = Float64(x * 4.16438922228);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= -4600000000.0)
		tmp = (x * 4.16438922228) - 110.1139242984811;
	elseif (x <= 1.45e+21)
		tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256)));
	else
		tmp = x * 4.16438922228;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, -4600000000.0], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision], If[LessEqual[x, 1.45e+21], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(x * N[(N[(y * -0.0424927283095952), $MachinePrecision] + N[(z * 0.3041881842569256), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4600000000:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\

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

\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.6e9

    1. Initial program 13.9%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around inf 95.3%

      \[\leadsto \color{blue}{4.16438922228 \cdot x - 110.1139242984811} \]

    if -4.6e9 < x < 1.45e21

    1. Initial program 99.0%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around 0 88.1%

      \[\leadsto \color{blue}{-0.0424927283095952 \cdot z + x \cdot \left(0.0212463641547976 \cdot \left(z + -2 \cdot y\right) - -0.28294182010212804 \cdot z\right)} \]
    3. Step-by-step derivation
      1. expm1-log1p-u66.8%

        \[\leadsto -0.0424927283095952 \cdot z + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \left(0.0212463641547976 \cdot \left(z + -2 \cdot y\right) - -0.28294182010212804 \cdot z\right)\right)\right)} \]
      2. expm1-udef58.9%

        \[\leadsto -0.0424927283095952 \cdot z + \color{blue}{\left(e^{\mathsf{log1p}\left(x \cdot \left(0.0212463641547976 \cdot \left(z + -2 \cdot y\right) - -0.28294182010212804 \cdot z\right)\right)} - 1\right)} \]
      3. cancel-sign-sub-inv58.9%

        \[\leadsto -0.0424927283095952 \cdot z + \left(e^{\mathsf{log1p}\left(x \cdot \color{blue}{\left(0.0212463641547976 \cdot \left(z + -2 \cdot y\right) + \left(--0.28294182010212804\right) \cdot z\right)}\right)} - 1\right) \]
      4. fma-def58.9%

        \[\leadsto -0.0424927283095952 \cdot z + \left(e^{\mathsf{log1p}\left(x \cdot \color{blue}{\mathsf{fma}\left(0.0212463641547976, z + -2 \cdot y, \left(--0.28294182010212804\right) \cdot z\right)}\right)} - 1\right) \]
      5. +-commutative58.9%

        \[\leadsto -0.0424927283095952 \cdot z + \left(e^{\mathsf{log1p}\left(x \cdot \mathsf{fma}\left(0.0212463641547976, \color{blue}{-2 \cdot y + z}, \left(--0.28294182010212804\right) \cdot z\right)\right)} - 1\right) \]
      6. fma-def58.9%

        \[\leadsto -0.0424927283095952 \cdot z + \left(e^{\mathsf{log1p}\left(x \cdot \mathsf{fma}\left(0.0212463641547976, \color{blue}{\mathsf{fma}\left(-2, y, z\right)}, \left(--0.28294182010212804\right) \cdot z\right)\right)} - 1\right) \]
      7. metadata-eval58.9%

        \[\leadsto -0.0424927283095952 \cdot z + \left(e^{\mathsf{log1p}\left(x \cdot \mathsf{fma}\left(0.0212463641547976, \mathsf{fma}\left(-2, y, z\right), \color{blue}{0.28294182010212804} \cdot z\right)\right)} - 1\right) \]
    4. Applied egg-rr58.9%

      \[\leadsto -0.0424927283095952 \cdot z + \color{blue}{\left(e^{\mathsf{log1p}\left(x \cdot \mathsf{fma}\left(0.0212463641547976, \mathsf{fma}\left(-2, y, z\right), 0.28294182010212804 \cdot z\right)\right)} - 1\right)} \]
    5. Step-by-step derivation
      1. expm1-def66.8%

        \[\leadsto -0.0424927283095952 \cdot z + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \mathsf{fma}\left(0.0212463641547976, \mathsf{fma}\left(-2, y, z\right), 0.28294182010212804 \cdot z\right)\right)\right)} \]
      2. expm1-log1p88.1%

        \[\leadsto -0.0424927283095952 \cdot z + \color{blue}{x \cdot \mathsf{fma}\left(0.0212463641547976, \mathsf{fma}\left(-2, y, z\right), 0.28294182010212804 \cdot z\right)} \]
      3. fma-udef88.1%

        \[\leadsto -0.0424927283095952 \cdot z + x \cdot \color{blue}{\left(0.0212463641547976 \cdot \mathsf{fma}\left(-2, y, z\right) + 0.28294182010212804 \cdot z\right)} \]
      4. metadata-eval88.1%

        \[\leadsto -0.0424927283095952 \cdot z + x \cdot \left(0.0212463641547976 \cdot \mathsf{fma}\left(-2, y, z\right) + \color{blue}{\left(--0.28294182010212804\right)} \cdot z\right) \]
      5. fma-udef88.1%

        \[\leadsto -0.0424927283095952 \cdot z + x \cdot \left(0.0212463641547976 \cdot \color{blue}{\left(-2 \cdot y + z\right)} + \left(--0.28294182010212804\right) \cdot z\right) \]
      6. distribute-lft-in88.1%

        \[\leadsto -0.0424927283095952 \cdot z + x \cdot \left(\color{blue}{\left(0.0212463641547976 \cdot \left(-2 \cdot y\right) + 0.0212463641547976 \cdot z\right)} + \left(--0.28294182010212804\right) \cdot z\right) \]
      7. distribute-lft-neg-in88.1%

        \[\leadsto -0.0424927283095952 \cdot z + x \cdot \left(\left(0.0212463641547976 \cdot \left(-2 \cdot y\right) + 0.0212463641547976 \cdot z\right) + \color{blue}{\left(--0.28294182010212804 \cdot z\right)}\right) \]
      8. associate-+l+88.1%

        \[\leadsto -0.0424927283095952 \cdot z + x \cdot \color{blue}{\left(0.0212463641547976 \cdot \left(-2 \cdot y\right) + \left(0.0212463641547976 \cdot z + \left(--0.28294182010212804 \cdot z\right)\right)\right)} \]
      9. associate-*r*88.1%

        \[\leadsto -0.0424927283095952 \cdot z + x \cdot \left(\color{blue}{\left(0.0212463641547976 \cdot -2\right) \cdot y} + \left(0.0212463641547976 \cdot z + \left(--0.28294182010212804 \cdot z\right)\right)\right) \]
      10. metadata-eval88.1%

        \[\leadsto -0.0424927283095952 \cdot z + x \cdot \left(\color{blue}{-0.0424927283095952} \cdot y + \left(0.0212463641547976 \cdot z + \left(--0.28294182010212804 \cdot z\right)\right)\right) \]
      11. *-commutative88.1%

        \[\leadsto -0.0424927283095952 \cdot z + x \cdot \left(\color{blue}{y \cdot -0.0424927283095952} + \left(0.0212463641547976 \cdot z + \left(--0.28294182010212804 \cdot z\right)\right)\right) \]
      12. sub-neg88.1%

        \[\leadsto -0.0424927283095952 \cdot z + x \cdot \left(y \cdot -0.0424927283095952 + \color{blue}{\left(0.0212463641547976 \cdot z - -0.28294182010212804 \cdot z\right)}\right) \]
      13. distribute-rgt-out--88.1%

        \[\leadsto -0.0424927283095952 \cdot z + x \cdot \left(y \cdot -0.0424927283095952 + \color{blue}{z \cdot \left(0.0212463641547976 - -0.28294182010212804\right)}\right) \]
      14. metadata-eval88.1%

        \[\leadsto -0.0424927283095952 \cdot z + x \cdot \left(y \cdot -0.0424927283095952 + z \cdot \color{blue}{0.3041881842569256}\right) \]
    6. Simplified88.1%

      \[\leadsto -0.0424927283095952 \cdot z + \color{blue}{x \cdot \left(y \cdot -0.0424927283095952 + z \cdot 0.3041881842569256\right)} \]

    if 1.45e21 < x

    1. Initial program 10.8%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around inf 85.9%

      \[\leadsto \color{blue}{4.16438922228 \cdot x} \]
    3. Step-by-step derivation
      1. *-commutative85.9%

        \[\leadsto \color{blue}{x \cdot 4.16438922228} \]
    4. Simplified85.9%

      \[\leadsto \color{blue}{x \cdot 4.16438922228} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification89.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4600000000:\\ \;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{+21}:\\ \;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(y \cdot -0.0424927283095952 + z \cdot 0.3041881842569256\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \]

Alternative 9: 89.4% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4600000000:\\ \;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\ \mathbf{elif}\;x \leq 2:\\ \;\;\;\;z \cdot -0.0424927283095952 + -0.0424927283095952 \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x -4600000000.0)
   (- (* x 4.16438922228) 110.1139242984811)
   (if (<= x 2.0)
     (+ (* z -0.0424927283095952) (* -0.0424927283095952 (* x y)))
     (-
      (+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
      110.1139242984811))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= -4600000000.0) {
		tmp = (x * 4.16438922228) - 110.1139242984811;
	} else if (x <= 2.0) {
		tmp = (z * -0.0424927283095952) + (-0.0424927283095952 * (x * y));
	} else {
		tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811;
	}
	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 <= (-4600000000.0d0)) then
        tmp = (x * 4.16438922228d0) - 110.1139242984811d0
    else if (x <= 2.0d0) then
        tmp = (z * (-0.0424927283095952d0)) + ((-0.0424927283095952d0) * (x * y))
    else
        tmp = ((x * 4.16438922228d0) + (3655.1204654076414d0 * (1.0d0 / x))) - 110.1139242984811d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= -4600000000.0) {
		tmp = (x * 4.16438922228) - 110.1139242984811;
	} else if (x <= 2.0) {
		tmp = (z * -0.0424927283095952) + (-0.0424927283095952 * (x * y));
	} else {
		tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= -4600000000.0:
		tmp = (x * 4.16438922228) - 110.1139242984811
	elif x <= 2.0:
		tmp = (z * -0.0424927283095952) + (-0.0424927283095952 * (x * y))
	else:
		tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= -4600000000.0)
		tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811);
	elseif (x <= 2.0)
		tmp = Float64(Float64(z * -0.0424927283095952) + Float64(-0.0424927283095952 * Float64(x * y)));
	else
		tmp = Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) - 110.1139242984811);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= -4600000000.0)
		tmp = (x * 4.16438922228) - 110.1139242984811;
	elseif (x <= 2.0)
		tmp = (z * -0.0424927283095952) + (-0.0424927283095952 * (x * y));
	else
		tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, -4600000000.0], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision], If[LessEqual[x, 2.0], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4600000000:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.6e9

    1. Initial program 13.9%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around inf 95.3%

      \[\leadsto \color{blue}{4.16438922228 \cdot x - 110.1139242984811} \]

    if -4.6e9 < x < 2

    1. Initial program 99.6%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around 0 92.9%

      \[\leadsto \color{blue}{-0.0424927283095952 \cdot z + x \cdot \left(0.0212463641547976 \cdot \left(z + -2 \cdot y\right) - -0.28294182010212804 \cdot z\right)} \]
    3. Taylor expanded in z around 0 92.4%

      \[\leadsto -0.0424927283095952 \cdot z + \color{blue}{-0.0424927283095952 \cdot \left(x \cdot y\right)} \]

    if 2 < x

    1. Initial program 20.1%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around inf 75.8%

      \[\leadsto \color{blue}{\left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification88.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4600000000:\\ \;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\ \mathbf{elif}\;x \leq 2:\\ \;\;\;\;z \cdot -0.0424927283095952 + -0.0424927283095952 \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\\ \end{array} \]

Alternative 10: 89.3% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4600000000:\\ \;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\ \mathbf{elif}\;x \leq 2:\\ \;\;\;\;z \cdot -0.0424927283095952 + -0.0424927283095952 \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot 4.16438922228 + \frac{1}{x} \cdot 7085.836212289914\right) - 188.81341671388108\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x -4600000000.0)
   (- (* x 4.16438922228) 110.1139242984811)
   (if (<= x 2.0)
     (+ (* z -0.0424927283095952) (* -0.0424927283095952 (* x y)))
     (-
      (+ (* x 4.16438922228) (* (/ 1.0 x) 7085.836212289914))
      188.81341671388108))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= -4600000000.0) {
		tmp = (x * 4.16438922228) - 110.1139242984811;
	} else if (x <= 2.0) {
		tmp = (z * -0.0424927283095952) + (-0.0424927283095952 * (x * y));
	} else {
		tmp = ((x * 4.16438922228) + ((1.0 / x) * 7085.836212289914)) - 188.81341671388108;
	}
	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 <= (-4600000000.0d0)) then
        tmp = (x * 4.16438922228d0) - 110.1139242984811d0
    else if (x <= 2.0d0) then
        tmp = (z * (-0.0424927283095952d0)) + ((-0.0424927283095952d0) * (x * y))
    else
        tmp = ((x * 4.16438922228d0) + ((1.0d0 / x) * 7085.836212289914d0)) - 188.81341671388108d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= -4600000000.0) {
		tmp = (x * 4.16438922228) - 110.1139242984811;
	} else if (x <= 2.0) {
		tmp = (z * -0.0424927283095952) + (-0.0424927283095952 * (x * y));
	} else {
		tmp = ((x * 4.16438922228) + ((1.0 / x) * 7085.836212289914)) - 188.81341671388108;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= -4600000000.0:
		tmp = (x * 4.16438922228) - 110.1139242984811
	elif x <= 2.0:
		tmp = (z * -0.0424927283095952) + (-0.0424927283095952 * (x * y))
	else:
		tmp = ((x * 4.16438922228) + ((1.0 / x) * 7085.836212289914)) - 188.81341671388108
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= -4600000000.0)
		tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811);
	elseif (x <= 2.0)
		tmp = Float64(Float64(z * -0.0424927283095952) + Float64(-0.0424927283095952 * Float64(x * y)));
	else
		tmp = Float64(Float64(Float64(x * 4.16438922228) + Float64(Float64(1.0 / x) * 7085.836212289914)) - 188.81341671388108);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= -4600000000.0)
		tmp = (x * 4.16438922228) - 110.1139242984811;
	elseif (x <= 2.0)
		tmp = (z * -0.0424927283095952) + (-0.0424927283095952 * (x * y));
	else
		tmp = ((x * 4.16438922228) + ((1.0 / x) * 7085.836212289914)) - 188.81341671388108;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, -4600000000.0], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision], If[LessEqual[x, 2.0], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] * 7085.836212289914), $MachinePrecision]), $MachinePrecision] - 188.81341671388108), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4600000000:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\

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

\mathbf{else}:\\
\;\;\;\;\left(x \cdot 4.16438922228 + \frac{1}{x} \cdot 7085.836212289914\right) - 188.81341671388108\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.6e9

    1. Initial program 13.9%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around inf 95.3%

      \[\leadsto \color{blue}{4.16438922228 \cdot x - 110.1139242984811} \]

    if -4.6e9 < x < 2

    1. Initial program 99.6%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around 0 92.9%

      \[\leadsto \color{blue}{-0.0424927283095952 \cdot z + x \cdot \left(0.0212463641547976 \cdot \left(z + -2 \cdot y\right) - -0.28294182010212804 \cdot z\right)} \]
    3. Taylor expanded in z around 0 92.4%

      \[\leadsto -0.0424927283095952 \cdot z + \color{blue}{-0.0424927283095952 \cdot \left(x \cdot y\right)} \]

    if 2 < x

    1. Initial program 20.1%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around inf 20.1%

      \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\color{blue}{4.16438922228 \cdot {x}^{3}} + 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} \]
    3. Step-by-step derivation
      1. *-commutative20.1%

        \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\color{blue}{{x}^{3} \cdot 4.16438922228} + 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} \]
    4. Simplified20.1%

      \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\color{blue}{{x}^{3} \cdot 4.16438922228} + 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} \]
    5. Taylor expanded in x around inf 75.8%

      \[\leadsto \color{blue}{\left(4.16438922228 \cdot x + 7085.836212289914 \cdot \frac{1}{x}\right) - 188.81341671388108} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification88.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4600000000:\\ \;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\ \mathbf{elif}\;x \leq 2:\\ \;\;\;\;z \cdot -0.0424927283095952 + -0.0424927283095952 \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot 4.16438922228 + \frac{1}{x} \cdot 7085.836212289914\right) - 188.81341671388108\\ \end{array} \]

Alternative 11: 75.4% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot 4.16438922228 - 110.1139242984811\\ \mathbf{if}\;x \leq -0.72:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq -2.25 \cdot 10^{-110}:\\ \;\;\;\;\frac{x}{47.066876606} \cdot \left(y \cdot \left(x + -2\right)\right)\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-6}:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (- (* x 4.16438922228) 110.1139242984811)))
   (if (<= x -0.72)
     t_0
     (if (<= x -2.25e-110)
       (* (/ x 47.066876606) (* y (+ x -2.0)))
       (if (<= x 9.5e-6) (* z -0.0424927283095952) t_0)))))
double code(double x, double y, double z) {
	double t_0 = (x * 4.16438922228) - 110.1139242984811;
	double tmp;
	if (x <= -0.72) {
		tmp = t_0;
	} else if (x <= -2.25e-110) {
		tmp = (x / 47.066876606) * (y * (x + -2.0));
	} else if (x <= 9.5e-6) {
		tmp = z * -0.0424927283095952;
	} 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 = (x * 4.16438922228d0) - 110.1139242984811d0
    if (x <= (-0.72d0)) then
        tmp = t_0
    else if (x <= (-2.25d-110)) then
        tmp = (x / 47.066876606d0) * (y * (x + (-2.0d0)))
    else if (x <= 9.5d-6) then
        tmp = z * (-0.0424927283095952d0)
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (x * 4.16438922228) - 110.1139242984811;
	double tmp;
	if (x <= -0.72) {
		tmp = t_0;
	} else if (x <= -2.25e-110) {
		tmp = (x / 47.066876606) * (y * (x + -2.0));
	} else if (x <= 9.5e-6) {
		tmp = z * -0.0424927283095952;
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (x * 4.16438922228) - 110.1139242984811
	tmp = 0
	if x <= -0.72:
		tmp = t_0
	elif x <= -2.25e-110:
		tmp = (x / 47.066876606) * (y * (x + -2.0))
	elif x <= 9.5e-6:
		tmp = z * -0.0424927283095952
	else:
		tmp = t_0
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(x * 4.16438922228) - 110.1139242984811)
	tmp = 0.0
	if (x <= -0.72)
		tmp = t_0;
	elseif (x <= -2.25e-110)
		tmp = Float64(Float64(x / 47.066876606) * Float64(y * Float64(x + -2.0)));
	elseif (x <= 9.5e-6)
		tmp = Float64(z * -0.0424927283095952);
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (x * 4.16438922228) - 110.1139242984811;
	tmp = 0.0;
	if (x <= -0.72)
		tmp = t_0;
	elseif (x <= -2.25e-110)
		tmp = (x / 47.066876606) * (y * (x + -2.0));
	elseif (x <= 9.5e-6)
		tmp = z * -0.0424927283095952;
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision]}, If[LessEqual[x, -0.72], t$95$0, If[LessEqual[x, -2.25e-110], N[(N[(x / 47.066876606), $MachinePrecision] * N[(y * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.5e-6], N[(z * -0.0424927283095952), $MachinePrecision], t$95$0]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot 4.16438922228 - 110.1139242984811\\
\mathbf{if}\;x \leq -0.72:\\
\;\;\;\;t_0\\

\mathbf{elif}\;x \leq -2.25 \cdot 10^{-110}:\\
\;\;\;\;\frac{x}{47.066876606} \cdot \left(y \cdot \left(x + -2\right)\right)\\

\mathbf{elif}\;x \leq 9.5 \cdot 10^{-6}:\\
\;\;\;\;z \cdot -0.0424927283095952\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -0.71999999999999997 or 9.5000000000000005e-6 < x

    1. Initial program 19.4%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around inf 82.3%

      \[\leadsto \color{blue}{4.16438922228 \cdot x - 110.1139242984811} \]

    if -0.71999999999999997 < x < -2.25e-110

    1. Initial program 99.4%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in y around inf 56.3%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y \cdot \left(x - 2\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)}} \]
    3. Step-by-step derivation
      1. associate-/l*56.4%

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

        \[\leadsto \frac{x}{\frac{\color{blue}{x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right) + 47.066876606}}{y \cdot \left(x - 2\right)}} \]
      3. +-commutative56.4%

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

        \[\leadsto \frac{x}{\frac{x \cdot \left(x \cdot \color{blue}{\left(x \cdot \left(43.3400022514 + x\right) + 263.505074721\right)} + 313.399215894\right) + 47.066876606}{y \cdot \left(x - 2\right)}} \]
      5. +-commutative56.4%

        \[\leadsto \frac{x}{\frac{x \cdot \left(x \cdot \left(x \cdot \color{blue}{\left(x + 43.3400022514\right)} + 263.505074721\right) + 313.399215894\right) + 47.066876606}{y \cdot \left(x - 2\right)}} \]
      6. fma-udef56.4%

        \[\leadsto \frac{x}{\frac{x \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right)} + 313.399215894\right) + 47.066876606}{y \cdot \left(x - 2\right)}} \]
      7. fma-udef56.4%

        \[\leadsto \frac{x}{\frac{x \cdot \color{blue}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right)} + 47.066876606}{y \cdot \left(x - 2\right)}} \]
      8. fma-udef56.4%

        \[\leadsto \frac{x}{\frac{\color{blue}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}}{y \cdot \left(x - 2\right)}} \]
      9. associate-/r/56.3%

        \[\leadsto \color{blue}{\frac{x}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)} \cdot \left(y \cdot \left(x - 2\right)\right)} \]
      10. sub-neg56.3%

        \[\leadsto \frac{x}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)} \cdot \left(y \cdot \color{blue}{\left(x + \left(-2\right)\right)}\right) \]
      11. metadata-eval56.3%

        \[\leadsto \frac{x}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)} \cdot \left(y \cdot \left(x + \color{blue}{-2}\right)\right) \]
    4. Simplified56.3%

      \[\leadsto \color{blue}{\frac{x}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)} \cdot \left(y \cdot \left(x + -2\right)\right)} \]
    5. Taylor expanded in x around 0 52.9%

      \[\leadsto \frac{x}{\color{blue}{47.066876606}} \cdot \left(y \cdot \left(x + -2\right)\right) \]

    if -2.25e-110 < x < 9.5000000000000005e-6

    1. Initial program 99.7%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around 0 71.7%

      \[\leadsto \color{blue}{-0.0424927283095952 \cdot z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification74.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -0.72:\\ \;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\ \mathbf{elif}\;x \leq -2.25 \cdot 10^{-110}:\\ \;\;\;\;\frac{x}{47.066876606} \cdot \left(y \cdot \left(x + -2\right)\right)\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-6}:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\ \end{array} \]

Alternative 12: 89.3% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4600000000:\\ \;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\ \mathbf{elif}\;x \leq 2:\\ \;\;\;\;z \cdot -0.0424927283095952 + -0.0424927283095952 \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x -4600000000.0)
   (- (* x 4.16438922228) 110.1139242984811)
   (if (<= x 2.0)
     (+ (* z -0.0424927283095952) (* -0.0424927283095952 (* x y)))
     (* x 4.16438922228))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= -4600000000.0) {
		tmp = (x * 4.16438922228) - 110.1139242984811;
	} else if (x <= 2.0) {
		tmp = (z * -0.0424927283095952) + (-0.0424927283095952 * (x * y));
	} else {
		tmp = x * 4.16438922228;
	}
	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 <= (-4600000000.0d0)) then
        tmp = (x * 4.16438922228d0) - 110.1139242984811d0
    else if (x <= 2.0d0) then
        tmp = (z * (-0.0424927283095952d0)) + ((-0.0424927283095952d0) * (x * y))
    else
        tmp = x * 4.16438922228d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= -4600000000.0) {
		tmp = (x * 4.16438922228) - 110.1139242984811;
	} else if (x <= 2.0) {
		tmp = (z * -0.0424927283095952) + (-0.0424927283095952 * (x * y));
	} else {
		tmp = x * 4.16438922228;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= -4600000000.0:
		tmp = (x * 4.16438922228) - 110.1139242984811
	elif x <= 2.0:
		tmp = (z * -0.0424927283095952) + (-0.0424927283095952 * (x * y))
	else:
		tmp = x * 4.16438922228
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= -4600000000.0)
		tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811);
	elseif (x <= 2.0)
		tmp = Float64(Float64(z * -0.0424927283095952) + Float64(-0.0424927283095952 * Float64(x * y)));
	else
		tmp = Float64(x * 4.16438922228);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= -4600000000.0)
		tmp = (x * 4.16438922228) - 110.1139242984811;
	elseif (x <= 2.0)
		tmp = (z * -0.0424927283095952) + (-0.0424927283095952 * (x * y));
	else
		tmp = x * 4.16438922228;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, -4600000000.0], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision], If[LessEqual[x, 2.0], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4600000000:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\

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

\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.6e9

    1. Initial program 13.9%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around inf 95.3%

      \[\leadsto \color{blue}{4.16438922228 \cdot x - 110.1139242984811} \]

    if -4.6e9 < x < 2

    1. Initial program 99.6%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around 0 92.9%

      \[\leadsto \color{blue}{-0.0424927283095952 \cdot z + x \cdot \left(0.0212463641547976 \cdot \left(z + -2 \cdot y\right) - -0.28294182010212804 \cdot z\right)} \]
    3. Taylor expanded in z around 0 92.4%

      \[\leadsto -0.0424927283095952 \cdot z + \color{blue}{-0.0424927283095952 \cdot \left(x \cdot y\right)} \]

    if 2 < x

    1. Initial program 20.1%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around inf 75.8%

      \[\leadsto \color{blue}{4.16438922228 \cdot x} \]
    3. Step-by-step derivation
      1. *-commutative75.8%

        \[\leadsto \color{blue}{x \cdot 4.16438922228} \]
    4. Simplified75.8%

      \[\leadsto \color{blue}{x \cdot 4.16438922228} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification88.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4600000000:\\ \;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\ \mathbf{elif}\;x \leq 2:\\ \;\;\;\;z \cdot -0.0424927283095952 + -0.0424927283095952 \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \]

Alternative 13: 75.5% accurate, 3.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot 4.16438922228 - 110.1139242984811\\ \mathbf{if}\;x \leq -0.035:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq -5.1 \cdot 10^{-110}:\\ \;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-6}:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (- (* x 4.16438922228) 110.1139242984811)))
   (if (<= x -0.035)
     t_0
     (if (<= x -5.1e-110)
       (* -0.0424927283095952 (* x y))
       (if (<= x 9.5e-6) (* z -0.0424927283095952) t_0)))))
double code(double x, double y, double z) {
	double t_0 = (x * 4.16438922228) - 110.1139242984811;
	double tmp;
	if (x <= -0.035) {
		tmp = t_0;
	} else if (x <= -5.1e-110) {
		tmp = -0.0424927283095952 * (x * y);
	} else if (x <= 9.5e-6) {
		tmp = z * -0.0424927283095952;
	} 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 = (x * 4.16438922228d0) - 110.1139242984811d0
    if (x <= (-0.035d0)) then
        tmp = t_0
    else if (x <= (-5.1d-110)) then
        tmp = (-0.0424927283095952d0) * (x * y)
    else if (x <= 9.5d-6) then
        tmp = z * (-0.0424927283095952d0)
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (x * 4.16438922228) - 110.1139242984811;
	double tmp;
	if (x <= -0.035) {
		tmp = t_0;
	} else if (x <= -5.1e-110) {
		tmp = -0.0424927283095952 * (x * y);
	} else if (x <= 9.5e-6) {
		tmp = z * -0.0424927283095952;
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (x * 4.16438922228) - 110.1139242984811
	tmp = 0
	if x <= -0.035:
		tmp = t_0
	elif x <= -5.1e-110:
		tmp = -0.0424927283095952 * (x * y)
	elif x <= 9.5e-6:
		tmp = z * -0.0424927283095952
	else:
		tmp = t_0
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(x * 4.16438922228) - 110.1139242984811)
	tmp = 0.0
	if (x <= -0.035)
		tmp = t_0;
	elseif (x <= -5.1e-110)
		tmp = Float64(-0.0424927283095952 * Float64(x * y));
	elseif (x <= 9.5e-6)
		tmp = Float64(z * -0.0424927283095952);
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (x * 4.16438922228) - 110.1139242984811;
	tmp = 0.0;
	if (x <= -0.035)
		tmp = t_0;
	elseif (x <= -5.1e-110)
		tmp = -0.0424927283095952 * (x * y);
	elseif (x <= 9.5e-6)
		tmp = z * -0.0424927283095952;
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision]}, If[LessEqual[x, -0.035], t$95$0, If[LessEqual[x, -5.1e-110], N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.5e-6], N[(z * -0.0424927283095952), $MachinePrecision], t$95$0]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot 4.16438922228 - 110.1139242984811\\
\mathbf{if}\;x \leq -0.035:\\
\;\;\;\;t_0\\

\mathbf{elif}\;x \leq -5.1 \cdot 10^{-110}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\

\mathbf{elif}\;x \leq 9.5 \cdot 10^{-6}:\\
\;\;\;\;z \cdot -0.0424927283095952\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -0.035000000000000003 or 9.5000000000000005e-6 < x

    1. Initial program 19.4%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around inf 82.3%

      \[\leadsto \color{blue}{4.16438922228 \cdot x - 110.1139242984811} \]

    if -0.035000000000000003 < x < -5.1000000000000002e-110

    1. Initial program 99.4%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in y around inf 56.3%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y \cdot \left(x - 2\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)}} \]
    3. Taylor expanded in x around 0 52.9%

      \[\leadsto \color{blue}{-0.0424927283095952 \cdot \left(x \cdot y\right)} \]

    if -5.1000000000000002e-110 < x < 9.5000000000000005e-6

    1. Initial program 99.7%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around 0 71.7%

      \[\leadsto \color{blue}{-0.0424927283095952 \cdot z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification74.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -0.035:\\ \;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\ \mathbf{elif}\;x \leq -5.1 \cdot 10^{-110}:\\ \;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-6}:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\ \end{array} \]

Alternative 14: 75.3% accurate, 4.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -0.13:\\ \;\;\;\;x \cdot 4.16438922228\\ \mathbf{elif}\;x \leq -3.05 \cdot 10^{-112}:\\ \;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;x \leq 2:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x -0.13)
   (* x 4.16438922228)
   (if (<= x -3.05e-112)
     (* -0.0424927283095952 (* x y))
     (if (<= x 2.0) (* z -0.0424927283095952) (* x 4.16438922228)))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= -0.13) {
		tmp = x * 4.16438922228;
	} else if (x <= -3.05e-112) {
		tmp = -0.0424927283095952 * (x * y);
	} else if (x <= 2.0) {
		tmp = z * -0.0424927283095952;
	} else {
		tmp = x * 4.16438922228;
	}
	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 <= (-0.13d0)) then
        tmp = x * 4.16438922228d0
    else if (x <= (-3.05d-112)) then
        tmp = (-0.0424927283095952d0) * (x * y)
    else if (x <= 2.0d0) then
        tmp = z * (-0.0424927283095952d0)
    else
        tmp = x * 4.16438922228d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= -0.13) {
		tmp = x * 4.16438922228;
	} else if (x <= -3.05e-112) {
		tmp = -0.0424927283095952 * (x * y);
	} else if (x <= 2.0) {
		tmp = z * -0.0424927283095952;
	} else {
		tmp = x * 4.16438922228;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= -0.13:
		tmp = x * 4.16438922228
	elif x <= -3.05e-112:
		tmp = -0.0424927283095952 * (x * y)
	elif x <= 2.0:
		tmp = z * -0.0424927283095952
	else:
		tmp = x * 4.16438922228
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= -0.13)
		tmp = Float64(x * 4.16438922228);
	elseif (x <= -3.05e-112)
		tmp = Float64(-0.0424927283095952 * Float64(x * y));
	elseif (x <= 2.0)
		tmp = Float64(z * -0.0424927283095952);
	else
		tmp = Float64(x * 4.16438922228);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= -0.13)
		tmp = x * 4.16438922228;
	elseif (x <= -3.05e-112)
		tmp = -0.0424927283095952 * (x * y);
	elseif (x <= 2.0)
		tmp = z * -0.0424927283095952;
	else
		tmp = x * 4.16438922228;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, -0.13], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, -3.05e-112], N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.0], N[(z * -0.0424927283095952), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.13:\\
\;\;\;\;x \cdot 4.16438922228\\

\mathbf{elif}\;x \leq -3.05 \cdot 10^{-112}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\

\mathbf{elif}\;x \leq 2:\\
\;\;\;\;z \cdot -0.0424927283095952\\

\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -0.13 or 2 < x

    1. Initial program 18.8%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around inf 82.8%

      \[\leadsto \color{blue}{4.16438922228 \cdot x} \]
    3. Step-by-step derivation
      1. *-commutative82.8%

        \[\leadsto \color{blue}{x \cdot 4.16438922228} \]
    4. Simplified82.8%

      \[\leadsto \color{blue}{x \cdot 4.16438922228} \]

    if -0.13 < x < -3.0499999999999999e-112

    1. Initial program 99.4%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in y around inf 56.3%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y \cdot \left(x - 2\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)}} \]
    3. Taylor expanded in x around 0 52.9%

      \[\leadsto \color{blue}{-0.0424927283095952 \cdot \left(x \cdot y\right)} \]

    if -3.0499999999999999e-112 < x < 2

    1. Initial program 99.7%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around 0 71.1%

      \[\leadsto \color{blue}{-0.0424927283095952 \cdot z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification74.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -0.13:\\ \;\;\;\;x \cdot 4.16438922228\\ \mathbf{elif}\;x \leq -3.05 \cdot 10^{-112}:\\ \;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;x \leq 2:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \]

Alternative 15: 77.0% accurate, 5.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4600000000 \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 -4600000000.0) (not (<= x 2.0)))
   (* x 4.16438922228)
   (* z -0.0424927283095952)))
double code(double x, double y, double z) {
	double tmp;
	if ((x <= -4600000000.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 <= (-4600000000.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 <= -4600000000.0) || !(x <= 2.0)) {
		tmp = x * 4.16438922228;
	} else {
		tmp = z * -0.0424927283095952;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (x <= -4600000000.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 <= -4600000000.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 <= -4600000000.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, -4600000000.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 -4600000000 \lor \neg \left(x \leq 2\right):\\
\;\;\;\;x \cdot 4.16438922228\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.6e9 or 2 < x

    1. Initial program 17.4%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around inf 84.2%

      \[\leadsto \color{blue}{4.16438922228 \cdot x} \]
    3. Step-by-step derivation
      1. *-commutative84.2%

        \[\leadsto \color{blue}{x \cdot 4.16438922228} \]
    4. Simplified84.2%

      \[\leadsto \color{blue}{x \cdot 4.16438922228} \]

    if -4.6e9 < x < 2

    1. Initial program 99.6%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Taylor expanded in x around 0 62.2%

      \[\leadsto \color{blue}{-0.0424927283095952 \cdot z} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification72.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4600000000 \lor \neg \left(x \leq 2\right):\\ \;\;\;\;x \cdot 4.16438922228\\ \mathbf{else}:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \end{array} \]

Alternative 16: 34.9% 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
  1. Initial program 62.1%

    \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
  2. Taylor expanded in x around 0 35.1%

    \[\leadsto \color{blue}{-0.0424927283095952 \cdot z} \]
  3. Final simplification35.1%

    \[\leadsto z \cdot -0.0424927283095952 \]

Developer target: 98.8% 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 2023320 
(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)))