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

Percentage Accurate: 58.4% → 98.4%
Time: 24.8s
Alternatives: 19
Speedup: 5.2×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 58.4% accurate, 1.0× speedup?

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

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

Alternative 1: 98.4% accurate, 0.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq 2 \cdot 10^{+299}:\\
\;\;\;\;\left(x + -2\right) \cdot \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}\\

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


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

    1. Initial program 95.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. *-commutative95.1%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/98.4%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative98.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}} \]
      4. sub-neg98.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} \]
      5. metadata-eval98.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} \]
    3. Simplified98.4%

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

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

    1. Initial program 0.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. *-commutative0.1%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/2.4%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative2.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}} \]
      4. sub-neg2.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} \]
      5. metadata-eval2.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} \]
    3. Simplified2.4%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{130977.50649958357 + -1 \cdot y}{{x}^{2}} + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811} \]
    5. Step-by-step derivation
      1. sub-neg99.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) - \frac{130977.50649958357 - y}{\color{blue}{x \cdot x}}\right) + \left(-110.1139242984811\right) \]
      12. metadata-eval99.2%

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

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

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

Alternative 2: 98.4% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
t_1 := x \cdot \left(x \cdot \left(x \cdot \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 2 \cdot 10^{+299}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(\frac{t_1}{t_0} + \frac{z}{t_0}\right)\\

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


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

    1. Initial program 95.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. *-commutative95.1%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/98.4%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative98.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}} \]
      4. sub-neg98.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} \]
      5. metadata-eval98.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} \]
    3. Simplified98.4%

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

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

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

    1. Initial program 0.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. *-commutative0.1%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/2.4%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative2.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}} \]
      4. sub-neg2.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} \]
      5. metadata-eval2.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} \]
    3. Simplified2.4%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{130977.50649958357 + -1 \cdot y}{{x}^{2}} + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811} \]
    5. Step-by-step derivation
      1. sub-neg99.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) - \frac{130977.50649958357 - y}{\color{blue}{x \cdot x}}\right) + \left(-110.1139242984811\right) \]
      12. metadata-eval99.2%

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

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

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

Alternative 3: 97.4% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+299}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 4.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. *-commutative4.7%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/75.6%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative75.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}} \]
      4. sub-neg75.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} \]
      5. metadata-eval75.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} \]
    3. Simplified75.6%

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

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

      \[\leadsto \left(x + -2\right) \cdot \frac{\left(\left(137.519416416 + \left(78.6994924154 + 4.16438922228 \cdot x\right) \cdot x\right) \cdot x + y\right) \cdot x}{\left(313.399215894 + \color{blue}{\left(43.3400022514 \cdot {x}^{2} + {x}^{3}\right)}\right) \cdot x + 47.066876606} \]
    6. Step-by-step derivation
      1. +-commutative75.8%

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

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

        \[\leadsto \left(x + -2\right) \cdot \frac{\left(\left(137.519416416 + \left(78.6994924154 + 4.16438922228 \cdot x\right) \cdot x\right) \cdot x + y\right) \cdot x}{\left(313.399215894 + \left(x \cdot \color{blue}{{x}^{2}} + 43.3400022514 \cdot {x}^{2}\right)\right) \cdot x + 47.066876606} \]
      4. distribute-rgt-out75.8%

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

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

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

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

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

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

    1. Initial program 0.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*2.4%

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

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

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

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

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      6. fma-def2.4%

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      7. fma-def2.4%

        \[\leadsto \frac{x + -2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}{\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)}}} \]
      8. fma-def2.4%

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

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

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

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

      \[\leadsto \frac{x + -2}{\color{blue}{0.24013125253755718}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification98.0%

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

Alternative 4: 97.6% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
t_1 := x \cdot \left(x \cdot \left(x \cdot \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 2 \cdot 10^{+299}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(\frac{t_1}{t_0} + \frac{z}{t_0}\right)\\

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


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

    1. Initial program 95.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. *-commutative95.1%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/98.4%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative98.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}} \]
      4. sub-neg98.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} \]
      5. metadata-eval98.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} \]
    3. Simplified98.4%

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

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

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

    1. Initial program 0.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*2.4%

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

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

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

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

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      6. fma-def2.4%

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      7. fma-def2.4%

        \[\leadsto \frac{x + -2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}{\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)}}} \]
      8. fma-def2.4%

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

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

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

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

      \[\leadsto \frac{x + -2}{\color{blue}{0.24013125253755718}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.0%

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

Alternative 5: 94.4% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
\mathbf{if}\;x \leq -1.22 \cdot 10^{+27}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{t_0}\right)\\

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

\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{55.572073733743466}{x \cdot x}\right)}\\


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

    1. Initial program 14.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. *-commutative14.6%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/23.1%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative23.1%

        \[\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}} \]
      4. sub-neg23.1%

        \[\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} \]
      5. metadata-eval23.1%

        \[\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} \]
    3. Simplified23.1%

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

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

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

    if -1.2200000000000001e27 < x < 10500

    1. Initial program 98.9%

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

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

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

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

    if 10500 < x

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

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

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

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

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

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      6. fma-def19.0%

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      7. fma-def19.0%

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

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

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

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

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

      \[\leadsto \frac{x + -2}{\color{blue}{\left(0.24013125253755718 + 5.86923874282773 \cdot \frac{1}{x}\right) - 55.572073733743466 \cdot \frac{1}{{x}^{2}}}} \]
    5. Step-by-step derivation
      1. +-commutative94.6%

        \[\leadsto \frac{x + -2}{\color{blue}{\left(5.86923874282773 \cdot \frac{1}{x} + 0.24013125253755718\right)} - 55.572073733743466 \cdot \frac{1}{{x}^{2}}} \]
      2. associate--l+94.6%

        \[\leadsto \frac{x + -2}{\color{blue}{5.86923874282773 \cdot \frac{1}{x} + \left(0.24013125253755718 - 55.572073733743466 \cdot \frac{1}{{x}^{2}}\right)}} \]
      3. associate-*r/94.6%

        \[\leadsto \frac{x + -2}{\color{blue}{\frac{5.86923874282773 \cdot 1}{x}} + \left(0.24013125253755718 - 55.572073733743466 \cdot \frac{1}{{x}^{2}}\right)} \]
      4. metadata-eval94.6%

        \[\leadsto \frac{x + -2}{\frac{\color{blue}{5.86923874282773}}{x} + \left(0.24013125253755718 - 55.572073733743466 \cdot \frac{1}{{x}^{2}}\right)} \]
      5. associate-*r/94.6%

        \[\leadsto \frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \color{blue}{\frac{55.572073733743466 \cdot 1}{{x}^{2}}}\right)} \]
      6. metadata-eval94.6%

        \[\leadsto \frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{\color{blue}{55.572073733743466}}{{x}^{2}}\right)} \]
      7. unpow294.6%

        \[\leadsto \frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{55.572073733743466}{\color{blue}{x \cdot x}}\right)} \]
    6. Simplified94.6%

      \[\leadsto \frac{x + -2}{\color{blue}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{55.572073733743466}{x \cdot x}\right)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification95.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.22 \cdot 10^{+27}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\right)\\ \mathbf{elif}\;x \leq 10500:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{55.572073733743466}{x \cdot x}\right)}\\ \end{array} \]

Alternative 6: 91.4% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;x \leq 9000:\\
\;\;\;\;\left(x + -2\right) \cdot \left(t_0 + 0.0212463641547976 \cdot \left(x \cdot y\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{55.572073733743466}{x \cdot x}\right)}\\


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

    1. Initial program 25.9%

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

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/34.5%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative34.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}} \]
      4. sub-neg34.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} \]
      5. metadata-eval34.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} \]
    3. Simplified34.5%

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

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

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

    if -5.5 < x < 9e3

    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. *-commutative99.6%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/99.6%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative99.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}} \]
      4. 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} \]
      5. 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} \]
    3. Simplified99.6%

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

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

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

    if 9e3 < x

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

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

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

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

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

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      6. fma-def19.0%

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      7. fma-def19.0%

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

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

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

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

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

      \[\leadsto \frac{x + -2}{\color{blue}{\left(0.24013125253755718 + 5.86923874282773 \cdot \frac{1}{x}\right) - 55.572073733743466 \cdot \frac{1}{{x}^{2}}}} \]
    5. Step-by-step derivation
      1. +-commutative94.6%

        \[\leadsto \frac{x + -2}{\color{blue}{\left(5.86923874282773 \cdot \frac{1}{x} + 0.24013125253755718\right)} - 55.572073733743466 \cdot \frac{1}{{x}^{2}}} \]
      2. associate--l+94.6%

        \[\leadsto \frac{x + -2}{\color{blue}{5.86923874282773 \cdot \frac{1}{x} + \left(0.24013125253755718 - 55.572073733743466 \cdot \frac{1}{{x}^{2}}\right)}} \]
      3. associate-*r/94.6%

        \[\leadsto \frac{x + -2}{\color{blue}{\frac{5.86923874282773 \cdot 1}{x}} + \left(0.24013125253755718 - 55.572073733743466 \cdot \frac{1}{{x}^{2}}\right)} \]
      4. metadata-eval94.6%

        \[\leadsto \frac{x + -2}{\frac{\color{blue}{5.86923874282773}}{x} + \left(0.24013125253755718 - 55.572073733743466 \cdot \frac{1}{{x}^{2}}\right)} \]
      5. associate-*r/94.6%

        \[\leadsto \frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \color{blue}{\frac{55.572073733743466 \cdot 1}{{x}^{2}}}\right)} \]
      6. metadata-eval94.6%

        \[\leadsto \frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{\color{blue}{55.572073733743466}}{{x}^{2}}\right)} \]
      7. unpow294.6%

        \[\leadsto \frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{55.572073733743466}{\color{blue}{x \cdot x}}\right)} \]
    6. Simplified94.6%

      \[\leadsto \frac{x + -2}{\color{blue}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{55.572073733743466}{x \cdot x}\right)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification90.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.5:\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\right)\\ \mathbf{elif}\;x \leq 9000:\\ \;\;\;\;\left(x + -2\right) \cdot \left(\frac{z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} + 0.0212463641547976 \cdot \left(x \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{55.572073733743466}{x \cdot x}\right)}\\ \end{array} \]

Alternative 7: 91.2% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.1 \cdot 10^{-7}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\right)\\

\mathbf{elif}\;x \leq 230:\\
\;\;\;\;\left(x + -2\right) \cdot \left(0.0212463641547976 \cdot \left(x \cdot y\right) + \frac{z}{47.066876606 + x \cdot 313.399215894}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{55.572073733743466}{x \cdot x}\right)}\\


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

    1. Initial program 28.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. *-commutative28.1%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/36.4%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative36.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}} \]
      4. sub-neg36.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} \]
      5. metadata-eval36.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} \]
    3. Simplified36.4%

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

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

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

    if -3.1e-7 < x < 230

    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. *-commutative99.6%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/99.6%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative99.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}} \]
      4. 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} \]
      5. 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} \]
    3. Simplified99.6%

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

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

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

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

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

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

    if 230 < x

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

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

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

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

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

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      6. fma-def19.0%

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      7. fma-def19.0%

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

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

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

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

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

      \[\leadsto \frac{x + -2}{\color{blue}{\left(0.24013125253755718 + 5.86923874282773 \cdot \frac{1}{x}\right) - 55.572073733743466 \cdot \frac{1}{{x}^{2}}}} \]
    5. Step-by-step derivation
      1. +-commutative94.6%

        \[\leadsto \frac{x + -2}{\color{blue}{\left(5.86923874282773 \cdot \frac{1}{x} + 0.24013125253755718\right)} - 55.572073733743466 \cdot \frac{1}{{x}^{2}}} \]
      2. associate--l+94.6%

        \[\leadsto \frac{x + -2}{\color{blue}{5.86923874282773 \cdot \frac{1}{x} + \left(0.24013125253755718 - 55.572073733743466 \cdot \frac{1}{{x}^{2}}\right)}} \]
      3. associate-*r/94.6%

        \[\leadsto \frac{x + -2}{\color{blue}{\frac{5.86923874282773 \cdot 1}{x}} + \left(0.24013125253755718 - 55.572073733743466 \cdot \frac{1}{{x}^{2}}\right)} \]
      4. metadata-eval94.6%

        \[\leadsto \frac{x + -2}{\frac{\color{blue}{5.86923874282773}}{x} + \left(0.24013125253755718 - 55.572073733743466 \cdot \frac{1}{{x}^{2}}\right)} \]
      5. associate-*r/94.6%

        \[\leadsto \frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \color{blue}{\frac{55.572073733743466 \cdot 1}{{x}^{2}}}\right)} \]
      6. metadata-eval94.6%

        \[\leadsto \frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{\color{blue}{55.572073733743466}}{{x}^{2}}\right)} \]
      7. unpow294.6%

        \[\leadsto \frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{55.572073733743466}{\color{blue}{x \cdot x}}\right)} \]
    6. Simplified94.6%

      \[\leadsto \frac{x + -2}{\color{blue}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{55.572073733743466}{x \cdot x}\right)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification90.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.1 \cdot 10^{-7}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\right)\\ \mathbf{elif}\;x \leq 230:\\ \;\;\;\;\left(x + -2\right) \cdot \left(0.0212463641547976 \cdot \left(x \cdot y\right) + \frac{z}{47.066876606 + x \cdot 313.399215894}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{55.572073733743466}{x \cdot x}\right)}\\ \end{array} \]

Alternative 8: 90.1% accurate, 1.8× speedup?

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

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

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


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

    1. Initial program 21.4%

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

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

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

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

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

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      6. fma-def28.1%

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      7. fma-def28.1%

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

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

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

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

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

      \[\leadsto \frac{x + -2}{\color{blue}{\left(0.24013125253755718 + 5.86923874282773 \cdot \frac{1}{x}\right) - 55.572073733743466 \cdot \frac{1}{{x}^{2}}}} \]
    5. Step-by-step derivation
      1. +-commutative87.7%

        \[\leadsto \frac{x + -2}{\color{blue}{\left(5.86923874282773 \cdot \frac{1}{x} + 0.24013125253755718\right)} - 55.572073733743466 \cdot \frac{1}{{x}^{2}}} \]
      2. associate--l+87.7%

        \[\leadsto \frac{x + -2}{\color{blue}{5.86923874282773 \cdot \frac{1}{x} + \left(0.24013125253755718 - 55.572073733743466 \cdot \frac{1}{{x}^{2}}\right)}} \]
      3. associate-*r/87.7%

        \[\leadsto \frac{x + -2}{\color{blue}{\frac{5.86923874282773 \cdot 1}{x}} + \left(0.24013125253755718 - 55.572073733743466 \cdot \frac{1}{{x}^{2}}\right)} \]
      4. metadata-eval87.7%

        \[\leadsto \frac{x + -2}{\frac{\color{blue}{5.86923874282773}}{x} + \left(0.24013125253755718 - 55.572073733743466 \cdot \frac{1}{{x}^{2}}\right)} \]
      5. associate-*r/87.7%

        \[\leadsto \frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \color{blue}{\frac{55.572073733743466 \cdot 1}{{x}^{2}}}\right)} \]
      6. metadata-eval87.7%

        \[\leadsto \frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{\color{blue}{55.572073733743466}}{{x}^{2}}\right)} \]
      7. unpow287.7%

        \[\leadsto \frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{55.572073733743466}{\color{blue}{x \cdot x}}\right)} \]
    6. Simplified87.7%

      \[\leadsto \frac{x + -2}{\color{blue}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{55.572073733743466}{x \cdot x}\right)}} \]

    if -7.20000000000000018 < x < 115

    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. *-commutative99.6%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/99.6%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative99.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}} \]
      4. 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} \]
      5. 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} \]
    3. Simplified99.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.2 \lor \neg \left(x \leq 115\right):\\ \;\;\;\;\frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{55.572073733743466}{x \cdot x}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 + x \cdot \left(y \cdot 0.0212463641547976 - z \cdot 0.14147091005106402\right)\right)\\ \end{array} \]

Alternative 9: 90.3% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -36 \lor \neg \left(x \leq 320\right):\\ \;\;\;\;\frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{55.572073733743466}{x \cdot x}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(0.0212463641547976 \cdot \left(x \cdot y\right) + \frac{z}{47.066876606 + x \cdot 313.399215894}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= x -36.0) (not (<= x 320.0)))
   (/
    (+ x -2.0)
    (+
     (/ 5.86923874282773 x)
     (- 0.24013125253755718 (/ 55.572073733743466 (* x x)))))
   (*
    (+ x -2.0)
    (+
     (* 0.0212463641547976 (* x y))
     (/ z (+ 47.066876606 (* x 313.399215894)))))))
double code(double x, double y, double z) {
	double tmp;
	if ((x <= -36.0) || !(x <= 320.0)) {
		tmp = (x + -2.0) / ((5.86923874282773 / x) + (0.24013125253755718 - (55.572073733743466 / (x * x))));
	} else {
		tmp = (x + -2.0) * ((0.0212463641547976 * (x * y)) + (z / (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 <= 320.0d0))) then
        tmp = (x + (-2.0d0)) / ((5.86923874282773d0 / x) + (0.24013125253755718d0 - (55.572073733743466d0 / (x * x))))
    else
        tmp = (x + (-2.0d0)) * ((0.0212463641547976d0 * (x * y)) + (z / (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 <= 320.0)) {
		tmp = (x + -2.0) / ((5.86923874282773 / x) + (0.24013125253755718 - (55.572073733743466 / (x * x))));
	} else {
		tmp = (x + -2.0) * ((0.0212463641547976 * (x * y)) + (z / (47.066876606 + (x * 313.399215894))));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (x <= -36.0) or not (x <= 320.0):
		tmp = (x + -2.0) / ((5.86923874282773 / x) + (0.24013125253755718 - (55.572073733743466 / (x * x))))
	else:
		tmp = (x + -2.0) * ((0.0212463641547976 * (x * y)) + (z / (47.066876606 + (x * 313.399215894))))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((x <= -36.0) || !(x <= 320.0))
		tmp = Float64(Float64(x + -2.0) / Float64(Float64(5.86923874282773 / x) + Float64(0.24013125253755718 - Float64(55.572073733743466 / Float64(x * x)))));
	else
		tmp = Float64(Float64(x + -2.0) * Float64(Float64(0.0212463641547976 * Float64(x * y)) + Float64(z / 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 <= 320.0)))
		tmp = (x + -2.0) / ((5.86923874282773 / x) + (0.24013125253755718 - (55.572073733743466 / (x * x))));
	else
		tmp = (x + -2.0) * ((0.0212463641547976 * (x * y)) + (z / (47.066876606 + (x * 313.399215894))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[x, -36.0], N[Not[LessEqual[x, 320.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / N[(N[(5.86923874282773 / x), $MachinePrecision] + N[(0.24013125253755718 - N[(55.572073733743466 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(0.0212463641547976 * N[(x * y), $MachinePrecision]), $MachinePrecision] + N[(z / N[(47.066876606 + N[(x * 313.399215894), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


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

    1. Initial program 21.4%

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

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

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

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

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

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      6. fma-def28.1%

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      7. fma-def28.1%

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

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

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

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

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

      \[\leadsto \frac{x + -2}{\color{blue}{\left(0.24013125253755718 + 5.86923874282773 \cdot \frac{1}{x}\right) - 55.572073733743466 \cdot \frac{1}{{x}^{2}}}} \]
    5. Step-by-step derivation
      1. +-commutative87.7%

        \[\leadsto \frac{x + -2}{\color{blue}{\left(5.86923874282773 \cdot \frac{1}{x} + 0.24013125253755718\right)} - 55.572073733743466 \cdot \frac{1}{{x}^{2}}} \]
      2. associate--l+87.7%

        \[\leadsto \frac{x + -2}{\color{blue}{5.86923874282773 \cdot \frac{1}{x} + \left(0.24013125253755718 - 55.572073733743466 \cdot \frac{1}{{x}^{2}}\right)}} \]
      3. associate-*r/87.7%

        \[\leadsto \frac{x + -2}{\color{blue}{\frac{5.86923874282773 \cdot 1}{x}} + \left(0.24013125253755718 - 55.572073733743466 \cdot \frac{1}{{x}^{2}}\right)} \]
      4. metadata-eval87.7%

        \[\leadsto \frac{x + -2}{\frac{\color{blue}{5.86923874282773}}{x} + \left(0.24013125253755718 - 55.572073733743466 \cdot \frac{1}{{x}^{2}}\right)} \]
      5. associate-*r/87.7%

        \[\leadsto \frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \color{blue}{\frac{55.572073733743466 \cdot 1}{{x}^{2}}}\right)} \]
      6. metadata-eval87.7%

        \[\leadsto \frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{\color{blue}{55.572073733743466}}{{x}^{2}}\right)} \]
      7. unpow287.7%

        \[\leadsto \frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{55.572073733743466}{\color{blue}{x \cdot x}}\right)} \]
    6. Simplified87.7%

      \[\leadsto \frac{x + -2}{\color{blue}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{55.572073733743466}{x \cdot x}\right)}} \]

    if -36 < x < 320

    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. *-commutative99.6%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/99.6%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative99.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}} \]
      4. 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} \]
      5. 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} \]
    3. Simplified99.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -36 \lor \neg \left(x \leq 320\right):\\ \;\;\;\;\frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{55.572073733743466}{x \cdot x}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(0.0212463641547976 \cdot \left(x \cdot y\right) + \frac{z}{47.066876606 + x \cdot 313.399215894}\right)\\ \end{array} \]

Alternative 10: 89.9% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 21.4%

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

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

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

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

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

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      6. fma-def28.1%

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      7. fma-def28.1%

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

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

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

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

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

      \[\leadsto \frac{x + -2}{\color{blue}{\left(0.24013125253755718 + 5.86923874282773 \cdot \frac{1}{x}\right) - 55.572073733743466 \cdot \frac{1}{{x}^{2}}}} \]
    5. Step-by-step derivation
      1. +-commutative87.7%

        \[\leadsto \frac{x + -2}{\color{blue}{\left(5.86923874282773 \cdot \frac{1}{x} + 0.24013125253755718\right)} - 55.572073733743466 \cdot \frac{1}{{x}^{2}}} \]
      2. associate--l+87.7%

        \[\leadsto \frac{x + -2}{\color{blue}{5.86923874282773 \cdot \frac{1}{x} + \left(0.24013125253755718 - 55.572073733743466 \cdot \frac{1}{{x}^{2}}\right)}} \]
      3. associate-*r/87.7%

        \[\leadsto \frac{x + -2}{\color{blue}{\frac{5.86923874282773 \cdot 1}{x}} + \left(0.24013125253755718 - 55.572073733743466 \cdot \frac{1}{{x}^{2}}\right)} \]
      4. metadata-eval87.7%

        \[\leadsto \frac{x + -2}{\frac{\color{blue}{5.86923874282773}}{x} + \left(0.24013125253755718 - 55.572073733743466 \cdot \frac{1}{{x}^{2}}\right)} \]
      5. associate-*r/87.7%

        \[\leadsto \frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \color{blue}{\frac{55.572073733743466 \cdot 1}{{x}^{2}}}\right)} \]
      6. metadata-eval87.7%

        \[\leadsto \frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{\color{blue}{55.572073733743466}}{{x}^{2}}\right)} \]
      7. unpow287.7%

        \[\leadsto \frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{55.572073733743466}{\color{blue}{x \cdot x}}\right)} \]
    6. Simplified87.7%

      \[\leadsto \frac{x + -2}{\color{blue}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{55.572073733743466}{x \cdot x}\right)}} \]

    if -5.5 < x < 240

    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. *-commutative99.6%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/99.6%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative99.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}} \]
      4. 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} \]
      5. 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} \]
    3. Simplified99.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.5 \lor \neg \left(x \leq 240\right):\\ \;\;\;\;\frac{x + -2}{\frac{5.86923874282773}{x} + \left(0.24013125253755718 - \frac{55.572073733743466}{x \cdot x}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(0.0212463641547976 \cdot \left(x \cdot y\right) + z \cdot 0.0212463641547976\right)\\ \end{array} \]

Alternative 11: 89.9% accurate, 2.2× speedup?

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

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

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


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

    1. Initial program 21.4%

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

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

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

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

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

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      6. fma-def28.1%

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      7. fma-def28.1%

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

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

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

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

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

      \[\leadsto \frac{x + -2}{\color{blue}{0.24013125253755718 + 5.86923874282773 \cdot \frac{1}{x}}} \]
    5. Step-by-step derivation
      1. associate-*r/87.4%

        \[\leadsto \frac{x + -2}{0.24013125253755718 + \color{blue}{\frac{5.86923874282773 \cdot 1}{x}}} \]
      2. metadata-eval87.4%

        \[\leadsto \frac{x + -2}{0.24013125253755718 + \frac{\color{blue}{5.86923874282773}}{x}} \]
    6. Simplified87.4%

      \[\leadsto \frac{x + -2}{\color{blue}{0.24013125253755718 + \frac{5.86923874282773}{x}}} \]

    if -5.5 < x < 3500

    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. *-commutative99.6%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/99.6%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative99.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}} \]
      4. 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} \]
      5. 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} \]
    3. Simplified99.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.5 \lor \neg \left(x \leq 3500\right):\\ \;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\ \mathbf{else}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(0.0212463641547976 \cdot \left(x \cdot y\right) + z \cdot 0.0212463641547976\right)\\ \end{array} \]

Alternative 12: 77.6% accurate, 2.8× speedup?

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

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

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


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

    1. Initial program 23.4%

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

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

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

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

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

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      6. fma-def29.9%

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      7. fma-def29.9%

        \[\leadsto \frac{x + -2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}{\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)}}} \]
      8. fma-def29.9%

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

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

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

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

      \[\leadsto \frac{x + -2}{\color{blue}{0.24013125253755718 + 5.86923874282773 \cdot \frac{1}{x}}} \]
    5. Step-by-step derivation
      1. associate-*r/85.3%

        \[\leadsto \frac{x + -2}{0.24013125253755718 + \color{blue}{\frac{5.86923874282773 \cdot 1}{x}}} \]
      2. metadata-eval85.3%

        \[\leadsto \frac{x + -2}{0.24013125253755718 + \frac{\color{blue}{5.86923874282773}}{x}} \]
    6. Simplified85.3%

      \[\leadsto \frac{x + -2}{\color{blue}{0.24013125253755718 + \frac{5.86923874282773}{x}}} \]

    if -5.20000000000000018 < x < 0.409999999999999976

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

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

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

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

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

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      6. fma-def99.4%

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      7. fma-def99.4%

        \[\leadsto \frac{x + -2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}{\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)}}} \]
      8. fma-def99.4%

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

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

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

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

      \[\leadsto \frac{x + -2}{\color{blue}{\frac{47.066876606}{z}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification73.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.2 \lor \neg \left(x \leq 0.41\right):\\ \;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\ \end{array} \]

Alternative 13: 77.4% accurate, 3.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -900:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\

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

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


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

    1. Initial program 25.9%

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

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

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

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

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

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      6. fma-def34.6%

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      7. fma-def34.6%

        \[\leadsto \frac{x + -2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}{\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)}}} \]
      8. fma-def34.6%

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

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

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

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

      \[\leadsto \frac{x + -2}{\color{blue}{0.24013125253755718}} \]

    if -900 < x < 1950

    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. *-commutative99.6%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/99.6%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative99.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}} \]
      4. 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} \]
      5. 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} \]
    3. Simplified99.6%

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

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

    if 1950 < x

    1. Initial program 15.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. *-commutative15.0%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/19.0%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative19.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}} \]
      4. sub-neg19.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} \]
      5. metadata-eval19.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} \]
    3. Simplified19.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -900:\\ \;\;\;\;\frac{x + -2}{0.24013125253755718}\\ \mathbf{elif}\;x \leq 1950:\\ \;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\ \end{array} \]

Alternative 14: 77.4% accurate, 3.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -120:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\

\mathbf{elif}\;x \leq 650:\\
\;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\

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


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

    1. Initial program 25.9%

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

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

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

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

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

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      6. fma-def34.6%

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      7. fma-def34.6%

        \[\leadsto \frac{x + -2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}{\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)}}} \]
      8. fma-def34.6%

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

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

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

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

      \[\leadsto \frac{x + -2}{\color{blue}{0.24013125253755718}} \]

    if -120 < x < 650

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

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

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

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

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

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      6. fma-def99.4%

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      7. fma-def99.4%

        \[\leadsto \frac{x + -2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}{\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)}}} \]
      8. fma-def99.4%

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

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

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

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

      \[\leadsto \frac{x + -2}{\color{blue}{\frac{47.066876606}{z}}} \]

    if 650 < x

    1. Initial program 15.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. *-commutative15.0%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/19.0%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative19.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}} \]
      4. sub-neg19.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} \]
      5. metadata-eval19.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} \]
    3. Simplified19.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -120:\\ \;\;\;\;\frac{x + -2}{0.24013125253755718}\\ \mathbf{elif}\;x \leq 650:\\ \;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\ \end{array} \]

Alternative 15: 77.4% accurate, 4.0× speedup?

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

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

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


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

    1. Initial program 22.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. *-commutative22.1%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/28.7%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative28.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}} \]
      4. 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} \]
      5. 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} \]
    3. Simplified28.7%

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

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

    if -5.5 < x < 31

    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. *-commutative99.6%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/99.6%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative99.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}} \]
      4. 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} \]
      5. 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} \]
    3. Simplified99.6%

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

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

        \[\leadsto \color{blue}{z \cdot -0.0424927283095952} \]
    6. Simplified62.5%

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

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

Alternative 16: 77.4% accurate, 4.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\

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

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


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

    1. Initial program 25.9%

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

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

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

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

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

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      6. fma-def34.6%

        \[\leadsto \frac{x + -2}{\frac{\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)}{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}} \]
      7. fma-def34.6%

        \[\leadsto \frac{x + -2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}{\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)}}} \]
      8. fma-def34.6%

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

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

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

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

      \[\leadsto \frac{x + -2}{\color{blue}{0.24013125253755718}} \]

    if -5.5 < x < 30

    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. *-commutative99.6%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/99.6%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative99.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}} \]
      4. 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} \]
      5. 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} \]
    3. Simplified99.6%

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

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

        \[\leadsto \color{blue}{z \cdot -0.0424927283095952} \]
    6. Simplified62.5%

      \[\leadsto \color{blue}{z \cdot -0.0424927283095952} \]

    if 30 < x

    1. Initial program 16.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. *-commutative16.7%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/20.7%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative20.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}} \]
      4. sub-neg20.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} \]
      5. metadata-eval20.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} \]
    3. Simplified20.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.5:\\ \;\;\;\;\frac{x + -2}{0.24013125253755718}\\ \mathbf{elif}\;x \leq 30:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\ \end{array} \]

Alternative 17: 77.2% accurate, 5.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -5.5:\\ \;\;\;\;x \cdot 4.16438922228\\ \mathbf{elif}\;x \leq 0.01:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x -5.5)
   (* x 4.16438922228)
   (if (<= x 0.01) (* z -0.0424927283095952) (* x 4.16438922228))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= -5.5) {
		tmp = x * 4.16438922228;
	} else if (x <= 0.01) {
		tmp = z * -0.0424927283095952;
	} else {
		tmp = x * 4.16438922228;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (x <= (-5.5d0)) then
        tmp = x * 4.16438922228d0
    else if (x <= 0.01d0) then
        tmp = z * (-0.0424927283095952d0)
    else
        tmp = x * 4.16438922228d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= -5.5) {
		tmp = x * 4.16438922228;
	} else if (x <= 0.01) {
		tmp = z * -0.0424927283095952;
	} else {
		tmp = x * 4.16438922228;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= -5.5:
		tmp = x * 4.16438922228
	elif x <= 0.01:
		tmp = z * -0.0424927283095952
	else:
		tmp = x * 4.16438922228
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= -5.5)
		tmp = Float64(x * 4.16438922228);
	elseif (x <= 0.01)
		tmp = Float64(z * -0.0424927283095952);
	else
		tmp = Float64(x * 4.16438922228);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= -5.5)
		tmp = x * 4.16438922228;
	elseif (x <= 0.01)
		tmp = z * -0.0424927283095952;
	else
		tmp = x * 4.16438922228;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, -5.5], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 0.01], N[(z * -0.0424927283095952), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 24.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. *-commutative24.0%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/30.5%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative30.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}} \]
      4. sub-neg30.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} \]
      5. metadata-eval30.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} \]
    3. Simplified30.5%

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

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(\left(4.16438922228 + 3451.550173699799 \cdot \frac{1}{{x}^{2}}\right) - 101.7851458539211 \cdot \frac{1}{x}\right)} \]
    5. Step-by-step derivation
      1. associate--l+84.4%

        \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 + \left(3451.550173699799 \cdot \frac{1}{{x}^{2}} - 101.7851458539211 \cdot \frac{1}{x}\right)\right)} \]
      2. associate-*r/84.4%

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

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

        \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 + \left(\frac{3451.550173699799}{\color{blue}{x \cdot x}} - 101.7851458539211 \cdot \frac{1}{x}\right)\right) \]
      5. associate-*r/84.4%

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

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

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 + \left(\frac{3451.550173699799}{x \cdot x} - \frac{101.7851458539211}{x}\right)\right)} \]
    7. Taylor expanded in x around inf 83.4%

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

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

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

    if -5.5 < x < 0.0100000000000000002

    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. *-commutative99.6%

        \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
      2. associate-*l/99.6%

        \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
      3. *-commutative99.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}} \]
      4. 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} \]
      5. 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} \]
    3. Simplified99.6%

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

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

        \[\leadsto \color{blue}{z \cdot -0.0424927283095952} \]
    6. Simplified63.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.5:\\ \;\;\;\;x \cdot 4.16438922228\\ \mathbf{elif}\;x \leq 0.01:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \]

Alternative 18: 44.8% 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 65.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. *-commutative65.1%

      \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. associate-*l/68.0%

      \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
    3. *-commutative68.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}} \]
    4. sub-neg68.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} \]
    5. metadata-eval68.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} \]
  3. Simplified68.0%

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

    \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(\left(4.16438922228 + 3451.550173699799 \cdot \frac{1}{{x}^{2}}\right) - 101.7851458539211 \cdot \frac{1}{x}\right)} \]
  5. Step-by-step derivation
    1. associate--l+39.9%

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 + \left(3451.550173699799 \cdot \frac{1}{{x}^{2}} - 101.7851458539211 \cdot \frac{1}{x}\right)\right)} \]
    2. associate-*r/39.9%

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

      \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 + \left(\frac{\color{blue}{3451.550173699799}}{{x}^{2}} - 101.7851458539211 \cdot \frac{1}{x}\right)\right) \]
    4. unpow239.9%

      \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 + \left(\frac{3451.550173699799}{\color{blue}{x \cdot x}} - 101.7851458539211 \cdot \frac{1}{x}\right)\right) \]
    5. associate-*r/39.9%

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

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

    \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 + \left(\frac{3451.550173699799}{x \cdot x} - \frac{101.7851458539211}{x}\right)\right)} \]
  7. Taylor expanded in x around inf 39.9%

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

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

    \[\leadsto \color{blue}{x \cdot 4.16438922228} \]
  10. Final simplification39.9%

    \[\leadsto x \cdot 4.16438922228 \]

Alternative 19: 3.3% accurate, 37.0× speedup?

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

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

      \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    2. associate-*l/68.0%

      \[\leadsto \color{blue}{\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} \cdot \left(x - 2\right)} \]
    3. *-commutative68.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}} \]
    4. sub-neg68.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} \]
    5. metadata-eval68.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} \]
  3. Simplified68.0%

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

    \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(\left(4.16438922228 + 3451.550173699799 \cdot \frac{1}{{x}^{2}}\right) - 101.7851458539211 \cdot \frac{1}{x}\right)} \]
  5. Step-by-step derivation
    1. associate--l+39.9%

      \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 + \left(3451.550173699799 \cdot \frac{1}{{x}^{2}} - 101.7851458539211 \cdot \frac{1}{x}\right)\right)} \]
    2. associate-*r/39.9%

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

      \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 + \left(\frac{\color{blue}{3451.550173699799}}{{x}^{2}} - 101.7851458539211 \cdot \frac{1}{x}\right)\right) \]
    4. unpow239.9%

      \[\leadsto \left(x + -2\right) \cdot \left(4.16438922228 + \left(\frac{3451.550173699799}{\color{blue}{x \cdot x}} - 101.7851458539211 \cdot \frac{1}{x}\right)\right) \]
    5. associate-*r/39.9%

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

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

    \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(4.16438922228 + \left(\frac{3451.550173699799}{x \cdot x} - \frac{101.7851458539211}{x}\right)\right)} \]
  7. Taylor expanded in x around 0 3.0%

    \[\leadsto \color{blue}{3655.1204654076414 \cdot \frac{1}{x} - \left(110.1139242984811 + 6903.100347399598 \cdot \frac{1}{{x}^{2}}\right)} \]
  8. Step-by-step derivation
    1. associate-*r/3.0%

      \[\leadsto \color{blue}{\frac{3655.1204654076414 \cdot 1}{x}} - \left(110.1139242984811 + 6903.100347399598 \cdot \frac{1}{{x}^{2}}\right) \]
    2. metadata-eval3.0%

      \[\leadsto \frac{\color{blue}{3655.1204654076414}}{x} - \left(110.1139242984811 + 6903.100347399598 \cdot \frac{1}{{x}^{2}}\right) \]
    3. +-commutative3.0%

      \[\leadsto \frac{3655.1204654076414}{x} - \color{blue}{\left(6903.100347399598 \cdot \frac{1}{{x}^{2}} + 110.1139242984811\right)} \]
    4. associate-*r/3.0%

      \[\leadsto \frac{3655.1204654076414}{x} - \left(\color{blue}{\frac{6903.100347399598 \cdot 1}{{x}^{2}}} + 110.1139242984811\right) \]
    5. metadata-eval3.0%

      \[\leadsto \frac{3655.1204654076414}{x} - \left(\frac{\color{blue}{6903.100347399598}}{{x}^{2}} + 110.1139242984811\right) \]
    6. unpow23.0%

      \[\leadsto \frac{3655.1204654076414}{x} - \left(\frac{6903.100347399598}{\color{blue}{x \cdot x}} + 110.1139242984811\right) \]
  9. Simplified3.0%

    \[\leadsto \color{blue}{\frac{3655.1204654076414}{x} - \left(\frac{6903.100347399598}{x \cdot x} + 110.1139242984811\right)} \]
  10. Taylor expanded in x around inf 3.5%

    \[\leadsto \color{blue}{-110.1139242984811} \]
  11. Final simplification3.5%

    \[\leadsto -110.1139242984811 \]

Developer target: 98.7% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023279 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, C"
  :precision binary64

  :herbie-target
  (if (< x -3.326128725870005e+62) (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811) (if (< x 9.429991714554673e+55) (* (/ (- x 2.0) 1.0) (/ (+ (* (+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y) x) z) (+ (* (+ (+ (* 263.505074721 x) (+ (* 43.3400022514 (* x x)) (* x (* x x)))) 313.399215894) x) 47.066876606))) (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811)))

  (/ (* (- x 2.0) (+ (* (+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y) x) z)) (+ (* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x) 47.066876606)))