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

Percentage Accurate: 58.3% → 98.3%
Time: 14.3s
Alternatives: 19
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 19 alternatives:

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

Initial Program: 58.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (/
  (*
   (- x 2.0)
   (+
    (*
     (+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y)
     x)
    z))
  (+
   (* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x)
   47.066876606)))
double code(double x, double y, double z) {
	return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
public static double code(double x, double y, double z) {
	return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
def code(x, y, z):
	return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
function code(x, y, z)
	return Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606))
end
function tmp = code(x, y, z)
	tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
end
code[x_, y_, z_] := N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x), $MachinePrecision] + 263.505074721), $MachinePrecision] * x), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 98.3% 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}:\\ \;\;\;\;x \cdot 4.16438922228\\ \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)))
   (* x 4.16438922228)))
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 = x * 4.16438922228;
	}
	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(x * 4.16438922228);
	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[(x * 4.16438922228), $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}:\\
\;\;\;\;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)) < +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. Simplified99.6%

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

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

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

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

    \[\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}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \]

Alternative 2: 98.3% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq \infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y + \left(4.16438922228 \cdot {x}^{3} + \left(78.6994924154 \cdot {x}^{2} + x \cdot 137.519416416\right)\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}:\\ \;\;\;\;x \cdot 4.16438922228\\ \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
     (+
      y
      (+
       (* 4.16438922228 (pow x 3.0))
       (+ (* 78.6994924154 (pow x 2.0)) (* x 137.519416416))))
     z)
    (/
     (fma
      x
      (fma x (fma x (+ x 43.3400022514) 263.505074721) 313.399215894)
      47.066876606)
     (+ x -2.0)))
   (* x 4.16438922228)))
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, (y + ((4.16438922228 * pow(x, 3.0)) + ((78.6994924154 * pow(x, 2.0)) + (x * 137.519416416)))), z) / (fma(x, fma(x, fma(x, (x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606) / (x + -2.0));
	} else {
		tmp = x * 4.16438922228;
	}
	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, Float64(y + Float64(Float64(4.16438922228 * (x ^ 3.0)) + Float64(Float64(78.6994924154 * (x ^ 2.0)) + Float64(x * 137.519416416)))), 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(x * 4.16438922228);
	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[(y + N[(N[(4.16438922228 * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(N[(78.6994924154 * N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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[(x * 4.16438922228), $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, y + \left(4.16438922228 \cdot {x}^{3} + \left(78.6994924154 \cdot {x}^{2} + x \cdot 137.519416416\right)\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}:\\
\;\;\;\;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)) < +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. Simplified99.6%

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

      \[\leadsto \frac{\mathsf{fma}\left(x, \color{blue}{y + \left(4.16438922228 \cdot {x}^{3} + \left(78.6994924154 \cdot {x}^{2} + 137.519416416 \cdot x\right)\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. Taylor expanded in x around inf 99.2%

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

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

      \[\leadsto \color{blue}{x \cdot 4.16438922228} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.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 \infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y + \left(4.16438922228 \cdot {x}^{3} + \left(78.6994924154 \cdot {x}^{2} + x \cdot 137.519416416\right)\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}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \]

Alternative 3: 95.8% accurate, 0.1× 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)\\ \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)}{t_0} \leq 2 \cdot 10^{+208}:\\ \;\;\;\;t_1 + \frac{x \cdot \left(\left(x - 2\right) \cdot \left(y + \mathsf{fma}\left(x, 137.519416416, x \cdot \left(x \cdot \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right)\right)\right)\right)\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))))))
   (if (<=
        (/
         (*
          (- x 2.0)
          (+
           (*
            x
            (+
             (*
              x
              (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
             y))
           z))
         t_0)
        2e+208)
     (+
      t_1
      (/
       (*
        x
        (*
         (- x 2.0)
         (+
          y
          (fma
           x
           137.519416416
           (* x (* x (fma x 4.16438922228 78.6994924154)))))))
       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 tmp;
	if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0) <= 2e+208) {
		tmp = t_1 + ((x * ((x - 2.0) * (y + fma(x, 137.519416416, (x * (x * fma(x, 4.16438922228, 78.6994924154))))))) / 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))))
	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)) / t_0) <= 2e+208)
		tmp = Float64(t_1 + Float64(Float64(x * Float64(Float64(x - 2.0) * Float64(y + fma(x, 137.519416416, Float64(x * Float64(x * fma(x, 4.16438922228, 78.6994924154))))))) / t_0));
	else
		tmp = Float64(Float64(x * 4.16438922228) + t_1);
	end
	return tmp
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]}, Block[{t$95$1 = N[(z * N[(N[(x / t$95$0), $MachinePrecision] + N[(2.0 * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, 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] / t$95$0), $MachinePrecision], 2e+208], N[(t$95$1 + N[(N[(x * N[(N[(x - 2.0), $MachinePrecision] * N[(y + N[(x * 137.519416416 + N[(x * N[(x * N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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)\\
\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)}{t_0} \leq 2 \cdot 10^{+208}:\\
\;\;\;\;t_1 + \frac{x \cdot \left(\left(x - 2\right) \cdot \left(y + \mathsf{fma}\left(x, 137.519416416, x \cdot \left(x \cdot \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right)\right)\right)\right)\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)) < 2e208

    1. Initial program 96.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 z around 0 97.2%

      \[\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. Step-by-step derivation
      1. distribute-rgt-in97.2%

        \[\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) + \frac{x \cdot \left(\left(y + \color{blue}{\left(137.519416416 \cdot x + \left(x \cdot \left(78.6994924154 + 4.16438922228 \cdot x\right)\right) \cdot x\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)} \]
      2. *-commutative97.2%

        \[\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) + \frac{x \cdot \left(\left(y + \left(\color{blue}{x \cdot 137.519416416} + \left(x \cdot \left(78.6994924154 + 4.16438922228 \cdot x\right)\right) \cdot x\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. fma-def97.2%

        \[\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) + \frac{x \cdot \left(\left(y + \color{blue}{\mathsf{fma}\left(x, 137.519416416, \left(x \cdot \left(78.6994924154 + 4.16438922228 \cdot x\right)\right) \cdot x\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)} \]
      4. +-commutative97.2%

        \[\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) + \frac{x \cdot \left(\left(y + \mathsf{fma}\left(x, 137.519416416, \left(x \cdot \color{blue}{\left(4.16438922228 \cdot x + 78.6994924154\right)}\right) \cdot x\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)} \]
      5. *-commutative97.2%

        \[\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) + \frac{x \cdot \left(\left(y + \mathsf{fma}\left(x, 137.519416416, \left(x \cdot \left(\color{blue}{x \cdot 4.16438922228} + 78.6994924154\right)\right) \cdot x\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)} \]
      6. fma-def97.2%

        \[\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) + \frac{x \cdot \left(\left(y + \mathsf{fma}\left(x, 137.519416416, \left(x \cdot \color{blue}{\mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right)}\right) \cdot x\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)} \]
    4. Applied egg-rr97.2%

      \[\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) + \frac{x \cdot \left(\left(y + \color{blue}{\mathsf{fma}\left(x, 137.519416416, \left(x \cdot \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right)\right) \cdot x\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 2e208 < (/.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 14.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 z around 0 15.6%

      \[\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. Step-by-step derivation
      1. distribute-rgt-in15.6%

        \[\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) + \frac{x \cdot \left(\left(y + \color{blue}{\left(137.519416416 \cdot x + \left(x \cdot \left(78.6994924154 + 4.16438922228 \cdot x\right)\right) \cdot x\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)} \]
      2. *-commutative15.6%

        \[\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) + \frac{x \cdot \left(\left(y + \left(\color{blue}{x \cdot 137.519416416} + \left(x \cdot \left(78.6994924154 + 4.16438922228 \cdot x\right)\right) \cdot x\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. fma-def15.6%

        \[\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) + \frac{x \cdot \left(\left(y + \color{blue}{\mathsf{fma}\left(x, 137.519416416, \left(x \cdot \left(78.6994924154 + 4.16438922228 \cdot x\right)\right) \cdot x\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)} \]
      4. +-commutative15.6%

        \[\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) + \frac{x \cdot \left(\left(y + \mathsf{fma}\left(x, 137.519416416, \left(x \cdot \color{blue}{\left(4.16438922228 \cdot x + 78.6994924154\right)}\right) \cdot x\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)} \]
      5. *-commutative15.6%

        \[\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) + \frac{x \cdot \left(\left(y + \mathsf{fma}\left(x, 137.519416416, \left(x \cdot \left(\color{blue}{x \cdot 4.16438922228} + 78.6994924154\right)\right) \cdot x\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)} \]
      6. fma-def15.6%

        \[\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) + \frac{x \cdot \left(\left(y + \mathsf{fma}\left(x, 137.519416416, \left(x \cdot \color{blue}{\mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right)}\right) \cdot x\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)} \]
    4. Applied egg-rr15.6%

      \[\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) + \frac{x \cdot \left(\left(y + \color{blue}{\mathsf{fma}\left(x, 137.519416416, \left(x \cdot \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right)\right) \cdot x\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)} \]
    5. Taylor expanded in x around inf 98.5%

      \[\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} \]
    6. Step-by-step derivation
      1. *-commutative98.5%

        \[\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} \]
    7. Simplified98.5%

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

    \[\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^{+208}:\\ \;\;\;\;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(y + \mathsf{fma}\left(x, 137.519416416, x \cdot \left(x \cdot \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right)\right)\right)\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 4: 95.8% 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 2 \cdot 10^{+208}:\\ \;\;\;\;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) 2e+208)
     (+ 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) <= 2e+208) {
		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) <= 2d+208) 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) <= 2e+208) {
		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) <= 2e+208:
		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) <= 2e+208)
		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) <= 2e+208)
		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], 2e+208], 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 2 \cdot 10^{+208}:\\
\;\;\;\;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)) < 2e208

    1. Initial program 96.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 z around 0 97.2%

      \[\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 2e208 < (/.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 14.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 z around 0 15.6%

      \[\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. Step-by-step derivation
      1. distribute-rgt-in15.6%

        \[\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) + \frac{x \cdot \left(\left(y + \color{blue}{\left(137.519416416 \cdot x + \left(x \cdot \left(78.6994924154 + 4.16438922228 \cdot x\right)\right) \cdot x\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)} \]
      2. *-commutative15.6%

        \[\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) + \frac{x \cdot \left(\left(y + \left(\color{blue}{x \cdot 137.519416416} + \left(x \cdot \left(78.6994924154 + 4.16438922228 \cdot x\right)\right) \cdot x\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. fma-def15.6%

        \[\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) + \frac{x \cdot \left(\left(y + \color{blue}{\mathsf{fma}\left(x, 137.519416416, \left(x \cdot \left(78.6994924154 + 4.16438922228 \cdot x\right)\right) \cdot x\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)} \]
      4. +-commutative15.6%

        \[\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) + \frac{x \cdot \left(\left(y + \mathsf{fma}\left(x, 137.519416416, \left(x \cdot \color{blue}{\left(4.16438922228 \cdot x + 78.6994924154\right)}\right) \cdot x\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)} \]
      5. *-commutative15.6%

        \[\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) + \frac{x \cdot \left(\left(y + \mathsf{fma}\left(x, 137.519416416, \left(x \cdot \left(\color{blue}{x \cdot 4.16438922228} + 78.6994924154\right)\right) \cdot x\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)} \]
      6. fma-def15.6%

        \[\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) + \frac{x \cdot \left(\left(y + \mathsf{fma}\left(x, 137.519416416, \left(x \cdot \color{blue}{\mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right)}\right) \cdot x\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)} \]
    4. Applied egg-rr15.6%

      \[\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) + \frac{x \cdot \left(\left(y + \color{blue}{\mathsf{fma}\left(x, 137.519416416, \left(x \cdot \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right)\right) \cdot x\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)} \]
    5. Taylor expanded in x around inf 98.5%

      \[\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} \]
    6. Step-by-step derivation
      1. *-commutative98.5%

        \[\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} \]
    7. Simplified98.5%

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

    \[\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^{+208}:\\ \;\;\;\;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 5: 96.3% accurate, 0.5× 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 5 \cdot 10^{+251}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228 + z \cdot \left(\frac{x}{t_0} + 2 \cdot \frac{-1}{t_0}\right)\\ \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 (<= t_1 5e+251)
     t_1
     (+ (* x 4.16438922228) (* z (+ (/ x t_0) (* 2.0 (/ -1.0 t_0))))))))
double code(double x, double y, double z) {
	double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
	double t_1 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0;
	double tmp;
	if (t_1 <= 5e+251) {
		tmp = t_1;
	} else {
		tmp = (x * 4.16438922228) + (z * ((x / t_0) + (2.0 * (-1.0 / t_0))));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = (x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
    t_1 = ((x - 2.0d0) * ((x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)) + z)) / t_0
    if (t_1 <= 5d+251) then
        tmp = t_1
    else
        tmp = (x * 4.16438922228d0) + (z * ((x / t_0) + (2.0d0 * ((-1.0d0) / t_0))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
	double t_1 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0;
	double tmp;
	if (t_1 <= 5e+251) {
		tmp = t_1;
	} else {
		tmp = (x * 4.16438922228) + (z * ((x / t_0) + (2.0 * (-1.0 / t_0))));
	}
	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 <= 5e+251:
		tmp = t_1
	else:
		tmp = (x * 4.16438922228) + (z * ((x / t_0) + (2.0 * (-1.0 / t_0))))
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)
	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 <= 5e+251)
		tmp = t_1;
	else
		tmp = Float64(Float64(x * 4.16438922228) + Float64(z * Float64(Float64(x / t_0) + Float64(2.0 * Float64(-1.0 / t_0)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
	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 <= 5e+251)
		tmp = t_1;
	else
		tmp = (x * 4.16438922228) + (z * ((x / t_0) + (2.0 * (-1.0 / t_0))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]}, 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[LessEqual[t$95$1, 5e+251], t$95$1, 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]]]]
\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 5 \cdot 10^{+251}:\\
\;\;\;\;t_1\\

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


\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)) < 5.0000000000000005e251

    1. Initial program 96.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} \]

    if 5.0000000000000005e251 < (/.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 7.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 8.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)}} \]
    3. Step-by-step derivation
      1. distribute-rgt-in8.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) + \frac{x \cdot \left(\left(y + \color{blue}{\left(137.519416416 \cdot x + \left(x \cdot \left(78.6994924154 + 4.16438922228 \cdot x\right)\right) \cdot x\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)} \]
      2. *-commutative8.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) + \frac{x \cdot \left(\left(y + \left(\color{blue}{x \cdot 137.519416416} + \left(x \cdot \left(78.6994924154 + 4.16438922228 \cdot x\right)\right) \cdot x\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. fma-def8.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) + \frac{x \cdot \left(\left(y + \color{blue}{\mathsf{fma}\left(x, 137.519416416, \left(x \cdot \left(78.6994924154 + 4.16438922228 \cdot x\right)\right) \cdot x\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)} \]
      4. +-commutative8.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) + \frac{x \cdot \left(\left(y + \mathsf{fma}\left(x, 137.519416416, \left(x \cdot \color{blue}{\left(4.16438922228 \cdot x + 78.6994924154\right)}\right) \cdot x\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)} \]
      5. *-commutative8.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) + \frac{x \cdot \left(\left(y + \mathsf{fma}\left(x, 137.519416416, \left(x \cdot \left(\color{blue}{x \cdot 4.16438922228} + 78.6994924154\right)\right) \cdot x\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)} \]
      6. fma-def8.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) + \frac{x \cdot \left(\left(y + \mathsf{fma}\left(x, 137.519416416, \left(x \cdot \color{blue}{\mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right)}\right) \cdot x\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)} \]
    4. Applied egg-rr8.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) + \frac{x \cdot \left(\left(y + \color{blue}{\mathsf{fma}\left(x, 137.519416416, \left(x \cdot \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right)\right) \cdot x\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)} \]
    5. Taylor expanded in x around inf 98.4%

      \[\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} \]
    6. Step-by-step derivation
      1. *-commutative98.4%

        \[\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} \]
    7. Simplified98.4%

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

    \[\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 5 \cdot 10^{+251}:\\ \;\;\;\;\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 + 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: 97.0% 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 10^{+301}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\left(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - \frac{-1}{x} \cdot \frac{y + 130977.50649958357}{x}\right) - 110.1139242984811\\ \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 1e+301)
     t_0
     (-
      (-
       (+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
       (* (/ -1.0 x) (/ (+ y 130977.50649958357) x)))
      110.1139242984811))))
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 <= 1e+301) {
		tmp = t_0;
	} else {
		tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - ((-1.0 / x) * ((y + 130977.50649958357) / 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) :: 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 <= 1d+301) then
        tmp = t_0
    else
        tmp = (((x * 4.16438922228d0) + (3655.1204654076414d0 * (1.0d0 / x))) - (((-1.0d0) / x) * ((y + 130977.50649958357d0) / x))) - 110.1139242984811d0
    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 <= 1e+301) {
		tmp = t_0;
	} else {
		tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - ((-1.0 / x) * ((y + 130977.50649958357) / x))) - 110.1139242984811;
	}
	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 <= 1e+301:
		tmp = t_0
	else:
		tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - ((-1.0 / x) * ((y + 130977.50649958357) / x))) - 110.1139242984811
	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 <= 1e+301)
		tmp = t_0;
	else
		tmp = Float64(Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) - Float64(Float64(-1.0 / x) * Float64(Float64(y + 130977.50649958357) / x))) - 110.1139242984811);
	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 <= 1e+301)
		tmp = t_0;
	else
		tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - ((-1.0 / x) * ((y + 130977.50649958357) / x))) - 110.1139242984811;
	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, 1e+301], t$95$0, N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(-1.0 / x), $MachinePrecision] * N[(N[(y + 130977.50649958357), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $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 10^{+301}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;\left(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - \frac{-1}{x} \cdot \frac{y + 130977.50649958357}{x}\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)) < 1.00000000000000005e301

    1. Initial program 97.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 1.00000000000000005e301 < (/.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 98.3%

      \[\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. Step-by-step derivation
      1. add-sqr-sqrt92.6%

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

        \[\leadsto \left(-1 \cdot \color{blue}{\sqrt{\frac{130977.50649958357 + -1 \cdot y}{{x}^{2}} \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. sqr-neg97.4%

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

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

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

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

        \[\leadsto \left(-1 \cdot \color{blue}{\left(-1 \cdot \frac{130977.50649958357 + -1 \cdot y}{{x}^{2}}\right)} + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      8. associate-*r/97.4%

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

        \[\leadsto \left(-1 \cdot \frac{-1 \cdot \left(130977.50649958357 + -1 \cdot y\right)}{\color{blue}{x \cdot x}} + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      10. times-frac97.4%

        \[\leadsto \left(-1 \cdot \color{blue}{\left(\frac{-1}{x} \cdot \frac{130977.50649958357 + -1 \cdot y}{x}\right)} + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      11. add-sqr-sqrt53.9%

        \[\leadsto \left(-1 \cdot \left(\frac{-1}{x} \cdot \frac{130977.50649958357 + \color{blue}{\sqrt{-1 \cdot y} \cdot \sqrt{-1 \cdot y}}}{x}\right) + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      12. sqrt-unprod71.0%

        \[\leadsto \left(-1 \cdot \left(\frac{-1}{x} \cdot \frac{130977.50649958357 + \color{blue}{\sqrt{\left(-1 \cdot y\right) \cdot \left(-1 \cdot y\right)}}}{x}\right) + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      13. mul-1-neg71.0%

        \[\leadsto \left(-1 \cdot \left(\frac{-1}{x} \cdot \frac{130977.50649958357 + \sqrt{\color{blue}{\left(-y\right)} \cdot \left(-1 \cdot y\right)}}{x}\right) + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      14. mul-1-neg71.0%

        \[\leadsto \left(-1 \cdot \left(\frac{-1}{x} \cdot \frac{130977.50649958357 + \sqrt{\left(-y\right) \cdot \color{blue}{\left(-y\right)}}}{x}\right) + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      15. sqr-neg71.0%

        \[\leadsto \left(-1 \cdot \left(\frac{-1}{x} \cdot \frac{130977.50649958357 + \sqrt{\color{blue}{y \cdot y}}}{x}\right) + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      16. sqrt-unprod44.4%

        \[\leadsto \left(-1 \cdot \left(\frac{-1}{x} \cdot \frac{130977.50649958357 + \color{blue}{\sqrt{y} \cdot \sqrt{y}}}{x}\right) + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      17. add-sqr-sqrt98.3%

        \[\leadsto \left(-1 \cdot \left(\frac{-1}{x} \cdot \frac{130977.50649958357 + \color{blue}{y}}{x}\right) + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
    4. Applied egg-rr98.3%

      \[\leadsto \left(-1 \cdot \color{blue}{\left(\frac{-1}{x} \cdot \frac{130977.50649958357 + y}{x}\right)} + \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.6%

    \[\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^{+301}:\\ \;\;\;\;\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}:\\ \;\;\;\;\left(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - \frac{-1}{x} \cdot \frac{y + 130977.50649958357}{x}\right) - 110.1139242984811\\ \end{array} \]

Alternative 7: 95.5% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.05 \cdot 10^{+31}:\\ \;\;\;\;\left(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - \frac{-1}{x} \cdot \frac{y + 130977.50649958357}{x}\right) - 110.1139242984811\\ \mathbf{elif}\;x \leq 1.26 \cdot 10^{+31}:\\ \;\;\;\;\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 -1.05e+31)
   (-
    (-
     (+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
     (* (/ -1.0 x) (/ (+ y 130977.50649958357) x)))
    110.1139242984811)
   (if (<= x 1.26e+31)
     (/
      (* (- 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 <= -1.05e+31) {
		tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - ((-1.0 / x) * ((y + 130977.50649958357) / x))) - 110.1139242984811;
	} else if (x <= 1.26e+31) {
		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 <= (-1.05d+31)) then
        tmp = (((x * 4.16438922228d0) + (3655.1204654076414d0 * (1.0d0 / x))) - (((-1.0d0) / x) * ((y + 130977.50649958357d0) / x))) - 110.1139242984811d0
    else if (x <= 1.26d+31) 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 <= -1.05e+31) {
		tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - ((-1.0 / x) * ((y + 130977.50649958357) / x))) - 110.1139242984811;
	} else if (x <= 1.26e+31) {
		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 <= -1.05e+31:
		tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - ((-1.0 / x) * ((y + 130977.50649958357) / x))) - 110.1139242984811
	elif x <= 1.26e+31:
		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 <= -1.05e+31)
		tmp = Float64(Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) - Float64(Float64(-1.0 / x) * Float64(Float64(y + 130977.50649958357) / x))) - 110.1139242984811);
	elseif (x <= 1.26e+31)
		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 <= -1.05e+31)
		tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - ((-1.0 / x) * ((y + 130977.50649958357) / x))) - 110.1139242984811;
	elseif (x <= 1.26e+31)
		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, -1.05e+31], N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(-1.0 / x), $MachinePrecision] * N[(N[(y + 130977.50649958357), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision], If[LessEqual[x, 1.26e+31], 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 -1.05 \cdot 10^{+31}:\\
\;\;\;\;\left(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - \frac{-1}{x} \cdot \frac{y + 130977.50649958357}{x}\right) - 110.1139242984811\\

\mathbf{elif}\;x \leq 1.26 \cdot 10^{+31}:\\
\;\;\;\;\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 < -1.04999999999999989e31

    1. Initial program 5.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.6%

      \[\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. Step-by-step derivation
      1. add-sqr-sqrt88.0%

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

        \[\leadsto \left(-1 \cdot \color{blue}{\sqrt{\frac{130977.50649958357 + -1 \cdot y}{{x}^{2}} \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. sqr-neg93.7%

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

        \[\leadsto \left(-1 \cdot \sqrt{\color{blue}{\left(-1 \cdot \frac{130977.50649958357 + -1 \cdot y}{{x}^{2}}\right)} \cdot \left(-\frac{130977.50649958357 + -1 \cdot y}{{x}^{2}}\right)} + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      5. mul-1-neg93.7%

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

        \[\leadsto \left(-1 \cdot \color{blue}{\left(\sqrt{-1 \cdot \frac{130977.50649958357 + -1 \cdot y}{{x}^{2}}} \cdot \sqrt{-1 \cdot \frac{130977.50649958357 + -1 \cdot y}{{x}^{2}}}\right)} + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      7. add-sqr-sqrt91.8%

        \[\leadsto \left(-1 \cdot \color{blue}{\left(-1 \cdot \frac{130977.50649958357 + -1 \cdot y}{{x}^{2}}\right)} + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      8. associate-*r/91.8%

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

        \[\leadsto \left(-1 \cdot \frac{-1 \cdot \left(130977.50649958357 + -1 \cdot y\right)}{\color{blue}{x \cdot x}} + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      10. times-frac91.8%

        \[\leadsto \left(-1 \cdot \color{blue}{\left(\frac{-1}{x} \cdot \frac{130977.50649958357 + -1 \cdot y}{x}\right)} + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      11. add-sqr-sqrt50.5%

        \[\leadsto \left(-1 \cdot \left(\frac{-1}{x} \cdot \frac{130977.50649958357 + \color{blue}{\sqrt{-1 \cdot y} \cdot \sqrt{-1 \cdot y}}}{x}\right) + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      12. sqrt-unprod65.8%

        \[\leadsto \left(-1 \cdot \left(\frac{-1}{x} \cdot \frac{130977.50649958357 + \color{blue}{\sqrt{\left(-1 \cdot y\right) \cdot \left(-1 \cdot y\right)}}}{x}\right) + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      13. mul-1-neg65.8%

        \[\leadsto \left(-1 \cdot \left(\frac{-1}{x} \cdot \frac{130977.50649958357 + \sqrt{\color{blue}{\left(-y\right)} \cdot \left(-1 \cdot y\right)}}{x}\right) + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      14. mul-1-neg65.8%

        \[\leadsto \left(-1 \cdot \left(\frac{-1}{x} \cdot \frac{130977.50649958357 + \sqrt{\left(-y\right) \cdot \color{blue}{\left(-y\right)}}}{x}\right) + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      15. sqr-neg65.8%

        \[\leadsto \left(-1 \cdot \left(\frac{-1}{x} \cdot \frac{130977.50649958357 + \sqrt{\color{blue}{y \cdot y}}}{x}\right) + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      16. sqrt-unprod43.1%

        \[\leadsto \left(-1 \cdot \left(\frac{-1}{x} \cdot \frac{130977.50649958357 + \color{blue}{\sqrt{y} \cdot \sqrt{y}}}{x}\right) + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      17. add-sqr-sqrt95.5%

        \[\leadsto \left(-1 \cdot \left(\frac{-1}{x} \cdot \frac{130977.50649958357 + \color{blue}{y}}{x}\right) + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
    4. Applied egg-rr95.5%

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

    if -1.04999999999999989e31 < x < 1.26000000000000001e31

    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 98.3%

      \[\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. *-commutative98.3%

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

      \[\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 1.26000000000000001e31 < x

    1. Initial program 8.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 96.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.05 \cdot 10^{+31}:\\ \;\;\;\;\left(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - \frac{-1}{x} \cdot \frac{y + 130977.50649958357}{x}\right) - 110.1139242984811\\ \mathbf{elif}\;x \leq 1.26 \cdot 10^{+31}:\\ \;\;\;\;\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: 92.3% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -54 \lor \neg \left(x \leq 4.4 \cdot 10^{+14}\right):\\ \;\;\;\;\left(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - \frac{-1}{x} \cdot \frac{y + 130977.50649958357}{x}\right) - 110.1139242984811\\ \mathbf{else}:\\ \;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(0.0212463641547976 \cdot \left(z + y \cdot -2\right) - z \cdot -0.28294182010212804\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= x -54.0) (not (<= x 4.4e+14)))
   (-
    (-
     (+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
     (* (/ -1.0 x) (/ (+ y 130977.50649958357) x)))
    110.1139242984811)
   (+
    (* z -0.0424927283095952)
    (*
     x
     (- (* 0.0212463641547976 (+ z (* y -2.0))) (* z -0.28294182010212804))))))
double code(double x, double y, double z) {
	double tmp;
	if ((x <= -54.0) || !(x <= 4.4e+14)) {
		tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - ((-1.0 / x) * ((y + 130977.50649958357) / x))) - 110.1139242984811;
	} else {
		tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
	}
	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 <= (-54.0d0)) .or. (.not. (x <= 4.4d+14))) then
        tmp = (((x * 4.16438922228d0) + (3655.1204654076414d0 * (1.0d0 / x))) - (((-1.0d0) / x) * ((y + 130977.50649958357d0) / x))) - 110.1139242984811d0
    else
        tmp = (z * (-0.0424927283095952d0)) + (x * ((0.0212463641547976d0 * (z + (y * (-2.0d0)))) - (z * (-0.28294182010212804d0))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((x <= -54.0) || !(x <= 4.4e+14)) {
		tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - ((-1.0 / x) * ((y + 130977.50649958357) / x))) - 110.1139242984811;
	} else {
		tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (x <= -54.0) or not (x <= 4.4e+14):
		tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - ((-1.0 / x) * ((y + 130977.50649958357) / x))) - 110.1139242984811
	else:
		tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((x <= -54.0) || !(x <= 4.4e+14))
		tmp = Float64(Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) - Float64(Float64(-1.0 / x) * Float64(Float64(y + 130977.50649958357) / x))) - 110.1139242984811);
	else
		tmp = Float64(Float64(z * -0.0424927283095952) + Float64(x * Float64(Float64(0.0212463641547976 * Float64(z + Float64(y * -2.0))) - Float64(z * -0.28294182010212804))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((x <= -54.0) || ~((x <= 4.4e+14)))
		tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - ((-1.0 / x) * ((y + 130977.50649958357) / x))) - 110.1139242984811;
	else
		tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[x, -54.0], N[Not[LessEqual[x, 4.4e+14]], $MachinePrecision]], N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(-1.0 / x), $MachinePrecision] * N[(N[(y + 130977.50649958357), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(x * N[(N[(0.0212463641547976 * N[(z + N[(y * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * -0.28294182010212804), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -54 \lor \neg \left(x \leq 4.4 \cdot 10^{+14}\right):\\
\;\;\;\;\left(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - \frac{-1}{x} \cdot \frac{y + 130977.50649958357}{x}\right) - 110.1139242984811\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -54 or 4.4e14 < x

    1. Initial program 12.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 94.4%

      \[\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. Step-by-step derivation
      1. add-sqr-sqrt87.2%

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

        \[\leadsto \left(-1 \cdot \color{blue}{\sqrt{\frac{130977.50649958357 + -1 \cdot y}{{x}^{2}} \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. sqr-neg92.5%

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

        \[\leadsto \left(-1 \cdot \sqrt{\color{blue}{\left(-1 \cdot \frac{130977.50649958357 + -1 \cdot y}{{x}^{2}}\right)} \cdot \left(-\frac{130977.50649958357 + -1 \cdot y}{{x}^{2}}\right)} + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      5. mul-1-neg92.5%

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

        \[\leadsto \left(-1 \cdot \color{blue}{\left(\sqrt{-1 \cdot \frac{130977.50649958357 + -1 \cdot y}{{x}^{2}}} \cdot \sqrt{-1 \cdot \frac{130977.50649958357 + -1 \cdot y}{{x}^{2}}}\right)} + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      7. add-sqr-sqrt89.6%

        \[\leadsto \left(-1 \cdot \color{blue}{\left(-1 \cdot \frac{130977.50649958357 + -1 \cdot y}{{x}^{2}}\right)} + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      8. associate-*r/89.6%

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

        \[\leadsto \left(-1 \cdot \frac{-1 \cdot \left(130977.50649958357 + -1 \cdot y\right)}{\color{blue}{x \cdot x}} + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      10. times-frac89.6%

        \[\leadsto \left(-1 \cdot \color{blue}{\left(\frac{-1}{x} \cdot \frac{130977.50649958357 + -1 \cdot y}{x}\right)} + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      11. add-sqr-sqrt48.7%

        \[\leadsto \left(-1 \cdot \left(\frac{-1}{x} \cdot \frac{130977.50649958357 + \color{blue}{\sqrt{-1 \cdot y} \cdot \sqrt{-1 \cdot y}}}{x}\right) + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      12. sqrt-unprod67.3%

        \[\leadsto \left(-1 \cdot \left(\frac{-1}{x} \cdot \frac{130977.50649958357 + \color{blue}{\sqrt{\left(-1 \cdot y\right) \cdot \left(-1 \cdot y\right)}}}{x}\right) + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      13. mul-1-neg67.3%

        \[\leadsto \left(-1 \cdot \left(\frac{-1}{x} \cdot \frac{130977.50649958357 + \sqrt{\color{blue}{\left(-y\right)} \cdot \left(-1 \cdot y\right)}}{x}\right) + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      14. mul-1-neg67.3%

        \[\leadsto \left(-1 \cdot \left(\frac{-1}{x} \cdot \frac{130977.50649958357 + \sqrt{\left(-y\right) \cdot \color{blue}{\left(-y\right)}}}{x}\right) + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      15. sqr-neg67.3%

        \[\leadsto \left(-1 \cdot \left(\frac{-1}{x} \cdot \frac{130977.50649958357 + \sqrt{\color{blue}{y \cdot y}}}{x}\right) + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      16. sqrt-unprod42.5%

        \[\leadsto \left(-1 \cdot \left(\frac{-1}{x} \cdot \frac{130977.50649958357 + \color{blue}{\sqrt{y} \cdot \sqrt{y}}}{x}\right) + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811 \]
      17. add-sqr-sqrt94.2%

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

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

    if -54 < x < 4.4e14

    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 90.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -54 \lor \neg \left(x \leq 4.4 \cdot 10^{+14}\right):\\ \;\;\;\;\left(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - \frac{-1}{x} \cdot \frac{y + 130977.50649958357}{x}\right) - 110.1139242984811\\ \mathbf{else}:\\ \;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(0.0212463641547976 \cdot \left(z + y \cdot -2\right) - z \cdot -0.28294182010212804\right)\\ \end{array} \]

Alternative 9: 89.2% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{-5}:\\
\;\;\;\;\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\\

\mathbf{elif}\;x \leq 4.4 \cdot 10^{+14}:\\
\;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(0.0212463641547976 \cdot \left(z + y \cdot -2\right) - z \cdot -0.28294182010212804\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.84999999999999991e-5

    1. Initial program 15.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.6%

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

    if -1.84999999999999991e-5 < x < 4.4e14

    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 91.3%

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

    if 4.4e14 < 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 93.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.85 \cdot 10^{-5}:\\ \;\;\;\;\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\\ \mathbf{elif}\;x \leq 4.4 \cdot 10^{+14}:\\ \;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(0.0212463641547976 \cdot \left(z + y \cdot -2\right) - z \cdot -0.28294182010212804\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \]

Alternative 10: 89.2% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{-5}:\\
\;\;\;\;\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.84999999999999991e-5

    1. Initial program 15.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.6%

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

    if -1.84999999999999991e-5 < x < 4.4e14

    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 91.3%

      \[\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 91.2%

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

    if 4.4e14 < 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 93.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.85 \cdot 10^{-5}:\\ \;\;\;\;\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\\ \mathbf{elif}\;x \leq 4.4 \cdot 10^{+14}:\\ \;\;\;\;z \cdot -0.0424927283095952 + \left(-0.0424927283095952 \cdot \left(x \cdot y\right) + 0.3041881842569256 \cdot \left(x \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \]

Alternative 11: 89.0% accurate, 2.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{-5}:\\
\;\;\;\;\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\\

\mathbf{elif}\;x \leq 4.4 \cdot 10^{+14}:\\
\;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(y \cdot -0.0424927283095952 - z \cdot -0.28294182010212804\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.84999999999999991e-5

    1. Initial program 15.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.6%

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

    if -1.84999999999999991e-5 < x < 4.4e14

    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 91.3%

      \[\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 90.9%

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

    if 4.4e14 < 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 93.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.85 \cdot 10^{-5}:\\ \;\;\;\;\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\\ \mathbf{elif}\;x \leq 4.4 \cdot 10^{+14}:\\ \;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(y \cdot -0.0424927283095952 - z \cdot -0.28294182010212804\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \]

Alternative 12: 76.7% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{-5}:\\
\;\;\;\;\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\\

\mathbf{elif}\;x \leq 4.4 \cdot 10^{+14}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot z}{47.066876606 + x \cdot 313.399215894}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.84999999999999991e-5

    1. Initial program 15.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.6%

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

    if -1.84999999999999991e-5 < x < 4.4e14

    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 z around inf 72.6%

      \[\leadsto \color{blue}{\frac{z \cdot \left(x - 2\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 71.6%

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

        \[\leadsto \frac{z \cdot \left(x - 2\right)}{47.066876606 + \color{blue}{x \cdot 313.399215894}} \]
    5. Simplified71.6%

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

    if 4.4e14 < 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 93.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.85 \cdot 10^{-5}:\\ \;\;\;\;\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\\ \mathbf{elif}\;x \leq 4.4 \cdot 10^{+14}:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot z}{47.066876606 + x \cdot 313.399215894}\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \]

Alternative 13: 76.5% accurate, 2.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{-5}:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.84999999999999991e-5

    1. Initial program 15.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.3%

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

    if -1.84999999999999991e-5 < x < 4.4e14

    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 91.3%

      \[\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 inf 71.3%

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

    if 4.4e14 < 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 93.4%

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

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

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

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

Alternative 14: 76.6% accurate, 2.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{-5}:\\
\;\;\;\;\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.84999999999999991e-5

    1. Initial program 15.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.6%

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

    if -1.84999999999999991e-5 < x < 4.4e14

    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 91.3%

      \[\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 inf 71.3%

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

    if 4.4e14 < 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 93.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.85 \cdot 10^{-5}:\\ \;\;\;\;\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\\ \mathbf{elif}\;x \leq 4.4 \cdot 10^{+14}:\\ \;\;\;\;z \cdot -0.0424927283095952 + 0.3041881842569256 \cdot \left(x \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \]

Alternative 15: 76.5% accurate, 3.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{-5}:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.84999999999999991e-5

    1. Initial program 15.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.3%

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

    if -1.84999999999999991e-5 < x < 4.4e14

    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 z around inf 72.6%

      \[\leadsto \color{blue}{\frac{z \cdot \left(x - 2\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 71.3%

      \[\leadsto \color{blue}{-0.0424927283095952 \cdot z + x \cdot \left(0.0212463641547976 \cdot z - -0.28294182010212804 \cdot z\right)} \]
    4. Step-by-step derivation
      1. +-commutative71.3%

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

        \[\leadsto x \cdot \color{blue}{\left(z \cdot \left(0.0212463641547976 - -0.28294182010212804\right)\right)} + -0.0424927283095952 \cdot z \]
      3. metadata-eval71.3%

        \[\leadsto x \cdot \left(z \cdot \color{blue}{0.3041881842569256}\right) + -0.0424927283095952 \cdot z \]
      4. associate-*r*71.3%

        \[\leadsto \color{blue}{\left(x \cdot z\right) \cdot 0.3041881842569256} + -0.0424927283095952 \cdot z \]
      5. *-commutative71.3%

        \[\leadsto \color{blue}{0.3041881842569256 \cdot \left(x \cdot z\right)} + -0.0424927283095952 \cdot z \]
      6. associate-*r*71.3%

        \[\leadsto \color{blue}{\left(0.3041881842569256 \cdot x\right) \cdot z} + -0.0424927283095952 \cdot z \]
      7. distribute-rgt-out71.3%

        \[\leadsto \color{blue}{z \cdot \left(0.3041881842569256 \cdot x + -0.0424927283095952\right)} \]
      8. *-commutative71.3%

        \[\leadsto z \cdot \left(\color{blue}{x \cdot 0.3041881842569256} + -0.0424927283095952\right) \]
    5. Simplified71.3%

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

    if 4.4e14 < 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 93.4%

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

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

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

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

Alternative 16: 76.5% accurate, 4.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.85 \cdot 10^{-5} \lor \neg \left(x \leq 0.0031\right):\\ \;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\ \mathbf{else}:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= x -1.85e-5) (not (<= x 0.0031)))
   (- (* x 4.16438922228) 110.1139242984811)
   (* z -0.0424927283095952)))
double code(double x, double y, double z) {
	double tmp;
	if ((x <= -1.85e-5) || !(x <= 0.0031)) {
		tmp = (x * 4.16438922228) - 110.1139242984811;
	} 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 <= (-1.85d-5)) .or. (.not. (x <= 0.0031d0))) then
        tmp = (x * 4.16438922228d0) - 110.1139242984811d0
    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 <= -1.85e-5) || !(x <= 0.0031)) {
		tmp = (x * 4.16438922228) - 110.1139242984811;
	} else {
		tmp = z * -0.0424927283095952;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (x <= -1.85e-5) or not (x <= 0.0031):
		tmp = (x * 4.16438922228) - 110.1139242984811
	else:
		tmp = z * -0.0424927283095952
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((x <= -1.85e-5) || !(x <= 0.0031))
		tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811);
	else
		tmp = Float64(z * -0.0424927283095952);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((x <= -1.85e-5) || ~((x <= 0.0031)))
		tmp = (x * 4.16438922228) - 110.1139242984811;
	else
		tmp = z * -0.0424927283095952;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.85e-5], N[Not[LessEqual[x, 0.0031]], $MachinePrecision]], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{-5} \lor \neg \left(x \leq 0.0031\right):\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.84999999999999991e-5 or 0.00309999999999999989 < x

    1. Initial program 14.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 87.7%

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

    if -1.84999999999999991e-5 < x < 0.00309999999999999989

    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.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.85 \cdot 10^{-5} \lor \neg \left(x \leq 0.0031\right):\\ \;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\ \mathbf{else}:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \end{array} \]

Alternative 17: 75.7% accurate, 5.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2 \cdot 10^{-8} \lor \neg \left(x \leq 9.6 \cdot 10^{+30}\right):\\ \;\;\;\;x \cdot 4.16438922228\\ \mathbf{else}:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= x -2e-8) (not (<= x 9.6e+30)))
   (* x 4.16438922228)
   (* z -0.0424927283095952)))
double code(double x, double y, double z) {
	double tmp;
	if ((x <= -2e-8) || !(x <= 9.6e+30)) {
		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 <= (-2d-8)) .or. (.not. (x <= 9.6d+30))) 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 <= -2e-8) || !(x <= 9.6e+30)) {
		tmp = x * 4.16438922228;
	} else {
		tmp = z * -0.0424927283095952;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (x <= -2e-8) or not (x <= 9.6e+30):
		tmp = x * 4.16438922228
	else:
		tmp = z * -0.0424927283095952
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((x <= -2e-8) || !(x <= 9.6e+30))
		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 <= -2e-8) || ~((x <= 9.6e+30)))
		tmp = x * 4.16438922228;
	else
		tmp = z * -0.0424927283095952;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[x, -2e-8], N[Not[LessEqual[x, 9.6e+30]], $MachinePrecision]], N[(x * 4.16438922228), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{-8} \lor \neg \left(x \leq 9.6 \cdot 10^{+30}\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 < -2e-8 or 9.5999999999999997e30 < x

    1. Initial program 12.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 89.7%

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

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

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

    if -2e-8 < x < 9.5999999999999997e30

    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 70.3%

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

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

Alternative 18: 34.7% 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 57.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 0 37.8%

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

    \[\leadsto z \cdot -0.0424927283095952 \]

Alternative 19: 3.4% accurate, 37.0× speedup?

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

\\
-110.1139242984811
\end{array}
Derivation
  1. Initial program 57.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 45.2%

    \[\leadsto \color{blue}{4.16438922228 \cdot x - 110.1139242984811} \]
  3. Taylor expanded in x around 0 3.1%

    \[\leadsto \color{blue}{-110.1139242984811} \]
  4. Final simplification3.1%

    \[\leadsto -110.1139242984811 \]

Developer target: 98.7% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;x < 9.429991714554673 \cdot 10^{+55}:\\
\;\;\;\;\frac{x - 2}{1} \cdot \frac{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}{\left(\left(263.505074721 \cdot x + \left(43.3400022514 \cdot \left(x \cdot x\right) + x \cdot \left(x \cdot x\right)\right)\right) + 313.399215894\right) \cdot x + 47.066876606}\\

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


\end{array}
\end{array}

Reproduce

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