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

Percentage Accurate: 57.7% → 98.4%
Time: 14.5s
Alternatives: 19
Speedup: 2.8×

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: 57.7% accurate, 1.0× speedup?

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

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

Alternative 1: 98.4% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
t_0 := 47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)\\
t_1 := x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right)\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(t\_1 + z\right)}{t\_0} \leq \infty:\\
\;\;\;\;\sqrt[3]{{\left(x + -2\right)}^{3}} \cdot \left(\frac{z}{t\_0} + \frac{t\_1}{t\_0}\right)\\

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


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

    1. Initial program 91.6%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Step-by-step derivation
      1. associate-/l*98.9%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(\frac{z}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)} + \frac{x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + 4.16438922228 \cdot x\right)\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)}\right)} \]
    6. Step-by-step derivation
      1. add-cbrt-cube98.9%

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

        \[\leadsto \sqrt[3]{\color{blue}{{\left(x + -2\right)}^{3}}} \cdot \left(\frac{z}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)} + \frac{x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + 4.16438922228 \cdot x\right)\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)}\right) \]
    7. Applied egg-rr98.9%

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

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

    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. Step-by-step derivation
      1. associate-/l*0.0%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)}} \]
    6. Taylor expanded in x around inf 99.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)} \leq \infty:\\ \;\;\;\;\sqrt[3]{{\left(x + -2\right)}^{3}} \cdot \left(\frac{z}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)} + \frac{x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 98.4% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_0 := 47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)\\
t_1 := x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right)\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(t\_1 + z\right)}{t\_0} \leq \infty:\\
\;\;\;\;\left(\frac{z}{t\_0} + \frac{t\_1}{t\_0}\right) \cdot \sqrt[3]{x \cdot \left(12 - x \cdot \left(6 - x\right)\right) - 8}\\

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


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

    1. Initial program 91.6%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Step-by-step derivation
      1. associate-/l*98.9%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(\frac{z}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)} + \frac{x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + 4.16438922228 \cdot x\right)\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)}\right)} \]
    6. Step-by-step derivation
      1. add-cbrt-cube98.9%

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

        \[\leadsto \sqrt[3]{\color{blue}{{\left(x + -2\right)}^{3}}} \cdot \left(\frac{z}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)} + \frac{x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + 4.16438922228 \cdot x\right)\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)}\right) \]
    7. Applied egg-rr98.9%

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

      \[\leadsto \sqrt[3]{\color{blue}{x \cdot \left(12 + x \cdot \left(x - 6\right)\right) - 8}} \cdot \left(\frac{z}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)} + \frac{x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + 4.16438922228 \cdot x\right)\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(43.3400022514 + x\right)\right)\right)}\right) \]

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

    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. Step-by-step derivation
      1. associate-/l*0.0%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)}} \]
    6. Taylor expanded in x around inf 99.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)} \leq \infty:\\ \;\;\;\;\left(\frac{z}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)} + \frac{x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\right) \cdot \sqrt[3]{x \cdot \left(12 - x \cdot \left(6 - x\right)\right) - 8}\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 98.5% accurate, 0.3× 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)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\\ \mathbf{if}\;t\_0 \leq -\infty \lor \neg \left(t\_0 \leq 5 \cdot 10^{+298}\right):\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{\frac{124074.40615218398 - y}{x} - 3451.550173699799}{x}}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \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))
          (+
           47.066876606
           (*
            x
            (+
             313.399215894
             (* x (+ 263.505074721 (* x (+ x 43.3400022514))))))))))
   (if (or (<= t_0 (- INFINITY)) (not (<= t_0 5e+298)))
     (*
      (+ x -2.0)
      (-
       4.16438922228
       (/
        (+
         101.7851458539211
         (/ (- (/ (- 124074.40615218398 y) x) 3451.550173699799) x))
        x)))
     t_0)))
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)) / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))));
	double tmp;
	if ((t_0 <= -((double) INFINITY)) || !(t_0 <= 5e+298)) {
		tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x));
	} else {
		tmp = t_0;
	}
	return tmp;
}
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)) / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))));
	double tmp;
	if ((t_0 <= -Double.POSITIVE_INFINITY) || !(t_0 <= 5e+298)) {
		tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))))
	tmp = 0
	if (t_0 <= -math.inf) or not (t_0 <= 5e+298):
		tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x))
	else:
		tmp = t_0
	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(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * Float64(x + 43.3400022514))))))))
	tmp = 0.0
	if ((t_0 <= Float64(-Inf)) || !(t_0 <= 5e+298))
		tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 - Float64(Float64(101.7851458539211 + Float64(Float64(Float64(Float64(124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x)));
	else
		tmp = t_0;
	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)) / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))));
	tmp = 0.0;
	if ((t_0 <= -Inf) || ~((t_0 <= 5e+298)))
		tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x));
	else
		tmp = t_0;
	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[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, (-Infinity)], N[Not[LessEqual[t$95$0, 5e+298]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 - N[(N[(101.7851458539211 + N[(N[(N[(N[(124074.40615218398 - y), $MachinePrecision] / x), $MachinePrecision] - 3451.550173699799), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]
\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)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\\
\mathbf{if}\;t\_0 \leq -\infty \lor \neg \left(t\_0 \leq 5 \cdot 10^{+298}\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{\frac{124074.40615218398 - y}{x} - 3451.550173699799}{x}}{x}\right)\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


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

    1. Initial program 0.5%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Step-by-step derivation
      1. associate-/l*10.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 + -1 \cdot \frac{101.7851458539211 + -1 \cdot \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}{x}\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg96.6%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 + \color{blue}{\left(-\frac{101.7851458539211 + -1 \cdot \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}{x}\right)}\right) \]
      2. unsub-neg96.6%

        \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 - \frac{101.7851458539211 + -1 \cdot \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}{x}\right)} \]
      3. mul-1-neg96.6%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \color{blue}{\left(-\frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}\right)}}{x}\right) \]
      4. unsub-neg96.6%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{\color{blue}{101.7851458539211 - \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}}{x}\right) \]
      5. mul-1-neg96.6%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 + \color{blue}{\left(-\frac{124074.40615218398 + -1 \cdot y}{x}\right)}}{x}}{x}\right) \]
      6. unsub-neg96.6%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{\color{blue}{3451.550173699799 - \frac{124074.40615218398 + -1 \cdot y}{x}}}{x}}{x}\right) \]
      7. mul-1-neg96.6%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 - \frac{124074.40615218398 + \color{blue}{\left(-y\right)}}{x}}{x}}{x}\right) \]
      8. unsub-neg96.6%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 - \frac{\color{blue}{124074.40615218398 - y}}{x}}{x}}{x}\right) \]
    7. Simplified96.6%

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 - \frac{124074.40615218398 - y}{x}}{x}}{x}\right)} \]

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

    1. Initial program 99.5%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification98.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)} \leq -\infty \lor \neg \left(\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)} \leq 5 \cdot 10^{+298}\right):\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{\frac{124074.40615218398 - y}{x} - 3451.550173699799}{x}}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 98.4% accurate, 0.4× speedup?

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

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

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


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

    1. Initial program 91.6%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Step-by-step derivation
      1. associate-/l*98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    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. Step-by-step derivation
      1. associate-/l*0.0%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)}} \]
    6. Taylor expanded in x around inf 99.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)} \leq \infty:\\ \;\;\;\;\left(x + -2\right) \cdot \left(\frac{z}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)} + \frac{x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 96.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.8 \cdot 10^{+28} \lor \neg \left(x \leq 1.15 \cdot 10^{+21}\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{\frac{124074.40615218398 - y}{x} - 3451.550173699799}{x}}{x}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.8000000000000001e28 or 1.15e21 < 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. Step-by-step derivation
      1. associate-/l*21.4%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 + -1 \cdot \frac{101.7851458539211 + -1 \cdot \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}{x}\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg96.8%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 + \color{blue}{\left(-\frac{101.7851458539211 + -1 \cdot \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}{x}\right)}\right) \]
      2. unsub-neg96.8%

        \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 - \frac{101.7851458539211 + -1 \cdot \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}{x}\right)} \]
      3. mul-1-neg96.8%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \color{blue}{\left(-\frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}\right)}}{x}\right) \]
      4. unsub-neg96.8%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{\color{blue}{101.7851458539211 - \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}}{x}\right) \]
      5. mul-1-neg96.8%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 + \color{blue}{\left(-\frac{124074.40615218398 + -1 \cdot y}{x}\right)}}{x}}{x}\right) \]
      6. unsub-neg96.8%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{\color{blue}{3451.550173699799 - \frac{124074.40615218398 + -1 \cdot y}{x}}}{x}}{x}\right) \]
      7. mul-1-neg96.8%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 - \frac{124074.40615218398 + \color{blue}{\left(-y\right)}}{x}}{x}}{x}\right) \]
      8. unsub-neg96.8%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 - \frac{\color{blue}{124074.40615218398 - y}}{x}}{x}}{x}\right) \]
    7. Simplified96.8%

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 - \frac{124074.40615218398 - y}{x}}{x}}{x}\right)} \]

    if -2.8000000000000001e28 < x < 1.15e21

    1. Initial program 98.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. Add Preprocessing
    3. Taylor expanded in x around 0 97.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.8 \cdot 10^{+28} \lor \neg \left(x \leq 1.15 \cdot 10^{+21}\right):\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{\frac{124074.40615218398 - y}{x} - 3451.550173699799}{x}}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 96.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -36 \lor \neg \left(x \leq 66\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{\frac{124074.40615218398 - y}{x} - 3451.550173699799}{x}}{x}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot 43.3400022514\right)\right)}\\


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

    1. Initial program 19.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. Step-by-step derivation
      1. associate-/l*28.0%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 + -1 \cdot \frac{101.7851458539211 + -1 \cdot \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}{x}\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg91.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 + \color{blue}{\left(-\frac{101.7851458539211 + -1 \cdot \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}{x}\right)}\right) \]
      2. unsub-neg91.2%

        \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 - \frac{101.7851458539211 + -1 \cdot \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}{x}\right)} \]
      3. mul-1-neg91.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \color{blue}{\left(-\frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}\right)}}{x}\right) \]
      4. unsub-neg91.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{\color{blue}{101.7851458539211 - \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}}{x}\right) \]
      5. mul-1-neg91.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 + \color{blue}{\left(-\frac{124074.40615218398 + -1 \cdot y}{x}\right)}}{x}}{x}\right) \]
      6. unsub-neg91.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{\color{blue}{3451.550173699799 - \frac{124074.40615218398 + -1 \cdot y}{x}}}{x}}{x}\right) \]
      7. mul-1-neg91.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 - \frac{124074.40615218398 + \color{blue}{\left(-y\right)}}{x}}{x}}{x}\right) \]
      8. unsub-neg91.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 - \frac{\color{blue}{124074.40615218398 - y}}{x}}{x}}{x}\right) \]
    7. Simplified91.2%

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 - \frac{124074.40615218398 - y}{x}}{x}}{x}\right)} \]

    if -36 < x < 66

    1. Initial program 99.6%

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

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

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

      \[\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} \]
    6. Taylor expanded in x around 0 98.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -36 \lor \neg \left(x \leq 66\right):\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{\frac{124074.40615218398 - y}{x} - 3451.550173699799}{x}}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot 43.3400022514\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 95.6% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2500000000000 \lor \neg \left(x \leq 65\right):\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{\frac{124074.40615218398 - y}{x} - 3451.550173699799}{x}}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= x -2500000000000.0) (not (<= x 65.0)))
   (*
    (+ x -2.0)
    (-
     4.16438922228
     (/
      (+
       101.7851458539211
       (/ (- (/ (- 124074.40615218398 y) x) 3451.550173699799) x))
      x)))
   (/
    (* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
    (+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721)))))))
double code(double x, double y, double z) {
	double tmp;
	if ((x <= -2500000000000.0) || !(x <= 65.0)) {
		tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x));
	} else {
		tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
	}
	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 <= (-2500000000000.0d0)) .or. (.not. (x <= 65.0d0))) then
        tmp = (x + (-2.0d0)) * (4.16438922228d0 - ((101.7851458539211d0 + ((((124074.40615218398d0 - y) / x) - 3451.550173699799d0) / x)) / x))
    else
        tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / (47.066876606d0 + (x * (313.399215894d0 + (x * 263.505074721d0))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((x <= -2500000000000.0) || !(x <= 65.0)) {
		tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x));
	} else {
		tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (x <= -2500000000000.0) or not (x <= 65.0):
		tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x))
	else:
		tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((x <= -2500000000000.0) || !(x <= 65.0))
		tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 - Float64(Float64(101.7851458539211 + Float64(Float64(Float64(Float64(124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x)));
	else
		tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * 263.505074721)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((x <= -2500000000000.0) || ~((x <= 65.0)))
		tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x));
	else
		tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[x, -2500000000000.0], N[Not[LessEqual[x, 65.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 - N[(N[(101.7851458539211 + N[(N[(N[(N[(124074.40615218398 - y), $MachinePrecision] / x), $MachinePrecision] - 3451.550173699799), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * 263.505074721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2500000000000 \lor \neg \left(x \leq 65\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{\frac{124074.40615218398 - y}{x} - 3451.550173699799}{x}}{x}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.5e12 or 65 < x

    1. Initial program 18.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. Step-by-step derivation
      1. associate-/l*26.5%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 + -1 \cdot \frac{101.7851458539211 + -1 \cdot \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}{x}\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 + \color{blue}{\left(-\frac{101.7851458539211 + -1 \cdot \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}{x}\right)}\right) \]
      2. unsub-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 - \frac{101.7851458539211 + -1 \cdot \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}{x}\right)} \]
      3. mul-1-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \color{blue}{\left(-\frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}\right)}}{x}\right) \]
      4. unsub-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{\color{blue}{101.7851458539211 - \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}}{x}\right) \]
      5. mul-1-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 + \color{blue}{\left(-\frac{124074.40615218398 + -1 \cdot y}{x}\right)}}{x}}{x}\right) \]
      6. unsub-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{\color{blue}{3451.550173699799 - \frac{124074.40615218398 + -1 \cdot y}{x}}}{x}}{x}\right) \]
      7. mul-1-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 - \frac{124074.40615218398 + \color{blue}{\left(-y\right)}}{x}}{x}}{x}\right) \]
      8. unsub-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 - \frac{\color{blue}{124074.40615218398 - y}}{x}}{x}}{x}\right) \]
    7. Simplified93.2%

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 - \frac{124074.40615218398 - y}{x}}{x}}{x}\right)} \]

    if -2.5e12 < x < 65

    1. Initial program 99.6%

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

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

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

      \[\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} \]
    6. Taylor expanded in x around 0 95.5%

      \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(x \cdot 137.519416416 + y\right) \cdot x + z\right)}{\left(\color{blue}{263.505074721 \cdot x} + 313.399215894\right) \cdot x + 47.066876606} \]
    7. Step-by-step derivation
      1. *-commutative95.5%

        \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(x \cdot 137.519416416 + y\right) \cdot x + z\right)}{\left(\color{blue}{x \cdot 263.505074721} + 313.399215894\right) \cdot x + 47.066876606} \]
    8. Simplified95.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2500000000000 \lor \neg \left(x \leq 65\right):\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{\frac{124074.40615218398 - y}{x} - 3451.550173699799}{x}}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 95.7% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -36 \lor \neg \left(x \leq 40\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{\frac{124074.40615218398 - y}{x} - 3451.550173699799}{x}}{x}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot 313.399215894}\\


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

    1. Initial program 19.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. Step-by-step derivation
      1. associate-/l*28.0%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 + -1 \cdot \frac{101.7851458539211 + -1 \cdot \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}{x}\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg91.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 + \color{blue}{\left(-\frac{101.7851458539211 + -1 \cdot \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}{x}\right)}\right) \]
      2. unsub-neg91.2%

        \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 - \frac{101.7851458539211 + -1 \cdot \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}{x}\right)} \]
      3. mul-1-neg91.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \color{blue}{\left(-\frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}\right)}}{x}\right) \]
      4. unsub-neg91.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{\color{blue}{101.7851458539211 - \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}}{x}\right) \]
      5. mul-1-neg91.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 + \color{blue}{\left(-\frac{124074.40615218398 + -1 \cdot y}{x}\right)}}{x}}{x}\right) \]
      6. unsub-neg91.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{\color{blue}{3451.550173699799 - \frac{124074.40615218398 + -1 \cdot y}{x}}}{x}}{x}\right) \]
      7. mul-1-neg91.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 - \frac{124074.40615218398 + \color{blue}{\left(-y\right)}}{x}}{x}}{x}\right) \]
      8. unsub-neg91.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 - \frac{\color{blue}{124074.40615218398 - y}}{x}}{x}}{x}\right) \]
    7. Simplified91.2%

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 - \frac{124074.40615218398 - y}{x}}{x}}{x}\right)} \]

    if -36 < x < 40

    1. Initial program 99.6%

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

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

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

      \[\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} \]
    6. Taylor expanded in x around 0 97.3%

      \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(x \cdot 137.519416416 + y\right) \cdot x + z\right)}{\color{blue}{313.399215894 \cdot x} + 47.066876606} \]
    7. Step-by-step derivation
      1. *-commutative97.3%

        \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(x \cdot 137.519416416 + y\right) \cdot x + z\right)}{\color{blue}{x \cdot 313.399215894} + 47.066876606} \]
    8. Simplified97.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -36 \lor \neg \left(x \leq 40\right):\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{\frac{124074.40615218398 - y}{x} - 3451.550173699799}{x}}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot 313.399215894}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 93.3% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2500000000000 \lor \neg \left(x \leq 32\right):\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{\frac{124074.40615218398 - y}{x} - 3451.550173699799}{x}}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot y\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= x -2500000000000.0) (not (<= x 32.0)))
   (*
    (+ x -2.0)
    (-
     4.16438922228
     (/
      (+
       101.7851458539211
       (/ (- (/ (- 124074.40615218398 y) x) 3451.550173699799) x))
      x)))
   (/
    (* (- x 2.0) (+ z (* x y)))
    (+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721)))))))
double code(double x, double y, double z) {
	double tmp;
	if ((x <= -2500000000000.0) || !(x <= 32.0)) {
		tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x));
	} else {
		tmp = ((x - 2.0) * (z + (x * y))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
	}
	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 <= (-2500000000000.0d0)) .or. (.not. (x <= 32.0d0))) then
        tmp = (x + (-2.0d0)) * (4.16438922228d0 - ((101.7851458539211d0 + ((((124074.40615218398d0 - y) / x) - 3451.550173699799d0) / x)) / x))
    else
        tmp = ((x - 2.0d0) * (z + (x * y))) / (47.066876606d0 + (x * (313.399215894d0 + (x * 263.505074721d0))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((x <= -2500000000000.0) || !(x <= 32.0)) {
		tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x));
	} else {
		tmp = ((x - 2.0) * (z + (x * y))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (x <= -2500000000000.0) or not (x <= 32.0):
		tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x))
	else:
		tmp = ((x - 2.0) * (z + (x * y))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((x <= -2500000000000.0) || !(x <= 32.0))
		tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 - Float64(Float64(101.7851458539211 + Float64(Float64(Float64(Float64(124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x)));
	else
		tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * y))) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * 263.505074721)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((x <= -2500000000000.0) || ~((x <= 32.0)))
		tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x));
	else
		tmp = ((x - 2.0) * (z + (x * y))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[x, -2500000000000.0], N[Not[LessEqual[x, 32.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 - N[(N[(101.7851458539211 + N[(N[(N[(N[(124074.40615218398 - y), $MachinePrecision] / x), $MachinePrecision] - 3451.550173699799), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * 263.505074721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2500000000000 \lor \neg \left(x \leq 32\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{\frac{124074.40615218398 - y}{x} - 3451.550173699799}{x}}{x}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot y\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.5e12 or 32 < x

    1. Initial program 18.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. Step-by-step derivation
      1. associate-/l*26.5%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 + -1 \cdot \frac{101.7851458539211 + -1 \cdot \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}{x}\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 + \color{blue}{\left(-\frac{101.7851458539211 + -1 \cdot \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}{x}\right)}\right) \]
      2. unsub-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 - \frac{101.7851458539211 + -1 \cdot \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}{x}\right)} \]
      3. mul-1-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \color{blue}{\left(-\frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}\right)}}{x}\right) \]
      4. unsub-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{\color{blue}{101.7851458539211 - \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}}{x}\right) \]
      5. mul-1-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 + \color{blue}{\left(-\frac{124074.40615218398 + -1 \cdot y}{x}\right)}}{x}}{x}\right) \]
      6. unsub-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{\color{blue}{3451.550173699799 - \frac{124074.40615218398 + -1 \cdot y}{x}}}{x}}{x}\right) \]
      7. mul-1-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 - \frac{124074.40615218398 + \color{blue}{\left(-y\right)}}{x}}{x}}{x}\right) \]
      8. unsub-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 - \frac{\color{blue}{124074.40615218398 - y}}{x}}{x}}{x}\right) \]
    7. Simplified93.2%

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 - \frac{124074.40615218398 - y}{x}}{x}}{x}\right)} \]

    if -2.5e12 < x < 32

    1. Initial program 99.6%

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

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

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

      \[\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} \]
    6. Taylor expanded in x around 0 95.5%

      \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(x \cdot 137.519416416 + y\right) \cdot x + z\right)}{\left(\color{blue}{263.505074721 \cdot x} + 313.399215894\right) \cdot x + 47.066876606} \]
    7. Step-by-step derivation
      1. *-commutative95.5%

        \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(x \cdot 137.519416416 + y\right) \cdot x + z\right)}{\left(\color{blue}{x \cdot 263.505074721} + 313.399215894\right) \cdot x + 47.066876606} \]
    8. Simplified95.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2500000000000 \lor \neg \left(x \leq 32\right):\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{\frac{124074.40615218398 - y}{x} - 3451.550173699799}{x}}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot y\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 92.8% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2500000000000 \lor \neg \left(x \leq 3.4\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{\frac{124074.40615218398 - y}{x} - 3451.550173699799}{x}}{x}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.5e12 or 3.39999999999999991 < x

    1. Initial program 18.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. Step-by-step derivation
      1. associate-/l*26.5%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 + -1 \cdot \frac{101.7851458539211 + -1 \cdot \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}{x}\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 + \color{blue}{\left(-\frac{101.7851458539211 + -1 \cdot \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}{x}\right)}\right) \]
      2. unsub-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 - \frac{101.7851458539211 + -1 \cdot \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}{x}\right)} \]
      3. mul-1-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \color{blue}{\left(-\frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}\right)}}{x}\right) \]
      4. unsub-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{\color{blue}{101.7851458539211 - \frac{3451.550173699799 + -1 \cdot \frac{124074.40615218398 + -1 \cdot y}{x}}{x}}}{x}\right) \]
      5. mul-1-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 + \color{blue}{\left(-\frac{124074.40615218398 + -1 \cdot y}{x}\right)}}{x}}{x}\right) \]
      6. unsub-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{\color{blue}{3451.550173699799 - \frac{124074.40615218398 + -1 \cdot y}{x}}}{x}}{x}\right) \]
      7. mul-1-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 - \frac{124074.40615218398 + \color{blue}{\left(-y\right)}}{x}}{x}}{x}\right) \]
      8. unsub-neg93.2%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 - \frac{\color{blue}{124074.40615218398 - y}}{x}}{x}}{x}\right) \]
    7. Simplified93.2%

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 - \frac{124074.40615218398 - y}{x}}{x}}{x}\right)} \]

    if -2.5e12 < x < 3.39999999999999991

    1. Initial program 99.6%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Step-by-step derivation
      1. associate-/l*99.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(x + -2\right) \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), x, 137.519416416\right), x, y\right), x, z\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 88.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 simplification91.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2500000000000 \lor \neg \left(x \leq 3.4\right):\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{\frac{124074.40615218398 - y}{x} - 3451.550173699799}{x}}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot -0.0424927283095952 - x \cdot \left(z \cdot -0.28294182010212804 - 0.0212463641547976 \cdot \left(z + y \cdot -2\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 89.7% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2500000000000:\\ \;\;\;\;x \cdot \left(4.16438922228 - \frac{110.1139242984811}{x}\right)\\ \mathbf{elif}\;x \leq 2700000:\\ \;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 - x \cdot \left(z \cdot 0.14147091005106402 - y \cdot 0.0212463641547976\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211}{x}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x -2500000000000.0)
   (* x (- 4.16438922228 (/ 110.1139242984811 x)))
   (if (<= x 2700000.0)
     (*
      (+ x -2.0)
      (-
       (* z 0.0212463641547976)
       (* x (- (* z 0.14147091005106402) (* y 0.0212463641547976)))))
     (* (+ x -2.0) (- 4.16438922228 (/ 101.7851458539211 x))))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= -2500000000000.0) {
		tmp = x * (4.16438922228 - (110.1139242984811 / x));
	} else if (x <= 2700000.0) {
		tmp = (x + -2.0) * ((z * 0.0212463641547976) - (x * ((z * 0.14147091005106402) - (y * 0.0212463641547976))));
	} else {
		tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (x <= (-2500000000000.0d0)) then
        tmp = x * (4.16438922228d0 - (110.1139242984811d0 / x))
    else if (x <= 2700000.0d0) then
        tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) - (x * ((z * 0.14147091005106402d0) - (y * 0.0212463641547976d0))))
    else
        tmp = (x + (-2.0d0)) * (4.16438922228d0 - (101.7851458539211d0 / x))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= -2500000000000.0) {
		tmp = x * (4.16438922228 - (110.1139242984811 / x));
	} else if (x <= 2700000.0) {
		tmp = (x + -2.0) * ((z * 0.0212463641547976) - (x * ((z * 0.14147091005106402) - (y * 0.0212463641547976))));
	} else {
		tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= -2500000000000.0:
		tmp = x * (4.16438922228 - (110.1139242984811 / x))
	elif x <= 2700000.0:
		tmp = (x + -2.0) * ((z * 0.0212463641547976) - (x * ((z * 0.14147091005106402) - (y * 0.0212463641547976))))
	else:
		tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= -2500000000000.0)
		tmp = Float64(x * Float64(4.16438922228 - Float64(110.1139242984811 / x)));
	elseif (x <= 2700000.0)
		tmp = Float64(Float64(x + -2.0) * Float64(Float64(z * 0.0212463641547976) - Float64(x * Float64(Float64(z * 0.14147091005106402) - Float64(y * 0.0212463641547976)))));
	else
		tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 - Float64(101.7851458539211 / x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= -2500000000000.0)
		tmp = x * (4.16438922228 - (110.1139242984811 / x));
	elseif (x <= 2700000.0)
		tmp = (x + -2.0) * ((z * 0.0212463641547976) - (x * ((z * 0.14147091005106402) - (y * 0.0212463641547976))));
	else
		tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, -2500000000000.0], N[(x * N[(4.16438922228 - N[(110.1139242984811 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2700000.0], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z * 0.0212463641547976), $MachinePrecision] - N[(x * N[(N[(z * 0.14147091005106402), $MachinePrecision] - N[(y * 0.0212463641547976), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 - N[(101.7851458539211 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2500000000000:\\
\;\;\;\;x \cdot \left(4.16438922228 - \frac{110.1139242984811}{x}\right)\\

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

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


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

    1. Initial program 17.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. Step-by-step derivation
      1. associate-/l*23.0%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(4.16438922228 - 110.1139242984811 \cdot \frac{1}{x}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/90.5%

        \[\leadsto x \cdot \left(4.16438922228 - \color{blue}{\frac{110.1139242984811 \cdot 1}{x}}\right) \]
      2. metadata-eval90.5%

        \[\leadsto x \cdot \left(4.16438922228 - \frac{\color{blue}{110.1139242984811}}{x}\right) \]
    7. Simplified90.5%

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

    if -2.5e12 < x < 2.7e6

    1. Initial program 99.6%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Step-by-step derivation
      1. associate-/l*99.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.7e6 < x

    1. Initial program 17.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. Step-by-step derivation
      1. associate-/l*28.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 - 101.7851458539211 \cdot \frac{1}{x}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/88.0%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \color{blue}{\frac{101.7851458539211 \cdot 1}{x}}\right) \]
      2. metadata-eval88.0%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{\color{blue}{101.7851458539211}}{x}\right) \]
    7. Simplified88.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2500000000000:\\ \;\;\;\;x \cdot \left(4.16438922228 - \frac{110.1139242984811}{x}\right)\\ \mathbf{elif}\;x \leq 2700000:\\ \;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 - x \cdot \left(z \cdot 0.14147091005106402 - y \cdot 0.0212463641547976\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211}{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 89.6% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 18.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. Step-by-step derivation
      1. associate-/l*26.5%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(4.16438922228 - 110.1139242984811 \cdot \frac{1}{x}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/88.6%

        \[\leadsto x \cdot \left(4.16438922228 - \color{blue}{\frac{110.1139242984811 \cdot 1}{x}}\right) \]
      2. metadata-eval88.6%

        \[\leadsto x \cdot \left(4.16438922228 - \frac{\color{blue}{110.1139242984811}}{x}\right) \]
    7. Simplified88.6%

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

    if -2.5e12 < x < 2

    1. Initial program 99.6%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Step-by-step derivation
      1. associate-/l*99.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(x + -2\right) \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), x, 137.519416416\right), x, y\right), x, z\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 88.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)} \]
    6. Taylor expanded in z around 0 88.4%

      \[\leadsto -0.0424927283095952 \cdot z + \color{blue}{-0.0424927283095952 \cdot \left(x \cdot y\right)} \]
    7. Step-by-step derivation
      1. *-commutative88.4%

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

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

      \[\leadsto -0.0424927283095952 \cdot z + \color{blue}{x \cdot \left(y \cdot -0.0424927283095952\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification88.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2500000000000 \lor \neg \left(x \leq 2\right):\\ \;\;\;\;x \cdot \left(4.16438922228 - \frac{110.1139242984811}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot -0.0424927283095952\right) + z \cdot -0.0424927283095952\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 76.5% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2500000000000:\\ \;\;\;\;x \cdot \left(4.16438922228 - \frac{110.1139242984811}{x}\right)\\ \mathbf{elif}\;x \leq 1150000000000:\\ \;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211}{x}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x -2500000000000.0)
   (* x (- 4.16438922228 (/ 110.1139242984811 x)))
   (if (<= x 1150000000000.0)
     (* (+ x -2.0) (* z 0.0212463641547976))
     (* (+ x -2.0) (- 4.16438922228 (/ 101.7851458539211 x))))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= -2500000000000.0) {
		tmp = x * (4.16438922228 - (110.1139242984811 / x));
	} else if (x <= 1150000000000.0) {
		tmp = (x + -2.0) * (z * 0.0212463641547976);
	} else {
		tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (x <= (-2500000000000.0d0)) then
        tmp = x * (4.16438922228d0 - (110.1139242984811d0 / x))
    else if (x <= 1150000000000.0d0) then
        tmp = (x + (-2.0d0)) * (z * 0.0212463641547976d0)
    else
        tmp = (x + (-2.0d0)) * (4.16438922228d0 - (101.7851458539211d0 / x))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= -2500000000000.0) {
		tmp = x * (4.16438922228 - (110.1139242984811 / x));
	} else if (x <= 1150000000000.0) {
		tmp = (x + -2.0) * (z * 0.0212463641547976);
	} else {
		tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= -2500000000000.0:
		tmp = x * (4.16438922228 - (110.1139242984811 / x))
	elif x <= 1150000000000.0:
		tmp = (x + -2.0) * (z * 0.0212463641547976)
	else:
		tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= -2500000000000.0)
		tmp = Float64(x * Float64(4.16438922228 - Float64(110.1139242984811 / x)));
	elseif (x <= 1150000000000.0)
		tmp = Float64(Float64(x + -2.0) * Float64(z * 0.0212463641547976));
	else
		tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 - Float64(101.7851458539211 / x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= -2500000000000.0)
		tmp = x * (4.16438922228 - (110.1139242984811 / x));
	elseif (x <= 1150000000000.0)
		tmp = (x + -2.0) * (z * 0.0212463641547976);
	else
		tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, -2500000000000.0], N[(x * N[(4.16438922228 - N[(110.1139242984811 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1150000000000.0], N[(N[(x + -2.0), $MachinePrecision] * N[(z * 0.0212463641547976), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 - N[(101.7851458539211 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2500000000000:\\
\;\;\;\;x \cdot \left(4.16438922228 - \frac{110.1139242984811}{x}\right)\\

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

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


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

    1. Initial program 17.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. Step-by-step derivation
      1. associate-/l*23.0%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(4.16438922228 - 110.1139242984811 \cdot \frac{1}{x}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/90.5%

        \[\leadsto x \cdot \left(4.16438922228 - \color{blue}{\frac{110.1139242984811 \cdot 1}{x}}\right) \]
      2. metadata-eval90.5%

        \[\leadsto x \cdot \left(4.16438922228 - \frac{\color{blue}{110.1139242984811}}{x}\right) \]
    7. Simplified90.5%

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

    if -2.5e12 < x < 1.15e12

    1. Initial program 99.5%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Step-by-step derivation
      1. associate-/l*99.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.15e12 < x

    1. Initial program 16.5%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Step-by-step derivation
      1. associate-/l*27.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 - 101.7851458539211 \cdot \frac{1}{x}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/89.3%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \color{blue}{\frac{101.7851458539211 \cdot 1}{x}}\right) \]
      2. metadata-eval89.3%

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 - \frac{\color{blue}{101.7851458539211}}{x}\right) \]
    7. Simplified89.3%

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 - \frac{101.7851458539211}{x}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification74.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2500000000000:\\ \;\;\;\;x \cdot \left(4.16438922228 - \frac{110.1139242984811}{x}\right)\\ \mathbf{elif}\;x \leq 1150000000000:\\ \;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211}{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 76.5% accurate, 2.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.5e12 or 1.15e12 < x

    1. Initial program 16.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. Step-by-step derivation
      1. associate-/l*25.4%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(4.16438922228 - 110.1139242984811 \cdot \frac{1}{x}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/89.9%

        \[\leadsto x \cdot \left(4.16438922228 - \color{blue}{\frac{110.1139242984811 \cdot 1}{x}}\right) \]
      2. metadata-eval89.9%

        \[\leadsto x \cdot \left(4.16438922228 - \frac{\color{blue}{110.1139242984811}}{x}\right) \]
    7. Simplified89.9%

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

    if -2.5e12 < x < 1.15e12

    1. Initial program 99.5%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Step-by-step derivation
      1. associate-/l*99.5%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(0.0212463641547976 \cdot z\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification74.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2500000000000 \lor \neg \left(x \leq 1150000000000\right):\\ \;\;\;\;x \cdot \left(4.16438922228 - \frac{110.1139242984811}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 76.5% accurate, 2.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2500000000000 \lor \neg \left(x \leq 1.15 \cdot 10^{-6}\right):\\
\;\;\;\;x \cdot \left(4.16438922228 - \frac{110.1139242984811}{x}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.5e12 or 1.15e-6 < x

    1. Initial program 19.2%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Step-by-step derivation
      1. associate-/l*27.5%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(4.16438922228 - 110.1139242984811 \cdot \frac{1}{x}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/87.4%

        \[\leadsto x \cdot \left(4.16438922228 - \color{blue}{\frac{110.1139242984811 \cdot 1}{x}}\right) \]
      2. metadata-eval87.4%

        \[\leadsto x \cdot \left(4.16438922228 - \frac{\color{blue}{110.1139242984811}}{x}\right) \]
    7. Simplified87.4%

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

    if -2.5e12 < x < 1.15e-6

    1. Initial program 99.6%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Step-by-step derivation
      1. associate-/l*99.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.0424927283095952 \cdot z} \]
    6. Step-by-step derivation
      1. *-commutative60.5%

        \[\leadsto \color{blue}{z \cdot -0.0424927283095952} \]
    7. Simplified60.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2500000000000 \lor \neg \left(x \leq 1.15 \cdot 10^{-6}\right):\\ \;\;\;\;x \cdot \left(4.16438922228 - \frac{110.1139242984811}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 76.5% accurate, 2.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2500000000000 \lor \neg \left(x \leq 1.15 \cdot 10^{-6}\right):\\
\;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.5e12 or 1.15e-6 < x

    1. Initial program 19.2%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Step-by-step derivation
      1. associate-/l*27.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.5e12 < x < 1.15e-6

    1. Initial program 99.6%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Step-by-step derivation
      1. associate-/l*99.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.0424927283095952 \cdot z} \]
    6. Step-by-step derivation
      1. *-commutative60.5%

        \[\leadsto \color{blue}{z \cdot -0.0424927283095952} \]
    7. Simplified60.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2500000000000 \lor \neg \left(x \leq 1.15 \cdot 10^{-6}\right):\\ \;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 76.5% accurate, 2.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2500000000000 \lor \neg \left(x \leq 0.00017\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 < -2.5e12 or 1.7e-4 < x

    1. Initial program 18.6%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Step-by-step derivation
      1. associate-/l*27.0%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)}} \]
    6. Taylor expanded in x around inf 87.7%

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

        \[\leadsto \color{blue}{x \cdot 4.16438922228} \]
    8. Simplified87.7%

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

    if -2.5e12 < x < 1.7e-4

    1. Initial program 99.6%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. Step-by-step derivation
      1. associate-/l*99.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.0424927283095952 \cdot z} \]
    6. Step-by-step derivation
      1. *-commutative60.0%

        \[\leadsto \color{blue}{z \cdot -0.0424927283095952} \]
    7. Simplified60.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2500000000000 \lor \neg \left(x \leq 0.00017\right):\\ \;\;\;\;x \cdot 4.16438922228\\ \mathbf{else}:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 45.7% accurate, 12.3× speedup?

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

\\
x \cdot 4.16438922228
\end{array}
Derivation
  1. Initial program 56.5%

    \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
  2. Step-by-step derivation
    1. associate-/l*61.0%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\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)}} \]
  6. Taylor expanded in x around inf 48.2%

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

      \[\leadsto \color{blue}{x \cdot 4.16438922228} \]
  8. Simplified48.2%

    \[\leadsto \color{blue}{x \cdot 4.16438922228} \]
  9. Add Preprocessing

Alternative 19: 9.2% accurate, 12.3× speedup?

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

\\
x \cdot 0.5218852675289308
\end{array}
Derivation
  1. Initial program 56.5%

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

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

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

    \[\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} \]
  6. Taylor expanded in x around 0 47.2%

    \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(x \cdot 137.519416416 + y\right) \cdot x + z\right)}{\left(\color{blue}{263.505074721 \cdot x} + 313.399215894\right) \cdot x + 47.066876606} \]
  7. Step-by-step derivation
    1. *-commutative47.2%

      \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(x \cdot 137.519416416 + y\right) \cdot x + z\right)}{\left(\color{blue}{x \cdot 263.505074721} + 313.399215894\right) \cdot x + 47.066876606} \]
  8. Simplified47.2%

    \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(x \cdot 137.519416416 + y\right) \cdot x + z\right)}{\left(\color{blue}{x \cdot 263.505074721} + 313.399215894\right) \cdot x + 47.066876606} \]
  9. Taylor expanded in x around inf 9.5%

    \[\leadsto \color{blue}{0.5218852675289308 \cdot x} \]
  10. Step-by-step derivation
    1. *-commutative9.5%

      \[\leadsto \color{blue}{x \cdot 0.5218852675289308} \]
  11. Simplified9.5%

    \[\leadsto \color{blue}{x \cdot 0.5218852675289308} \]
  12. Add Preprocessing

Developer Target 1: 98.8% accurate, 0.7× 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 2024135 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, C"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< x -332612872587000500000000000000000000000000000000000000000000000) (- (+ (/ y (* x x)) (* 104109730557/25000000000 x)) 1101139242984811/10000000000000) (if (< x 94299917145546730000000000000000000000000000000000000000) (* (/ (- x 2) 1) (/ (+ (* (+ (* (+ (* (+ (* x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z) (+ (* (+ (+ (* 263505074721/1000000000 x) (+ (* 216700011257/5000000000 (* x x)) (* x (* x x)))) 156699607947/500000000) x) 23533438303/500000000))) (- (+ (/ y (* x x)) (* 104109730557/25000000000 x)) 1101139242984811/10000000000000))))

  (/ (* (- 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)))