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

Percentage Accurate: 58.1% → 98.6%
Time: 20.2s
Alternatives: 25
Speedup: 2.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 25 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.1% accurate, 1.0× speedup?

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

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

Alternative 1: 98.6% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 90.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*N/A

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified98.8%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing

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

    1. Initial program 0.0%

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

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified0.0%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \color{blue}{\left(\frac{104109730557}{25000000000} + -1 \cdot \frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{104109730557}{25000000000} + \left(\mathsf{neg}\left(\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)\right)\right)\right) \]
      2. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{104109730557}{25000000000} - \color{blue}{\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{\_.f64}\left(\frac{104109730557}{25000000000}, \color{blue}{\left(\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{\_.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\left(\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}\right), \color{blue}{x}\right)\right)\right) \]
    7. Simplified99.0%

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

    \[\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\ \mathbf{else}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 96.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot x\right)\\
\mathbf{if}\;x \leq -4.7 \cdot 10^{+32}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\

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

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


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

    1. Initial program 5.5%

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

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified15.2%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \color{blue}{\left(\frac{104109730557}{25000000000} + -1 \cdot \frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{104109730557}{25000000000} + \left(\mathsf{neg}\left(\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)\right)\right)\right) \]
      2. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{104109730557}{25000000000} - \color{blue}{\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{\_.f64}\left(\frac{104109730557}{25000000000}, \color{blue}{\left(\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{\_.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\left(\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}\right), \color{blue}{x}\right)\right)\right) \]
    7. Simplified99.0%

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

    if -4.70000000000000023e32 < x < 4.25e8

    1. Initial program 98.8%

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

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Applied egg-rr99.4%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right)\right), \frac{263505074721}{1000000000}\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\color{blue}{\left(\frac{4297481763}{31250000} \cdot x\right)}, y\right)\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right)\right), \frac{263505074721}{1000000000}\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(x \cdot \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
      2. *-lowering-*.f6496.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right)\right), \frac{263505074721}{1000000000}\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
    8. Simplified96.8%

      \[\leadsto \left(x + -2\right) \cdot \frac{1}{\frac{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}{z + x \cdot \left(\color{blue}{x \cdot 137.519416416} + y\right)}} \]
    9. Step-by-step derivation
      1. un-div-invN/A

        \[\leadsto \frac{x + -2}{\color{blue}{\frac{x \cdot \left(x \cdot \left(x \cdot \left(x + \frac{216700011257}{5000000000}\right) + \frac{263505074721}{1000000000}\right) + \frac{156699607947}{500000000}\right) + \frac{23533438303}{500000000}}{z + x \cdot \left(x \cdot \frac{4297481763}{31250000} + y\right)}}} \]
      2. clear-numN/A

        \[\leadsto \frac{1}{\color{blue}{\frac{\frac{x \cdot \left(x \cdot \left(x \cdot \left(x + \frac{216700011257}{5000000000}\right) + \frac{263505074721}{1000000000}\right) + \frac{156699607947}{500000000}\right) + \frac{23533438303}{500000000}}{z + x \cdot \left(x \cdot \frac{4297481763}{31250000} + y\right)}}{x + -2}}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{\frac{x \cdot \left(x \cdot \left(x \cdot \left(x + \frac{216700011257}{5000000000}\right) + \frac{263505074721}{1000000000}\right) + \frac{156699607947}{500000000}\right) + \frac{23533438303}{500000000}}{z + x \cdot \left(x \cdot \frac{4297481763}{31250000} + y\right)}}{x + -2}\right)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{\frac{x \cdot \left(x \cdot \left(x \cdot \left(x + \frac{216700011257}{5000000000}\right) + \frac{263505074721}{1000000000}\right) + \frac{156699607947}{500000000}\right) + \frac{23533438303}{500000000}}{z + x \cdot \left(x \cdot \frac{4297481763}{31250000} + y\right)}}{x + \left(\mathsf{neg}\left(2\right)\right)}\right)\right) \]
      5. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{\frac{x \cdot \left(x \cdot \left(x \cdot \left(x + \frac{216700011257}{5000000000}\right) + \frac{263505074721}{1000000000}\right) + \frac{156699607947}{500000000}\right) + \frac{23533438303}{500000000}}{z + x \cdot \left(x \cdot \frac{4297481763}{31250000} + y\right)}}{x - \color{blue}{2}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{x \cdot \left(x \cdot \left(x \cdot \left(x + \frac{216700011257}{5000000000}\right) + \frac{263505074721}{1000000000}\right) + \frac{156699607947}{500000000}\right) + \frac{23533438303}{500000000}}{z + x \cdot \left(x \cdot \frac{4297481763}{31250000} + y\right)}\right), \color{blue}{\left(x - 2\right)}\right)\right) \]
    10. Applied egg-rr96.8%

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

    if 4.25e8 < x

    1. Initial program 17.3%

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

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified26.0%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(\left(\frac{104109730557}{25000000000} + \left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{{x}^{2}} + \frac{y}{{x}^{3}}\right)\right) - \left(\frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{{x}^{3}}\right)\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\left(\frac{104109730557}{25000000000} + \left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{{x}^{2}} + \frac{y}{{x}^{3}}\right)\right) - \left(\frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{{x}^{3}}\right)\right)}\right) \]
      2. associate--r+N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(\frac{104109730557}{25000000000} + \left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{{x}^{2}} + \frac{y}{{x}^{3}}\right)\right) - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right) - \color{blue}{\frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{{x}^{3}}}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\left(\left(\frac{104109730557}{25000000000} + \left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{{x}^{2}} + \frac{y}{{x}^{3}}\right)\right) - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right), \color{blue}{\left(\frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{{x}^{3}}\right)}\right)\right) \]
    7. Simplified94.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.7 \cdot 10^{+32}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\ \mathbf{elif}\;x \leq 425000000:\\ \;\;\;\;\frac{1}{\frac{\frac{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}{z + x \cdot \left(y + x \cdot 137.519416416\right)}}{x + -2}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(\left(4.16438922228 + \frac{3655.1204654076414}{x \cdot x}\right) + \left(\frac{y}{x \cdot \left(x \cdot x\right)} + \frac{-110.1139242984811}{x}\right)\right) - \frac{130977.50649958357}{x \cdot \left(x \cdot x\right)}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 96.3% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot x\right)\\
\mathbf{if}\;x \leq -5.8 \cdot 10^{+34}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\

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

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


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

    1. Initial program 5.5%

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

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified15.2%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \color{blue}{\left(\frac{104109730557}{25000000000} + -1 \cdot \frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{104109730557}{25000000000} + \left(\mathsf{neg}\left(\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)\right)\right)\right) \]
      2. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{104109730557}{25000000000} - \color{blue}{\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{\_.f64}\left(\frac{104109730557}{25000000000}, \color{blue}{\left(\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{\_.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\left(\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}\right), \color{blue}{x}\right)\right)\right) \]
    7. Simplified99.0%

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

    if -5.8000000000000003e34 < x < 3.9e8

    1. Initial program 98.8%

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

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Applied egg-rr99.4%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right)\right), \frac{263505074721}{1000000000}\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\color{blue}{\left(\frac{4297481763}{31250000} \cdot x\right)}, y\right)\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right)\right), \frac{263505074721}{1000000000}\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(x \cdot \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
      2. *-lowering-*.f6496.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right)\right), \frac{263505074721}{1000000000}\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
    8. Simplified96.8%

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

    if 3.9e8 < x

    1. Initial program 17.3%

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

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified26.0%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(\left(\frac{104109730557}{25000000000} + \left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{{x}^{2}} + \frac{y}{{x}^{3}}\right)\right) - \left(\frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{{x}^{3}}\right)\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\left(\frac{104109730557}{25000000000} + \left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{{x}^{2}} + \frac{y}{{x}^{3}}\right)\right) - \left(\frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{{x}^{3}}\right)\right)}\right) \]
      2. associate--r+N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(\frac{104109730557}{25000000000} + \left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{{x}^{2}} + \frac{y}{{x}^{3}}\right)\right) - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right) - \color{blue}{\frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{{x}^{3}}}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\left(\left(\frac{104109730557}{25000000000} + \left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{{x}^{2}} + \frac{y}{{x}^{3}}\right)\right) - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right), \color{blue}{\left(\frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{{x}^{3}}\right)}\right)\right) \]
    7. Simplified94.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.8 \cdot 10^{+34}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\ \mathbf{elif}\;x \leq 390000000:\\ \;\;\;\;\left(x + -2\right) \cdot \frac{1}{\frac{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}{z + x \cdot \left(y + x \cdot 137.519416416\right)}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(\left(4.16438922228 + \frac{3655.1204654076414}{x \cdot x}\right) + \left(\frac{y}{x \cdot \left(x \cdot x\right)} + \frac{-110.1139242984811}{x}\right)\right) - \frac{130977.50649958357}{x \cdot \left(x \cdot x\right)}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 96.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \left(x \cdot x\right)\\ \mathbf{if}\;x \leq -2.8 \cdot 10^{+32}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\ \mathbf{elif}\;x \leq 410000000:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(\left(4.16438922228 + \frac{3655.1204654076414}{x \cdot x}\right) + \left(\frac{y}{t\_0} + \frac{-110.1139242984811}{x}\right)\right) - \frac{130977.50649958357}{t\_0}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (* x (* x x))))
   (if (<= x -2.8e+32)
     (*
      (+ x -2.0)
      (+
       4.16438922228
       (/
        (-
         (/ (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) x)
         101.7851458539211)
        x)))
     (if (<= x 410000000.0)
       (/
        (* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
        (+
         (*
          x
          (+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
         47.066876606))
       (*
        x
        (-
         (+
          (+ 4.16438922228 (/ 3655.1204654076414 (* x x)))
          (+ (/ y t_0) (/ -110.1139242984811 x)))
         (/ 130977.50649958357 t_0)))))))
double code(double x, double y, double z) {
	double t_0 = x * (x * x);
	double tmp;
	if (x <= -2.8e+32) {
		tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
	} else if (x <= 410000000.0) {
		tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
	} else {
		tmp = x * (((4.16438922228 + (3655.1204654076414 / (x * x))) + ((y / t_0) + (-110.1139242984811 / x))) - (130977.50649958357 / t_0));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x * (x * x)
    if (x <= (-2.8d+32)) then
        tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) / x) - 101.7851458539211d0) / x))
    else if (x <= 410000000.0d0) then
        tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
    else
        tmp = x * (((4.16438922228d0 + (3655.1204654076414d0 / (x * x))) + ((y / t_0) + ((-110.1139242984811d0) / x))) - (130977.50649958357d0 / t_0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = x * (x * x);
	double tmp;
	if (x <= -2.8e+32) {
		tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
	} else if (x <= 410000000.0) {
		tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
	} else {
		tmp = x * (((4.16438922228 + (3655.1204654076414 / (x * x))) + ((y / t_0) + (-110.1139242984811 / x))) - (130977.50649958357 / t_0));
	}
	return tmp;
}
def code(x, y, z):
	t_0 = x * (x * x)
	tmp = 0
	if x <= -2.8e+32:
		tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x))
	elif x <= 410000000.0:
		tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)
	else:
		tmp = x * (((4.16438922228 + (3655.1204654076414 / (x * x))) + ((y / t_0) + (-110.1139242984811 / x))) - (130977.50649958357 / t_0))
	return tmp
function code(x, y, z)
	t_0 = Float64(x * Float64(x * x))
	tmp = 0.0
	if (x <= -2.8e+32)
		tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)));
	elseif (x <= 410000000.0)
		tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606));
	else
		tmp = Float64(x * Float64(Float64(Float64(4.16438922228 + Float64(3655.1204654076414 / Float64(x * x))) + Float64(Float64(y / t_0) + Float64(-110.1139242984811 / x))) - Float64(130977.50649958357 / t_0)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = x * (x * x);
	tmp = 0.0;
	if (x <= -2.8e+32)
		tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
	elseif (x <= 410000000.0)
		tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
	else
		tmp = x * (((4.16438922228 + (3655.1204654076414 / (x * x))) + ((y / t_0) + (-110.1139242984811 / x))) - (130977.50649958357 / t_0));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.8e+32], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 410000000.0], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(4.16438922228 + N[(3655.1204654076414 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / t$95$0), $MachinePrecision] + N[(-110.1139242984811 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(130977.50649958357 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot x\right)\\
\mathbf{if}\;x \leq -2.8 \cdot 10^{+32}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\

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

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


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

    1. Initial program 5.5%

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

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified15.2%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \color{blue}{\left(\frac{104109730557}{25000000000} + -1 \cdot \frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{104109730557}{25000000000} + \left(\mathsf{neg}\left(\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)\right)\right)\right) \]
      2. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{104109730557}{25000000000} - \color{blue}{\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{\_.f64}\left(\frac{104109730557}{25000000000}, \color{blue}{\left(\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{\_.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\left(\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}\right), \color{blue}{x}\right)\right)\right) \]
    7. Simplified99.0%

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

    if -2.8e32 < x < 4.1e8

    1. Initial program 98.8%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\color{blue}{\left(\frac{4297481763}{31250000} \cdot x\right)}, y\right), x\right), z\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(x \cdot \frac{4297481763}{31250000}\right), y\right), x\right), z\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      2. *-lowering-*.f6496.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{4297481763}{31250000}\right), y\right), x\right), z\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
    5. Simplified96.2%

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

    if 4.1e8 < x

    1. Initial program 17.3%

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

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified26.0%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(\left(\frac{104109730557}{25000000000} + \left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{{x}^{2}} + \frac{y}{{x}^{3}}\right)\right) - \left(\frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{{x}^{3}}\right)\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\left(\frac{104109730557}{25000000000} + \left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{{x}^{2}} + \frac{y}{{x}^{3}}\right)\right) - \left(\frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{{x}^{3}}\right)\right)}\right) \]
      2. associate--r+N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(\frac{104109730557}{25000000000} + \left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{{x}^{2}} + \frac{y}{{x}^{3}}\right)\right) - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right) - \color{blue}{\frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{{x}^{3}}}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\left(\left(\frac{104109730557}{25000000000} + \left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{{x}^{2}} + \frac{y}{{x}^{3}}\right)\right) - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right), \color{blue}{\left(\frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{{x}^{3}}\right)}\right)\right) \]
    7. Simplified94.1%

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

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

Alternative 5: 95.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \left(x \cdot x\right)\\ \mathbf{if}\;x \leq -2.8 \cdot 10^{+32}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\ \mathbf{elif}\;x \leq 1600000:\\ \;\;\;\;\left(x + -2\right) \cdot \frac{1}{\frac{47.066876606 + x \cdot \left(313.399215894 + t\_0\right)}{z + x \cdot \left(y + x \cdot 137.519416416\right)}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(\left(4.16438922228 + \frac{3655.1204654076414}{x \cdot x}\right) + \left(\frac{y}{t\_0} + \frac{-110.1139242984811}{x}\right)\right) - \frac{130977.50649958357}{t\_0}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (* x (* x x))))
   (if (<= x -2.8e+32)
     (*
      (+ x -2.0)
      (+
       4.16438922228
       (/
        (-
         (/ (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) x)
         101.7851458539211)
        x)))
     (if (<= x 1600000.0)
       (*
        (+ x -2.0)
        (/
         1.0
         (/
          (+ 47.066876606 (* x (+ 313.399215894 t_0)))
          (+ z (* x (+ y (* x 137.519416416)))))))
       (*
        x
        (-
         (+
          (+ 4.16438922228 (/ 3655.1204654076414 (* x x)))
          (+ (/ y t_0) (/ -110.1139242984811 x)))
         (/ 130977.50649958357 t_0)))))))
double code(double x, double y, double z) {
	double t_0 = x * (x * x);
	double tmp;
	if (x <= -2.8e+32) {
		tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
	} else if (x <= 1600000.0) {
		tmp = (x + -2.0) * (1.0 / ((47.066876606 + (x * (313.399215894 + t_0))) / (z + (x * (y + (x * 137.519416416))))));
	} else {
		tmp = x * (((4.16438922228 + (3655.1204654076414 / (x * x))) + ((y / t_0) + (-110.1139242984811 / x))) - (130977.50649958357 / t_0));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x * (x * x)
    if (x <= (-2.8d+32)) then
        tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) / x) - 101.7851458539211d0) / x))
    else if (x <= 1600000.0d0) then
        tmp = (x + (-2.0d0)) * (1.0d0 / ((47.066876606d0 + (x * (313.399215894d0 + t_0))) / (z + (x * (y + (x * 137.519416416d0))))))
    else
        tmp = x * (((4.16438922228d0 + (3655.1204654076414d0 / (x * x))) + ((y / t_0) + ((-110.1139242984811d0) / x))) - (130977.50649958357d0 / t_0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = x * (x * x);
	double tmp;
	if (x <= -2.8e+32) {
		tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
	} else if (x <= 1600000.0) {
		tmp = (x + -2.0) * (1.0 / ((47.066876606 + (x * (313.399215894 + t_0))) / (z + (x * (y + (x * 137.519416416))))));
	} else {
		tmp = x * (((4.16438922228 + (3655.1204654076414 / (x * x))) + ((y / t_0) + (-110.1139242984811 / x))) - (130977.50649958357 / t_0));
	}
	return tmp;
}
def code(x, y, z):
	t_0 = x * (x * x)
	tmp = 0
	if x <= -2.8e+32:
		tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x))
	elif x <= 1600000.0:
		tmp = (x + -2.0) * (1.0 / ((47.066876606 + (x * (313.399215894 + t_0))) / (z + (x * (y + (x * 137.519416416))))))
	else:
		tmp = x * (((4.16438922228 + (3655.1204654076414 / (x * x))) + ((y / t_0) + (-110.1139242984811 / x))) - (130977.50649958357 / t_0))
	return tmp
function code(x, y, z)
	t_0 = Float64(x * Float64(x * x))
	tmp = 0.0
	if (x <= -2.8e+32)
		tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)));
	elseif (x <= 1600000.0)
		tmp = Float64(Float64(x + -2.0) * Float64(1.0 / Float64(Float64(47.066876606 + Float64(x * Float64(313.399215894 + t_0))) / Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416)))))));
	else
		tmp = Float64(x * Float64(Float64(Float64(4.16438922228 + Float64(3655.1204654076414 / Float64(x * x))) + Float64(Float64(y / t_0) + Float64(-110.1139242984811 / x))) - Float64(130977.50649958357 / t_0)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = x * (x * x);
	tmp = 0.0;
	if (x <= -2.8e+32)
		tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
	elseif (x <= 1600000.0)
		tmp = (x + -2.0) * (1.0 / ((47.066876606 + (x * (313.399215894 + t_0))) / (z + (x * (y + (x * 137.519416416))))));
	else
		tmp = x * (((4.16438922228 + (3655.1204654076414 / (x * x))) + ((y / t_0) + (-110.1139242984811 / x))) - (130977.50649958357 / t_0));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.8e+32], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1600000.0], N[(N[(x + -2.0), $MachinePrecision] * N[(1.0 / N[(N[(47.066876606 + N[(x * N[(313.399215894 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(4.16438922228 + N[(3655.1204654076414 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / t$95$0), $MachinePrecision] + N[(-110.1139242984811 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(130977.50649958357 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot x\right)\\
\mathbf{if}\;x \leq -2.8 \cdot 10^{+32}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\

\mathbf{elif}\;x \leq 1600000:\\
\;\;\;\;\left(x + -2\right) \cdot \frac{1}{\frac{47.066876606 + x \cdot \left(313.399215894 + t\_0\right)}{z + x \cdot \left(y + x \cdot 137.519416416\right)}}\\

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


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

    1. Initial program 5.5%

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

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified15.2%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \color{blue}{\left(\frac{104109730557}{25000000000} + -1 \cdot \frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{104109730557}{25000000000} + \left(\mathsf{neg}\left(\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)\right)\right)\right) \]
      2. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{104109730557}{25000000000} - \color{blue}{\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{\_.f64}\left(\frac{104109730557}{25000000000}, \color{blue}{\left(\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{\_.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\left(\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}\right), \color{blue}{x}\right)\right)\right) \]
    7. Simplified99.0%

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

    if -2.8e32 < x < 1.6e6

    1. Initial program 98.8%

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

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Applied egg-rr99.4%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right)\right), \frac{263505074721}{1000000000}\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\color{blue}{\left(\frac{4297481763}{31250000} \cdot x\right)}, y\right)\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right)\right), \frac{263505074721}{1000000000}\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(x \cdot \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
      2. *-lowering-*.f6496.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right)\right), \frac{263505074721}{1000000000}\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
    8. Simplified96.8%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\color{blue}{\left({x}^{3}\right)}, \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
    10. Step-by-step derivation
      1. cube-multN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(x \cdot \left(x \cdot x\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(x \cdot {x}^{2}\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left({x}^{2}\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot x\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f6492.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
    11. Simplified92.7%

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

    if 1.6e6 < x

    1. Initial program 17.3%

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

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified26.0%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(\left(\frac{104109730557}{25000000000} + \left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{{x}^{2}} + \frac{y}{{x}^{3}}\right)\right) - \left(\frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{{x}^{3}}\right)\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\left(\frac{104109730557}{25000000000} + \left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{{x}^{2}} + \frac{y}{{x}^{3}}\right)\right) - \left(\frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{{x}^{3}}\right)\right)}\right) \]
      2. associate--r+N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(\frac{104109730557}{25000000000} + \left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{{x}^{2}} + \frac{y}{{x}^{3}}\right)\right) - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right) - \color{blue}{\frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{{x}^{3}}}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\left(\left(\frac{104109730557}{25000000000} + \left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{{x}^{2}} + \frac{y}{{x}^{3}}\right)\right) - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right), \color{blue}{\left(\frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{{x}^{3}}\right)}\right)\right) \]
    7. Simplified94.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.8 \cdot 10^{+32}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\ \mathbf{elif}\;x \leq 1600000:\\ \;\;\;\;\left(x + -2\right) \cdot \frac{1}{\frac{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(x \cdot x\right)\right)}{z + x \cdot \left(y + x \cdot 137.519416416\right)}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(\left(4.16438922228 + \frac{3655.1204654076414}{x \cdot x}\right) + \left(\frac{y}{x \cdot \left(x \cdot x\right)} + \frac{-110.1139242984811}{x}\right)\right) - \frac{130977.50649958357}{x \cdot \left(x \cdot x\right)}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 95.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\mathbf{if}\;x \leq -2.95 \cdot 10^{+32}:\\
\;\;\;\;t\_0\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.94999999999999983e32 or 1.52e6 < x

    1. Initial program 12.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*N/A

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified21.3%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \color{blue}{\left(\frac{104109730557}{25000000000} + -1 \cdot \frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{104109730557}{25000000000} + \left(\mathsf{neg}\left(\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)\right)\right)\right) \]
      2. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{104109730557}{25000000000} - \color{blue}{\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{\_.f64}\left(\frac{104109730557}{25000000000}, \color{blue}{\left(\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{\_.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\left(\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}\right), \color{blue}{x}\right)\right)\right) \]
    7. Simplified96.2%

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

    if -2.94999999999999983e32 < x < 1.52e6

    1. Initial program 98.8%

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

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Applied egg-rr99.4%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right)\right), \frac{263505074721}{1000000000}\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\color{blue}{\left(\frac{4297481763}{31250000} \cdot x\right)}, y\right)\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right)\right), \frac{263505074721}{1000000000}\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(x \cdot \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
      2. *-lowering-*.f6496.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right)\right), \frac{263505074721}{1000000000}\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
    8. Simplified96.8%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\color{blue}{\left({x}^{3}\right)}, \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
    10. Step-by-step derivation
      1. cube-multN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(x \cdot \left(x \cdot x\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(x \cdot {x}^{2}\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left({x}^{2}\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot x\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f6492.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
    11. Simplified92.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.95 \cdot 10^{+32}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\ \mathbf{elif}\;x \leq 1520000:\\ \;\;\;\;\left(x + -2\right) \cdot \frac{1}{\frac{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(x \cdot x\right)\right)}{z + x \cdot \left(y + x \cdot 137.519416416\right)}}\\ \mathbf{else}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 93.7% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\ \mathbf{if}\;x \leq -2.8 \cdot 10^{+32}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 245000000:\\ \;\;\;\;\left(z + x \cdot y\right) \cdot \frac{x + -2}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0
         (*
          (+ x -2.0)
          (+
           4.16438922228
           (/
            (-
             (/ (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) x)
             101.7851458539211)
            x)))))
   (if (<= x -2.8e+32)
     t_0
     (if (<= x 245000000.0)
       (*
        (+ z (* x y))
        (/
         (+ x -2.0)
         (+
          (*
           x
           (+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
          47.066876606)))
       t_0))))
double code(double x, double y, double z) {
	double t_0 = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
	double tmp;
	if (x <= -2.8e+32) {
		tmp = t_0;
	} else if (x <= 245000000.0) {
		tmp = (z + (x * y)) * ((x + -2.0) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 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 = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) / x) - 101.7851458539211d0) / x))
    if (x <= (-2.8d+32)) then
        tmp = t_0
    else if (x <= 245000000.0d0) then
        tmp = (z + (x * y)) * ((x + (-2.0d0)) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 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 = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
	double tmp;
	if (x <= -2.8e+32) {
		tmp = t_0;
	} else if (x <= 245000000.0) {
		tmp = (z + (x * y)) * ((x + -2.0) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x))
	tmp = 0
	if x <= -2.8e+32:
		tmp = t_0
	elif x <= 245000000.0:
		tmp = (z + (x * y)) * ((x + -2.0) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606))
	else:
		tmp = t_0
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)))
	tmp = 0.0
	if (x <= -2.8e+32)
		tmp = t_0;
	elseif (x <= 245000000.0)
		tmp = Float64(Float64(z + Float64(x * y)) * Float64(Float64(x + -2.0) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
	tmp = 0.0;
	if (x <= -2.8e+32)
		tmp = t_0;
	elseif (x <= 245000000.0)
		tmp = (z + (x * y)) * ((x + -2.0) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.8e+32], t$95$0, If[LessEqual[x, 245000000.0], N[(N[(z + N[(x * y), $MachinePrecision]), $MachinePrecision] * N[(N[(x + -2.0), $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]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\mathbf{if}\;x \leq -2.8 \cdot 10^{+32}:\\
\;\;\;\;t\_0\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.8e32 or 2.45e8 < x

    1. Initial program 12.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*N/A

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified21.3%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \color{blue}{\left(\frac{104109730557}{25000000000} + -1 \cdot \frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{104109730557}{25000000000} + \left(\mathsf{neg}\left(\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)\right)\right)\right) \]
      2. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{104109730557}{25000000000} - \color{blue}{\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{\_.f64}\left(\frac{104109730557}{25000000000}, \color{blue}{\left(\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{\_.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\left(\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}\right), \color{blue}{x}\right)\right)\right) \]
    7. Simplified96.2%

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

    if -2.8e32 < x < 2.45e8

    1. Initial program 98.8%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \color{blue}{\left(z + x \cdot y\right)}\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
    4. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \left(x \cdot y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), \color{blue}{x}\right), \frac{23533438303}{500000000}\right)\right) \]
      2. *-lowering-*.f6491.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
    5. Simplified91.0%

      \[\leadsto \frac{\left(x - 2\right) \cdot \color{blue}{\left(z + x \cdot y\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    6. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \frac{\left(x + \left(\mathsf{neg}\left(2\right)\right)\right) \cdot \left(z + x \cdot y\right)}{\color{blue}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right)} \cdot x + \frac{23533438303}{500000000}} \]
      2. metadata-evalN/A

        \[\leadsto \frac{\left(x + -2\right) \cdot \left(z + x \cdot y\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \color{blue}{\frac{156699607947}{500000000}}\right) \cdot x + \frac{23533438303}{500000000}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\left(z + x \cdot y\right) \cdot \left(x + -2\right)}{\color{blue}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x} + \frac{23533438303}{500000000}} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\left(z + x \cdot y\right) \cdot \left(x + -2\right)}{x \cdot \left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) + \frac{23533438303}{500000000}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\left(z + x \cdot y\right) \cdot \left(x + -2\right)}{x \cdot \left(x \cdot \left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) + \frac{156699607947}{500000000}\right) + \frac{23533438303}{500000000}} \]
      6. *-commutativeN/A

        \[\leadsto \frac{\left(z + x \cdot y\right) \cdot \left(x + -2\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + \frac{216700011257}{5000000000}\right) + \frac{263505074721}{1000000000}\right) + \frac{156699607947}{500000000}\right) + \frac{23533438303}{500000000}} \]
      7. associate-/l*N/A

        \[\leadsto \left(z + x \cdot y\right) \cdot \color{blue}{\frac{x + -2}{x \cdot \left(x \cdot \left(x \cdot \left(x + \frac{216700011257}{5000000000}\right) + \frac{263505074721}{1000000000}\right) + \frac{156699607947}{500000000}\right) + \frac{23533438303}{500000000}}} \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(z + x \cdot y\right), \color{blue}{\left(\frac{x + -2}{x \cdot \left(x \cdot \left(x \cdot \left(x + \frac{216700011257}{5000000000}\right) + \frac{263505074721}{1000000000}\right) + \frac{156699607947}{500000000}\right) + \frac{23533438303}{500000000}}\right)}\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(z, \left(x \cdot y\right)\right), \left(\frac{\color{blue}{x + -2}}{x \cdot \left(x \cdot \left(x \cdot \left(x + \frac{216700011257}{5000000000}\right) + \frac{263505074721}{1000000000}\right) + \frac{156699607947}{500000000}\right) + \frac{23533438303}{500000000}}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right), \left(\frac{x + \color{blue}{-2}}{x \cdot \left(x \cdot \left(x \cdot \left(x + \frac{216700011257}{5000000000}\right) + \frac{263505074721}{1000000000}\right) + \frac{156699607947}{500000000}\right) + \frac{23533438303}{500000000}}\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right), \mathsf{/.f64}\left(\left(x + -2\right), \color{blue}{\left(x \cdot \left(x \cdot \left(x \cdot \left(x + \frac{216700011257}{5000000000}\right) + \frac{263505074721}{1000000000}\right) + \frac{156699607947}{500000000}\right) + \frac{23533438303}{500000000}\right)}\right)\right) \]
    7. Applied egg-rr91.4%

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

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

Alternative 8: 95.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\ \mathbf{if}\;x \leq -82:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 1520000:\\ \;\;\;\;\left(x + -2\right) \cdot \frac{1}{\frac{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}{z + x \cdot \left(y + x \cdot 137.519416416\right)}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0
         (*
          (+ x -2.0)
          (+
           4.16438922228
           (/
            (-
             (/ (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) x)
             101.7851458539211)
            x)))))
   (if (<= x -82.0)
     t_0
     (if (<= x 1520000.0)
       (*
        (+ x -2.0)
        (/
         1.0
         (/
          (+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721))))
          (+ z (* x (+ y (* x 137.519416416)))))))
       t_0))))
double code(double x, double y, double z) {
	double t_0 = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
	double tmp;
	if (x <= -82.0) {
		tmp = t_0;
	} else if (x <= 1520000.0) {
		tmp = (x + -2.0) * (1.0 / ((47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) / (z + (x * (y + (x * 137.519416416))))));
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) / x) - 101.7851458539211d0) / x))
    if (x <= (-82.0d0)) then
        tmp = t_0
    else if (x <= 1520000.0d0) then
        tmp = (x + (-2.0d0)) * (1.0d0 / ((47.066876606d0 + (x * (313.399215894d0 + (x * 263.505074721d0)))) / (z + (x * (y + (x * 137.519416416d0))))))
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
	double tmp;
	if (x <= -82.0) {
		tmp = t_0;
	} else if (x <= 1520000.0) {
		tmp = (x + -2.0) * (1.0 / ((47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) / (z + (x * (y + (x * 137.519416416))))));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x))
	tmp = 0
	if x <= -82.0:
		tmp = t_0
	elif x <= 1520000.0:
		tmp = (x + -2.0) * (1.0 / ((47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) / (z + (x * (y + (x * 137.519416416))))))
	else:
		tmp = t_0
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)))
	tmp = 0.0
	if (x <= -82.0)
		tmp = t_0;
	elseif (x <= 1520000.0)
		tmp = Float64(Float64(x + -2.0) * Float64(1.0 / Float64(Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * 263.505074721)))) / Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416)))))));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
	tmp = 0.0;
	if (x <= -82.0)
		tmp = t_0;
	elseif (x <= 1520000.0)
		tmp = (x + -2.0) * (1.0 / ((47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) / (z + (x * (y + (x * 137.519416416))))));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -82.0], t$95$0, If[LessEqual[x, 1520000.0], N[(N[(x + -2.0), $MachinePrecision] * N[(1.0 / N[(N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * 263.505074721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\mathbf{if}\;x \leq -82:\\
\;\;\;\;t\_0\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -82 or 1.52e6 < x

    1. Initial program 15.2%

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

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified24.6%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \color{blue}{\left(\frac{104109730557}{25000000000} + -1 \cdot \frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{104109730557}{25000000000} + \left(\mathsf{neg}\left(\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)\right)\right)\right) \]
      2. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{104109730557}{25000000000} - \color{blue}{\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{\_.f64}\left(\frac{104109730557}{25000000000}, \color{blue}{\left(\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{\_.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\left(\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}\right), \color{blue}{x}\right)\right)\right) \]
    7. Simplified93.9%

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

    if -82 < x < 1.52e6

    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*N/A

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Applied egg-rr99.5%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right)\right), \frac{263505074721}{1000000000}\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\color{blue}{\left(\frac{4297481763}{31250000} \cdot x\right)}, y\right)\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right)\right), \frac{263505074721}{1000000000}\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(x \cdot \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
      2. *-lowering-*.f6498.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right)\right), \frac{263505074721}{1000000000}\right)\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
    8. Simplified98.3%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\color{blue}{\left(\frac{263505074721}{1000000000} \cdot x\right)}, \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
    10. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(x \cdot \frac{263505074721}{1000000000}\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
      2. *-lowering-*.f6493.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{263505074721}{1000000000}\right), \frac{156699607947}{500000000}\right)\right), \frac{23533438303}{500000000}\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{4297481763}{31250000}\right), y\right)\right)\right)\right)\right)\right) \]
    11. Simplified93.9%

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

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

Alternative 9: 92.1% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\ \mathbf{if}\;x \leq -2.9 \cdot 10^{+32}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 3100000:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot y\right)}{47.066876606 + x \cdot \left(x \cdot \left(x \cdot x\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0
         (*
          (+ x -2.0)
          (+
           4.16438922228
           (/
            (-
             (/ (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) x)
             101.7851458539211)
            x)))))
   (if (<= x -2.9e+32)
     t_0
     (if (<= x 3100000.0)
       (/ (* (- x 2.0) (+ z (* x y))) (+ 47.066876606 (* x (* x (* x x)))))
       t_0))))
double code(double x, double y, double z) {
	double t_0 = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
	double tmp;
	if (x <= -2.9e+32) {
		tmp = t_0;
	} else if (x <= 3100000.0) {
		tmp = ((x - 2.0) * (z + (x * y))) / (47.066876606 + (x * (x * (x * x))));
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) / x) - 101.7851458539211d0) / x))
    if (x <= (-2.9d+32)) then
        tmp = t_0
    else if (x <= 3100000.0d0) then
        tmp = ((x - 2.0d0) * (z + (x * y))) / (47.066876606d0 + (x * (x * (x * x))))
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
	double tmp;
	if (x <= -2.9e+32) {
		tmp = t_0;
	} else if (x <= 3100000.0) {
		tmp = ((x - 2.0) * (z + (x * y))) / (47.066876606 + (x * (x * (x * x))));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x))
	tmp = 0
	if x <= -2.9e+32:
		tmp = t_0
	elif x <= 3100000.0:
		tmp = ((x - 2.0) * (z + (x * y))) / (47.066876606 + (x * (x * (x * x))))
	else:
		tmp = t_0
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)))
	tmp = 0.0
	if (x <= -2.9e+32)
		tmp = t_0;
	elseif (x <= 3100000.0)
		tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * y))) / Float64(47.066876606 + Float64(x * Float64(x * Float64(x * x)))));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
	tmp = 0.0;
	if (x <= -2.9e+32)
		tmp = t_0;
	elseif (x <= 3100000.0)
		tmp = ((x - 2.0) * (z + (x * y))) / (47.066876606 + (x * (x * (x * x))));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.9e+32], t$95$0, If[LessEqual[x, 3100000.0], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\mathbf{if}\;x \leq -2.9 \cdot 10^{+32}:\\
\;\;\;\;t\_0\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.90000000000000003e32 or 3.1e6 < x

    1. Initial program 12.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*N/A

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified21.3%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \color{blue}{\left(\frac{104109730557}{25000000000} + -1 \cdot \frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{104109730557}{25000000000} + \left(\mathsf{neg}\left(\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)\right)\right)\right) \]
      2. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{104109730557}{25000000000} - \color{blue}{\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{\_.f64}\left(\frac{104109730557}{25000000000}, \color{blue}{\left(\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{\_.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\left(\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}\right), \color{blue}{x}\right)\right)\right) \]
    7. Simplified96.2%

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

    if -2.90000000000000003e32 < x < 3.1e6

    1. Initial program 98.8%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \color{blue}{\left(z + x \cdot y\right)}\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
    4. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \left(x \cdot y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), \color{blue}{x}\right), \frac{23533438303}{500000000}\right)\right) \]
      2. *-lowering-*.f6491.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
    5. Simplified91.0%

      \[\leadsto \frac{\left(x - 2\right) \cdot \color{blue}{\left(z + x \cdot y\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(x \cdot \left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      2. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(x \cdot \left(\frac{263505074721}{1000000000} + \left(x + \frac{216700011257}{5000000000}\right) \cdot x\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(x \cdot \left(\frac{263505074721}{1000000000} + x \cdot \left(x + \frac{216700011257}{5000000000}\right)\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      4. distribute-lft-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(x \cdot \frac{263505074721}{1000000000} + x \cdot \left(x \cdot \left(x + \frac{216700011257}{5000000000}\right)\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{263505074721}{1000000000} \cdot x + x \cdot \left(x \cdot \left(x + \frac{216700011257}{5000000000}\right)\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      6. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(x \cdot \left(x \cdot \left(x + \frac{216700011257}{5000000000}\right)\right) + \frac{263505074721}{1000000000} \cdot x\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\left(x \cdot \left(x \cdot \left(x + \frac{216700011257}{5000000000}\right)\right)\right), \left(\frac{263505074721}{1000000000} \cdot x\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\left(\left(x \cdot \left(x + \frac{216700011257}{5000000000}\right)\right) \cdot x\right), \left(\frac{263505074721}{1000000000} \cdot x\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x\right) \cdot x\right), \left(\frac{263505074721}{1000000000} \cdot x\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      10. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot \left(x \cdot x\right)\right), \left(\frac{263505074721}{1000000000} \cdot x\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(x + \frac{216700011257}{5000000000}\right), \left(x \cdot x\right)\right), \left(\frac{263505074721}{1000000000} \cdot x\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), \left(x \cdot x\right)\right), \left(\frac{263505074721}{1000000000} \cdot x\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), \mathsf{*.f64}\left(x, x\right)\right), \left(\frac{263505074721}{1000000000} \cdot x\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), \mathsf{*.f64}\left(x, x\right)\right), \left(x \cdot \frac{263505074721}{1000000000}\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      15. *-lowering-*.f6491.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), \mathsf{*.f64}\left(x, x\right)\right), \mathsf{*.f64}\left(x, \frac{263505074721}{1000000000}\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
    7. Applied egg-rr91.0%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left({x}^{3}\right)}, x\right), \frac{23533438303}{500000000}\right)\right) \]
    9. Step-by-step derivation
      1. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(x \cdot \left(x \cdot x\right)\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(x \cdot {x}^{2}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left({x}^{2}\right)\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot x\right)\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      5. *-lowering-*.f6486.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
    10. Simplified86.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.9 \cdot 10^{+32}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\ \mathbf{elif}\;x \leq 3100000:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot y\right)}{47.066876606 + x \cdot \left(x \cdot \left(x \cdot x\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 93.1% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\ \mathbf{if}\;x \leq -1.35:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 35:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot y\right)}{47.066876606 + x \cdot 313.399215894}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0
         (*
          (+ x -2.0)
          (+
           4.16438922228
           (/
            (-
             (/ (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) x)
             101.7851458539211)
            x)))))
   (if (<= x -1.35)
     t_0
     (if (<= x 35.0)
       (/ (* (- x 2.0) (+ z (* x y))) (+ 47.066876606 (* x 313.399215894)))
       t_0))))
double code(double x, double y, double z) {
	double t_0 = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
	double tmp;
	if (x <= -1.35) {
		tmp = t_0;
	} else if (x <= 35.0) {
		tmp = ((x - 2.0) * (z + (x * y))) / (47.066876606 + (x * 313.399215894));
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) / x) - 101.7851458539211d0) / x))
    if (x <= (-1.35d0)) then
        tmp = t_0
    else if (x <= 35.0d0) then
        tmp = ((x - 2.0d0) * (z + (x * y))) / (47.066876606d0 + (x * 313.399215894d0))
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
	double tmp;
	if (x <= -1.35) {
		tmp = t_0;
	} else if (x <= 35.0) {
		tmp = ((x - 2.0) * (z + (x * y))) / (47.066876606 + (x * 313.399215894));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x))
	tmp = 0
	if x <= -1.35:
		tmp = t_0
	elif x <= 35.0:
		tmp = ((x - 2.0) * (z + (x * y))) / (47.066876606 + (x * 313.399215894))
	else:
		tmp = t_0
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)))
	tmp = 0.0
	if (x <= -1.35)
		tmp = t_0;
	elseif (x <= 35.0)
		tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * y))) / Float64(47.066876606 + Float64(x * 313.399215894)));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
	tmp = 0.0;
	if (x <= -1.35)
		tmp = t_0;
	elseif (x <= 35.0)
		tmp = ((x - 2.0) * (z + (x * y))) / (47.066876606 + (x * 313.399215894));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.35], t$95$0, If[LessEqual[x, 35.0], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * 313.399215894), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\mathbf{if}\;x \leq -1.35:\\
\;\;\;\;t\_0\\

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

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


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

    1. Initial program 18.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*N/A

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified27.1%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \color{blue}{\left(\frac{104109730557}{25000000000} + -1 \cdot \frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{104109730557}{25000000000} + \left(\mathsf{neg}\left(\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)\right)\right)\right) \]
      2. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{104109730557}{25000000000} - \color{blue}{\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{\_.f64}\left(\frac{104109730557}{25000000000}, \color{blue}{\left(\frac{\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}}{x}\right)}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{\_.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\left(\frac{12723143231740136880149}{125000000000000000000} + -1 \cdot \frac{\frac{2157218858562374472887084159837293}{625000000000000000000000000000} + -1 \cdot \frac{\frac{387732519225574910908939577061312055388407301}{3125000000000000000000000000000000000000} + -1 \cdot y}{x}}{x}\right), \color{blue}{x}\right)\right)\right) \]
    7. Simplified91.0%

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

    if -1.3500000000000001 < x < 35

    1. Initial program 99.7%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \color{blue}{\left(z + x \cdot y\right)}\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
    4. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \left(x \cdot y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), \color{blue}{x}\right), \frac{23533438303}{500000000}\right)\right) \]
      2. *-lowering-*.f6492.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
    5. Simplified92.7%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\color{blue}{\left(\frac{156699607947}{500000000} \cdot x\right)}, \frac{23533438303}{500000000}\right)\right) \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\left(x \cdot \frac{156699607947}{500000000}\right), \frac{23533438303}{500000000}\right)\right) \]
      2. *-lowering-*.f6492.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{156699607947}{500000000}\right), \frac{23533438303}{500000000}\right)\right) \]
    8. Simplified92.0%

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

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

Alternative 11: 90.6% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x + -2}{\frac{5.86923874282773}{x} - -0.24013125253755718}\\ \mathbf{if}\;x \leq -1.35:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 1520000:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot y\right)}{47.066876606 + x \cdot 313.399215894}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (/ (+ x -2.0) (- (/ 5.86923874282773 x) -0.24013125253755718))))
   (if (<= x -1.35)
     t_0
     (if (<= x 1520000.0)
       (/ (* (- x 2.0) (+ z (* x y))) (+ 47.066876606 (* x 313.399215894)))
       t_0))))
double code(double x, double y, double z) {
	double t_0 = (x + -2.0) / ((5.86923874282773 / x) - -0.24013125253755718);
	double tmp;
	if (x <= -1.35) {
		tmp = t_0;
	} else if (x <= 1520000.0) {
		tmp = ((x - 2.0) * (z + (x * y))) / (47.066876606 + (x * 313.399215894));
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (x + (-2.0d0)) / ((5.86923874282773d0 / x) - (-0.24013125253755718d0))
    if (x <= (-1.35d0)) then
        tmp = t_0
    else if (x <= 1520000.0d0) then
        tmp = ((x - 2.0d0) * (z + (x * y))) / (47.066876606d0 + (x * 313.399215894d0))
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (x + -2.0) / ((5.86923874282773 / x) - -0.24013125253755718);
	double tmp;
	if (x <= -1.35) {
		tmp = t_0;
	} else if (x <= 1520000.0) {
		tmp = ((x - 2.0) * (z + (x * y))) / (47.066876606 + (x * 313.399215894));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (x + -2.0) / ((5.86923874282773 / x) - -0.24013125253755718)
	tmp = 0
	if x <= -1.35:
		tmp = t_0
	elif x <= 1520000.0:
		tmp = ((x - 2.0) * (z + (x * y))) / (47.066876606 + (x * 313.399215894))
	else:
		tmp = t_0
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(x + -2.0) / Float64(Float64(5.86923874282773 / x) - -0.24013125253755718))
	tmp = 0.0
	if (x <= -1.35)
		tmp = t_0;
	elseif (x <= 1520000.0)
		tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * y))) / Float64(47.066876606 + Float64(x * 313.399215894)));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (x + -2.0) / ((5.86923874282773 / x) - -0.24013125253755718);
	tmp = 0.0;
	if (x <= -1.35)
		tmp = t_0;
	elseif (x <= 1520000.0)
		tmp = ((x - 2.0) * (z + (x * y))) / (47.066876606 + (x * 313.399215894));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + -2.0), $MachinePrecision] / N[(N[(5.86923874282773 / x), $MachinePrecision] - -0.24013125253755718), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.35], t$95$0, If[LessEqual[x, 1520000.0], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * 313.399215894), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x + -2}{\frac{5.86923874282773}{x} - -0.24013125253755718}\\
\mathbf{if}\;x \leq -1.35:\\
\;\;\;\;t\_0\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.3500000000000001 or 1.52e6 < x

    1. Initial program 16.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*N/A

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified25.6%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Applied egg-rr25.6%

      \[\leadsto \color{blue}{\frac{\frac{z + 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} \cdot \left(x \cdot x + -4\right)}{x + 2}} \]
    6. Applied egg-rr25.7%

      \[\leadsto \color{blue}{\frac{-\left(x + -2\right)}{\frac{-1}{\frac{z + 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}}}} \]
    7. Taylor expanded in x around inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \color{blue}{\left(-1 \cdot \left(\frac{25000000000}{104109730557} + \frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)}\right) \]
    8. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \left(-1 \cdot \frac{25000000000}{104109730557} + \color{blue}{-1 \cdot \left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)}\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \left(\frac{-25000000000}{104109730557} + \color{blue}{-1} \cdot \left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \left(\left(\mathsf{neg}\left(\frac{25000000000}{104109730557}\right)\right) + \color{blue}{-1} \cdot \left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\frac{25000000000}{104109730557}\right)\right), \color{blue}{\left(-1 \cdot \left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \left(\color{blue}{-1} \cdot \left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)\right)\right) \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \left(\mathsf{neg}\left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)\right)\right) \]
      7. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \mathsf{neg.f64}\left(\left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)\right)\right) \]
      8. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \mathsf{neg.f64}\left(\left(\frac{\frac{63615716158700684400745}{10838835996651139530249} \cdot 1}{x}\right)\right)\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \mathsf{neg.f64}\left(\left(\frac{\frac{63615716158700684400745}{10838835996651139530249}}{x}\right)\right)\right)\right) \]
      10. /-lowering-/.f6488.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\frac{63615716158700684400745}{10838835996651139530249}, x\right)\right)\right)\right) \]
    9. Simplified88.0%

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

    if -1.3500000000000001 < x < 1.52e6

    1. Initial program 99.6%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \color{blue}{\left(z + x \cdot y\right)}\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
    4. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \left(x \cdot y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), \color{blue}{x}\right), \frac{23533438303}{500000000}\right)\right) \]
      2. *-lowering-*.f6492.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
    5. Simplified92.9%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\color{blue}{\left(\frac{156699607947}{500000000} \cdot x\right)}, \frac{23533438303}{500000000}\right)\right) \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\left(x \cdot \frac{156699607947}{500000000}\right), \frac{23533438303}{500000000}\right)\right) \]
      2. *-lowering-*.f6489.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \frac{156699607947}{500000000}\right), \frac{23533438303}{500000000}\right)\right) \]
    8. Simplified89.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.35:\\ \;\;\;\;\frac{x + -2}{\frac{5.86923874282773}{x} - -0.24013125253755718}\\ \mathbf{elif}\;x \leq 1520000:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot y\right)}{47.066876606 + x \cdot 313.399215894}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + -2}{\frac{5.86923874282773}{x} - -0.24013125253755718}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 90.1% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x + -2}{\frac{5.86923874282773}{x} - -0.24013125253755718}\\ \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\ \;\;\;\;x \cdot \left(y \cdot -0.0424927283095952 + z \cdot 0.3041881842569256\right) + z \cdot -0.0424927283095952\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (/ (+ x -2.0) (- (/ 5.86923874282773 x) -0.24013125253755718))))
   (if (<= x -490000000.0)
     t_0
     (if (<= x 8.5e-8)
       (+
        (* x (+ (* y -0.0424927283095952) (* z 0.3041881842569256)))
        (* z -0.0424927283095952))
       t_0))))
double code(double x, double y, double z) {
	double t_0 = (x + -2.0) / ((5.86923874282773 / x) - -0.24013125253755718);
	double tmp;
	if (x <= -490000000.0) {
		tmp = t_0;
	} else if (x <= 8.5e-8) {
		tmp = (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256))) + (z * -0.0424927283095952);
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (x + (-2.0d0)) / ((5.86923874282773d0 / x) - (-0.24013125253755718d0))
    if (x <= (-490000000.0d0)) then
        tmp = t_0
    else if (x <= 8.5d-8) then
        tmp = (x * ((y * (-0.0424927283095952d0)) + (z * 0.3041881842569256d0))) + (z * (-0.0424927283095952d0))
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (x + -2.0) / ((5.86923874282773 / x) - -0.24013125253755718);
	double tmp;
	if (x <= -490000000.0) {
		tmp = t_0;
	} else if (x <= 8.5e-8) {
		tmp = (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256))) + (z * -0.0424927283095952);
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (x + -2.0) / ((5.86923874282773 / x) - -0.24013125253755718)
	tmp = 0
	if x <= -490000000.0:
		tmp = t_0
	elif x <= 8.5e-8:
		tmp = (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256))) + (z * -0.0424927283095952)
	else:
		tmp = t_0
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(x + -2.0) / Float64(Float64(5.86923874282773 / x) - -0.24013125253755718))
	tmp = 0.0
	if (x <= -490000000.0)
		tmp = t_0;
	elseif (x <= 8.5e-8)
		tmp = Float64(Float64(x * Float64(Float64(y * -0.0424927283095952) + Float64(z * 0.3041881842569256))) + Float64(z * -0.0424927283095952));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (x + -2.0) / ((5.86923874282773 / x) - -0.24013125253755718);
	tmp = 0.0;
	if (x <= -490000000.0)
		tmp = t_0;
	elseif (x <= 8.5e-8)
		tmp = (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256))) + (z * -0.0424927283095952);
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + -2.0), $MachinePrecision] / N[(N[(5.86923874282773 / x), $MachinePrecision] - -0.24013125253755718), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -490000000.0], t$95$0, If[LessEqual[x, 8.5e-8], N[(N[(x * N[(N[(y * -0.0424927283095952), $MachinePrecision] + N[(z * 0.3041881842569256), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0424927283095952), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x + -2}{\frac{5.86923874282773}{x} - -0.24013125253755718}\\
\mathbf{if}\;x \leq -490000000:\\
\;\;\;\;t\_0\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.9e8 or 8.49999999999999935e-8 < x

    1. Initial program 18.7%

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

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified27.2%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Applied egg-rr27.1%

      \[\leadsto \color{blue}{\frac{\frac{z + 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} \cdot \left(x \cdot x + -4\right)}{x + 2}} \]
    6. Applied egg-rr27.2%

      \[\leadsto \color{blue}{\frac{-\left(x + -2\right)}{\frac{-1}{\frac{z + 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}}}} \]
    7. Taylor expanded in x around inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \color{blue}{\left(-1 \cdot \left(\frac{25000000000}{104109730557} + \frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)}\right) \]
    8. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \left(-1 \cdot \frac{25000000000}{104109730557} + \color{blue}{-1 \cdot \left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)}\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \left(\frac{-25000000000}{104109730557} + \color{blue}{-1} \cdot \left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \left(\left(\mathsf{neg}\left(\frac{25000000000}{104109730557}\right)\right) + \color{blue}{-1} \cdot \left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\frac{25000000000}{104109730557}\right)\right), \color{blue}{\left(-1 \cdot \left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \left(\color{blue}{-1} \cdot \left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)\right)\right) \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \left(\mathsf{neg}\left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)\right)\right) \]
      7. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \mathsf{neg.f64}\left(\left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)\right)\right) \]
      8. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \mathsf{neg.f64}\left(\left(\frac{\frac{63615716158700684400745}{10838835996651139530249} \cdot 1}{x}\right)\right)\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \mathsf{neg.f64}\left(\left(\frac{\frac{63615716158700684400745}{10838835996651139530249}}{x}\right)\right)\right)\right) \]
      10. /-lowering-/.f6486.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\frac{63615716158700684400745}{10838835996651139530249}, x\right)\right)\right)\right) \]
    9. Simplified86.5%

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

    if -4.9e8 < x < 8.49999999999999935e-8

    1. Initial program 98.8%

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

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\frac{\frac{z + 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} \cdot \left(x \cdot x + -4\right)}{x + 2}} \]
    6. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z + x \cdot \left(\frac{-1000000000}{23533438303} \cdot y - \frac{-168466327098500000000}{553822718361107519809} \cdot z\right)} \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{-1000000000}{23533438303} \cdot z\right), \color{blue}{\left(x \cdot \left(\frac{-1000000000}{23533438303} \cdot y - \frac{-168466327098500000000}{553822718361107519809} \cdot z\right)\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot \frac{-1000000000}{23533438303}\right), \left(\color{blue}{x} \cdot \left(\frac{-1000000000}{23533438303} \cdot y - \frac{-168466327098500000000}{553822718361107519809} \cdot z\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{-1000000000}{23533438303}\right), \left(\color{blue}{x} \cdot \left(\frac{-1000000000}{23533438303} \cdot y - \frac{-168466327098500000000}{553822718361107519809} \cdot z\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{-1000000000}{23533438303}\right), \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{-1000000000}{23533438303} \cdot y - \frac{-168466327098500000000}{553822718361107519809} \cdot z\right)}\right)\right) \]
      5. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{-1000000000}{23533438303}\right), \mathsf{*.f64}\left(x, \left(\frac{-1000000000}{23533438303} \cdot y + \color{blue}{\left(\mathsf{neg}\left(\frac{-168466327098500000000}{553822718361107519809} \cdot z\right)\right)}\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{-1000000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\frac{-1000000000}{23533438303} \cdot y\right), \color{blue}{\left(\mathsf{neg}\left(\frac{-168466327098500000000}{553822718361107519809} \cdot z\right)\right)}\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{-1000000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(y \cdot \frac{-1000000000}{23533438303}\right), \left(\mathsf{neg}\left(\color{blue}{\frac{-168466327098500000000}{553822718361107519809} \cdot z}\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{-1000000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(y, \frac{-1000000000}{23533438303}\right), \left(\mathsf{neg}\left(\color{blue}{\frac{-168466327098500000000}{553822718361107519809} \cdot z}\right)\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{-1000000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(y, \frac{-1000000000}{23533438303}\right), \left(\mathsf{neg}\left(z \cdot \frac{-168466327098500000000}{553822718361107519809}\right)\right)\right)\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{-1000000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(y, \frac{-1000000000}{23533438303}\right), \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{-168466327098500000000}{553822718361107519809}\right)\right)}\right)\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{-1000000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(y, \frac{-1000000000}{23533438303}\right), \mathsf{*.f64}\left(z, \color{blue}{\left(\mathsf{neg}\left(\frac{-168466327098500000000}{553822718361107519809}\right)\right)}\right)\right)\right)\right) \]
      12. metadata-eval91.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{-1000000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(y, \frac{-1000000000}{23533438303}\right), \mathsf{*.f64}\left(z, \frac{168466327098500000000}{553822718361107519809}\right)\right)\right)\right) \]
    8. Simplified91.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;\frac{x + -2}{\frac{5.86923874282773}{x} - -0.24013125253755718}\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\ \;\;\;\;x \cdot \left(y \cdot -0.0424927283095952 + z \cdot 0.3041881842569256\right) + z \cdot -0.0424927283095952\\ \mathbf{else}:\\ \;\;\;\;\frac{x + -2}{\frac{5.86923874282773}{x} - -0.24013125253755718}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 90.1% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{x + -2}{\frac{5.86923874282773}{x} - -0.24013125253755718}\\
\mathbf{if}\;x \leq -490000000:\\
\;\;\;\;t\_0\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.9e8 or 1.52e6 < x

    1. Initial program 15.3%

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

        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
    3. Simplified24.1%

      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
    4. Add Preprocessing
    5. Applied egg-rr24.1%

      \[\leadsto \color{blue}{\frac{\frac{z + 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} \cdot \left(x \cdot x + -4\right)}{x + 2}} \]
    6. Applied egg-rr24.1%

      \[\leadsto \color{blue}{\frac{-\left(x + -2\right)}{\frac{-1}{\frac{z + 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}}}} \]
    7. Taylor expanded in x around inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \color{blue}{\left(-1 \cdot \left(\frac{25000000000}{104109730557} + \frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)}\right) \]
    8. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \left(-1 \cdot \frac{25000000000}{104109730557} + \color{blue}{-1 \cdot \left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)}\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \left(\frac{-25000000000}{104109730557} + \color{blue}{-1} \cdot \left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \left(\left(\mathsf{neg}\left(\frac{25000000000}{104109730557}\right)\right) + \color{blue}{-1} \cdot \left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\frac{25000000000}{104109730557}\right)\right), \color{blue}{\left(-1 \cdot \left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \left(\color{blue}{-1} \cdot \left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)\right)\right) \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \left(\mathsf{neg}\left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)\right)\right) \]
      7. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \mathsf{neg.f64}\left(\left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)\right)\right) \]
      8. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \mathsf{neg.f64}\left(\left(\frac{\frac{63615716158700684400745}{10838835996651139530249} \cdot 1}{x}\right)\right)\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \mathsf{neg.f64}\left(\left(\frac{\frac{63615716158700684400745}{10838835996651139530249}}{x}\right)\right)\right)\right) \]
      10. /-lowering-/.f6489.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\frac{63615716158700684400745}{10838835996651139530249}, x\right)\right)\right)\right) \]
    9. Simplified89.8%

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

    if -4.9e8 < x < 1.52e6

    1. Initial program 98.8%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \color{blue}{\left(z + x \cdot y\right)}\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
    4. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \left(x \cdot y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), \color{blue}{x}\right), \frac{23533438303}{500000000}\right)\right) \]
      2. *-lowering-*.f6492.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
    5. Simplified92.3%

      \[\leadsto \frac{\left(x - 2\right) \cdot \color{blue}{\left(z + x \cdot y\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(x \cdot \left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      2. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(x \cdot \left(\frac{263505074721}{1000000000} + \left(x + \frac{216700011257}{5000000000}\right) \cdot x\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(x \cdot \left(\frac{263505074721}{1000000000} + x \cdot \left(x + \frac{216700011257}{5000000000}\right)\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      4. distribute-lft-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(x \cdot \frac{263505074721}{1000000000} + x \cdot \left(x \cdot \left(x + \frac{216700011257}{5000000000}\right)\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{263505074721}{1000000000} \cdot x + x \cdot \left(x \cdot \left(x + \frac{216700011257}{5000000000}\right)\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      6. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(x \cdot \left(x \cdot \left(x + \frac{216700011257}{5000000000}\right)\right) + \frac{263505074721}{1000000000} \cdot x\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\left(x \cdot \left(x \cdot \left(x + \frac{216700011257}{5000000000}\right)\right)\right), \left(\frac{263505074721}{1000000000} \cdot x\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\left(\left(x \cdot \left(x + \frac{216700011257}{5000000000}\right)\right) \cdot x\right), \left(\frac{263505074721}{1000000000} \cdot x\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x\right) \cdot x\right), \left(\frac{263505074721}{1000000000} \cdot x\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      10. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot \left(x \cdot x\right)\right), \left(\frac{263505074721}{1000000000} \cdot x\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(x + \frac{216700011257}{5000000000}\right), \left(x \cdot x\right)\right), \left(\frac{263505074721}{1000000000} \cdot x\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), \left(x \cdot x\right)\right), \left(\frac{263505074721}{1000000000} \cdot x\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), \mathsf{*.f64}\left(x, x\right)\right), \left(\frac{263505074721}{1000000000} \cdot x\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), \mathsf{*.f64}\left(x, x\right)\right), \left(x \cdot \frac{263505074721}{1000000000}\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
      15. *-lowering-*.f6492.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), \mathsf{*.f64}\left(x, x\right)\right), \mathsf{*.f64}\left(x, \frac{263505074721}{1000000000}\right)\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
    7. Applied egg-rr92.3%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, 2\right), \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \color{blue}{\frac{23533438303}{500000000}}\right) \]
    9. Step-by-step derivation
      1. Simplified87.0%

        \[\leadsto \frac{\left(x - 2\right) \cdot \left(z + x \cdot y\right)}{\color{blue}{47.066876606}} \]
    10. Recombined 2 regimes into one program.
    11. Final simplification88.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;\frac{x + -2}{\frac{5.86923874282773}{x} - -0.24013125253755718}\\ \mathbf{elif}\;x \leq 1520000:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot y\right)}{47.066876606}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + -2}{\frac{5.86923874282773}{x} - -0.24013125253755718}\\ \end{array} \]
    12. Add Preprocessing

    Alternative 14: 76.9% accurate, 1.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x + -2}{\frac{5.86923874282773}{x} - -0.24013125253755718}\\ \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(z \cdot \left(0.0212463641547976 + x \cdot -0.14147091005106402\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (let* ((t_0 (/ (+ x -2.0) (- (/ 5.86923874282773 x) -0.24013125253755718))))
       (if (<= x -490000000.0)
         t_0
         (if (<= x 8.5e-8)
           (* (+ x -2.0) (* z (+ 0.0212463641547976 (* x -0.14147091005106402))))
           t_0))))
    double code(double x, double y, double z) {
    	double t_0 = (x + -2.0) / ((5.86923874282773 / x) - -0.24013125253755718);
    	double tmp;
    	if (x <= -490000000.0) {
    		tmp = t_0;
    	} else if (x <= 8.5e-8) {
    		tmp = (x + -2.0) * (z * (0.0212463641547976 + (x * -0.14147091005106402)));
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8) :: t_0
        real(8) :: tmp
        t_0 = (x + (-2.0d0)) / ((5.86923874282773d0 / x) - (-0.24013125253755718d0))
        if (x <= (-490000000.0d0)) then
            tmp = t_0
        else if (x <= 8.5d-8) then
            tmp = (x + (-2.0d0)) * (z * (0.0212463641547976d0 + (x * (-0.14147091005106402d0))))
        else
            tmp = t_0
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z) {
    	double t_0 = (x + -2.0) / ((5.86923874282773 / x) - -0.24013125253755718);
    	double tmp;
    	if (x <= -490000000.0) {
    		tmp = t_0;
    	} else if (x <= 8.5e-8) {
    		tmp = (x + -2.0) * (z * (0.0212463641547976 + (x * -0.14147091005106402)));
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	t_0 = (x + -2.0) / ((5.86923874282773 / x) - -0.24013125253755718)
    	tmp = 0
    	if x <= -490000000.0:
    		tmp = t_0
    	elif x <= 8.5e-8:
    		tmp = (x + -2.0) * (z * (0.0212463641547976 + (x * -0.14147091005106402)))
    	else:
    		tmp = t_0
    	return tmp
    
    function code(x, y, z)
    	t_0 = Float64(Float64(x + -2.0) / Float64(Float64(5.86923874282773 / x) - -0.24013125253755718))
    	tmp = 0.0
    	if (x <= -490000000.0)
    		tmp = t_0;
    	elseif (x <= 8.5e-8)
    		tmp = Float64(Float64(x + -2.0) * Float64(z * Float64(0.0212463641547976 + Float64(x * -0.14147091005106402))));
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	t_0 = (x + -2.0) / ((5.86923874282773 / x) - -0.24013125253755718);
    	tmp = 0.0;
    	if (x <= -490000000.0)
    		tmp = t_0;
    	elseif (x <= 8.5e-8)
    		tmp = (x + -2.0) * (z * (0.0212463641547976 + (x * -0.14147091005106402)));
    	else
    		tmp = t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + -2.0), $MachinePrecision] / N[(N[(5.86923874282773 / x), $MachinePrecision] - -0.24013125253755718), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -490000000.0], t$95$0, If[LessEqual[x, 8.5e-8], N[(N[(x + -2.0), $MachinePrecision] * N[(z * N[(0.0212463641547976 + N[(x * -0.14147091005106402), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \frac{x + -2}{\frac{5.86923874282773}{x} - -0.24013125253755718}\\
    \mathbf{if}\;x \leq -490000000:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\
    \;\;\;\;\left(x + -2\right) \cdot \left(z \cdot \left(0.0212463641547976 + x \cdot -0.14147091005106402\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < -4.9e8 or 8.49999999999999935e-8 < x

      1. Initial program 18.7%

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

          \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
        3. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
        4. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
      3. Simplified27.2%

        \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
      4. Add Preprocessing
      5. Applied egg-rr27.1%

        \[\leadsto \color{blue}{\frac{\frac{z + 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} \cdot \left(x \cdot x + -4\right)}{x + 2}} \]
      6. Applied egg-rr27.2%

        \[\leadsto \color{blue}{\frac{-\left(x + -2\right)}{\frac{-1}{\frac{z + 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}}}} \]
      7. Taylor expanded in x around inf

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \color{blue}{\left(-1 \cdot \left(\frac{25000000000}{104109730557} + \frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)}\right) \]
      8. Step-by-step derivation
        1. distribute-lft-inN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \left(-1 \cdot \frac{25000000000}{104109730557} + \color{blue}{-1 \cdot \left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)}\right)\right) \]
        2. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \left(\frac{-25000000000}{104109730557} + \color{blue}{-1} \cdot \left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)\right) \]
        3. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \left(\left(\mathsf{neg}\left(\frac{25000000000}{104109730557}\right)\right) + \color{blue}{-1} \cdot \left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)\right) \]
        4. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\frac{25000000000}{104109730557}\right)\right), \color{blue}{\left(-1 \cdot \left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)}\right)\right) \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \left(\color{blue}{-1} \cdot \left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)\right)\right) \]
        6. mul-1-negN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \left(\mathsf{neg}\left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)\right)\right) \]
        7. neg-lowering-neg.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \mathsf{neg.f64}\left(\left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)\right)\right)\right) \]
        8. associate-*r/N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \mathsf{neg.f64}\left(\left(\frac{\frac{63615716158700684400745}{10838835996651139530249} \cdot 1}{x}\right)\right)\right)\right) \]
        9. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \mathsf{neg.f64}\left(\left(\frac{\frac{63615716158700684400745}{10838835996651139530249}}{x}\right)\right)\right)\right) \]
        10. /-lowering-/.f6486.5%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \mathsf{+.f64}\left(\frac{-25000000000}{104109730557}, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\frac{63615716158700684400745}{10838835996651139530249}, x\right)\right)\right)\right) \]
      9. Simplified86.5%

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

      if -4.9e8 < x < 8.49999999999999935e-8

      1. Initial program 98.8%

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

          \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
        3. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
        4. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
      3. Simplified99.6%

        \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
      4. Add Preprocessing
      5. Taylor expanded in x around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \color{blue}{\left(\frac{500000000}{23533438303} \cdot z + x \cdot \left(\frac{500000000}{23533438303} \cdot y - \frac{78349803973500000000}{553822718361107519809} \cdot z\right)\right)}\right) \]
      6. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\left(\frac{500000000}{23533438303} \cdot z\right), \color{blue}{\left(x \cdot \left(\frac{500000000}{23533438303} \cdot y - \frac{78349803973500000000}{553822718361107519809} \cdot z\right)\right)}\right)\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\left(z \cdot \frac{500000000}{23533438303}\right), \left(\color{blue}{x} \cdot \left(\frac{500000000}{23533438303} \cdot y - \frac{78349803973500000000}{553822718361107519809} \cdot z\right)\right)\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \left(\color{blue}{x} \cdot \left(\frac{500000000}{23533438303} \cdot y - \frac{78349803973500000000}{553822718361107519809} \cdot z\right)\right)\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{500000000}{23533438303} \cdot y - \frac{78349803973500000000}{553822718361107519809} \cdot z\right)}\right)\right)\right) \]
        5. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \left(\frac{500000000}{23533438303} \cdot y + \color{blue}{\left(\mathsf{neg}\left(\frac{78349803973500000000}{553822718361107519809} \cdot z\right)\right)}\right)\right)\right)\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\frac{500000000}{23533438303} \cdot y\right), \color{blue}{\left(\mathsf{neg}\left(\frac{78349803973500000000}{553822718361107519809} \cdot z\right)\right)}\right)\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{500000000}{23533438303}, y\right), \left(\mathsf{neg}\left(\color{blue}{\frac{78349803973500000000}{553822718361107519809} \cdot z}\right)\right)\right)\right)\right)\right) \]
        8. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{500000000}{23533438303}, y\right), \left(\mathsf{neg}\left(z \cdot \frac{78349803973500000000}{553822718361107519809}\right)\right)\right)\right)\right)\right) \]
        9. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{500000000}{23533438303}, y\right), \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{78349803973500000000}{553822718361107519809}\right)\right)}\right)\right)\right)\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{500000000}{23533438303}, y\right), \mathsf{*.f64}\left(z, \color{blue}{\left(\mathsf{neg}\left(\frac{78349803973500000000}{553822718361107519809}\right)\right)}\right)\right)\right)\right)\right) \]
        11. metadata-eval91.9%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{500000000}{23533438303}, y\right), \mathsf{*.f64}\left(z, \frac{-78349803973500000000}{553822718361107519809}\right)\right)\right)\right)\right) \]
      7. Simplified91.9%

        \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(z \cdot 0.0212463641547976 + x \cdot \left(0.0212463641547976 \cdot y + z \cdot -0.14147091005106402\right)\right)} \]
      8. Taylor expanded in z around inf

        \[\leadsto \color{blue}{z \cdot \left(\left(\frac{500000000}{23533438303} + \frac{-78349803973500000000}{553822718361107519809} \cdot x\right) \cdot \left(x - 2\right)\right)} \]
      9. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \left(z \cdot \left(\frac{500000000}{23533438303} + \frac{-78349803973500000000}{553822718361107519809} \cdot x\right)\right) \cdot \color{blue}{\left(x - 2\right)} \]
        2. distribute-rgt-inN/A

          \[\leadsto \left(\frac{500000000}{23533438303} \cdot z + \left(\frac{-78349803973500000000}{553822718361107519809} \cdot x\right) \cdot z\right) \cdot \left(\color{blue}{x} - 2\right) \]
        3. associate-*r*N/A

          \[\leadsto \left(\frac{500000000}{23533438303} \cdot z + \frac{-78349803973500000000}{553822718361107519809} \cdot \left(x \cdot z\right)\right) \cdot \left(x - 2\right) \]
        4. +-commutativeN/A

          \[\leadsto \left(\frac{-78349803973500000000}{553822718361107519809} \cdot \left(x \cdot z\right) + \frac{500000000}{23533438303} \cdot z\right) \cdot \left(\color{blue}{x} - 2\right) \]
        5. *-commutativeN/A

          \[\leadsto \left(x - 2\right) \cdot \color{blue}{\left(\frac{-78349803973500000000}{553822718361107519809} \cdot \left(x \cdot z\right) + \frac{500000000}{23533438303} \cdot z\right)} \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{-78349803973500000000}{553822718361107519809} \cdot \left(x \cdot z\right) + \frac{500000000}{23533438303} \cdot z\right)}\right) \]
        7. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\color{blue}{\frac{-78349803973500000000}{553822718361107519809} \cdot \left(x \cdot z\right)} + \frac{500000000}{23533438303} \cdot z\right)\right) \]
        8. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\left(x + -2\right), \left(\frac{-78349803973500000000}{553822718361107519809} \cdot \color{blue}{\left(x \cdot z\right)} + \frac{500000000}{23533438303} \cdot z\right)\right) \]
        9. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\color{blue}{\frac{-78349803973500000000}{553822718361107519809} \cdot \left(x \cdot z\right)} + \frac{500000000}{23533438303} \cdot z\right)\right) \]
        10. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{500000000}{23533438303} \cdot z + \color{blue}{\frac{-78349803973500000000}{553822718361107519809} \cdot \left(x \cdot z\right)}\right)\right) \]
        11. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{500000000}{23533438303} \cdot z + \left(\frac{-78349803973500000000}{553822718361107519809} \cdot x\right) \cdot \color{blue}{z}\right)\right) \]
        12. distribute-rgt-inN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(z \cdot \color{blue}{\left(\frac{500000000}{23533438303} + \frac{-78349803973500000000}{553822718361107519809} \cdot x\right)}\right)\right) \]
        13. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{*.f64}\left(z, \color{blue}{\left(\frac{500000000}{23533438303} + \frac{-78349803973500000000}{553822718361107519809} \cdot x\right)}\right)\right) \]
        14. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{500000000}{23533438303}, \color{blue}{\left(\frac{-78349803973500000000}{553822718361107519809} \cdot x\right)}\right)\right)\right) \]
        15. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{500000000}{23533438303}, \left(x \cdot \color{blue}{\frac{-78349803973500000000}{553822718361107519809}}\right)\right)\right)\right) \]
        16. *-lowering-*.f6465.2%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{500000000}{23533438303}, \mathsf{*.f64}\left(x, \color{blue}{\frac{-78349803973500000000}{553822718361107519809}}\right)\right)\right)\right) \]
      10. Simplified65.2%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;\frac{x + -2}{\frac{5.86923874282773}{x} - -0.24013125253755718}\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(z \cdot \left(0.0212463641547976 + x \cdot -0.14147091005106402\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x + -2}{\frac{5.86923874282773}{x} - -0.24013125253755718}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 15: 76.8% accurate, 1.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;\frac{0 - \left(x + -2\right)}{-0.24013125253755718}\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(z \cdot \left(0.0212463641547976 + x \cdot -0.14147091005106402\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + -2\right) \cdot \frac{1}{\frac{5.86923874282773}{x} + 0.24013125253755718}\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (if (<= x -490000000.0)
       (/ (- 0.0 (+ x -2.0)) -0.24013125253755718)
       (if (<= x 8.5e-8)
         (* (+ x -2.0) (* z (+ 0.0212463641547976 (* x -0.14147091005106402))))
         (* (+ x -2.0) (/ 1.0 (+ (/ 5.86923874282773 x) 0.24013125253755718))))))
    double code(double x, double y, double z) {
    	double tmp;
    	if (x <= -490000000.0) {
    		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718;
    	} else if (x <= 8.5e-8) {
    		tmp = (x + -2.0) * (z * (0.0212463641547976 + (x * -0.14147091005106402)));
    	} else {
    		tmp = (x + -2.0) * (1.0 / ((5.86923874282773 / x) + 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) :: tmp
        if (x <= (-490000000.0d0)) then
            tmp = (0.0d0 - (x + (-2.0d0))) / (-0.24013125253755718d0)
        else if (x <= 8.5d-8) then
            tmp = (x + (-2.0d0)) * (z * (0.0212463641547976d0 + (x * (-0.14147091005106402d0))))
        else
            tmp = (x + (-2.0d0)) * (1.0d0 / ((5.86923874282773d0 / x) + 0.24013125253755718d0))
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z) {
    	double tmp;
    	if (x <= -490000000.0) {
    		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718;
    	} else if (x <= 8.5e-8) {
    		tmp = (x + -2.0) * (z * (0.0212463641547976 + (x * -0.14147091005106402)));
    	} else {
    		tmp = (x + -2.0) * (1.0 / ((5.86923874282773 / x) + 0.24013125253755718));
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	tmp = 0
    	if x <= -490000000.0:
    		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718
    	elif x <= 8.5e-8:
    		tmp = (x + -2.0) * (z * (0.0212463641547976 + (x * -0.14147091005106402)))
    	else:
    		tmp = (x + -2.0) * (1.0 / ((5.86923874282773 / x) + 0.24013125253755718))
    	return tmp
    
    function code(x, y, z)
    	tmp = 0.0
    	if (x <= -490000000.0)
    		tmp = Float64(Float64(0.0 - Float64(x + -2.0)) / -0.24013125253755718);
    	elseif (x <= 8.5e-8)
    		tmp = Float64(Float64(x + -2.0) * Float64(z * Float64(0.0212463641547976 + Float64(x * -0.14147091005106402))));
    	else
    		tmp = Float64(Float64(x + -2.0) * Float64(1.0 / Float64(Float64(5.86923874282773 / x) + 0.24013125253755718)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	tmp = 0.0;
    	if (x <= -490000000.0)
    		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718;
    	elseif (x <= 8.5e-8)
    		tmp = (x + -2.0) * (z * (0.0212463641547976 + (x * -0.14147091005106402)));
    	else
    		tmp = (x + -2.0) * (1.0 / ((5.86923874282773 / x) + 0.24013125253755718));
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := If[LessEqual[x, -490000000.0], N[(N[(0.0 - N[(x + -2.0), $MachinePrecision]), $MachinePrecision] / -0.24013125253755718), $MachinePrecision], If[LessEqual[x, 8.5e-8], N[(N[(x + -2.0), $MachinePrecision] * N[(z * N[(0.0212463641547976 + N[(x * -0.14147091005106402), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(1.0 / N[(N[(5.86923874282773 / x), $MachinePrecision] + 0.24013125253755718), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;x \leq -490000000:\\
    \;\;\;\;\frac{0 - \left(x + -2\right)}{-0.24013125253755718}\\
    
    \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\
    \;\;\;\;\left(x + -2\right) \cdot \left(z \cdot \left(0.0212463641547976 + x \cdot -0.14147091005106402\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(x + -2\right) \cdot \frac{1}{\frac{5.86923874282773}{x} + 0.24013125253755718}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if x < -4.9e8

      1. Initial program 12.8%

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

          \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
        3. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
        4. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
      3. Simplified21.8%

        \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
      4. Add Preprocessing
      5. Applied egg-rr21.8%

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

        \[\leadsto \color{blue}{\frac{-\left(x + -2\right)}{\frac{-1}{\frac{z + 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}}}} \]
      7. Taylor expanded in x around inf

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \color{blue}{\frac{-25000000000}{104109730557}}\right) \]
      8. Step-by-step derivation
        1. Simplified90.2%

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

        if -4.9e8 < x < 8.49999999999999935e-8

        1. Initial program 98.8%

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

            \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
          3. sub-negN/A

            \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
          4. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
          5. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
          6. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
        3. Simplified99.6%

          \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
        4. Add Preprocessing
        5. Taylor expanded in x around 0

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \color{blue}{\left(\frac{500000000}{23533438303} \cdot z + x \cdot \left(\frac{500000000}{23533438303} \cdot y - \frac{78349803973500000000}{553822718361107519809} \cdot z\right)\right)}\right) \]
        6. Step-by-step derivation
          1. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\left(\frac{500000000}{23533438303} \cdot z\right), \color{blue}{\left(x \cdot \left(\frac{500000000}{23533438303} \cdot y - \frac{78349803973500000000}{553822718361107519809} \cdot z\right)\right)}\right)\right) \]
          2. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\left(z \cdot \frac{500000000}{23533438303}\right), \left(\color{blue}{x} \cdot \left(\frac{500000000}{23533438303} \cdot y - \frac{78349803973500000000}{553822718361107519809} \cdot z\right)\right)\right)\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \left(\color{blue}{x} \cdot \left(\frac{500000000}{23533438303} \cdot y - \frac{78349803973500000000}{553822718361107519809} \cdot z\right)\right)\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{500000000}{23533438303} \cdot y - \frac{78349803973500000000}{553822718361107519809} \cdot z\right)}\right)\right)\right) \]
          5. sub-negN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \left(\frac{500000000}{23533438303} \cdot y + \color{blue}{\left(\mathsf{neg}\left(\frac{78349803973500000000}{553822718361107519809} \cdot z\right)\right)}\right)\right)\right)\right) \]
          6. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\frac{500000000}{23533438303} \cdot y\right), \color{blue}{\left(\mathsf{neg}\left(\frac{78349803973500000000}{553822718361107519809} \cdot z\right)\right)}\right)\right)\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{500000000}{23533438303}, y\right), \left(\mathsf{neg}\left(\color{blue}{\frac{78349803973500000000}{553822718361107519809} \cdot z}\right)\right)\right)\right)\right)\right) \]
          8. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{500000000}{23533438303}, y\right), \left(\mathsf{neg}\left(z \cdot \frac{78349803973500000000}{553822718361107519809}\right)\right)\right)\right)\right)\right) \]
          9. distribute-rgt-neg-inN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{500000000}{23533438303}, y\right), \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{78349803973500000000}{553822718361107519809}\right)\right)}\right)\right)\right)\right)\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{500000000}{23533438303}, y\right), \mathsf{*.f64}\left(z, \color{blue}{\left(\mathsf{neg}\left(\frac{78349803973500000000}{553822718361107519809}\right)\right)}\right)\right)\right)\right)\right) \]
          11. metadata-eval91.9%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{500000000}{23533438303}, y\right), \mathsf{*.f64}\left(z, \frac{-78349803973500000000}{553822718361107519809}\right)\right)\right)\right)\right) \]
        7. Simplified91.9%

          \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(z \cdot 0.0212463641547976 + x \cdot \left(0.0212463641547976 \cdot y + z \cdot -0.14147091005106402\right)\right)} \]
        8. Taylor expanded in z around inf

          \[\leadsto \color{blue}{z \cdot \left(\left(\frac{500000000}{23533438303} + \frac{-78349803973500000000}{553822718361107519809} \cdot x\right) \cdot \left(x - 2\right)\right)} \]
        9. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \left(z \cdot \left(\frac{500000000}{23533438303} + \frac{-78349803973500000000}{553822718361107519809} \cdot x\right)\right) \cdot \color{blue}{\left(x - 2\right)} \]
          2. distribute-rgt-inN/A

            \[\leadsto \left(\frac{500000000}{23533438303} \cdot z + \left(\frac{-78349803973500000000}{553822718361107519809} \cdot x\right) \cdot z\right) \cdot \left(\color{blue}{x} - 2\right) \]
          3. associate-*r*N/A

            \[\leadsto \left(\frac{500000000}{23533438303} \cdot z + \frac{-78349803973500000000}{553822718361107519809} \cdot \left(x \cdot z\right)\right) \cdot \left(x - 2\right) \]
          4. +-commutativeN/A

            \[\leadsto \left(\frac{-78349803973500000000}{553822718361107519809} \cdot \left(x \cdot z\right) + \frac{500000000}{23533438303} \cdot z\right) \cdot \left(\color{blue}{x} - 2\right) \]
          5. *-commutativeN/A

            \[\leadsto \left(x - 2\right) \cdot \color{blue}{\left(\frac{-78349803973500000000}{553822718361107519809} \cdot \left(x \cdot z\right) + \frac{500000000}{23533438303} \cdot z\right)} \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{-78349803973500000000}{553822718361107519809} \cdot \left(x \cdot z\right) + \frac{500000000}{23533438303} \cdot z\right)}\right) \]
          7. sub-negN/A

            \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\color{blue}{\frac{-78349803973500000000}{553822718361107519809} \cdot \left(x \cdot z\right)} + \frac{500000000}{23533438303} \cdot z\right)\right) \]
          8. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\left(x + -2\right), \left(\frac{-78349803973500000000}{553822718361107519809} \cdot \color{blue}{\left(x \cdot z\right)} + \frac{500000000}{23533438303} \cdot z\right)\right) \]
          9. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\color{blue}{\frac{-78349803973500000000}{553822718361107519809} \cdot \left(x \cdot z\right)} + \frac{500000000}{23533438303} \cdot z\right)\right) \]
          10. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{500000000}{23533438303} \cdot z + \color{blue}{\frac{-78349803973500000000}{553822718361107519809} \cdot \left(x \cdot z\right)}\right)\right) \]
          11. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{500000000}{23533438303} \cdot z + \left(\frac{-78349803973500000000}{553822718361107519809} \cdot x\right) \cdot \color{blue}{z}\right)\right) \]
          12. distribute-rgt-inN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(z \cdot \color{blue}{\left(\frac{500000000}{23533438303} + \frac{-78349803973500000000}{553822718361107519809} \cdot x\right)}\right)\right) \]
          13. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{*.f64}\left(z, \color{blue}{\left(\frac{500000000}{23533438303} + \frac{-78349803973500000000}{553822718361107519809} \cdot x\right)}\right)\right) \]
          14. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{500000000}{23533438303}, \color{blue}{\left(\frac{-78349803973500000000}{553822718361107519809} \cdot x\right)}\right)\right)\right) \]
          15. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{500000000}{23533438303}, \left(x \cdot \color{blue}{\frac{-78349803973500000000}{553822718361107519809}}\right)\right)\right)\right) \]
          16. *-lowering-*.f6465.2%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{500000000}{23533438303}, \mathsf{*.f64}\left(x, \color{blue}{\frac{-78349803973500000000}{553822718361107519809}}\right)\right)\right)\right) \]
        10. Simplified65.2%

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

        if 8.49999999999999935e-8 < x

        1. Initial program 23.3%

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

            \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
          3. sub-negN/A

            \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
          4. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
          5. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
          6. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
        3. Simplified31.4%

          \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
        4. Add Preprocessing
        5. Applied egg-rr31.3%

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{25000000000}{104109730557} + \frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)}\right)\right) \]
        7. Step-by-step derivation
          1. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{25000000000}{104109730557}, \color{blue}{\left(\frac{63615716158700684400745}{10838835996651139530249} \cdot \frac{1}{x}\right)}\right)\right)\right) \]
          2. associate-*r/N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{25000000000}{104109730557}, \left(\frac{\frac{63615716158700684400745}{10838835996651139530249} \cdot 1}{\color{blue}{x}}\right)\right)\right)\right) \]
          3. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{25000000000}{104109730557}, \left(\frac{\frac{63615716158700684400745}{10838835996651139530249}}{x}\right)\right)\right)\right) \]
          4. /-lowering-/.f6482.9%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{25000000000}{104109730557}, \mathsf{/.f64}\left(\frac{63615716158700684400745}{10838835996651139530249}, \color{blue}{x}\right)\right)\right)\right) \]
        8. Simplified82.9%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;\frac{0 - \left(x + -2\right)}{-0.24013125253755718}\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(z \cdot \left(0.0212463641547976 + x \cdot -0.14147091005106402\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + -2\right) \cdot \frac{1}{\frac{5.86923874282773}{x} + 0.24013125253755718}\\ \end{array} \]
      11. Add Preprocessing

      Alternative 16: 76.8% accurate, 1.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;\frac{0 - \left(x + -2\right)}{-0.24013125253755718}\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(z \cdot \left(0.0212463641547976 + x \cdot -0.14147091005106402\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(4.16438922228 + \frac{-110.1139242984811}{x}\right)\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (if (<= x -490000000.0)
         (/ (- 0.0 (+ x -2.0)) -0.24013125253755718)
         (if (<= x 8.5e-8)
           (* (+ x -2.0) (* z (+ 0.0212463641547976 (* x -0.14147091005106402))))
           (* x (+ 4.16438922228 (/ -110.1139242984811 x))))))
      double code(double x, double y, double z) {
      	double tmp;
      	if (x <= -490000000.0) {
      		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718;
      	} else if (x <= 8.5e-8) {
      		tmp = (x + -2.0) * (z * (0.0212463641547976 + (x * -0.14147091005106402)));
      	} else {
      		tmp = x * (4.16438922228 + (-110.1139242984811 / 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 <= (-490000000.0d0)) then
              tmp = (0.0d0 - (x + (-2.0d0))) / (-0.24013125253755718d0)
          else if (x <= 8.5d-8) then
              tmp = (x + (-2.0d0)) * (z * (0.0212463641547976d0 + (x * (-0.14147091005106402d0))))
          else
              tmp = x * (4.16438922228d0 + ((-110.1139242984811d0) / x))
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z) {
      	double tmp;
      	if (x <= -490000000.0) {
      		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718;
      	} else if (x <= 8.5e-8) {
      		tmp = (x + -2.0) * (z * (0.0212463641547976 + (x * -0.14147091005106402)));
      	} else {
      		tmp = x * (4.16438922228 + (-110.1139242984811 / x));
      	}
      	return tmp;
      }
      
      def code(x, y, z):
      	tmp = 0
      	if x <= -490000000.0:
      		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718
      	elif x <= 8.5e-8:
      		tmp = (x + -2.0) * (z * (0.0212463641547976 + (x * -0.14147091005106402)))
      	else:
      		tmp = x * (4.16438922228 + (-110.1139242984811 / x))
      	return tmp
      
      function code(x, y, z)
      	tmp = 0.0
      	if (x <= -490000000.0)
      		tmp = Float64(Float64(0.0 - Float64(x + -2.0)) / -0.24013125253755718);
      	elseif (x <= 8.5e-8)
      		tmp = Float64(Float64(x + -2.0) * Float64(z * Float64(0.0212463641547976 + Float64(x * -0.14147091005106402))));
      	else
      		tmp = Float64(x * Float64(4.16438922228 + Float64(-110.1139242984811 / x)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z)
      	tmp = 0.0;
      	if (x <= -490000000.0)
      		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718;
      	elseif (x <= 8.5e-8)
      		tmp = (x + -2.0) * (z * (0.0212463641547976 + (x * -0.14147091005106402)));
      	else
      		tmp = x * (4.16438922228 + (-110.1139242984811 / x));
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_] := If[LessEqual[x, -490000000.0], N[(N[(0.0 - N[(x + -2.0), $MachinePrecision]), $MachinePrecision] / -0.24013125253755718), $MachinePrecision], If[LessEqual[x, 8.5e-8], N[(N[(x + -2.0), $MachinePrecision] * N[(z * N[(0.0212463641547976 + N[(x * -0.14147091005106402), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(4.16438922228 + N[(-110.1139242984811 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;x \leq -490000000:\\
      \;\;\;\;\frac{0 - \left(x + -2\right)}{-0.24013125253755718}\\
      
      \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\
      \;\;\;\;\left(x + -2\right) \cdot \left(z \cdot \left(0.0212463641547976 + x \cdot -0.14147091005106402\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;x \cdot \left(4.16438922228 + \frac{-110.1139242984811}{x}\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if x < -4.9e8

        1. Initial program 12.8%

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

            \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
          3. sub-negN/A

            \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
          4. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
          5. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
          6. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
        3. Simplified21.8%

          \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
        4. Add Preprocessing
        5. Applied egg-rr21.8%

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

          \[\leadsto \color{blue}{\frac{-\left(x + -2\right)}{\frac{-1}{\frac{z + 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}}}} \]
        7. Taylor expanded in x around inf

          \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \color{blue}{\frac{-25000000000}{104109730557}}\right) \]
        8. Step-by-step derivation
          1. Simplified90.2%

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

          if -4.9e8 < x < 8.49999999999999935e-8

          1. Initial program 98.8%

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

              \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
            3. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
            4. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
            5. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
            6. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
          3. Simplified99.6%

            \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
          4. Add Preprocessing
          5. Taylor expanded in x around 0

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \color{blue}{\left(\frac{500000000}{23533438303} \cdot z + x \cdot \left(\frac{500000000}{23533438303} \cdot y - \frac{78349803973500000000}{553822718361107519809} \cdot z\right)\right)}\right) \]
          6. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\left(\frac{500000000}{23533438303} \cdot z\right), \color{blue}{\left(x \cdot \left(\frac{500000000}{23533438303} \cdot y - \frac{78349803973500000000}{553822718361107519809} \cdot z\right)\right)}\right)\right) \]
            2. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\left(z \cdot \frac{500000000}{23533438303}\right), \left(\color{blue}{x} \cdot \left(\frac{500000000}{23533438303} \cdot y - \frac{78349803973500000000}{553822718361107519809} \cdot z\right)\right)\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \left(\color{blue}{x} \cdot \left(\frac{500000000}{23533438303} \cdot y - \frac{78349803973500000000}{553822718361107519809} \cdot z\right)\right)\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{500000000}{23533438303} \cdot y - \frac{78349803973500000000}{553822718361107519809} \cdot z\right)}\right)\right)\right) \]
            5. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \left(\frac{500000000}{23533438303} \cdot y + \color{blue}{\left(\mathsf{neg}\left(\frac{78349803973500000000}{553822718361107519809} \cdot z\right)\right)}\right)\right)\right)\right) \]
            6. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\frac{500000000}{23533438303} \cdot y\right), \color{blue}{\left(\mathsf{neg}\left(\frac{78349803973500000000}{553822718361107519809} \cdot z\right)\right)}\right)\right)\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{500000000}{23533438303}, y\right), \left(\mathsf{neg}\left(\color{blue}{\frac{78349803973500000000}{553822718361107519809} \cdot z}\right)\right)\right)\right)\right)\right) \]
            8. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{500000000}{23533438303}, y\right), \left(\mathsf{neg}\left(z \cdot \frac{78349803973500000000}{553822718361107519809}\right)\right)\right)\right)\right)\right) \]
            9. distribute-rgt-neg-inN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{500000000}{23533438303}, y\right), \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{78349803973500000000}{553822718361107519809}\right)\right)}\right)\right)\right)\right)\right) \]
            10. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{500000000}{23533438303}, y\right), \mathsf{*.f64}\left(z, \color{blue}{\left(\mathsf{neg}\left(\frac{78349803973500000000}{553822718361107519809}\right)\right)}\right)\right)\right)\right)\right) \]
            11. metadata-eval91.9%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \frac{500000000}{23533438303}\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{500000000}{23533438303}, y\right), \mathsf{*.f64}\left(z, \frac{-78349803973500000000}{553822718361107519809}\right)\right)\right)\right)\right) \]
          7. Simplified91.9%

            \[\leadsto \left(x + -2\right) \cdot \color{blue}{\left(z \cdot 0.0212463641547976 + x \cdot \left(0.0212463641547976 \cdot y + z \cdot -0.14147091005106402\right)\right)} \]
          8. Taylor expanded in z around inf

            \[\leadsto \color{blue}{z \cdot \left(\left(\frac{500000000}{23533438303} + \frac{-78349803973500000000}{553822718361107519809} \cdot x\right) \cdot \left(x - 2\right)\right)} \]
          9. Step-by-step derivation
            1. associate-*r*N/A

              \[\leadsto \left(z \cdot \left(\frac{500000000}{23533438303} + \frac{-78349803973500000000}{553822718361107519809} \cdot x\right)\right) \cdot \color{blue}{\left(x - 2\right)} \]
            2. distribute-rgt-inN/A

              \[\leadsto \left(\frac{500000000}{23533438303} \cdot z + \left(\frac{-78349803973500000000}{553822718361107519809} \cdot x\right) \cdot z\right) \cdot \left(\color{blue}{x} - 2\right) \]
            3. associate-*r*N/A

              \[\leadsto \left(\frac{500000000}{23533438303} \cdot z + \frac{-78349803973500000000}{553822718361107519809} \cdot \left(x \cdot z\right)\right) \cdot \left(x - 2\right) \]
            4. +-commutativeN/A

              \[\leadsto \left(\frac{-78349803973500000000}{553822718361107519809} \cdot \left(x \cdot z\right) + \frac{500000000}{23533438303} \cdot z\right) \cdot \left(\color{blue}{x} - 2\right) \]
            5. *-commutativeN/A

              \[\leadsto \left(x - 2\right) \cdot \color{blue}{\left(\frac{-78349803973500000000}{553822718361107519809} \cdot \left(x \cdot z\right) + \frac{500000000}{23533438303} \cdot z\right)} \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{-78349803973500000000}{553822718361107519809} \cdot \left(x \cdot z\right) + \frac{500000000}{23533438303} \cdot z\right)}\right) \]
            7. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\color{blue}{\frac{-78349803973500000000}{553822718361107519809} \cdot \left(x \cdot z\right)} + \frac{500000000}{23533438303} \cdot z\right)\right) \]
            8. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\left(x + -2\right), \left(\frac{-78349803973500000000}{553822718361107519809} \cdot \color{blue}{\left(x \cdot z\right)} + \frac{500000000}{23533438303} \cdot z\right)\right) \]
            9. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\color{blue}{\frac{-78349803973500000000}{553822718361107519809} \cdot \left(x \cdot z\right)} + \frac{500000000}{23533438303} \cdot z\right)\right) \]
            10. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{500000000}{23533438303} \cdot z + \color{blue}{\frac{-78349803973500000000}{553822718361107519809} \cdot \left(x \cdot z\right)}\right)\right) \]
            11. associate-*r*N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{500000000}{23533438303} \cdot z + \left(\frac{-78349803973500000000}{553822718361107519809} \cdot x\right) \cdot \color{blue}{z}\right)\right) \]
            12. distribute-rgt-inN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(z \cdot \color{blue}{\left(\frac{500000000}{23533438303} + \frac{-78349803973500000000}{553822718361107519809} \cdot x\right)}\right)\right) \]
            13. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{*.f64}\left(z, \color{blue}{\left(\frac{500000000}{23533438303} + \frac{-78349803973500000000}{553822718361107519809} \cdot x\right)}\right)\right) \]
            14. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{500000000}{23533438303}, \color{blue}{\left(\frac{-78349803973500000000}{553822718361107519809} \cdot x\right)}\right)\right)\right) \]
            15. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{500000000}{23533438303}, \left(x \cdot \color{blue}{\frac{-78349803973500000000}{553822718361107519809}}\right)\right)\right)\right) \]
            16. *-lowering-*.f6465.2%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{500000000}{23533438303}, \mathsf{*.f64}\left(x, \color{blue}{\frac{-78349803973500000000}{553822718361107519809}}\right)\right)\right)\right) \]
          10. Simplified65.2%

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

          if 8.49999999999999935e-8 < x

          1. Initial program 23.3%

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

              \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
            3. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
            4. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
            5. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
            6. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
          3. Simplified31.4%

            \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
          4. Add Preprocessing
          5. Taylor expanded in x around inf

            \[\leadsto \color{blue}{x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)} \]
          6. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)}\right) \]
            2. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{104109730557}{25000000000} + \color{blue}{\left(\mathsf{neg}\left(\frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\right)}\right)\right) \]
            3. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \color{blue}{\left(\mathsf{neg}\left(\frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\right)}\right)\right) \]
            4. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \left(\mathsf{neg}\left(\frac{\frac{13764240537310136880149}{125000000000000000000} \cdot 1}{x}\right)\right)\right)\right) \]
            5. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \left(\mathsf{neg}\left(\frac{\frac{13764240537310136880149}{125000000000000000000}}{x}\right)\right)\right)\right) \]
            6. distribute-neg-fracN/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \left(\frac{\mathsf{neg}\left(\frac{13764240537310136880149}{125000000000000000000}\right)}{\color{blue}{x}}\right)\right)\right) \]
            7. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\frac{13764240537310136880149}{125000000000000000000}\right)\right), \color{blue}{x}\right)\right)\right) \]
            8. metadata-eval82.8%

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\frac{-13764240537310136880149}{125000000000000000000}, x\right)\right)\right) \]
          7. Simplified82.8%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;\frac{0 - \left(x + -2\right)}{-0.24013125253755718}\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(z \cdot \left(0.0212463641547976 + x \cdot -0.14147091005106402\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(4.16438922228 + \frac{-110.1139242984811}{x}\right)\\ \end{array} \]
        11. Add Preprocessing

        Alternative 17: 76.7% accurate, 1.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;\frac{0 - \left(x + -2\right)}{-0.24013125253755718}\\ \mathbf{elif}\;x \leq 1520000:\\ \;\;\;\;z \cdot \left(-0.0424927283095952 + x \cdot 0.28294182010212804\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(4.16438922228 + \frac{-110.1139242984811 + \frac{3655.1204654076414}{x}}{x}\right)\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= x -490000000.0)
           (/ (- 0.0 (+ x -2.0)) -0.24013125253755718)
           (if (<= x 1520000.0)
             (* z (+ -0.0424927283095952 (* x 0.28294182010212804)))
             (*
              x
              (+
               4.16438922228
               (/ (+ -110.1139242984811 (/ 3655.1204654076414 x)) x))))))
        double code(double x, double y, double z) {
        	double tmp;
        	if (x <= -490000000.0) {
        		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718;
        	} else if (x <= 1520000.0) {
        		tmp = z * (-0.0424927283095952 + (x * 0.28294182010212804));
        	} else {
        		tmp = x * (4.16438922228 + ((-110.1139242984811 + (3655.1204654076414 / 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 <= (-490000000.0d0)) then
                tmp = (0.0d0 - (x + (-2.0d0))) / (-0.24013125253755718d0)
            else if (x <= 1520000.0d0) then
                tmp = z * ((-0.0424927283095952d0) + (x * 0.28294182010212804d0))
            else
                tmp = x * (4.16438922228d0 + (((-110.1139242984811d0) + (3655.1204654076414d0 / x)) / x))
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double tmp;
        	if (x <= -490000000.0) {
        		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718;
        	} else if (x <= 1520000.0) {
        		tmp = z * (-0.0424927283095952 + (x * 0.28294182010212804));
        	} else {
        		tmp = x * (4.16438922228 + ((-110.1139242984811 + (3655.1204654076414 / x)) / x));
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	tmp = 0
        	if x <= -490000000.0:
        		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718
        	elif x <= 1520000.0:
        		tmp = z * (-0.0424927283095952 + (x * 0.28294182010212804))
        	else:
        		tmp = x * (4.16438922228 + ((-110.1139242984811 + (3655.1204654076414 / x)) / x))
        	return tmp
        
        function code(x, y, z)
        	tmp = 0.0
        	if (x <= -490000000.0)
        		tmp = Float64(Float64(0.0 - Float64(x + -2.0)) / -0.24013125253755718);
        	elseif (x <= 1520000.0)
        		tmp = Float64(z * Float64(-0.0424927283095952 + Float64(x * 0.28294182010212804)));
        	else
        		tmp = Float64(x * Float64(4.16438922228 + Float64(Float64(-110.1139242984811 + Float64(3655.1204654076414 / x)) / x)));
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	tmp = 0.0;
        	if (x <= -490000000.0)
        		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718;
        	elseif (x <= 1520000.0)
        		tmp = z * (-0.0424927283095952 + (x * 0.28294182010212804));
        	else
        		tmp = x * (4.16438922228 + ((-110.1139242984811 + (3655.1204654076414 / x)) / x));
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := If[LessEqual[x, -490000000.0], N[(N[(0.0 - N[(x + -2.0), $MachinePrecision]), $MachinePrecision] / -0.24013125253755718), $MachinePrecision], If[LessEqual[x, 1520000.0], N[(z * N[(-0.0424927283095952 + N[(x * 0.28294182010212804), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(4.16438922228 + N[(N[(-110.1139242984811 + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq -490000000:\\
        \;\;\;\;\frac{0 - \left(x + -2\right)}{-0.24013125253755718}\\
        
        \mathbf{elif}\;x \leq 1520000:\\
        \;\;\;\;z \cdot \left(-0.0424927283095952 + x \cdot 0.28294182010212804\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;x \cdot \left(4.16438922228 + \frac{-110.1139242984811 + \frac{3655.1204654076414}{x}}{x}\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if x < -4.9e8

          1. Initial program 12.8%

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

              \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
            3. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
            4. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
            5. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
            6. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
          3. Simplified21.8%

            \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
          4. Add Preprocessing
          5. Applied egg-rr21.8%

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

            \[\leadsto \color{blue}{\frac{-\left(x + -2\right)}{\frac{-1}{\frac{z + 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}}}} \]
          7. Taylor expanded in x around inf

            \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \color{blue}{\frac{-25000000000}{104109730557}}\right) \]
          8. Step-by-step derivation
            1. Simplified90.2%

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

            if -4.9e8 < x < 1.52e6

            1. Initial program 98.8%

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

              \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(-2 \cdot z\right)}, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
            4. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\left(z \cdot -2\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right)}, \frac{23533438303}{500000000}\right)\right) \]
              2. *-lowering-*.f6461.5%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, -2\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right)}, \frac{23533438303}{500000000}\right)\right) \]
            5. Simplified61.5%

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

              \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z + \frac{156699607947000000000}{553822718361107519809} \cdot \left(x \cdot z\right)} \]
            7. Step-by-step derivation
              1. associate-*r*N/A

                \[\leadsto \frac{-1000000000}{23533438303} \cdot z + \left(\frac{156699607947000000000}{553822718361107519809} \cdot x\right) \cdot \color{blue}{z} \]
              2. distribute-rgt-outN/A

                \[\leadsto z \cdot \color{blue}{\left(\frac{-1000000000}{23533438303} + \frac{156699607947000000000}{553822718361107519809} \cdot x\right)} \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(\frac{-1000000000}{23533438303} + \frac{156699607947000000000}{553822718361107519809} \cdot x\right)}\right) \]
              4. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{-1000000000}{23533438303}, \color{blue}{\left(\frac{156699607947000000000}{553822718361107519809} \cdot x\right)}\right)\right) \]
              5. *-lowering-*.f6461.5%

                \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{-1000000000}{23533438303}, \mathsf{*.f64}\left(\frac{156699607947000000000}{553822718361107519809}, \color{blue}{x}\right)\right)\right) \]
            8. Simplified61.5%

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

            if 1.52e6 < x

            1. Initial program 17.3%

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

                \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
              3. sub-negN/A

                \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
              4. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
              5. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
              6. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
            3. Simplified26.0%

              \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
            4. Add Preprocessing
            5. Taylor expanded in x around inf

              \[\leadsto \color{blue}{x \cdot \left(\left(\frac{104109730557}{25000000000} + \frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{{x}^{2}}\right) - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)} \]
            6. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\left(\frac{104109730557}{25000000000} + \frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{{x}^{2}}\right) - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)}\right) \]
              2. associate--l+N/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{104109730557}{25000000000} + \color{blue}{\left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{{x}^{2}} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)}\right)\right) \]
              3. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{104109730557}{25000000000} + \left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{x \cdot x} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\right)\right) \]
              4. associate-/r*N/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{104109730557}{25000000000} + \left(\frac{\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{x}}{x} - \color{blue}{\frac{13764240537310136880149}{125000000000000000000}} \cdot \frac{1}{x}\right)\right)\right) \]
              5. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{104109730557}{25000000000} + \left(\frac{\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000} \cdot 1}{x}}{x} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\right)\right) \]
              6. associate-*r/N/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{104109730557}{25000000000} + \left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000} \cdot \frac{1}{x}}{x} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\right)\right) \]
              7. associate-*r/N/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{104109730557}{25000000000} + \left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000} \cdot \frac{1}{x}}{x} - \frac{\frac{13764240537310136880149}{125000000000000000000} \cdot 1}{\color{blue}{x}}\right)\right)\right) \]
              8. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{104109730557}{25000000000} + \left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000} \cdot \frac{1}{x}}{x} - \frac{\frac{13764240537310136880149}{125000000000000000000}}{x}\right)\right)\right) \]
              9. div-subN/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{104109730557}{25000000000} + \frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000} \cdot \frac{1}{x} - \frac{13764240537310136880149}{125000000000000000000}}{\color{blue}{x}}\right)\right) \]
              10. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \color{blue}{\left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000} \cdot \frac{1}{x} - \frac{13764240537310136880149}{125000000000000000000}}{x}\right)}\right)\right) \]
              11. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\left(\frac{2284450290879775841688574159837293}{625000000000000000000000000000} \cdot \frac{1}{x} - \frac{13764240537310136880149}{125000000000000000000}\right), \color{blue}{x}\right)\right)\right) \]
              12. sub-negN/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\left(\frac{2284450290879775841688574159837293}{625000000000000000000000000000} \cdot \frac{1}{x} + \left(\mathsf{neg}\left(\frac{13764240537310136880149}{125000000000000000000}\right)\right)\right), x\right)\right)\right) \]
              13. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{2284450290879775841688574159837293}{625000000000000000000000000000} \cdot \frac{1}{x}\right), \left(\mathsf{neg}\left(\frac{13764240537310136880149}{125000000000000000000}\right)\right)\right), x\right)\right)\right) \]
              14. associate-*r/N/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000} \cdot 1}{x}\right), \left(\mathsf{neg}\left(\frac{13764240537310136880149}{125000000000000000000}\right)\right)\right), x\right)\right)\right) \]
              15. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{x}\right), \left(\mathsf{neg}\left(\frac{13764240537310136880149}{125000000000000000000}\right)\right)\right), x\right)\right)\right) \]
              16. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{2284450290879775841688574159837293}{625000000000000000000000000000}, x\right), \left(\mathsf{neg}\left(\frac{13764240537310136880149}{125000000000000000000}\right)\right)\right), x\right)\right)\right) \]
              17. metadata-eval88.9%

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{2284450290879775841688574159837293}{625000000000000000000000000000}, x\right), \frac{-13764240537310136880149}{125000000000000000000}\right), x\right)\right)\right) \]
            7. Simplified88.9%

              \[\leadsto \color{blue}{x \cdot \left(4.16438922228 + \frac{\frac{3655.1204654076414}{x} + -110.1139242984811}{x}\right)} \]
          9. Recombined 3 regimes into one program.
          10. Final simplification76.8%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;\frac{0 - \left(x + -2\right)}{-0.24013125253755718}\\ \mathbf{elif}\;x \leq 1520000:\\ \;\;\;\;z \cdot \left(-0.0424927283095952 + x \cdot 0.28294182010212804\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(4.16438922228 + \frac{-110.1139242984811 + \frac{3655.1204654076414}{x}}{x}\right)\\ \end{array} \]
          11. Add Preprocessing

          Alternative 18: 76.6% accurate, 1.9× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;\frac{0 - \left(x + -2\right)}{-0.24013125253755718}\\ \mathbf{elif}\;x \leq 1550000:\\ \;\;\;\;z \cdot \left(-0.0424927283095952 + x \cdot 0.28294182010212804\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{-101.7851458539211}{x}\right)\\ \end{array} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (if (<= x -490000000.0)
             (/ (- 0.0 (+ x -2.0)) -0.24013125253755718)
             (if (<= x 1550000.0)
               (* z (+ -0.0424927283095952 (* x 0.28294182010212804)))
               (* (+ x -2.0) (+ 4.16438922228 (/ -101.7851458539211 x))))))
          double code(double x, double y, double z) {
          	double tmp;
          	if (x <= -490000000.0) {
          		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718;
          	} else if (x <= 1550000.0) {
          		tmp = z * (-0.0424927283095952 + (x * 0.28294182010212804));
          	} else {
          		tmp = (x + -2.0) * (4.16438922228 + (-101.7851458539211 / x));
          	}
          	return tmp;
          }
          
          real(8) function code(x, y, z)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8) :: tmp
              if (x <= (-490000000.0d0)) then
                  tmp = (0.0d0 - (x + (-2.0d0))) / (-0.24013125253755718d0)
              else if (x <= 1550000.0d0) then
                  tmp = z * ((-0.0424927283095952d0) + (x * 0.28294182010212804d0))
              else
                  tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((-101.7851458539211d0) / x))
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z) {
          	double tmp;
          	if (x <= -490000000.0) {
          		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718;
          	} else if (x <= 1550000.0) {
          		tmp = z * (-0.0424927283095952 + (x * 0.28294182010212804));
          	} else {
          		tmp = (x + -2.0) * (4.16438922228 + (-101.7851458539211 / x));
          	}
          	return tmp;
          }
          
          def code(x, y, z):
          	tmp = 0
          	if x <= -490000000.0:
          		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718
          	elif x <= 1550000.0:
          		tmp = z * (-0.0424927283095952 + (x * 0.28294182010212804))
          	else:
          		tmp = (x + -2.0) * (4.16438922228 + (-101.7851458539211 / x))
          	return tmp
          
          function code(x, y, z)
          	tmp = 0.0
          	if (x <= -490000000.0)
          		tmp = Float64(Float64(0.0 - Float64(x + -2.0)) / -0.24013125253755718);
          	elseif (x <= 1550000.0)
          		tmp = Float64(z * Float64(-0.0424927283095952 + Float64(x * 0.28294182010212804)));
          	else
          		tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(-101.7851458539211 / x)));
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z)
          	tmp = 0.0;
          	if (x <= -490000000.0)
          		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718;
          	elseif (x <= 1550000.0)
          		tmp = z * (-0.0424927283095952 + (x * 0.28294182010212804));
          	else
          		tmp = (x + -2.0) * (4.16438922228 + (-101.7851458539211 / x));
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_] := If[LessEqual[x, -490000000.0], N[(N[(0.0 - N[(x + -2.0), $MachinePrecision]), $MachinePrecision] / -0.24013125253755718), $MachinePrecision], If[LessEqual[x, 1550000.0], N[(z * N[(-0.0424927283095952 + N[(x * 0.28294182010212804), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(-101.7851458539211 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;x \leq -490000000:\\
          \;\;\;\;\frac{0 - \left(x + -2\right)}{-0.24013125253755718}\\
          
          \mathbf{elif}\;x \leq 1550000:\\
          \;\;\;\;z \cdot \left(-0.0424927283095952 + x \cdot 0.28294182010212804\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{-101.7851458539211}{x}\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if x < -4.9e8

            1. Initial program 12.8%

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

                \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
              3. sub-negN/A

                \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
              4. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
              5. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
              6. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
            3. Simplified21.8%

              \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
            4. Add Preprocessing
            5. Applied egg-rr21.8%

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

              \[\leadsto \color{blue}{\frac{-\left(x + -2\right)}{\frac{-1}{\frac{z + 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}}}} \]
            7. Taylor expanded in x around inf

              \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \color{blue}{\frac{-25000000000}{104109730557}}\right) \]
            8. Step-by-step derivation
              1. Simplified90.2%

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

              if -4.9e8 < x < 1.55e6

              1. Initial program 98.8%

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

                \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(-2 \cdot z\right)}, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(\left(z \cdot -2\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right)}, \frac{23533438303}{500000000}\right)\right) \]
                2. *-lowering-*.f6461.5%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, -2\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right)}, \frac{23533438303}{500000000}\right)\right) \]
              5. Simplified61.5%

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

                \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z + \frac{156699607947000000000}{553822718361107519809} \cdot \left(x \cdot z\right)} \]
              7. Step-by-step derivation
                1. associate-*r*N/A

                  \[\leadsto \frac{-1000000000}{23533438303} \cdot z + \left(\frac{156699607947000000000}{553822718361107519809} \cdot x\right) \cdot \color{blue}{z} \]
                2. distribute-rgt-outN/A

                  \[\leadsto z \cdot \color{blue}{\left(\frac{-1000000000}{23533438303} + \frac{156699607947000000000}{553822718361107519809} \cdot x\right)} \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(\frac{-1000000000}{23533438303} + \frac{156699607947000000000}{553822718361107519809} \cdot x\right)}\right) \]
                4. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{-1000000000}{23533438303}, \color{blue}{\left(\frac{156699607947000000000}{553822718361107519809} \cdot x\right)}\right)\right) \]
                5. *-lowering-*.f6461.5%

                  \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{-1000000000}{23533438303}, \mathsf{*.f64}\left(\frac{156699607947000000000}{553822718361107519809}, \color{blue}{x}\right)\right)\right) \]
              8. Simplified61.5%

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

              if 1.55e6 < x

              1. Initial program 17.3%

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

                  \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
                3. sub-negN/A

                  \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                4. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                6. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
              3. Simplified26.0%

                \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
              4. Add Preprocessing
              5. Taylor expanded in x around inf

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \color{blue}{\left(\frac{104109730557}{25000000000} - \frac{12723143231740136880149}{125000000000000000000} \cdot \frac{1}{x}\right)}\right) \]
              6. Step-by-step derivation
                1. sub-negN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{104109730557}{25000000000} + \color{blue}{\left(\mathsf{neg}\left(\frac{12723143231740136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\right)}\right)\right) \]
                2. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \color{blue}{\left(\mathsf{neg}\left(\frac{12723143231740136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\right)}\right)\right) \]
                3. associate-*r/N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \left(\mathsf{neg}\left(\frac{\frac{12723143231740136880149}{125000000000000000000} \cdot 1}{x}\right)\right)\right)\right) \]
                4. metadata-evalN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \left(\mathsf{neg}\left(\frac{\frac{12723143231740136880149}{125000000000000000000}}{x}\right)\right)\right)\right) \]
                5. distribute-neg-fracN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \left(\frac{\mathsf{neg}\left(\frac{12723143231740136880149}{125000000000000000000}\right)}{\color{blue}{x}}\right)\right)\right) \]
                6. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\frac{12723143231740136880149}{125000000000000000000}\right)\right), \color{blue}{x}\right)\right)\right) \]
                7. metadata-eval88.8%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\frac{-12723143231740136880149}{125000000000000000000}, x\right)\right)\right) \]
              7. Simplified88.8%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;\frac{0 - \left(x + -2\right)}{-0.24013125253755718}\\ \mathbf{elif}\;x \leq 1550000:\\ \;\;\;\;z \cdot \left(-0.0424927283095952 + x \cdot 0.28294182010212804\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{-101.7851458539211}{x}\right)\\ \end{array} \]
            11. Add Preprocessing

            Alternative 19: 76.6% accurate, 2.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;\frac{0 - \left(x + -2\right)}{-0.24013125253755718}\\ \mathbf{elif}\;x \leq 1520000:\\ \;\;\;\;z \cdot \left(-0.0424927283095952 + x \cdot 0.28294182010212804\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(4.16438922228 + \frac{-110.1139242984811}{x}\right)\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<= x -490000000.0)
               (/ (- 0.0 (+ x -2.0)) -0.24013125253755718)
               (if (<= x 1520000.0)
                 (* z (+ -0.0424927283095952 (* x 0.28294182010212804)))
                 (* x (+ 4.16438922228 (/ -110.1139242984811 x))))))
            double code(double x, double y, double z) {
            	double tmp;
            	if (x <= -490000000.0) {
            		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718;
            	} else if (x <= 1520000.0) {
            		tmp = z * (-0.0424927283095952 + (x * 0.28294182010212804));
            	} else {
            		tmp = x * (4.16438922228 + (-110.1139242984811 / 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 <= (-490000000.0d0)) then
                    tmp = (0.0d0 - (x + (-2.0d0))) / (-0.24013125253755718d0)
                else if (x <= 1520000.0d0) then
                    tmp = z * ((-0.0424927283095952d0) + (x * 0.28294182010212804d0))
                else
                    tmp = x * (4.16438922228d0 + ((-110.1139242984811d0) / x))
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z) {
            	double tmp;
            	if (x <= -490000000.0) {
            		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718;
            	} else if (x <= 1520000.0) {
            		tmp = z * (-0.0424927283095952 + (x * 0.28294182010212804));
            	} else {
            		tmp = x * (4.16438922228 + (-110.1139242984811 / x));
            	}
            	return tmp;
            }
            
            def code(x, y, z):
            	tmp = 0
            	if x <= -490000000.0:
            		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718
            	elif x <= 1520000.0:
            		tmp = z * (-0.0424927283095952 + (x * 0.28294182010212804))
            	else:
            		tmp = x * (4.16438922228 + (-110.1139242984811 / x))
            	return tmp
            
            function code(x, y, z)
            	tmp = 0.0
            	if (x <= -490000000.0)
            		tmp = Float64(Float64(0.0 - Float64(x + -2.0)) / -0.24013125253755718);
            	elseif (x <= 1520000.0)
            		tmp = Float64(z * Float64(-0.0424927283095952 + Float64(x * 0.28294182010212804)));
            	else
            		tmp = Float64(x * Float64(4.16438922228 + Float64(-110.1139242984811 / x)));
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z)
            	tmp = 0.0;
            	if (x <= -490000000.0)
            		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718;
            	elseif (x <= 1520000.0)
            		tmp = z * (-0.0424927283095952 + (x * 0.28294182010212804));
            	else
            		tmp = x * (4.16438922228 + (-110.1139242984811 / x));
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_] := If[LessEqual[x, -490000000.0], N[(N[(0.0 - N[(x + -2.0), $MachinePrecision]), $MachinePrecision] / -0.24013125253755718), $MachinePrecision], If[LessEqual[x, 1520000.0], N[(z * N[(-0.0424927283095952 + N[(x * 0.28294182010212804), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(4.16438922228 + N[(-110.1139242984811 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;x \leq -490000000:\\
            \;\;\;\;\frac{0 - \left(x + -2\right)}{-0.24013125253755718}\\
            
            \mathbf{elif}\;x \leq 1520000:\\
            \;\;\;\;z \cdot \left(-0.0424927283095952 + x \cdot 0.28294182010212804\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;x \cdot \left(4.16438922228 + \frac{-110.1139242984811}{x}\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if x < -4.9e8

              1. Initial program 12.8%

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

                  \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
                3. sub-negN/A

                  \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                4. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                6. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
              3. Simplified21.8%

                \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
              4. Add Preprocessing
              5. Applied egg-rr21.8%

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

                \[\leadsto \color{blue}{\frac{-\left(x + -2\right)}{\frac{-1}{\frac{z + 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}}}} \]
              7. Taylor expanded in x around inf

                \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \color{blue}{\frac{-25000000000}{104109730557}}\right) \]
              8. Step-by-step derivation
                1. Simplified90.2%

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

                if -4.9e8 < x < 1.52e6

                1. Initial program 98.8%

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

                  \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(-2 \cdot z\right)}, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(\left(z \cdot -2\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right)}, \frac{23533438303}{500000000}\right)\right) \]
                  2. *-lowering-*.f6461.5%

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, -2\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right)}, \frac{23533438303}{500000000}\right)\right) \]
                5. Simplified61.5%

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

                  \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z + \frac{156699607947000000000}{553822718361107519809} \cdot \left(x \cdot z\right)} \]
                7. Step-by-step derivation
                  1. associate-*r*N/A

                    \[\leadsto \frac{-1000000000}{23533438303} \cdot z + \left(\frac{156699607947000000000}{553822718361107519809} \cdot x\right) \cdot \color{blue}{z} \]
                  2. distribute-rgt-outN/A

                    \[\leadsto z \cdot \color{blue}{\left(\frac{-1000000000}{23533438303} + \frac{156699607947000000000}{553822718361107519809} \cdot x\right)} \]
                  3. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(\frac{-1000000000}{23533438303} + \frac{156699607947000000000}{553822718361107519809} \cdot x\right)}\right) \]
                  4. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{-1000000000}{23533438303}, \color{blue}{\left(\frac{156699607947000000000}{553822718361107519809} \cdot x\right)}\right)\right) \]
                  5. *-lowering-*.f6461.5%

                    \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{-1000000000}{23533438303}, \mathsf{*.f64}\left(\frac{156699607947000000000}{553822718361107519809}, \color{blue}{x}\right)\right)\right) \]
                8. Simplified61.5%

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

                if 1.52e6 < x

                1. Initial program 17.3%

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

                    \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
                  2. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
                  3. sub-negN/A

                    \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                  4. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                  5. metadata-evalN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                  6. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
                3. Simplified26.0%

                  \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
                4. Add Preprocessing
                5. Taylor expanded in x around inf

                  \[\leadsto \color{blue}{x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)} \]
                6. Step-by-step derivation
                  1. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)}\right) \]
                  2. sub-negN/A

                    \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{104109730557}{25000000000} + \color{blue}{\left(\mathsf{neg}\left(\frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\right)}\right)\right) \]
                  3. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \color{blue}{\left(\mathsf{neg}\left(\frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\right)}\right)\right) \]
                  4. associate-*r/N/A

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \left(\mathsf{neg}\left(\frac{\frac{13764240537310136880149}{125000000000000000000} \cdot 1}{x}\right)\right)\right)\right) \]
                  5. metadata-evalN/A

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \left(\mathsf{neg}\left(\frac{\frac{13764240537310136880149}{125000000000000000000}}{x}\right)\right)\right)\right) \]
                  6. distribute-neg-fracN/A

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \left(\frac{\mathsf{neg}\left(\frac{13764240537310136880149}{125000000000000000000}\right)}{\color{blue}{x}}\right)\right)\right) \]
                  7. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\frac{13764240537310136880149}{125000000000000000000}\right)\right), \color{blue}{x}\right)\right)\right) \]
                  8. metadata-eval88.8%

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\frac{-13764240537310136880149}{125000000000000000000}, x\right)\right)\right) \]
                7. Simplified88.8%

                  \[\leadsto \color{blue}{x \cdot \left(4.16438922228 + \frac{-110.1139242984811}{x}\right)} \]
              9. Recombined 3 regimes into one program.
              10. Final simplification76.8%

                \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;\frac{0 - \left(x + -2\right)}{-0.24013125253755718}\\ \mathbf{elif}\;x \leq 1520000:\\ \;\;\;\;z \cdot \left(-0.0424927283095952 + x \cdot 0.28294182010212804\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(4.16438922228 + \frac{-110.1139242984811}{x}\right)\\ \end{array} \]
              11. Add Preprocessing

              Alternative 20: 76.7% accurate, 2.2× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;\frac{0 - \left(x + -2\right)}{-0.24013125253755718}\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\ \;\;\;\;\frac{z \cdot -2}{47.066876606}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(4.16438922228 + \frac{-110.1139242984811}{x}\right)\\ \end{array} \end{array} \]
              (FPCore (x y z)
               :precision binary64
               (if (<= x -490000000.0)
                 (/ (- 0.0 (+ x -2.0)) -0.24013125253755718)
                 (if (<= x 8.5e-8)
                   (/ (* z -2.0) 47.066876606)
                   (* x (+ 4.16438922228 (/ -110.1139242984811 x))))))
              double code(double x, double y, double z) {
              	double tmp;
              	if (x <= -490000000.0) {
              		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718;
              	} else if (x <= 8.5e-8) {
              		tmp = (z * -2.0) / 47.066876606;
              	} else {
              		tmp = x * (4.16438922228 + (-110.1139242984811 / 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 <= (-490000000.0d0)) then
                      tmp = (0.0d0 - (x + (-2.0d0))) / (-0.24013125253755718d0)
                  else if (x <= 8.5d-8) then
                      tmp = (z * (-2.0d0)) / 47.066876606d0
                  else
                      tmp = x * (4.16438922228d0 + ((-110.1139242984811d0) / x))
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z) {
              	double tmp;
              	if (x <= -490000000.0) {
              		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718;
              	} else if (x <= 8.5e-8) {
              		tmp = (z * -2.0) / 47.066876606;
              	} else {
              		tmp = x * (4.16438922228 + (-110.1139242984811 / x));
              	}
              	return tmp;
              }
              
              def code(x, y, z):
              	tmp = 0
              	if x <= -490000000.0:
              		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718
              	elif x <= 8.5e-8:
              		tmp = (z * -2.0) / 47.066876606
              	else:
              		tmp = x * (4.16438922228 + (-110.1139242984811 / x))
              	return tmp
              
              function code(x, y, z)
              	tmp = 0.0
              	if (x <= -490000000.0)
              		tmp = Float64(Float64(0.0 - Float64(x + -2.0)) / -0.24013125253755718);
              	elseif (x <= 8.5e-8)
              		tmp = Float64(Float64(z * -2.0) / 47.066876606);
              	else
              		tmp = Float64(x * Float64(4.16438922228 + Float64(-110.1139242984811 / x)));
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z)
              	tmp = 0.0;
              	if (x <= -490000000.0)
              		tmp = (0.0 - (x + -2.0)) / -0.24013125253755718;
              	elseif (x <= 8.5e-8)
              		tmp = (z * -2.0) / 47.066876606;
              	else
              		tmp = x * (4.16438922228 + (-110.1139242984811 / x));
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_] := If[LessEqual[x, -490000000.0], N[(N[(0.0 - N[(x + -2.0), $MachinePrecision]), $MachinePrecision] / -0.24013125253755718), $MachinePrecision], If[LessEqual[x, 8.5e-8], N[(N[(z * -2.0), $MachinePrecision] / 47.066876606), $MachinePrecision], N[(x * N[(4.16438922228 + N[(-110.1139242984811 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;x \leq -490000000:\\
              \;\;\;\;\frac{0 - \left(x + -2\right)}{-0.24013125253755718}\\
              
              \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\
              \;\;\;\;\frac{z \cdot -2}{47.066876606}\\
              
              \mathbf{else}:\\
              \;\;\;\;x \cdot \left(4.16438922228 + \frac{-110.1139242984811}{x}\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if x < -4.9e8

                1. Initial program 12.8%

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

                    \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
                  2. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
                  3. sub-negN/A

                    \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                  4. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                  5. metadata-evalN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                  6. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
                3. Simplified21.8%

                  \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
                4. Add Preprocessing
                5. Applied egg-rr21.8%

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

                  \[\leadsto \color{blue}{\frac{-\left(x + -2\right)}{\frac{-1}{\frac{z + 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}}}} \]
                7. Taylor expanded in x around inf

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \color{blue}{\frac{-25000000000}{104109730557}}\right) \]
                8. Step-by-step derivation
                  1. Simplified90.2%

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

                  if -4.9e8 < x < 8.49999999999999935e-8

                  1. Initial program 98.8%

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

                    \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(-2 \cdot z\right)}, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(\left(z \cdot -2\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right)}, \frac{23533438303}{500000000}\right)\right) \]
                    2. *-lowering-*.f6464.7%

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, -2\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right)}, \frac{23533438303}{500000000}\right)\right) \]
                  5. Simplified64.7%

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

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, -2\right), \color{blue}{\frac{23533438303}{500000000}}\right) \]
                  7. Step-by-step derivation
                    1. Simplified64.6%

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

                    if 8.49999999999999935e-8 < x

                    1. Initial program 23.3%

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

                        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
                      2. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
                      3. sub-negN/A

                        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                      4. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                      5. metadata-evalN/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                      6. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
                    3. Simplified31.4%

                      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
                    4. Add Preprocessing
                    5. Taylor expanded in x around inf

                      \[\leadsto \color{blue}{x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)} \]
                    6. Step-by-step derivation
                      1. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)}\right) \]
                      2. sub-negN/A

                        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{104109730557}{25000000000} + \color{blue}{\left(\mathsf{neg}\left(\frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\right)}\right)\right) \]
                      3. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \color{blue}{\left(\mathsf{neg}\left(\frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\right)}\right)\right) \]
                      4. associate-*r/N/A

                        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \left(\mathsf{neg}\left(\frac{\frac{13764240537310136880149}{125000000000000000000} \cdot 1}{x}\right)\right)\right)\right) \]
                      5. metadata-evalN/A

                        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \left(\mathsf{neg}\left(\frac{\frac{13764240537310136880149}{125000000000000000000}}{x}\right)\right)\right)\right) \]
                      6. distribute-neg-fracN/A

                        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \left(\frac{\mathsf{neg}\left(\frac{13764240537310136880149}{125000000000000000000}\right)}{\color{blue}{x}}\right)\right)\right) \]
                      7. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\frac{13764240537310136880149}{125000000000000000000}\right)\right), \color{blue}{x}\right)\right)\right) \]
                      8. metadata-eval82.8%

                        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{104109730557}{25000000000}, \mathsf{/.f64}\left(\frac{-13764240537310136880149}{125000000000000000000}, x\right)\right)\right) \]
                    7. Simplified82.8%

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;\frac{0 - \left(x + -2\right)}{-0.24013125253755718}\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\ \;\;\;\;\frac{z \cdot -2}{47.066876606}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(4.16438922228 + \frac{-110.1139242984811}{x}\right)\\ \end{array} \]
                  10. Add Preprocessing

                  Alternative 21: 76.7% accurate, 2.2× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{0 - \left(x + -2\right)}{-0.24013125253755718}\\ \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\ \;\;\;\;\frac{z \cdot -2}{47.066876606}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                  (FPCore (x y z)
                   :precision binary64
                   (let* ((t_0 (/ (- 0.0 (+ x -2.0)) -0.24013125253755718)))
                     (if (<= x -490000000.0)
                       t_0
                       (if (<= x 8.5e-8) (/ (* z -2.0) 47.066876606) t_0))))
                  double code(double x, double y, double z) {
                  	double t_0 = (0.0 - (x + -2.0)) / -0.24013125253755718;
                  	double tmp;
                  	if (x <= -490000000.0) {
                  		tmp = t_0;
                  	} else if (x <= 8.5e-8) {
                  		tmp = (z * -2.0) / 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 = (0.0d0 - (x + (-2.0d0))) / (-0.24013125253755718d0)
                      if (x <= (-490000000.0d0)) then
                          tmp = t_0
                      else if (x <= 8.5d-8) then
                          tmp = (z * (-2.0d0)) / 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 = (0.0 - (x + -2.0)) / -0.24013125253755718;
                  	double tmp;
                  	if (x <= -490000000.0) {
                  		tmp = t_0;
                  	} else if (x <= 8.5e-8) {
                  		tmp = (z * -2.0) / 47.066876606;
                  	} else {
                  		tmp = t_0;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z):
                  	t_0 = (0.0 - (x + -2.0)) / -0.24013125253755718
                  	tmp = 0
                  	if x <= -490000000.0:
                  		tmp = t_0
                  	elif x <= 8.5e-8:
                  		tmp = (z * -2.0) / 47.066876606
                  	else:
                  		tmp = t_0
                  	return tmp
                  
                  function code(x, y, z)
                  	t_0 = Float64(Float64(0.0 - Float64(x + -2.0)) / -0.24013125253755718)
                  	tmp = 0.0
                  	if (x <= -490000000.0)
                  		tmp = t_0;
                  	elseif (x <= 8.5e-8)
                  		tmp = Float64(Float64(z * -2.0) / 47.066876606);
                  	else
                  		tmp = t_0;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z)
                  	t_0 = (0.0 - (x + -2.0)) / -0.24013125253755718;
                  	tmp = 0.0;
                  	if (x <= -490000000.0)
                  		tmp = t_0;
                  	elseif (x <= 8.5e-8)
                  		tmp = (z * -2.0) / 47.066876606;
                  	else
                  		tmp = t_0;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_] := Block[{t$95$0 = N[(N[(0.0 - N[(x + -2.0), $MachinePrecision]), $MachinePrecision] / -0.24013125253755718), $MachinePrecision]}, If[LessEqual[x, -490000000.0], t$95$0, If[LessEqual[x, 8.5e-8], N[(N[(z * -2.0), $MachinePrecision] / 47.066876606), $MachinePrecision], t$95$0]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_0 := \frac{0 - \left(x + -2\right)}{-0.24013125253755718}\\
                  \mathbf{if}\;x \leq -490000000:\\
                  \;\;\;\;t\_0\\
                  
                  \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\
                  \;\;\;\;\frac{z \cdot -2}{47.066876606}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_0\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x < -4.9e8 or 8.49999999999999935e-8 < x

                    1. Initial program 18.7%

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

                        \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
                      2. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
                      3. sub-negN/A

                        \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                      4. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                      5. metadata-evalN/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                      6. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
                    3. Simplified27.2%

                      \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
                    4. Add Preprocessing
                    5. Applied egg-rr27.1%

                      \[\leadsto \color{blue}{\frac{\frac{z + 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} \cdot \left(x \cdot x + -4\right)}{x + 2}} \]
                    6. Applied egg-rr27.2%

                      \[\leadsto \color{blue}{\frac{-\left(x + -2\right)}{\frac{-1}{\frac{z + 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}}}} \]
                    7. Taylor expanded in x around inf

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{+.f64}\left(x, -2\right)\right), \color{blue}{\frac{-25000000000}{104109730557}}\right) \]
                    8. Step-by-step derivation
                      1. Simplified85.7%

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

                      if -4.9e8 < x < 8.49999999999999935e-8

                      1. Initial program 98.8%

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

                        \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(-2 \cdot z\right)}, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
                      4. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \mathsf{/.f64}\left(\left(z \cdot -2\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right)}, \frac{23533438303}{500000000}\right)\right) \]
                        2. *-lowering-*.f6464.7%

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, -2\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right)}, \frac{23533438303}{500000000}\right)\right) \]
                      5. Simplified64.7%

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

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, -2\right), \color{blue}{\frac{23533438303}{500000000}}\right) \]
                      7. Step-by-step derivation
                        1. Simplified64.6%

                          \[\leadsto \frac{z \cdot -2}{\color{blue}{47.066876606}} \]
                      8. Recombined 2 regimes into one program.
                      9. Final simplification76.6%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;\frac{0 - \left(x + -2\right)}{-0.24013125253755718}\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\ \;\;\;\;\frac{z \cdot -2}{47.066876606}\\ \mathbf{else}:\\ \;\;\;\;\frac{0 - \left(x + -2\right)}{-0.24013125253755718}\\ \end{array} \]
                      10. Add Preprocessing

                      Alternative 22: 76.5% accurate, 2.5× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := 4.16438922228 \cdot \left(x + -2\right)\\ \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\ \;\;\;\;\frac{z \cdot -2}{47.066876606}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                      (FPCore (x y z)
                       :precision binary64
                       (let* ((t_0 (* 4.16438922228 (+ x -2.0))))
                         (if (<= x -490000000.0)
                           t_0
                           (if (<= x 8.5e-8) (/ (* z -2.0) 47.066876606) t_0))))
                      double code(double x, double y, double z) {
                      	double t_0 = 4.16438922228 * (x + -2.0);
                      	double tmp;
                      	if (x <= -490000000.0) {
                      		tmp = t_0;
                      	} else if (x <= 8.5e-8) {
                      		tmp = (z * -2.0) / 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 = 4.16438922228d0 * (x + (-2.0d0))
                          if (x <= (-490000000.0d0)) then
                              tmp = t_0
                          else if (x <= 8.5d-8) then
                              tmp = (z * (-2.0d0)) / 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 = 4.16438922228 * (x + -2.0);
                      	double tmp;
                      	if (x <= -490000000.0) {
                      		tmp = t_0;
                      	} else if (x <= 8.5e-8) {
                      		tmp = (z * -2.0) / 47.066876606;
                      	} else {
                      		tmp = t_0;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z):
                      	t_0 = 4.16438922228 * (x + -2.0)
                      	tmp = 0
                      	if x <= -490000000.0:
                      		tmp = t_0
                      	elif x <= 8.5e-8:
                      		tmp = (z * -2.0) / 47.066876606
                      	else:
                      		tmp = t_0
                      	return tmp
                      
                      function code(x, y, z)
                      	t_0 = Float64(4.16438922228 * Float64(x + -2.0))
                      	tmp = 0.0
                      	if (x <= -490000000.0)
                      		tmp = t_0;
                      	elseif (x <= 8.5e-8)
                      		tmp = Float64(Float64(z * -2.0) / 47.066876606);
                      	else
                      		tmp = t_0;
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y, z)
                      	t_0 = 4.16438922228 * (x + -2.0);
                      	tmp = 0.0;
                      	if (x <= -490000000.0)
                      		tmp = t_0;
                      	elseif (x <= 8.5e-8)
                      		tmp = (z * -2.0) / 47.066876606;
                      	else
                      		tmp = t_0;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_, z_] := Block[{t$95$0 = N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -490000000.0], t$95$0, If[LessEqual[x, 8.5e-8], N[(N[(z * -2.0), $MachinePrecision] / 47.066876606), $MachinePrecision], t$95$0]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_0 := 4.16438922228 \cdot \left(x + -2\right)\\
                      \mathbf{if}\;x \leq -490000000:\\
                      \;\;\;\;t\_0\\
                      
                      \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\
                      \;\;\;\;\frac{z \cdot -2}{47.066876606}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_0\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if x < -4.9e8 or 8.49999999999999935e-8 < x

                        1. Initial program 18.7%

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

                            \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
                          2. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
                          3. sub-negN/A

                            \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                          4. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                          5. metadata-evalN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                          6. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
                        3. Simplified27.2%

                          \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
                        4. Add Preprocessing
                        5. Taylor expanded in x around inf

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \color{blue}{\frac{104109730557}{25000000000}}\right) \]
                        6. Step-by-step derivation
                          1. Simplified85.3%

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

                          if -4.9e8 < x < 8.49999999999999935e-8

                          1. Initial program 98.8%

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

                            \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(-2 \cdot z\right)}, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right), \frac{23533438303}{500000000}\right)\right) \]
                          4. Step-by-step derivation
                            1. *-commutativeN/A

                              \[\leadsto \mathsf{/.f64}\left(\left(z \cdot -2\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right)}, \frac{23533438303}{500000000}\right)\right) \]
                            2. *-lowering-*.f6464.7%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, -2\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \frac{216700011257}{5000000000}\right), x\right), \frac{263505074721}{1000000000}\right), x\right), \frac{156699607947}{500000000}\right), x\right)}, \frac{23533438303}{500000000}\right)\right) \]
                          5. Simplified64.7%

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

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, -2\right), \color{blue}{\frac{23533438303}{500000000}}\right) \]
                          7. Step-by-step derivation
                            1. Simplified64.6%

                              \[\leadsto \frac{z \cdot -2}{\color{blue}{47.066876606}} \]
                          8. Recombined 2 regimes into one program.
                          9. Final simplification76.4%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\ \;\;\;\;\frac{z \cdot -2}{47.066876606}\\ \mathbf{else}:\\ \;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\ \end{array} \]
                          10. Add Preprocessing

                          Alternative 23: 76.4% accurate, 2.5× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := 4.16438922228 \cdot \left(x + -2\right)\\ \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                          (FPCore (x y z)
                           :precision binary64
                           (let* ((t_0 (* 4.16438922228 (+ x -2.0))))
                             (if (<= x -490000000.0)
                               t_0
                               (if (<= x 8.5e-8) (* z -0.0424927283095952) t_0))))
                          double code(double x, double y, double z) {
                          	double t_0 = 4.16438922228 * (x + -2.0);
                          	double tmp;
                          	if (x <= -490000000.0) {
                          		tmp = t_0;
                          	} else if (x <= 8.5e-8) {
                          		tmp = z * -0.0424927283095952;
                          	} else {
                          		tmp = t_0;
                          	}
                          	return tmp;
                          }
                          
                          real(8) function code(x, y, z)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              real(8), intent (in) :: z
                              real(8) :: t_0
                              real(8) :: tmp
                              t_0 = 4.16438922228d0 * (x + (-2.0d0))
                              if (x <= (-490000000.0d0)) then
                                  tmp = t_0
                              else if (x <= 8.5d-8) then
                                  tmp = z * (-0.0424927283095952d0)
                              else
                                  tmp = t_0
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y, double z) {
                          	double t_0 = 4.16438922228 * (x + -2.0);
                          	double tmp;
                          	if (x <= -490000000.0) {
                          		tmp = t_0;
                          	} else if (x <= 8.5e-8) {
                          		tmp = z * -0.0424927283095952;
                          	} else {
                          		tmp = t_0;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z):
                          	t_0 = 4.16438922228 * (x + -2.0)
                          	tmp = 0
                          	if x <= -490000000.0:
                          		tmp = t_0
                          	elif x <= 8.5e-8:
                          		tmp = z * -0.0424927283095952
                          	else:
                          		tmp = t_0
                          	return tmp
                          
                          function code(x, y, z)
                          	t_0 = Float64(4.16438922228 * Float64(x + -2.0))
                          	tmp = 0.0
                          	if (x <= -490000000.0)
                          		tmp = t_0;
                          	elseif (x <= 8.5e-8)
                          		tmp = Float64(z * -0.0424927283095952);
                          	else
                          		tmp = t_0;
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z)
                          	t_0 = 4.16438922228 * (x + -2.0);
                          	tmp = 0.0;
                          	if (x <= -490000000.0)
                          		tmp = t_0;
                          	elseif (x <= 8.5e-8)
                          		tmp = z * -0.0424927283095952;
                          	else
                          		tmp = t_0;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_, z_] := Block[{t$95$0 = N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -490000000.0], t$95$0, If[LessEqual[x, 8.5e-8], N[(z * -0.0424927283095952), $MachinePrecision], t$95$0]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_0 := 4.16438922228 \cdot \left(x + -2\right)\\
                          \mathbf{if}\;x \leq -490000000:\\
                          \;\;\;\;t\_0\\
                          
                          \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\
                          \;\;\;\;z \cdot -0.0424927283095952\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;t\_0\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if x < -4.9e8 or 8.49999999999999935e-8 < x

                            1. Initial program 18.7%

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

                                \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
                              2. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
                              3. sub-negN/A

                                \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                              4. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                              5. metadata-evalN/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                              6. /-lowering-/.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
                            3. Simplified27.2%

                              \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
                            4. Add Preprocessing
                            5. Taylor expanded in x around inf

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \color{blue}{\frac{104109730557}{25000000000}}\right) \]
                            6. Step-by-step derivation
                              1. Simplified85.3%

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

                              if -4.9e8 < x < 8.49999999999999935e-8

                              1. Initial program 98.8%

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

                                  \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
                                2. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
                                3. sub-negN/A

                                  \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                                4. +-lowering-+.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                                5. metadata-evalN/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                                6. /-lowering-/.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
                              3. Simplified99.6%

                                \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
                              4. Add Preprocessing
                              5. Taylor expanded in x around 0

                                \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} \]
                              6. Step-by-step derivation
                                1. *-lowering-*.f6464.4%

                                  \[\leadsto \mathsf{*.f64}\left(\frac{-1000000000}{23533438303}, \color{blue}{z}\right) \]
                              7. Simplified64.4%

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-8}:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \mathbf{else}:\\ \;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\ \end{array} \]
                            9. Add Preprocessing

                            Alternative 24: 76.4% accurate, 2.8× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;x \cdot 4.16438922228\\ \mathbf{elif}\;x \leq 2:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \end{array} \]
                            (FPCore (x y z)
                             :precision binary64
                             (if (<= x -490000000.0)
                               (* x 4.16438922228)
                               (if (<= x 2.0) (* z -0.0424927283095952) (* x 4.16438922228))))
                            double code(double x, double y, double z) {
                            	double tmp;
                            	if (x <= -490000000.0) {
                            		tmp = x * 4.16438922228;
                            	} else if (x <= 2.0) {
                            		tmp = z * -0.0424927283095952;
                            	} else {
                            		tmp = x * 4.16438922228;
                            	}
                            	return tmp;
                            }
                            
                            real(8) function code(x, y, z)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                real(8), intent (in) :: z
                                real(8) :: tmp
                                if (x <= (-490000000.0d0)) then
                                    tmp = x * 4.16438922228d0
                                else if (x <= 2.0d0) then
                                    tmp = z * (-0.0424927283095952d0)
                                else
                                    tmp = x * 4.16438922228d0
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y, double z) {
                            	double tmp;
                            	if (x <= -490000000.0) {
                            		tmp = x * 4.16438922228;
                            	} else if (x <= 2.0) {
                            		tmp = z * -0.0424927283095952;
                            	} else {
                            		tmp = x * 4.16438922228;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z):
                            	tmp = 0
                            	if x <= -490000000.0:
                            		tmp = x * 4.16438922228
                            	elif x <= 2.0:
                            		tmp = z * -0.0424927283095952
                            	else:
                            		tmp = x * 4.16438922228
                            	return tmp
                            
                            function code(x, y, z)
                            	tmp = 0.0
                            	if (x <= -490000000.0)
                            		tmp = Float64(x * 4.16438922228);
                            	elseif (x <= 2.0)
                            		tmp = Float64(z * -0.0424927283095952);
                            	else
                            		tmp = Float64(x * 4.16438922228);
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z)
                            	tmp = 0.0;
                            	if (x <= -490000000.0)
                            		tmp = x * 4.16438922228;
                            	elseif (x <= 2.0)
                            		tmp = z * -0.0424927283095952;
                            	else
                            		tmp = x * 4.16438922228;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_] := If[LessEqual[x, -490000000.0], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 2.0], N[(z * -0.0424927283095952), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;x \leq -490000000:\\
                            \;\;\;\;x \cdot 4.16438922228\\
                            
                            \mathbf{elif}\;x \leq 2:\\
                            \;\;\;\;z \cdot -0.0424927283095952\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;x \cdot 4.16438922228\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if x < -4.9e8 or 2 < x

                              1. Initial program 17.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*N/A

                                  \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
                                2. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
                                3. sub-negN/A

                                  \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                                4. +-lowering-+.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                                5. metadata-evalN/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                                6. /-lowering-/.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
                              3. Simplified26.2%

                                \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
                              4. Add Preprocessing
                              5. Taylor expanded in x around inf

                                \[\leadsto \color{blue}{\frac{104109730557}{25000000000} \cdot x} \]
                              6. Step-by-step derivation
                                1. *-commutativeN/A

                                  \[\leadsto x \cdot \color{blue}{\frac{104109730557}{25000000000}} \]
                                2. *-lowering-*.f6486.3%

                                  \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\frac{104109730557}{25000000000}}\right) \]
                              7. Simplified86.3%

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

                              if -4.9e8 < x < 2

                              1. Initial program 98.8%

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

                                  \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
                                2. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
                                3. sub-negN/A

                                  \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                                4. +-lowering-+.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                                5. metadata-evalN/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                                6. /-lowering-/.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
                              3. Simplified99.6%

                                \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
                              4. Add Preprocessing
                              5. Taylor expanded in x around 0

                                \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} \]
                              6. Step-by-step derivation
                                1. *-lowering-*.f6463.3%

                                  \[\leadsto \mathsf{*.f64}\left(\frac{-1000000000}{23533438303}, \color{blue}{z}\right) \]
                              7. Simplified63.3%

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -490000000:\\ \;\;\;\;x \cdot 4.16438922228\\ \mathbf{elif}\;x \leq 2:\\ \;\;\;\;z \cdot -0.0424927283095952\\ \mathbf{else}:\\ \;\;\;\;x \cdot 4.16438922228\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 25: 34.1% accurate, 12.3× speedup?

                            \[\begin{array}{l} \\ z \cdot -0.0424927283095952 \end{array} \]
                            (FPCore (x y z) :precision binary64 (* z -0.0424927283095952))
                            double code(double x, double y, double z) {
                            	return z * -0.0424927283095952;
                            }
                            
                            real(8) function code(x, y, z)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                real(8), intent (in) :: z
                                code = z * (-0.0424927283095952d0)
                            end function
                            
                            public static double code(double x, double y, double z) {
                            	return z * -0.0424927283095952;
                            }
                            
                            def code(x, y, z):
                            	return z * -0.0424927283095952
                            
                            function code(x, y, z)
                            	return Float64(z * -0.0424927283095952)
                            end
                            
                            function tmp = code(x, y, z)
                            	tmp = z * -0.0424927283095952;
                            end
                            
                            code[x_, y_, z_] := N[(z * -0.0424927283095952), $MachinePrecision]
                            
                            \begin{array}{l}
                            
                            \\
                            z \cdot -0.0424927283095952
                            \end{array}
                            
                            Derivation
                            1. Initial program 53.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*N/A

                                \[\leadsto \left(x - 2\right) \cdot \color{blue}{\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}} \]
                              2. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\left(x - 2\right), \color{blue}{\left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)}\right) \]
                              3. sub-negN/A

                                \[\leadsto \mathsf{*.f64}\left(\left(x + \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                              4. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(2\right)\right)\right), \left(\frac{\color{blue}{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                              5. metadata-evalN/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \left(\frac{\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + \color{blue}{z}}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\right)\right) \]
                              6. /-lowering-/.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, -2\right), \mathsf{/.f64}\left(\left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right), \color{blue}{\left(\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}\right)}\right)\right) \]
                            3. Simplified58.3%

                              \[\leadsto \color{blue}{\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) + z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}} \]
                            4. Add Preprocessing
                            5. Taylor expanded in x around 0

                              \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} \]
                            6. Step-by-step derivation
                              1. *-lowering-*.f6429.4%

                                \[\leadsto \mathsf{*.f64}\left(\frac{-1000000000}{23533438303}, \color{blue}{z}\right) \]
                            7. Simplified29.4%

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

                              \[\leadsto z \cdot -0.0424927283095952 \]
                            9. Add Preprocessing

                            Developer Target 1: 98.7% accurate, 0.7× speedup?

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

                            Reproduce

                            ?
                            herbie shell --seed 2024158 
                            (FPCore (x y z)
                              :name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, C"
                              :precision binary64
                            
                              :alt
                              (! :herbie-platform default (if (< x -332612872587000500000000000000000000000000000000000000000000000) (- (+ (/ y (* x x)) (* 104109730557/25000000000 x)) 1101139242984811/10000000000000) (if (< x 94299917145546730000000000000000000000000000000000000000) (* (/ (- x 2) 1) (/ (+ (* (+ (* (+ (* (+ (* x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z) (+ (* (+ (+ (* 263505074721/1000000000 x) (+ (* 216700011257/5000000000 (* x x)) (* x (* x x)))) 156699607947/500000000) x) 23533438303/500000000))) (- (+ (/ y (* x x)) (* 104109730557/25000000000 x)) 1101139242984811/10000000000000))))
                            
                              (/ (* (- x 2.0) (+ (* (+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y) x) z)) (+ (* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x) 47.066876606)))