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

Percentage Accurate: 69.7% → 99.8%
Time: 11.2s
Alternatives: 13
Speedup: 4.2×

Specification

?
\[\begin{array}{l} \\ x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  x
  (/
   (*
    y
    (+
     (* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
     0.279195317918525))
   (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
double code(double x, double y, double z) {
	return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0))
end function
public static double code(double x, double y, double z) {
	return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
def code(x, y, z):
	return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304))
function code(x, y, z)
	return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304)))
end
function tmp = code(x, y, z)
	tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
end
code[x_, y_, z_] := N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}
\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 13 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: 69.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  x
  (/
   (*
    y
    (+
     (* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
     0.279195317918525))
   (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
double code(double x, double y, double z) {
	return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0))
end function
public static double code(double x, double y, double z) {
	return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
def code(x, y, z):
	return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304))
function code(x, y, z)
	return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304)))
end
function tmp = code(x, y, z)
	tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
end
code[x_, y_, z_] := N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}
\end{array}

Alternative 1: 99.8% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 10^{+307}:\\ \;\;\;\;x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<=
      (/
       (*
        y
        (+
         (* z (+ (* z 0.0692910599291889) 0.4917317610505968))
         0.279195317918525))
       (+ (* z (+ z 6.012459259764103)) 3.350343815022304))
      1e+307)
   (+
    x
    (*
     y
     (/
      (fma (fma z 0.0692910599291889 0.4917317610505968) z 0.279195317918525)
      (fma (+ z 6.012459259764103) z 3.350343815022304))))
   (+ x (/ y 14.431876219268936))))
double code(double x, double y, double z) {
	double tmp;
	if (((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= 1e+307) {
		tmp = x + (y * (fma(fma(z, 0.0692910599291889, 0.4917317610505968), z, 0.279195317918525) / fma((z + 6.012459259764103), z, 3.350343815022304)));
	} else {
		tmp = x + (y / 14.431876219268936);
	}
	return tmp;
}
function code(x, y, z)
	tmp = 0.0
	if (Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) <= 1e+307)
		tmp = Float64(x + Float64(y * Float64(fma(fma(z, 0.0692910599291889, 0.4917317610505968), z, 0.279195317918525) / fma(Float64(z + 6.012459259764103), z, 3.350343815022304))));
	else
		tmp = Float64(x + Float64(y / 14.431876219268936));
	end
	return tmp
end
code[x_, y_, z_] := If[LessEqual[N[(N[(y * N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision], 1e+307], N[(x + N[(y * N[(N[(N[(z * 0.0692910599291889 + 0.4917317610505968), $MachinePrecision] * z + 0.279195317918525), $MachinePrecision] / N[(N[(z + 6.012459259764103), $MachinePrecision] * z + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 10^{+307}:\\
\;\;\;\;x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < 9.99999999999999986e306

    1. Initial program 96.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg96.5%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*99.7%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in99.7%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in99.7%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in99.7%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in99.7%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg99.7%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define99.7%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define99.7%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define99.7%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing

    if 9.99999999999999986e306 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64)))

    1. Initial program 0.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg0.5%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*9.4%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in9.4%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in9.4%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in9.4%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in9.4%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg9.4%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define9.4%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define9.4%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define9.4%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified9.4%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-define9.4%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right) \cdot z + 0.279195317918525}}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
      2. fma-define9.4%

        \[\leadsto x + y \cdot \frac{\color{blue}{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)} \cdot z + 0.279195317918525}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
      3. fma-define9.4%

        \[\leadsto x + y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\color{blue}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      4. associate-/l*0.5%

        \[\leadsto x + \color{blue}{\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      5. clear-num0.5%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}}} \]
      6. *-commutative0.5%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
      7. fma-undefine0.5%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
      8. *-commutative0.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right) \cdot y}}} \]
      9. fma-define0.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} \cdot z + 0.279195317918525\right) \cdot y}} \]
      10. *-commutative0.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{z \cdot \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} + 0.279195317918525\right) \cdot y}} \]
      11. fma-undefine0.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)} \cdot y}} \]
    6. Applied egg-rr0.5%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right) \cdot y}}} \]
    7. Taylor expanded in z around inf 99.8%

      \[\leadsto x + \frac{1}{\color{blue}{\frac{14.431876219268936}{y}}} \]
    8. Step-by-step derivation
      1. inv-pow99.8%

        \[\leadsto x + \color{blue}{{\left(\frac{14.431876219268936}{y}\right)}^{-1}} \]
      2. div-inv99.7%

        \[\leadsto x + {\color{blue}{\left(14.431876219268936 \cdot \frac{1}{y}\right)}}^{-1} \]
      3. unpow-prod-down99.5%

        \[\leadsto x + \color{blue}{{14.431876219268936}^{-1} \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
      4. metadata-eval99.5%

        \[\leadsto x + \color{blue}{0.0692910599291889} \cdot {\left(\frac{1}{y}\right)}^{-1} \]
    9. Applied egg-rr99.5%

      \[\leadsto x + \color{blue}{0.0692910599291889 \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. *-commutative99.5%

        \[\leadsto x + \color{blue}{{\left(\frac{1}{y}\right)}^{-1} \cdot 0.0692910599291889} \]
      2. unpow-199.5%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{1}{y}}} \cdot 0.0692910599291889 \]
      3. remove-double-div99.5%

        \[\leadsto x + \color{blue}{y} \cdot 0.0692910599291889 \]
      4. metadata-eval99.5%

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{14.431876219268936}} \]
      5. div-inv100.0%

        \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]
    11. Applied egg-rr100.0%

      \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 10^{+307}:\\ \;\;\;\;x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 99.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+53} \lor \neg \left(z \leq 2.05 \cdot 10^{+15}\right):\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot 0.279195317918525 + z \cdot \left(0.0692910599291889 \cdot \left(y \cdot z\right) + y \cdot 0.4917317610505968\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -5.8e+53) (not (<= z 2.05e+15)))
   (+ x (/ y 14.431876219268936))
   (+
    x
    (/
     (+
      (* y 0.279195317918525)
      (* z (+ (* 0.0692910599291889 (* y z)) (* y 0.4917317610505968))))
     (+ (* z (+ z 6.012459259764103)) 3.350343815022304)))))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -5.8e+53) || !(z <= 2.05e+15)) {
		tmp = x + (y / 14.431876219268936);
	} else {
		tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
	}
	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 ((z <= (-5.8d+53)) .or. (.not. (z <= 2.05d+15))) then
        tmp = x + (y / 14.431876219268936d0)
    else
        tmp = x + (((y * 0.279195317918525d0) + (z * ((0.0692910599291889d0 * (y * z)) + (y * 0.4917317610505968d0)))) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -5.8e+53) || !(z <= 2.05e+15)) {
		tmp = x + (y / 14.431876219268936);
	} else {
		tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -5.8e+53) or not (z <= 2.05e+15):
		tmp = x + (y / 14.431876219268936)
	else:
		tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -5.8e+53) || !(z <= 2.05e+15))
		tmp = Float64(x + Float64(y / 14.431876219268936));
	else
		tmp = Float64(x + Float64(Float64(Float64(y * 0.279195317918525) + Float64(z * Float64(Float64(0.0692910599291889 * Float64(y * z)) + Float64(y * 0.4917317610505968)))) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -5.8e+53) || ~((z <= 2.05e+15)))
		tmp = x + (y / 14.431876219268936);
	else
		tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.8e+53], N[Not[LessEqual[z, 2.05e+15]], $MachinePrecision]], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(y * 0.279195317918525), $MachinePrecision] + N[(z * N[(N[(0.0692910599291889 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(y * 0.4917317610505968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+53} \lor \neg \left(z \leq 2.05 \cdot 10^{+15}\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot 0.279195317918525 + z \cdot \left(0.0692910599291889 \cdot \left(y \cdot z\right) + y \cdot 0.4917317610505968\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.8000000000000004e53 or 2.05e15 < z

    1. Initial program 29.8%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg29.8%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*40.5%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in40.5%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in40.5%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in40.5%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in40.5%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg40.5%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define40.5%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define40.5%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define40.5%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified40.5%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-define40.5%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right) \cdot z + 0.279195317918525}}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
      2. fma-define40.5%

        \[\leadsto x + y \cdot \frac{\color{blue}{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)} \cdot z + 0.279195317918525}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
      3. fma-define40.5%

        \[\leadsto x + y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\color{blue}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      4. associate-/l*29.8%

        \[\leadsto x + \color{blue}{\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      5. clear-num29.7%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}}} \]
      6. *-commutative29.7%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
      7. fma-undefine29.7%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
      8. *-commutative29.7%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right) \cdot y}}} \]
      9. fma-define29.7%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} \cdot z + 0.279195317918525\right) \cdot y}} \]
      10. *-commutative29.7%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{z \cdot \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} + 0.279195317918525\right) \cdot y}} \]
      11. fma-undefine29.7%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)} \cdot y}} \]
    6. Applied egg-rr29.7%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right) \cdot y}}} \]
    7. Taylor expanded in z around inf 99.7%

      \[\leadsto x + \frac{1}{\color{blue}{\frac{14.431876219268936}{y}}} \]
    8. Step-by-step derivation
      1. inv-pow99.7%

        \[\leadsto x + \color{blue}{{\left(\frac{14.431876219268936}{y}\right)}^{-1}} \]
      2. div-inv99.6%

        \[\leadsto x + {\color{blue}{\left(14.431876219268936 \cdot \frac{1}{y}\right)}}^{-1} \]
      3. unpow-prod-down99.5%

        \[\leadsto x + \color{blue}{{14.431876219268936}^{-1} \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
      4. metadata-eval99.5%

        \[\leadsto x + \color{blue}{0.0692910599291889} \cdot {\left(\frac{1}{y}\right)}^{-1} \]
    9. Applied egg-rr99.5%

      \[\leadsto x + \color{blue}{0.0692910599291889 \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. *-commutative99.5%

        \[\leadsto x + \color{blue}{{\left(\frac{1}{y}\right)}^{-1} \cdot 0.0692910599291889} \]
      2. unpow-199.5%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{1}{y}}} \cdot 0.0692910599291889 \]
      3. remove-double-div99.5%

        \[\leadsto x + \color{blue}{y} \cdot 0.0692910599291889 \]
      4. metadata-eval99.5%

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{14.431876219268936}} \]
      5. div-inv100.0%

        \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]
    11. Applied egg-rr100.0%

      \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]

    if -5.8000000000000004e53 < z < 2.05e15

    1. Initial program 99.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 99.6%

      \[\leadsto x + \frac{\color{blue}{0.279195317918525 \cdot y + z \cdot \left(0.0692910599291889 \cdot \left(y \cdot z\right) + 0.4917317610505968 \cdot y\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+53} \lor \neg \left(z \leq 2.05 \cdot 10^{+15}\right):\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot 0.279195317918525 + z \cdot \left(0.0692910599291889 \cdot \left(y \cdot z\right) + y \cdot 0.4917317610505968\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 99.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{+28} \lor \neg \left(z \leq 1.36 \cdot 10^{+14}\right):\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} + x\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -2.6e+28) (not (<= z 1.36e+14)))
   (+ x (/ y 14.431876219268936))
   (+
    (/
     (*
      y
      (+
       (* z (+ (* z 0.0692910599291889) 0.4917317610505968))
       0.279195317918525))
     (+ (* z (+ z 6.012459259764103)) 3.350343815022304))
    x)))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -2.6e+28) || !(z <= 1.36e+14)) {
		tmp = x + (y / 14.431876219268936);
	} else {
		tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + 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 ((z <= (-2.6d+28)) .or. (.not. (z <= 1.36d+14))) then
        tmp = x + (y / 14.431876219268936d0)
    else
        tmp = ((y * ((z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0)) + 0.279195317918525d0)) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0)) + x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -2.6e+28) || !(z <= 1.36e+14)) {
		tmp = x + (y / 14.431876219268936);
	} else {
		tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -2.6e+28) or not (z <= 1.36e+14):
		tmp = x + (y / 14.431876219268936)
	else:
		tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -2.6e+28) || !(z <= 1.36e+14))
		tmp = Float64(x + Float64(y / 14.431876219268936));
	else
		tmp = Float64(Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -2.6e+28) || ~((z <= 1.36e+14)))
		tmp = x + (y / 14.431876219268936);
	else
		tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[z, -2.6e+28], N[Not[LessEqual[z, 1.36e+14]], $MachinePrecision]], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+28} \lor \neg \left(z \leq 1.36 \cdot 10^{+14}\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\

\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} + x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.6000000000000002e28 or 1.36e14 < z

    1. Initial program 31.6%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg31.6%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*42.0%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in42.0%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in42.0%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in42.0%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in42.0%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg42.0%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define42.0%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define42.0%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define42.0%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified42.0%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-define42.0%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right) \cdot z + 0.279195317918525}}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
      2. fma-define42.0%

        \[\leadsto x + y \cdot \frac{\color{blue}{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)} \cdot z + 0.279195317918525}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
      3. fma-define42.0%

        \[\leadsto x + y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\color{blue}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      4. associate-/l*31.6%

        \[\leadsto x + \color{blue}{\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      5. clear-num31.5%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}}} \]
      6. *-commutative31.5%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
      7. fma-undefine31.5%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
      8. *-commutative31.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right) \cdot y}}} \]
      9. fma-define31.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} \cdot z + 0.279195317918525\right) \cdot y}} \]
      10. *-commutative31.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{z \cdot \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} + 0.279195317918525\right) \cdot y}} \]
      11. fma-undefine31.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)} \cdot y}} \]
    6. Applied egg-rr31.5%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right) \cdot y}}} \]
    7. Taylor expanded in z around inf 99.7%

      \[\leadsto x + \frac{1}{\color{blue}{\frac{14.431876219268936}{y}}} \]
    8. Step-by-step derivation
      1. inv-pow99.7%

        \[\leadsto x + \color{blue}{{\left(\frac{14.431876219268936}{y}\right)}^{-1}} \]
      2. div-inv99.6%

        \[\leadsto x + {\color{blue}{\left(14.431876219268936 \cdot \frac{1}{y}\right)}}^{-1} \]
      3. unpow-prod-down99.5%

        \[\leadsto x + \color{blue}{{14.431876219268936}^{-1} \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
      4. metadata-eval99.5%

        \[\leadsto x + \color{blue}{0.0692910599291889} \cdot {\left(\frac{1}{y}\right)}^{-1} \]
    9. Applied egg-rr99.5%

      \[\leadsto x + \color{blue}{0.0692910599291889 \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. *-commutative99.5%

        \[\leadsto x + \color{blue}{{\left(\frac{1}{y}\right)}^{-1} \cdot 0.0692910599291889} \]
      2. unpow-199.5%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{1}{y}}} \cdot 0.0692910599291889 \]
      3. remove-double-div99.5%

        \[\leadsto x + \color{blue}{y} \cdot 0.0692910599291889 \]
      4. metadata-eval99.5%

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{14.431876219268936}} \]
      5. div-inv100.0%

        \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]
    11. Applied egg-rr100.0%

      \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]

    if -2.6000000000000002e28 < z < 1.36e14

    1. Initial program 99.6%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification99.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{+28} \lor \neg \left(z \leq 1.36 \cdot 10^{+14}\right):\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 99.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.5:\\ \;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\right)\\ \mathbf{elif}\;z \leq 2.7:\\ \;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot \left(0.0007936505811533442 + z \cdot -0.0005951669793454025\right) - 0.00277777777751721\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -5.5)
   (+
    x
    (*
     y
     (-
      0.0692910599291889
      (/ (+ (/ 0.4046220386999212 z) -0.07512208616047561) z))))
   (if (<= z 2.7)
     (+
      x
      (*
       y
       (+
        0.08333333333333323
        (*
         z
         (-
          (* z (+ 0.0007936505811533442 (* z -0.0005951669793454025)))
          0.00277777777751721)))))
     (+ x (/ y 14.431876219268936)))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -5.5) {
		tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
	} else if (z <= 2.7) {
		tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721))));
	} else {
		tmp = x + (y / 14.431876219268936);
	}
	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 (z <= (-5.5d0)) then
        tmp = x + (y * (0.0692910599291889d0 - (((0.4046220386999212d0 / z) + (-0.07512208616047561d0)) / z)))
    else if (z <= 2.7d0) then
        tmp = x + (y * (0.08333333333333323d0 + (z * ((z * (0.0007936505811533442d0 + (z * (-0.0005951669793454025d0)))) - 0.00277777777751721d0))))
    else
        tmp = x + (y / 14.431876219268936d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -5.5) {
		tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
	} else if (z <= 2.7) {
		tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721))));
	} else {
		tmp = x + (y / 14.431876219268936);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -5.5:
		tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)))
	elif z <= 2.7:
		tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721))))
	else:
		tmp = x + (y / 14.431876219268936)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -5.5)
		tmp = Float64(x + Float64(y * Float64(0.0692910599291889 - Float64(Float64(Float64(0.4046220386999212 / z) + -0.07512208616047561) / z))));
	elseif (z <= 2.7)
		tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * Float64(Float64(z * Float64(0.0007936505811533442 + Float64(z * -0.0005951669793454025))) - 0.00277777777751721)))));
	else
		tmp = Float64(x + Float64(y / 14.431876219268936));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -5.5)
		tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
	elseif (z <= 2.7)
		tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721))));
	else
		tmp = x + (y / 14.431876219268936);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -5.5], N[(x + N[(y * N[(0.0692910599291889 - N[(N[(N[(0.4046220386999212 / z), $MachinePrecision] + -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7], N[(x + N[(y * N[(0.08333333333333323 + N[(z * N[(N[(z * N[(0.0007936505811533442 + N[(z * -0.0005951669793454025), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\right)\\

\mathbf{elif}\;z \leq 2.7:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot \left(0.0007936505811533442 + z \cdot -0.0005951669793454025\right) - 0.00277777777751721\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\


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

    1. Initial program 34.0%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg34.0%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*47.5%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in47.5%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in47.5%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in47.5%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in47.5%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg47.5%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define47.5%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define47.5%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define47.5%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified47.5%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around -inf 98.8%

      \[\leadsto x + y \cdot \color{blue}{\left(0.0692910599291889 + -1 \cdot \frac{0.4046220386999212 \cdot \frac{1}{z} - 0.07512208616047561}{z}\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg98.8%

        \[\leadsto x + y \cdot \left(0.0692910599291889 + \color{blue}{\left(-\frac{0.4046220386999212 \cdot \frac{1}{z} - 0.07512208616047561}{z}\right)}\right) \]
      2. unsub-neg98.8%

        \[\leadsto x + y \cdot \color{blue}{\left(0.0692910599291889 - \frac{0.4046220386999212 \cdot \frac{1}{z} - 0.07512208616047561}{z}\right)} \]
      3. sub-neg98.8%

        \[\leadsto x + y \cdot \left(0.0692910599291889 - \frac{\color{blue}{0.4046220386999212 \cdot \frac{1}{z} + \left(-0.07512208616047561\right)}}{z}\right) \]
      4. associate-*r/98.8%

        \[\leadsto x + y \cdot \left(0.0692910599291889 - \frac{\color{blue}{\frac{0.4046220386999212 \cdot 1}{z}} + \left(-0.07512208616047561\right)}{z}\right) \]
      5. metadata-eval98.8%

        \[\leadsto x + y \cdot \left(0.0692910599291889 - \frac{\frac{\color{blue}{0.4046220386999212}}{z} + \left(-0.07512208616047561\right)}{z}\right) \]
      6. metadata-eval98.8%

        \[\leadsto x + y \cdot \left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} + \color{blue}{-0.07512208616047561}}{z}\right) \]
    7. Simplified98.8%

      \[\leadsto x + y \cdot \color{blue}{\left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\right)} \]

    if -5.5 < z < 2.7000000000000002

    1. Initial program 99.6%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg99.6%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*99.8%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in99.8%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in99.8%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in99.8%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in99.8%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg99.8%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define99.8%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define99.8%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define99.8%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 99.8%

      \[\leadsto x + y \cdot \color{blue}{\left(0.08333333333333323 + z \cdot \left(z \cdot \left(0.0007936505811533442 + -0.0005951669793454025 \cdot z\right) - 0.00277777777751721\right)\right)} \]

    if 2.7000000000000002 < z

    1. Initial program 42.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg42.5%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*47.2%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in47.2%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in47.2%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in47.2%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in47.2%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg47.2%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified47.2%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right) \cdot z + 0.279195317918525}}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
      2. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\color{blue}{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)} \cdot z + 0.279195317918525}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
      3. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\color{blue}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      4. associate-/l*42.5%

        \[\leadsto x + \color{blue}{\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      5. clear-num42.5%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}}} \]
      6. *-commutative42.5%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
      7. fma-undefine42.5%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
      8. *-commutative42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right) \cdot y}}} \]
      9. fma-define42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} \cdot z + 0.279195317918525\right) \cdot y}} \]
      10. *-commutative42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{z \cdot \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} + 0.279195317918525\right) \cdot y}} \]
      11. fma-undefine42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)} \cdot y}} \]
    6. Applied egg-rr42.5%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right) \cdot y}}} \]
    7. Taylor expanded in z around inf 99.5%

      \[\leadsto x + \frac{1}{\color{blue}{\frac{14.431876219268936}{y}}} \]
    8. Step-by-step derivation
      1. inv-pow99.5%

        \[\leadsto x + \color{blue}{{\left(\frac{14.431876219268936}{y}\right)}^{-1}} \]
      2. div-inv99.4%

        \[\leadsto x + {\color{blue}{\left(14.431876219268936 \cdot \frac{1}{y}\right)}}^{-1} \]
      3. unpow-prod-down99.2%

        \[\leadsto x + \color{blue}{{14.431876219268936}^{-1} \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
      4. metadata-eval99.2%

        \[\leadsto x + \color{blue}{0.0692910599291889} \cdot {\left(\frac{1}{y}\right)}^{-1} \]
    9. Applied egg-rr99.2%

      \[\leadsto x + \color{blue}{0.0692910599291889 \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. *-commutative99.2%

        \[\leadsto x + \color{blue}{{\left(\frac{1}{y}\right)}^{-1} \cdot 0.0692910599291889} \]
      2. unpow-199.2%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{1}{y}}} \cdot 0.0692910599291889 \]
      3. remove-double-div99.1%

        \[\leadsto x + \color{blue}{y} \cdot 0.0692910599291889 \]
      4. metadata-eval99.1%

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{14.431876219268936}} \]
      5. div-inv99.6%

        \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]
    11. Applied egg-rr99.6%

      \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5:\\ \;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\right)\\ \mathbf{elif}\;z \leq 2.7:\\ \;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot \left(0.0007936505811533442 + z \cdot -0.0005951669793454025\right) - 0.00277777777751721\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 99.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.5:\\ \;\;\;\;x + \left(y \cdot 0.0692910599291889 - \frac{y \cdot -0.07512208616047561}{z}\right)\\ \mathbf{elif}\;z \leq 4.5:\\ \;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot 0.0007936505811533442 - 0.00277777777751721\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -5.5)
   (+ x (- (* y 0.0692910599291889) (/ (* y -0.07512208616047561) z)))
   (if (<= z 4.5)
     (+
      x
      (*
       y
       (+
        0.08333333333333323
        (* z (- (* z 0.0007936505811533442) 0.00277777777751721)))))
     (+ x (/ y 14.431876219268936)))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -5.5) {
		tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z));
	} else if (z <= 4.5) {
		tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
	} else {
		tmp = x + (y / 14.431876219268936);
	}
	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 (z <= (-5.5d0)) then
        tmp = x + ((y * 0.0692910599291889d0) - ((y * (-0.07512208616047561d0)) / z))
    else if (z <= 4.5d0) then
        tmp = x + (y * (0.08333333333333323d0 + (z * ((z * 0.0007936505811533442d0) - 0.00277777777751721d0))))
    else
        tmp = x + (y / 14.431876219268936d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -5.5) {
		tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z));
	} else if (z <= 4.5) {
		tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
	} else {
		tmp = x + (y / 14.431876219268936);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -5.5:
		tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z))
	elif z <= 4.5:
		tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))))
	else:
		tmp = x + (y / 14.431876219268936)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -5.5)
		tmp = Float64(x + Float64(Float64(y * 0.0692910599291889) - Float64(Float64(y * -0.07512208616047561) / z)));
	elseif (z <= 4.5)
		tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * Float64(Float64(z * 0.0007936505811533442) - 0.00277777777751721)))));
	else
		tmp = Float64(x + Float64(y / 14.431876219268936));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -5.5)
		tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z));
	elseif (z <= 4.5)
		tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
	else
		tmp = x + (y / 14.431876219268936);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -5.5], N[(x + N[(N[(y * 0.0692910599291889), $MachinePrecision] - N[(N[(y * -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5], N[(x + N[(y * N[(0.08333333333333323 + N[(z * N[(N[(z * 0.0007936505811533442), $MachinePrecision] - 0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x + \left(y \cdot 0.0692910599291889 - \frac{y \cdot -0.07512208616047561}{z}\right)\\

\mathbf{elif}\;z \leq 4.5:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot 0.0007936505811533442 - 0.00277777777751721\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\


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

    1. Initial program 34.0%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg34.0%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*47.5%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in47.5%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in47.5%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in47.5%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in47.5%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg47.5%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define47.5%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define47.5%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define47.5%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified47.5%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around -inf 98.7%

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{-0.4917317610505968 \cdot y - -0.4166096748901212 \cdot y}{z} + 0.0692910599291889 \cdot y\right)} \]
    6. Step-by-step derivation
      1. +-commutative98.7%

        \[\leadsto x + \color{blue}{\left(0.0692910599291889 \cdot y + -1 \cdot \frac{-0.4917317610505968 \cdot y - -0.4166096748901212 \cdot y}{z}\right)} \]
      2. mul-1-neg98.7%

        \[\leadsto x + \left(0.0692910599291889 \cdot y + \color{blue}{\left(-\frac{-0.4917317610505968 \cdot y - -0.4166096748901212 \cdot y}{z}\right)}\right) \]
      3. unsub-neg98.7%

        \[\leadsto x + \color{blue}{\left(0.0692910599291889 \cdot y - \frac{-0.4917317610505968 \cdot y - -0.4166096748901212 \cdot y}{z}\right)} \]
      4. distribute-rgt-out--98.7%

        \[\leadsto x + \left(0.0692910599291889 \cdot y - \frac{\color{blue}{y \cdot \left(-0.4917317610505968 - -0.4166096748901212\right)}}{z}\right) \]
      5. metadata-eval98.7%

        \[\leadsto x + \left(0.0692910599291889 \cdot y - \frac{y \cdot \color{blue}{-0.07512208616047561}}{z}\right) \]
    7. Simplified98.7%

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

    if -5.5 < z < 4.5

    1. Initial program 99.6%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg99.6%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*99.8%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in99.8%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in99.8%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in99.8%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in99.8%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg99.8%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define99.8%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define99.8%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define99.8%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 99.6%

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

    if 4.5 < z

    1. Initial program 42.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg42.5%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*47.2%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in47.2%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in47.2%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in47.2%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in47.2%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg47.2%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified47.2%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right) \cdot z + 0.279195317918525}}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
      2. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\color{blue}{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)} \cdot z + 0.279195317918525}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
      3. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\color{blue}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      4. associate-/l*42.5%

        \[\leadsto x + \color{blue}{\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      5. clear-num42.5%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}}} \]
      6. *-commutative42.5%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
      7. fma-undefine42.5%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
      8. *-commutative42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right) \cdot y}}} \]
      9. fma-define42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} \cdot z + 0.279195317918525\right) \cdot y}} \]
      10. *-commutative42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{z \cdot \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} + 0.279195317918525\right) \cdot y}} \]
      11. fma-undefine42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)} \cdot y}} \]
    6. Applied egg-rr42.5%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right) \cdot y}}} \]
    7. Taylor expanded in z around inf 99.5%

      \[\leadsto x + \frac{1}{\color{blue}{\frac{14.431876219268936}{y}}} \]
    8. Step-by-step derivation
      1. inv-pow99.5%

        \[\leadsto x + \color{blue}{{\left(\frac{14.431876219268936}{y}\right)}^{-1}} \]
      2. div-inv99.4%

        \[\leadsto x + {\color{blue}{\left(14.431876219268936 \cdot \frac{1}{y}\right)}}^{-1} \]
      3. unpow-prod-down99.2%

        \[\leadsto x + \color{blue}{{14.431876219268936}^{-1} \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
      4. metadata-eval99.2%

        \[\leadsto x + \color{blue}{0.0692910599291889} \cdot {\left(\frac{1}{y}\right)}^{-1} \]
    9. Applied egg-rr99.2%

      \[\leadsto x + \color{blue}{0.0692910599291889 \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. *-commutative99.2%

        \[\leadsto x + \color{blue}{{\left(\frac{1}{y}\right)}^{-1} \cdot 0.0692910599291889} \]
      2. unpow-199.2%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{1}{y}}} \cdot 0.0692910599291889 \]
      3. remove-double-div99.1%

        \[\leadsto x + \color{blue}{y} \cdot 0.0692910599291889 \]
      4. metadata-eval99.1%

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{14.431876219268936}} \]
      5. div-inv99.6%

        \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]
    11. Applied egg-rr99.6%

      \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5:\\ \;\;\;\;x + \left(y \cdot 0.0692910599291889 - \frac{y \cdot -0.07512208616047561}{z}\right)\\ \mathbf{elif}\;z \leq 4.5:\\ \;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot 0.0007936505811533442 - 0.00277777777751721\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 99.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.5:\\ \;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\right)\\ \mathbf{elif}\;z \leq 4.2:\\ \;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot 0.0007936505811533442 - 0.00277777777751721\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -5.5)
   (+
    x
    (*
     y
     (-
      0.0692910599291889
      (/ (+ (/ 0.4046220386999212 z) -0.07512208616047561) z))))
   (if (<= z 4.2)
     (+
      x
      (*
       y
       (+
        0.08333333333333323
        (* z (- (* z 0.0007936505811533442) 0.00277777777751721)))))
     (+ x (/ y 14.431876219268936)))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -5.5) {
		tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
	} else if (z <= 4.2) {
		tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
	} else {
		tmp = x + (y / 14.431876219268936);
	}
	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 (z <= (-5.5d0)) then
        tmp = x + (y * (0.0692910599291889d0 - (((0.4046220386999212d0 / z) + (-0.07512208616047561d0)) / z)))
    else if (z <= 4.2d0) then
        tmp = x + (y * (0.08333333333333323d0 + (z * ((z * 0.0007936505811533442d0) - 0.00277777777751721d0))))
    else
        tmp = x + (y / 14.431876219268936d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -5.5) {
		tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
	} else if (z <= 4.2) {
		tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
	} else {
		tmp = x + (y / 14.431876219268936);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -5.5:
		tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)))
	elif z <= 4.2:
		tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))))
	else:
		tmp = x + (y / 14.431876219268936)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -5.5)
		tmp = Float64(x + Float64(y * Float64(0.0692910599291889 - Float64(Float64(Float64(0.4046220386999212 / z) + -0.07512208616047561) / z))));
	elseif (z <= 4.2)
		tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * Float64(Float64(z * 0.0007936505811533442) - 0.00277777777751721)))));
	else
		tmp = Float64(x + Float64(y / 14.431876219268936));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -5.5)
		tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
	elseif (z <= 4.2)
		tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
	else
		tmp = x + (y / 14.431876219268936);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -5.5], N[(x + N[(y * N[(0.0692910599291889 - N[(N[(N[(0.4046220386999212 / z), $MachinePrecision] + -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2], N[(x + N[(y * N[(0.08333333333333323 + N[(z * N[(N[(z * 0.0007936505811533442), $MachinePrecision] - 0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\right)\\

\mathbf{elif}\;z \leq 4.2:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot 0.0007936505811533442 - 0.00277777777751721\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\


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

    1. Initial program 34.0%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg34.0%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*47.5%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in47.5%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in47.5%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in47.5%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in47.5%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg47.5%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define47.5%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define47.5%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define47.5%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified47.5%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around -inf 98.8%

      \[\leadsto x + y \cdot \color{blue}{\left(0.0692910599291889 + -1 \cdot \frac{0.4046220386999212 \cdot \frac{1}{z} - 0.07512208616047561}{z}\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg98.8%

        \[\leadsto x + y \cdot \left(0.0692910599291889 + \color{blue}{\left(-\frac{0.4046220386999212 \cdot \frac{1}{z} - 0.07512208616047561}{z}\right)}\right) \]
      2. unsub-neg98.8%

        \[\leadsto x + y \cdot \color{blue}{\left(0.0692910599291889 - \frac{0.4046220386999212 \cdot \frac{1}{z} - 0.07512208616047561}{z}\right)} \]
      3. sub-neg98.8%

        \[\leadsto x + y \cdot \left(0.0692910599291889 - \frac{\color{blue}{0.4046220386999212 \cdot \frac{1}{z} + \left(-0.07512208616047561\right)}}{z}\right) \]
      4. associate-*r/98.8%

        \[\leadsto x + y \cdot \left(0.0692910599291889 - \frac{\color{blue}{\frac{0.4046220386999212 \cdot 1}{z}} + \left(-0.07512208616047561\right)}{z}\right) \]
      5. metadata-eval98.8%

        \[\leadsto x + y \cdot \left(0.0692910599291889 - \frac{\frac{\color{blue}{0.4046220386999212}}{z} + \left(-0.07512208616047561\right)}{z}\right) \]
      6. metadata-eval98.8%

        \[\leadsto x + y \cdot \left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} + \color{blue}{-0.07512208616047561}}{z}\right) \]
    7. Simplified98.8%

      \[\leadsto x + y \cdot \color{blue}{\left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\right)} \]

    if -5.5 < z < 4.20000000000000018

    1. Initial program 99.6%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg99.6%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*99.8%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in99.8%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in99.8%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in99.8%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in99.8%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg99.8%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define99.8%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define99.8%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define99.8%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 99.6%

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

    if 4.20000000000000018 < z

    1. Initial program 42.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg42.5%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*47.2%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in47.2%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in47.2%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in47.2%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in47.2%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg47.2%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified47.2%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right) \cdot z + 0.279195317918525}}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
      2. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\color{blue}{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)} \cdot z + 0.279195317918525}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
      3. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\color{blue}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      4. associate-/l*42.5%

        \[\leadsto x + \color{blue}{\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      5. clear-num42.5%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}}} \]
      6. *-commutative42.5%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
      7. fma-undefine42.5%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
      8. *-commutative42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right) \cdot y}}} \]
      9. fma-define42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} \cdot z + 0.279195317918525\right) \cdot y}} \]
      10. *-commutative42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{z \cdot \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} + 0.279195317918525\right) \cdot y}} \]
      11. fma-undefine42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)} \cdot y}} \]
    6. Applied egg-rr42.5%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right) \cdot y}}} \]
    7. Taylor expanded in z around inf 99.5%

      \[\leadsto x + \frac{1}{\color{blue}{\frac{14.431876219268936}{y}}} \]
    8. Step-by-step derivation
      1. inv-pow99.5%

        \[\leadsto x + \color{blue}{{\left(\frac{14.431876219268936}{y}\right)}^{-1}} \]
      2. div-inv99.4%

        \[\leadsto x + {\color{blue}{\left(14.431876219268936 \cdot \frac{1}{y}\right)}}^{-1} \]
      3. unpow-prod-down99.2%

        \[\leadsto x + \color{blue}{{14.431876219268936}^{-1} \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
      4. metadata-eval99.2%

        \[\leadsto x + \color{blue}{0.0692910599291889} \cdot {\left(\frac{1}{y}\right)}^{-1} \]
    9. Applied egg-rr99.2%

      \[\leadsto x + \color{blue}{0.0692910599291889 \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. *-commutative99.2%

        \[\leadsto x + \color{blue}{{\left(\frac{1}{y}\right)}^{-1} \cdot 0.0692910599291889} \]
      2. unpow-199.2%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{1}{y}}} \cdot 0.0692910599291889 \]
      3. remove-double-div99.1%

        \[\leadsto x + \color{blue}{y} \cdot 0.0692910599291889 \]
      4. metadata-eval99.1%

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{14.431876219268936}} \]
      5. div-inv99.6%

        \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]
    11. Applied egg-rr99.6%

      \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5:\\ \;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\right)\\ \mathbf{elif}\;z \leq 4.2:\\ \;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot 0.0007936505811533442 - 0.00277777777751721\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 99.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.5:\\ \;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\ \mathbf{elif}\;z \leq 5:\\ \;\;\;\;x + \left(\left(y \cdot z\right) \cdot -0.00277777777751721 + y \cdot 0.08333333333333323\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -5.5)
   (+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z))))
   (if (<= z 5.0)
     (+ x (+ (* (* y z) -0.00277777777751721) (* y 0.08333333333333323)))
     (+ x (/ y 14.431876219268936)))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -5.5) {
		tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
	} else if (z <= 5.0) {
		tmp = x + (((y * z) * -0.00277777777751721) + (y * 0.08333333333333323));
	} else {
		tmp = x + (y / 14.431876219268936);
	}
	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 (z <= (-5.5d0)) then
        tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
    else if (z <= 5.0d0) then
        tmp = x + (((y * z) * (-0.00277777777751721d0)) + (y * 0.08333333333333323d0))
    else
        tmp = x + (y / 14.431876219268936d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -5.5) {
		tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
	} else if (z <= 5.0) {
		tmp = x + (((y * z) * -0.00277777777751721) + (y * 0.08333333333333323));
	} else {
		tmp = x + (y / 14.431876219268936);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -5.5:
		tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)))
	elif z <= 5.0:
		tmp = x + (((y * z) * -0.00277777777751721) + (y * 0.08333333333333323))
	else:
		tmp = x + (y / 14.431876219268936)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -5.5)
		tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z))));
	elseif (z <= 5.0)
		tmp = Float64(x + Float64(Float64(Float64(y * z) * -0.00277777777751721) + Float64(y * 0.08333333333333323)));
	else
		tmp = Float64(x + Float64(y / 14.431876219268936));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -5.5)
		tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
	elseif (z <= 5.0)
		tmp = x + (((y * z) * -0.00277777777751721) + (y * 0.08333333333333323));
	else
		tmp = x + (y / 14.431876219268936);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -5.5], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.0], N[(x + N[(N[(N[(y * z), $MachinePrecision] * -0.00277777777751721), $MachinePrecision] + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\

\mathbf{elif}\;z \leq 5:\\
\;\;\;\;x + \left(\left(y \cdot z\right) \cdot -0.00277777777751721 + y \cdot 0.08333333333333323\right)\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\


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

    1. Initial program 34.0%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg34.0%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*47.5%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in47.5%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in47.5%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in47.5%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in47.5%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg47.5%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define47.5%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define47.5%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define47.5%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified47.5%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 98.7%

      \[\leadsto x + y \cdot \color{blue}{\left(0.0692910599291889 + 0.07512208616047561 \cdot \frac{1}{z}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/98.7%

        \[\leadsto x + y \cdot \left(0.0692910599291889 + \color{blue}{\frac{0.07512208616047561 \cdot 1}{z}}\right) \]
      2. metadata-eval98.7%

        \[\leadsto x + y \cdot \left(0.0692910599291889 + \frac{\color{blue}{0.07512208616047561}}{z}\right) \]
    7. Simplified98.7%

      \[\leadsto x + y \cdot \color{blue}{\left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)} \]

    if -5.5 < z < 5

    1. Initial program 99.6%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg99.6%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*99.8%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in99.8%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in99.8%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in99.8%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in99.8%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg99.8%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define99.8%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define99.8%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define99.8%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 99.6%

      \[\leadsto x + y \cdot \color{blue}{\left(0.08333333333333323 + z \cdot \left(0.0007936505811533442 \cdot z - 0.00277777777751721\right)\right)} \]
    6. Taylor expanded in z around 0 99.4%

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

    if 5 < z

    1. Initial program 42.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg42.5%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*47.2%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in47.2%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in47.2%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in47.2%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in47.2%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg47.2%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified47.2%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right) \cdot z + 0.279195317918525}}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
      2. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\color{blue}{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)} \cdot z + 0.279195317918525}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
      3. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\color{blue}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      4. associate-/l*42.5%

        \[\leadsto x + \color{blue}{\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      5. clear-num42.5%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}}} \]
      6. *-commutative42.5%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
      7. fma-undefine42.5%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
      8. *-commutative42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right) \cdot y}}} \]
      9. fma-define42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} \cdot z + 0.279195317918525\right) \cdot y}} \]
      10. *-commutative42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{z \cdot \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} + 0.279195317918525\right) \cdot y}} \]
      11. fma-undefine42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)} \cdot y}} \]
    6. Applied egg-rr42.5%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right) \cdot y}}} \]
    7. Taylor expanded in z around inf 99.5%

      \[\leadsto x + \frac{1}{\color{blue}{\frac{14.431876219268936}{y}}} \]
    8. Step-by-step derivation
      1. inv-pow99.5%

        \[\leadsto x + \color{blue}{{\left(\frac{14.431876219268936}{y}\right)}^{-1}} \]
      2. div-inv99.4%

        \[\leadsto x + {\color{blue}{\left(14.431876219268936 \cdot \frac{1}{y}\right)}}^{-1} \]
      3. unpow-prod-down99.2%

        \[\leadsto x + \color{blue}{{14.431876219268936}^{-1} \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
      4. metadata-eval99.2%

        \[\leadsto x + \color{blue}{0.0692910599291889} \cdot {\left(\frac{1}{y}\right)}^{-1} \]
    9. Applied egg-rr99.2%

      \[\leadsto x + \color{blue}{0.0692910599291889 \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. *-commutative99.2%

        \[\leadsto x + \color{blue}{{\left(\frac{1}{y}\right)}^{-1} \cdot 0.0692910599291889} \]
      2. unpow-199.2%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{1}{y}}} \cdot 0.0692910599291889 \]
      3. remove-double-div99.1%

        \[\leadsto x + \color{blue}{y} \cdot 0.0692910599291889 \]
      4. metadata-eval99.1%

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{14.431876219268936}} \]
      5. div-inv99.6%

        \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]
    11. Applied egg-rr99.6%

      \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5:\\ \;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\ \mathbf{elif}\;z \leq 5:\\ \;\;\;\;x + \left(\left(y \cdot z\right) \cdot -0.00277777777751721 + y \cdot 0.08333333333333323\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 99.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.5:\\ \;\;\;\;x + \left(y \cdot 0.0692910599291889 - \frac{y \cdot -0.07512208616047561}{z}\right)\\ \mathbf{elif}\;z \leq 5:\\ \;\;\;\;x + \left(\left(y \cdot z\right) \cdot -0.00277777777751721 + y \cdot 0.08333333333333323\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -5.5)
   (+ x (- (* y 0.0692910599291889) (/ (* y -0.07512208616047561) z)))
   (if (<= z 5.0)
     (+ x (+ (* (* y z) -0.00277777777751721) (* y 0.08333333333333323)))
     (+ x (/ y 14.431876219268936)))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -5.5) {
		tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z));
	} else if (z <= 5.0) {
		tmp = x + (((y * z) * -0.00277777777751721) + (y * 0.08333333333333323));
	} else {
		tmp = x + (y / 14.431876219268936);
	}
	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 (z <= (-5.5d0)) then
        tmp = x + ((y * 0.0692910599291889d0) - ((y * (-0.07512208616047561d0)) / z))
    else if (z <= 5.0d0) then
        tmp = x + (((y * z) * (-0.00277777777751721d0)) + (y * 0.08333333333333323d0))
    else
        tmp = x + (y / 14.431876219268936d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -5.5) {
		tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z));
	} else if (z <= 5.0) {
		tmp = x + (((y * z) * -0.00277777777751721) + (y * 0.08333333333333323));
	} else {
		tmp = x + (y / 14.431876219268936);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -5.5:
		tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z))
	elif z <= 5.0:
		tmp = x + (((y * z) * -0.00277777777751721) + (y * 0.08333333333333323))
	else:
		tmp = x + (y / 14.431876219268936)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -5.5)
		tmp = Float64(x + Float64(Float64(y * 0.0692910599291889) - Float64(Float64(y * -0.07512208616047561) / z)));
	elseif (z <= 5.0)
		tmp = Float64(x + Float64(Float64(Float64(y * z) * -0.00277777777751721) + Float64(y * 0.08333333333333323)));
	else
		tmp = Float64(x + Float64(y / 14.431876219268936));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -5.5)
		tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z));
	elseif (z <= 5.0)
		tmp = x + (((y * z) * -0.00277777777751721) + (y * 0.08333333333333323));
	else
		tmp = x + (y / 14.431876219268936);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -5.5], N[(x + N[(N[(y * 0.0692910599291889), $MachinePrecision] - N[(N[(y * -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.0], N[(x + N[(N[(N[(y * z), $MachinePrecision] * -0.00277777777751721), $MachinePrecision] + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x + \left(y \cdot 0.0692910599291889 - \frac{y \cdot -0.07512208616047561}{z}\right)\\

\mathbf{elif}\;z \leq 5:\\
\;\;\;\;x + \left(\left(y \cdot z\right) \cdot -0.00277777777751721 + y \cdot 0.08333333333333323\right)\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\


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

    1. Initial program 34.0%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg34.0%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*47.5%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in47.5%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in47.5%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in47.5%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in47.5%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg47.5%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define47.5%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define47.5%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define47.5%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified47.5%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around -inf 98.7%

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{-0.4917317610505968 \cdot y - -0.4166096748901212 \cdot y}{z} + 0.0692910599291889 \cdot y\right)} \]
    6. Step-by-step derivation
      1. +-commutative98.7%

        \[\leadsto x + \color{blue}{\left(0.0692910599291889 \cdot y + -1 \cdot \frac{-0.4917317610505968 \cdot y - -0.4166096748901212 \cdot y}{z}\right)} \]
      2. mul-1-neg98.7%

        \[\leadsto x + \left(0.0692910599291889 \cdot y + \color{blue}{\left(-\frac{-0.4917317610505968 \cdot y - -0.4166096748901212 \cdot y}{z}\right)}\right) \]
      3. unsub-neg98.7%

        \[\leadsto x + \color{blue}{\left(0.0692910599291889 \cdot y - \frac{-0.4917317610505968 \cdot y - -0.4166096748901212 \cdot y}{z}\right)} \]
      4. distribute-rgt-out--98.7%

        \[\leadsto x + \left(0.0692910599291889 \cdot y - \frac{\color{blue}{y \cdot \left(-0.4917317610505968 - -0.4166096748901212\right)}}{z}\right) \]
      5. metadata-eval98.7%

        \[\leadsto x + \left(0.0692910599291889 \cdot y - \frac{y \cdot \color{blue}{-0.07512208616047561}}{z}\right) \]
    7. Simplified98.7%

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

    if -5.5 < z < 5

    1. Initial program 99.6%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg99.6%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*99.8%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in99.8%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in99.8%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in99.8%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in99.8%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg99.8%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define99.8%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define99.8%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define99.8%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 99.6%

      \[\leadsto x + y \cdot \color{blue}{\left(0.08333333333333323 + z \cdot \left(0.0007936505811533442 \cdot z - 0.00277777777751721\right)\right)} \]
    6. Taylor expanded in z around 0 99.4%

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

    if 5 < z

    1. Initial program 42.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg42.5%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*47.2%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in47.2%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in47.2%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in47.2%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in47.2%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg47.2%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified47.2%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right) \cdot z + 0.279195317918525}}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
      2. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\color{blue}{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)} \cdot z + 0.279195317918525}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
      3. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\color{blue}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      4. associate-/l*42.5%

        \[\leadsto x + \color{blue}{\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      5. clear-num42.5%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}}} \]
      6. *-commutative42.5%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
      7. fma-undefine42.5%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
      8. *-commutative42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right) \cdot y}}} \]
      9. fma-define42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} \cdot z + 0.279195317918525\right) \cdot y}} \]
      10. *-commutative42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{z \cdot \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} + 0.279195317918525\right) \cdot y}} \]
      11. fma-undefine42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)} \cdot y}} \]
    6. Applied egg-rr42.5%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right) \cdot y}}} \]
    7. Taylor expanded in z around inf 99.5%

      \[\leadsto x + \frac{1}{\color{blue}{\frac{14.431876219268936}{y}}} \]
    8. Step-by-step derivation
      1. inv-pow99.5%

        \[\leadsto x + \color{blue}{{\left(\frac{14.431876219268936}{y}\right)}^{-1}} \]
      2. div-inv99.4%

        \[\leadsto x + {\color{blue}{\left(14.431876219268936 \cdot \frac{1}{y}\right)}}^{-1} \]
      3. unpow-prod-down99.2%

        \[\leadsto x + \color{blue}{{14.431876219268936}^{-1} \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
      4. metadata-eval99.2%

        \[\leadsto x + \color{blue}{0.0692910599291889} \cdot {\left(\frac{1}{y}\right)}^{-1} \]
    9. Applied egg-rr99.2%

      \[\leadsto x + \color{blue}{0.0692910599291889 \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. *-commutative99.2%

        \[\leadsto x + \color{blue}{{\left(\frac{1}{y}\right)}^{-1} \cdot 0.0692910599291889} \]
      2. unpow-199.2%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{1}{y}}} \cdot 0.0692910599291889 \]
      3. remove-double-div99.1%

        \[\leadsto x + \color{blue}{y} \cdot 0.0692910599291889 \]
      4. metadata-eval99.1%

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{14.431876219268936}} \]
      5. div-inv99.6%

        \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]
    11. Applied egg-rr99.6%

      \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5:\\ \;\;\;\;x + \left(y \cdot 0.0692910599291889 - \frac{y \cdot -0.07512208616047561}{z}\right)\\ \mathbf{elif}\;z \leq 5:\\ \;\;\;\;x + \left(\left(y \cdot z\right) \cdot -0.00277777777751721 + y \cdot 0.08333333333333323\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 99.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.5:\\ \;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\ \mathbf{elif}\;z \leq 5:\\ \;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot -0.00277777777751721\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -5.5)
   (+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z))))
   (if (<= z 5.0)
     (+ x (* y (+ 0.08333333333333323 (* z -0.00277777777751721))))
     (+ x (/ y 14.431876219268936)))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -5.5) {
		tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
	} else if (z <= 5.0) {
		tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
	} else {
		tmp = x + (y / 14.431876219268936);
	}
	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 (z <= (-5.5d0)) then
        tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
    else if (z <= 5.0d0) then
        tmp = x + (y * (0.08333333333333323d0 + (z * (-0.00277777777751721d0))))
    else
        tmp = x + (y / 14.431876219268936d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -5.5) {
		tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
	} else if (z <= 5.0) {
		tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
	} else {
		tmp = x + (y / 14.431876219268936);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -5.5:
		tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)))
	elif z <= 5.0:
		tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)))
	else:
		tmp = x + (y / 14.431876219268936)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -5.5)
		tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z))));
	elseif (z <= 5.0)
		tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * -0.00277777777751721))));
	else
		tmp = Float64(x + Float64(y / 14.431876219268936));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -5.5)
		tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
	elseif (z <= 5.0)
		tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
	else
		tmp = x + (y / 14.431876219268936);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -5.5], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.0], N[(x + N[(y * N[(0.08333333333333323 + N[(z * -0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\

\mathbf{elif}\;z \leq 5:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot -0.00277777777751721\right)\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\


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

    1. Initial program 34.0%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg34.0%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*47.5%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in47.5%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in47.5%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in47.5%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in47.5%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg47.5%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define47.5%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define47.5%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define47.5%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified47.5%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 98.7%

      \[\leadsto x + y \cdot \color{blue}{\left(0.0692910599291889 + 0.07512208616047561 \cdot \frac{1}{z}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/98.7%

        \[\leadsto x + y \cdot \left(0.0692910599291889 + \color{blue}{\frac{0.07512208616047561 \cdot 1}{z}}\right) \]
      2. metadata-eval98.7%

        \[\leadsto x + y \cdot \left(0.0692910599291889 + \frac{\color{blue}{0.07512208616047561}}{z}\right) \]
    7. Simplified98.7%

      \[\leadsto x + y \cdot \color{blue}{\left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)} \]

    if -5.5 < z < 5

    1. Initial program 99.6%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg99.6%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*99.8%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in99.8%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in99.8%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in99.8%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in99.8%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg99.8%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define99.8%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define99.8%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define99.8%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 99.4%

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

    if 5 < z

    1. Initial program 42.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg42.5%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*47.2%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in47.2%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in47.2%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in47.2%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in47.2%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg47.2%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified47.2%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right) \cdot z + 0.279195317918525}}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
      2. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\color{blue}{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)} \cdot z + 0.279195317918525}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
      3. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\color{blue}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      4. associate-/l*42.5%

        \[\leadsto x + \color{blue}{\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      5. clear-num42.5%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}}} \]
      6. *-commutative42.5%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
      7. fma-undefine42.5%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
      8. *-commutative42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right) \cdot y}}} \]
      9. fma-define42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} \cdot z + 0.279195317918525\right) \cdot y}} \]
      10. *-commutative42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{z \cdot \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} + 0.279195317918525\right) \cdot y}} \]
      11. fma-undefine42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)} \cdot y}} \]
    6. Applied egg-rr42.5%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right) \cdot y}}} \]
    7. Taylor expanded in z around inf 99.5%

      \[\leadsto x + \frac{1}{\color{blue}{\frac{14.431876219268936}{y}}} \]
    8. Step-by-step derivation
      1. inv-pow99.5%

        \[\leadsto x + \color{blue}{{\left(\frac{14.431876219268936}{y}\right)}^{-1}} \]
      2. div-inv99.4%

        \[\leadsto x + {\color{blue}{\left(14.431876219268936 \cdot \frac{1}{y}\right)}}^{-1} \]
      3. unpow-prod-down99.2%

        \[\leadsto x + \color{blue}{{14.431876219268936}^{-1} \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
      4. metadata-eval99.2%

        \[\leadsto x + \color{blue}{0.0692910599291889} \cdot {\left(\frac{1}{y}\right)}^{-1} \]
    9. Applied egg-rr99.2%

      \[\leadsto x + \color{blue}{0.0692910599291889 \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. *-commutative99.2%

        \[\leadsto x + \color{blue}{{\left(\frac{1}{y}\right)}^{-1} \cdot 0.0692910599291889} \]
      2. unpow-199.2%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{1}{y}}} \cdot 0.0692910599291889 \]
      3. remove-double-div99.1%

        \[\leadsto x + \color{blue}{y} \cdot 0.0692910599291889 \]
      4. metadata-eval99.1%

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{14.431876219268936}} \]
      5. div-inv99.6%

        \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]
    11. Applied egg-rr99.6%

      \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5:\\ \;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\ \mathbf{elif}\;z \leq 5:\\ \;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot -0.00277777777751721\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 98.9% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 5.5\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\


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

    1. Initial program 38.0%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg38.0%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*47.4%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in47.4%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in47.4%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in47.4%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in47.4%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg47.4%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define47.4%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define47.4%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define47.4%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified47.4%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-define47.4%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right) \cdot z + 0.279195317918525}}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
      2. fma-define47.4%

        \[\leadsto x + y \cdot \frac{\color{blue}{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)} \cdot z + 0.279195317918525}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
      3. fma-define47.4%

        \[\leadsto x + y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\color{blue}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      4. associate-/l*38.0%

        \[\leadsto x + \color{blue}{\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      5. clear-num37.9%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}}} \]
      6. *-commutative37.9%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
      7. fma-undefine37.9%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
      8. *-commutative37.9%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right) \cdot y}}} \]
      9. fma-define37.9%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} \cdot z + 0.279195317918525\right) \cdot y}} \]
      10. *-commutative37.9%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{z \cdot \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} + 0.279195317918525\right) \cdot y}} \]
      11. fma-undefine37.9%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)} \cdot y}} \]
    6. Applied egg-rr37.9%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right) \cdot y}}} \]
    7. Taylor expanded in z around inf 98.8%

      \[\leadsto x + \frac{1}{\color{blue}{\frac{14.431876219268936}{y}}} \]
    8. Step-by-step derivation
      1. inv-pow98.8%

        \[\leadsto x + \color{blue}{{\left(\frac{14.431876219268936}{y}\right)}^{-1}} \]
      2. div-inv98.7%

        \[\leadsto x + {\color{blue}{\left(14.431876219268936 \cdot \frac{1}{y}\right)}}^{-1} \]
      3. unpow-prod-down98.6%

        \[\leadsto x + \color{blue}{{14.431876219268936}^{-1} \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
      4. metadata-eval98.6%

        \[\leadsto x + \color{blue}{0.0692910599291889} \cdot {\left(\frac{1}{y}\right)}^{-1} \]
    9. Applied egg-rr98.6%

      \[\leadsto x + \color{blue}{0.0692910599291889 \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. *-commutative98.6%

        \[\leadsto x + \color{blue}{{\left(\frac{1}{y}\right)}^{-1} \cdot 0.0692910599291889} \]
      2. unpow-198.6%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{1}{y}}} \cdot 0.0692910599291889 \]
      3. remove-double-div98.6%

        \[\leadsto x + \color{blue}{y} \cdot 0.0692910599291889 \]
      4. metadata-eval98.6%

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{14.431876219268936}} \]
      5. div-inv99.0%

        \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]
    11. Applied egg-rr99.0%

      \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]

    if -5.5 < z < 5.5

    1. Initial program 99.6%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. +-commutative99.6%

        \[\leadsto \color{blue}{\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} + x} \]
      2. *-commutative99.6%

        \[\leadsto \frac{\color{blue}{\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right) \cdot y}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} + x \]
      3. associate-/l*99.5%

        \[\leadsto \color{blue}{\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right) \cdot \frac{y}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} + x \]
      4. fma-define99.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525, \frac{y}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}, x\right)} \]
      5. *-commutative99.5%

        \[\leadsto \mathsf{fma}\left(\color{blue}{z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)} + 0.279195317918525, \frac{y}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}, x\right) \]
      6. fma-define99.5%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, z \cdot 0.0692910599291889 + 0.4917317610505968, 0.279195317918525\right)}, \frac{y}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}, x\right) \]
      7. fma-define99.5%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, 0.279195317918525\right), \frac{y}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}, x\right) \]
      8. *-commutative99.5%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right), \frac{y}{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}, x\right) \]
      9. fma-define99.5%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right), \frac{y}{\color{blue}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}}, x\right) \]
    3. Simplified99.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right), \frac{y}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 98.5%

      \[\leadsto \color{blue}{x + 0.08333333333333323 \cdot y} \]
    6. Step-by-step derivation
      1. +-commutative98.5%

        \[\leadsto \color{blue}{0.08333333333333323 \cdot y + x} \]
    7. Simplified98.5%

      \[\leadsto \color{blue}{0.08333333333333323 \cdot y + x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.8%

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

Alternative 11: 99.0% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\

\mathbf{elif}\;z \leq 5.6:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\


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

    1. Initial program 34.0%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg34.0%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*47.5%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in47.5%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in47.5%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in47.5%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in47.5%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg47.5%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define47.5%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define47.5%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define47.5%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified47.5%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 98.7%

      \[\leadsto x + y \cdot \color{blue}{\left(0.0692910599291889 + 0.07512208616047561 \cdot \frac{1}{z}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/98.7%

        \[\leadsto x + y \cdot \left(0.0692910599291889 + \color{blue}{\frac{0.07512208616047561 \cdot 1}{z}}\right) \]
      2. metadata-eval98.7%

        \[\leadsto x + y \cdot \left(0.0692910599291889 + \frac{\color{blue}{0.07512208616047561}}{z}\right) \]
    7. Simplified98.7%

      \[\leadsto x + y \cdot \color{blue}{\left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)} \]

    if -5.5 < z < 5.5999999999999996

    1. Initial program 99.6%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. +-commutative99.6%

        \[\leadsto \color{blue}{\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} + x} \]
      2. *-commutative99.6%

        \[\leadsto \frac{\color{blue}{\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right) \cdot y}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} + x \]
      3. associate-/l*99.5%

        \[\leadsto \color{blue}{\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right) \cdot \frac{y}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} + x \]
      4. fma-define99.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525, \frac{y}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}, x\right)} \]
      5. *-commutative99.5%

        \[\leadsto \mathsf{fma}\left(\color{blue}{z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)} + 0.279195317918525, \frac{y}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}, x\right) \]
      6. fma-define99.5%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, z \cdot 0.0692910599291889 + 0.4917317610505968, 0.279195317918525\right)}, \frac{y}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}, x\right) \]
      7. fma-define99.5%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, 0.279195317918525\right), \frac{y}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}, x\right) \]
      8. *-commutative99.5%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right), \frac{y}{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}, x\right) \]
      9. fma-define99.5%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right), \frac{y}{\color{blue}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}}, x\right) \]
    3. Simplified99.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right), \frac{y}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 98.5%

      \[\leadsto \color{blue}{x + 0.08333333333333323 \cdot y} \]
    6. Step-by-step derivation
      1. +-commutative98.5%

        \[\leadsto \color{blue}{0.08333333333333323 \cdot y + x} \]
    7. Simplified98.5%

      \[\leadsto \color{blue}{0.08333333333333323 \cdot y + x} \]

    if 5.5999999999999996 < z

    1. Initial program 42.5%

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Step-by-step derivation
      1. remove-double-neg42.5%

        \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      2. associate-/l*47.2%

        \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
      3. distribute-rgt-neg-in47.2%

        \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
      4. distribute-lft-neg-in47.2%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
      5. distribute-lft-neg-in47.2%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      6. distribute-rgt-neg-in47.2%

        \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
      7. remove-double-neg47.2%

        \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      8. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      9. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      10. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    3. Simplified47.2%

      \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right) \cdot z + 0.279195317918525}}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
      2. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\color{blue}{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)} \cdot z + 0.279195317918525}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
      3. fma-define47.2%

        \[\leadsto x + y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\color{blue}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      4. associate-/l*42.5%

        \[\leadsto x + \color{blue}{\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      5. clear-num42.5%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}}} \]
      6. *-commutative42.5%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
      7. fma-undefine42.5%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
      8. *-commutative42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right) \cdot y}}} \]
      9. fma-define42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} \cdot z + 0.279195317918525\right) \cdot y}} \]
      10. *-commutative42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{z \cdot \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} + 0.279195317918525\right) \cdot y}} \]
      11. fma-undefine42.5%

        \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)} \cdot y}} \]
    6. Applied egg-rr42.5%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right) \cdot y}}} \]
    7. Taylor expanded in z around inf 99.5%

      \[\leadsto x + \frac{1}{\color{blue}{\frac{14.431876219268936}{y}}} \]
    8. Step-by-step derivation
      1. inv-pow99.5%

        \[\leadsto x + \color{blue}{{\left(\frac{14.431876219268936}{y}\right)}^{-1}} \]
      2. div-inv99.4%

        \[\leadsto x + {\color{blue}{\left(14.431876219268936 \cdot \frac{1}{y}\right)}}^{-1} \]
      3. unpow-prod-down99.2%

        \[\leadsto x + \color{blue}{{14.431876219268936}^{-1} \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
      4. metadata-eval99.2%

        \[\leadsto x + \color{blue}{0.0692910599291889} \cdot {\left(\frac{1}{y}\right)}^{-1} \]
    9. Applied egg-rr99.2%

      \[\leadsto x + \color{blue}{0.0692910599291889 \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. *-commutative99.2%

        \[\leadsto x + \color{blue}{{\left(\frac{1}{y}\right)}^{-1} \cdot 0.0692910599291889} \]
      2. unpow-199.2%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{1}{y}}} \cdot 0.0692910599291889 \]
      3. remove-double-div99.1%

        \[\leadsto x + \color{blue}{y} \cdot 0.0692910599291889 \]
      4. metadata-eval99.1%

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{14.431876219268936}} \]
      5. div-inv99.6%

        \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]
    11. Applied egg-rr99.6%

      \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification98.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5:\\ \;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\ \mathbf{elif}\;z \leq 5.6:\\ \;\;\;\;x + y \cdot 0.08333333333333323\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 79.3% accurate, 4.2× speedup?

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

\\
x + \frac{y}{14.431876219268936}
\end{array}
Derivation
  1. Initial program 68.8%

    \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
  2. Step-by-step derivation
    1. remove-double-neg68.8%

      \[\leadsto x + \color{blue}{\left(-\left(-\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
    2. associate-/l*73.6%

      \[\leadsto x + \left(-\left(-\color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}}\right)\right) \]
    3. distribute-rgt-neg-in73.6%

      \[\leadsto x + \left(-\color{blue}{y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)}\right) \]
    4. distribute-lft-neg-in73.6%

      \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)} \]
    5. distribute-lft-neg-in73.6%

      \[\leadsto x + \color{blue}{\left(-y \cdot \left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
    6. distribute-rgt-neg-in73.6%

      \[\leadsto x + \color{blue}{y \cdot \left(-\left(-\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\right)\right)} \]
    7. remove-double-neg73.6%

      \[\leadsto x + y \cdot \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
    8. fma-define73.6%

      \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    9. fma-define73.6%

      \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    10. fma-define73.6%

      \[\leadsto x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
  3. Simplified73.6%

    \[\leadsto \color{blue}{x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. fma-define73.6%

      \[\leadsto x + y \cdot \frac{\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right) \cdot z + 0.279195317918525}}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
    2. fma-define73.6%

      \[\leadsto x + y \cdot \frac{\color{blue}{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)} \cdot z + 0.279195317918525}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)} \]
    3. fma-define73.6%

      \[\leadsto x + y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\color{blue}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
    4. associate-/l*68.8%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
    5. clear-num68.7%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}}} \]
    6. *-commutative68.7%

      \[\leadsto x + \frac{1}{\frac{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
    7. fma-undefine68.7%

      \[\leadsto x + \frac{1}{\frac{\color{blue}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}}{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}} \]
    8. *-commutative68.7%

      \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right) \cdot y}}} \]
    9. fma-define68.7%

      \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} \cdot z + 0.279195317918525\right) \cdot y}} \]
    10. *-commutative68.7%

      \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\left(\color{blue}{z \cdot \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)} + 0.279195317918525\right) \cdot y}} \]
    11. fma-undefine68.7%

      \[\leadsto x + \frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)} \cdot y}} \]
  6. Applied egg-rr68.7%

    \[\leadsto x + \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right) \cdot y}}} \]
  7. Taylor expanded in z around inf 77.6%

    \[\leadsto x + \frac{1}{\color{blue}{\frac{14.431876219268936}{y}}} \]
  8. Step-by-step derivation
    1. inv-pow77.6%

      \[\leadsto x + \color{blue}{{\left(\frac{14.431876219268936}{y}\right)}^{-1}} \]
    2. div-inv77.6%

      \[\leadsto x + {\color{blue}{\left(14.431876219268936 \cdot \frac{1}{y}\right)}}^{-1} \]
    3. unpow-prod-down77.5%

      \[\leadsto x + \color{blue}{{14.431876219268936}^{-1} \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
    4. metadata-eval77.5%

      \[\leadsto x + \color{blue}{0.0692910599291889} \cdot {\left(\frac{1}{y}\right)}^{-1} \]
  9. Applied egg-rr77.5%

    \[\leadsto x + \color{blue}{0.0692910599291889 \cdot {\left(\frac{1}{y}\right)}^{-1}} \]
  10. Step-by-step derivation
    1. *-commutative77.5%

      \[\leadsto x + \color{blue}{{\left(\frac{1}{y}\right)}^{-1} \cdot 0.0692910599291889} \]
    2. unpow-177.5%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{1}{y}}} \cdot 0.0692910599291889 \]
    3. remove-double-div77.5%

      \[\leadsto x + \color{blue}{y} \cdot 0.0692910599291889 \]
    4. metadata-eval77.5%

      \[\leadsto x + y \cdot \color{blue}{\frac{1}{14.431876219268936}} \]
    5. div-inv77.8%

      \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]
  11. Applied egg-rr77.8%

    \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]
  12. Final simplification77.8%

    \[\leadsto x + \frac{y}{14.431876219268936} \]
  13. Add Preprocessing

Alternative 13: 51.2% accurate, 21.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 68.8%

    \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
  2. Step-by-step derivation
    1. +-commutative68.8%

      \[\leadsto \color{blue}{\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} + x} \]
    2. *-commutative68.8%

      \[\leadsto \frac{\color{blue}{\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right) \cdot y}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} + x \]
    3. associate-/l*72.4%

      \[\leadsto \color{blue}{\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right) \cdot \frac{y}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} + x \]
    4. fma-define72.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525, \frac{y}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}, x\right)} \]
    5. *-commutative72.4%

      \[\leadsto \mathsf{fma}\left(\color{blue}{z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)} + 0.279195317918525, \frac{y}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}, x\right) \]
    6. fma-define72.4%

      \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, z \cdot 0.0692910599291889 + 0.4917317610505968, 0.279195317918525\right)}, \frac{y}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}, x\right) \]
    7. fma-define72.4%

      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, 0.279195317918525\right), \frac{y}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}, x\right) \]
    8. *-commutative72.4%

      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right), \frac{y}{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}, x\right) \]
    9. fma-define72.4%

      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right), \frac{y}{\color{blue}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}}, x\right) \]
  3. Simplified72.4%

    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right), \frac{y}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}, x\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in y around 0 46.8%

    \[\leadsto \color{blue}{x} \]
  6. Final simplification46.8%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 99.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\frac{0.07512208616047561}{z} + 0.0692910599291889\right) \cdot y - \left(\frac{0.40462203869992125 \cdot y}{z \cdot z} - x\right)\\ \mathbf{if}\;z < -8120153.652456675:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z < 6.576118972787377 \cdot 10^{+20}:\\ \;\;\;\;x + \left(y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)\right) \cdot \frac{1}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0
         (-
          (* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y)
          (- (/ (* 0.40462203869992125 y) (* z z)) x))))
   (if (< z -8120153.652456675)
     t_0
     (if (< z 6.576118972787377e+20)
       (+
        x
        (*
         (*
          y
          (+
           (* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
           0.279195317918525))
         (/ 1.0 (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
       t_0))))
double code(double x, double y, double z) {
	double t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x);
	double tmp;
	if (z < -8120153.652456675) {
		tmp = t_0;
	} else if (z < 6.576118972787377e+20) {
		tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304)));
	} 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.07512208616047561d0 / z) + 0.0692910599291889d0) * y) - (((0.40462203869992125d0 * y) / (z * z)) - x)
    if (z < (-8120153.652456675d0)) then
        tmp = t_0
    else if (z < 6.576118972787377d+20) then
        tmp = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) * (1.0d0 / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0)))
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x);
	double tmp;
	if (z < -8120153.652456675) {
		tmp = t_0;
	} else if (z < 6.576118972787377e+20) {
		tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304)));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x)
	tmp = 0
	if z < -8120153.652456675:
		tmp = t_0
	elif z < 6.576118972787377e+20:
		tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304)))
	else:
		tmp = t_0
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(Float64(Float64(0.07512208616047561 / z) + 0.0692910599291889) * y) - Float64(Float64(Float64(0.40462203869992125 * y) / Float64(z * z)) - x))
	tmp = 0.0
	if (z < -8120153.652456675)
		tmp = t_0;
	elseif (z < 6.576118972787377e+20)
		tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * Float64(1.0 / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304))));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x);
	tmp = 0.0;
	if (z < -8120153.652456675)
		tmp = t_0;
	elseif (z < 6.576118972787377e+20)
		tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304)));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(0.07512208616047561 / z), $MachinePrecision] + 0.0692910599291889), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(0.40462203869992125 * y), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -8120153.652456675], t$95$0, If[Less[z, 6.576118972787377e+20], N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(\frac{0.07512208616047561}{z} + 0.0692910599291889\right) \cdot y - \left(\frac{0.40462203869992125 \cdot y}{z \cdot z} - x\right)\\
\mathbf{if}\;z < -8120153.652456675:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z < 6.576118972787377 \cdot 10^{+20}:\\
\;\;\;\;x + \left(y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)\right) \cdot \frac{1}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\\

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


\end{array}
\end{array}

Reproduce

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

  :alt
  (if (< z -8120153.652456675) (- (* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y) (- (/ (* 0.40462203869992125 y) (* z z)) x)) (if (< z 6.576118972787377e+20) (+ x (* (* y (+ (* (+ (* z 0.0692910599291889) 0.4917317610505968) z) 0.279195317918525)) (/ 1.0 (+ (* (+ z 6.012459259764103) z) 3.350343815022304)))) (- (* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y) (- (/ (* 0.40462203869992125 y) (* z z)) x))))

  (+ x (/ (* y (+ (* (+ (* z 0.0692910599291889) 0.4917317610505968) z) 0.279195317918525)) (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))