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

Percentage Accurate: 69.2% → 98.6%
Time: 13.5s
Alternatives: 11
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 11 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.2% 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: 98.6% accurate, 0.0× 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^{+273}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}, x\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+273)
   (fma
    y
    (/
     (fma z (fma z 0.0692910599291889 0.4917317610505968) 0.279195317918525)
     (fma z (+ z 6.012459259764103) 3.350343815022304))
    x)
   (+ 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+273) {
		tmp = fma(y, (fma(z, fma(z, 0.0692910599291889, 0.4917317610505968), 0.279195317918525) / fma(z, (z + 6.012459259764103), 3.350343815022304)), x);
	} 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+273)
		tmp = fma(y, Float64(fma(z, fma(z, 0.0692910599291889, 0.4917317610505968), 0.279195317918525) / fma(z, Float64(z + 6.012459259764103), 3.350343815022304)), x);
	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+273], N[(y * N[(N[(z * N[(z * 0.0692910599291889 + 0.4917317610505968), $MachinePrecision] + 0.279195317918525), $MachinePrecision] / N[(z * N[(z + 6.012459259764103), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision] + x), $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^{+273}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}, x\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.99999999999999945e272

    1. Initial program 93.9%

      \[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. +-commutative93.9%

        \[\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. associate-/l*99.7%

        \[\leadsto \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}} + x \]
      3. fma-define99.7%

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

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

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

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

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

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

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

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

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

    if 9.99999999999999945e272 < (/.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.7%

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

      \[\leadsto x + \frac{\color{blue}{0.0692910599291889 \cdot \left(y \cdot {z}^{2}\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    4. Step-by-step derivation
      1. unpow20.7%

        \[\leadsto x + \frac{0.0692910599291889 \cdot \left(y \cdot \color{blue}{\left(z \cdot z\right)}\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      2. associate-*r*0.7%

        \[\leadsto x + \frac{\color{blue}{\left(0.0692910599291889 \cdot y\right) \cdot \left(z \cdot z\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      3. *-commutative0.7%

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}{\left(y \cdot 0.0692910599291889\right) \cdot \left(z \cdot z\right)}}} \]
      2. *-un-lft-identity0.7%

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

        \[\leadsto x + \frac{1}{\frac{1 \cdot \left(\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304\right)}{\color{blue}{y \cdot \left(0.0692910599291889 \cdot \left(z \cdot z\right)\right)}}} \]
      4. times-frac11.3%

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

        \[\leadsto x + \frac{1}{\frac{1}{y} \cdot \frac{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}{0.0692910599291889 \cdot \left(z \cdot z\right)}} \]
    7. Applied egg-rr11.3%

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

      \[\leadsto x + \frac{1}{\frac{1}{y} \cdot \color{blue}{14.431876219268936}} \]
    9. Step-by-step derivation
      1. associate-*l/99.7%

        \[\leadsto x + \frac{1}{\color{blue}{\frac{1 \cdot 14.431876219268936}{y}}} \]
      2. metadata-eval99.7%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{14.431876219268936}}{y}} \]
      3. clear-num99.9%

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

      \[\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^{+273}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}, x\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 98.2% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304\\ t_1 := z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\\ t_2 := {t\_0}^{0.5}\\ \mathbf{if}\;\frac{y \cdot t\_1}{t\_0} \leq 10^{+273}:\\ \;\;\;\;x + \frac{t\_1}{t\_2} \cdot \frac{y}{t\_2}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (+ (* z (+ z 6.012459259764103)) 3.350343815022304))
        (t_1
         (+
          (* z (+ (* z 0.0692910599291889) 0.4917317610505968))
          0.279195317918525))
        (t_2 (pow t_0 0.5)))
   (if (<= (/ (* y t_1) t_0) 1e+273)
     (+ x (* (/ t_1 t_2) (/ y t_2)))
     (+ x (/ y 14.431876219268936)))))
double code(double x, double y, double z) {
	double t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304;
	double t_1 = (z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525;
	double t_2 = pow(t_0, 0.5);
	double tmp;
	if (((y * t_1) / t_0) <= 1e+273) {
		tmp = x + ((t_1 / t_2) * (y / t_2));
	} 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) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_0 = (z * (z + 6.012459259764103d0)) + 3.350343815022304d0
    t_1 = (z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0)) + 0.279195317918525d0
    t_2 = t_0 ** 0.5d0
    if (((y * t_1) / t_0) <= 1d+273) then
        tmp = x + ((t_1 / t_2) * (y / t_2))
    else
        tmp = x + (y / 14.431876219268936d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304;
	double t_1 = (z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525;
	double t_2 = Math.pow(t_0, 0.5);
	double tmp;
	if (((y * t_1) / t_0) <= 1e+273) {
		tmp = x + ((t_1 / t_2) * (y / t_2));
	} else {
		tmp = x + (y / 14.431876219268936);
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304
	t_1 = (z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525
	t_2 = math.pow(t_0, 0.5)
	tmp = 0
	if ((y * t_1) / t_0) <= 1e+273:
		tmp = x + ((t_1 / t_2) * (y / t_2))
	else:
		tmp = x + (y / 14.431876219268936)
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)
	t_1 = Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)
	t_2 = t_0 ^ 0.5
	tmp = 0.0
	if (Float64(Float64(y * t_1) / t_0) <= 1e+273)
		tmp = Float64(x + Float64(Float64(t_1 / t_2) * Float64(y / t_2)));
	else
		tmp = Float64(x + Float64(y / 14.431876219268936));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304;
	t_1 = (z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525;
	t_2 = t_0 ^ 0.5;
	tmp = 0.0;
	if (((y * t_1) / t_0) <= 1e+273)
		tmp = x + ((t_1 / t_2) * (y / t_2));
	else
		tmp = x + (y / 14.431876219268936);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]}, Block[{t$95$1 = N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]}, Block[{t$95$2 = N[Power[t$95$0, 0.5], $MachinePrecision]}, If[LessEqual[N[(N[(y * t$95$1), $MachinePrecision] / t$95$0), $MachinePrecision], 1e+273], N[(x + N[(N[(t$95$1 / t$95$2), $MachinePrecision] * N[(y / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304\\
t_1 := z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\\
t_2 := {t\_0}^{0.5}\\
\mathbf{if}\;\frac{y \cdot t\_1}{t\_0} \leq 10^{+273}:\\
\;\;\;\;x + \frac{t\_1}{t\_2} \cdot \frac{y}{t\_2}\\

\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.99999999999999945e272

    1. Initial program 93.9%

      \[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. Step-by-step derivation
      1. *-commutative93.9%

        \[\leadsto x + \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} \]
      2. add-sqr-sqrt93.5%

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

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

        \[\leadsto x + \frac{\color{blue}{z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)} + 0.279195317918525}{\sqrt{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \cdot \frac{y}{\sqrt{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      5. pow1/299.6%

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

        \[\leadsto x + \frac{z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525}{{\left(\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304\right)}^{0.5}} \cdot \frac{y}{\sqrt{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} \]
      7. pow1/299.6%

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

        \[\leadsto x + \frac{z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525}{{\left(z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304\right)}^{0.5}} \cdot \frac{y}{{\left(\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304\right)}^{0.5}} \]
    4. Applied egg-rr99.6%

      \[\leadsto x + \color{blue}{\frac{z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525}{{\left(z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304\right)}^{0.5}} \cdot \frac{y}{{\left(z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304\right)}^{0.5}}} \]

    if 9.99999999999999945e272 < (/.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.7%

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

      \[\leadsto x + \frac{\color{blue}{0.0692910599291889 \cdot \left(y \cdot {z}^{2}\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    4. Step-by-step derivation
      1. unpow20.7%

        \[\leadsto x + \frac{0.0692910599291889 \cdot \left(y \cdot \color{blue}{\left(z \cdot z\right)}\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      2. associate-*r*0.7%

        \[\leadsto x + \frac{\color{blue}{\left(0.0692910599291889 \cdot y\right) \cdot \left(z \cdot z\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      3. *-commutative0.7%

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}{\left(y \cdot 0.0692910599291889\right) \cdot \left(z \cdot z\right)}}} \]
      2. *-un-lft-identity0.7%

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

        \[\leadsto x + \frac{1}{\frac{1 \cdot \left(\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304\right)}{\color{blue}{y \cdot \left(0.0692910599291889 \cdot \left(z \cdot z\right)\right)}}} \]
      4. times-frac11.3%

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

        \[\leadsto x + \frac{1}{\frac{1}{y} \cdot \frac{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}{0.0692910599291889 \cdot \left(z \cdot z\right)}} \]
    7. Applied egg-rr11.3%

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

      \[\leadsto x + \frac{1}{\frac{1}{y} \cdot \color{blue}{14.431876219268936}} \]
    9. Step-by-step derivation
      1. associate-*l/99.7%

        \[\leadsto x + \frac{1}{\color{blue}{\frac{1 \cdot 14.431876219268936}{y}}} \]
      2. metadata-eval99.7%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{14.431876219268936}}{y}} \]
      3. clear-num99.9%

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

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

    \[\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^{+273}:\\ \;\;\;\;x + \frac{z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525}{{\left(z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304\right)}^{0.5}} \cdot \frac{y}{{\left(z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 97.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_0 := z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304\\
t_1 := z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\\
\mathbf{if}\;\frac{y \cdot t\_1}{t\_0} \leq 10^{+273}:\\
\;\;\;\;x + t\_1 \cdot \frac{y}{t\_0}\\

\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.99999999999999945e272

    1. Initial program 93.9%

      \[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. +-commutative93.9%

        \[\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. associate-/l*99.7%

        \[\leadsto \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}} + x \]
      3. fma-define99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 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} + x \]
      7. associate-/l*93.9%

        \[\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 \]
      8. *-commutative93.9%

        \[\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 \]
      9. associate-/l*98.3%

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

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

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

      \[\leadsto \color{blue}{\left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right) \cdot \frac{y}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} + x} \]

    if 9.99999999999999945e272 < (/.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.7%

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

      \[\leadsto x + \frac{\color{blue}{0.0692910599291889 \cdot \left(y \cdot {z}^{2}\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    4. Step-by-step derivation
      1. unpow20.7%

        \[\leadsto x + \frac{0.0692910599291889 \cdot \left(y \cdot \color{blue}{\left(z \cdot z\right)}\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      2. associate-*r*0.7%

        \[\leadsto x + \frac{\color{blue}{\left(0.0692910599291889 \cdot y\right) \cdot \left(z \cdot z\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      3. *-commutative0.7%

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}{\left(y \cdot 0.0692910599291889\right) \cdot \left(z \cdot z\right)}}} \]
      2. *-un-lft-identity0.7%

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

        \[\leadsto x + \frac{1}{\frac{1 \cdot \left(\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304\right)}{\color{blue}{y \cdot \left(0.0692910599291889 \cdot \left(z \cdot z\right)\right)}}} \]
      4. times-frac11.3%

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

        \[\leadsto x + \frac{1}{\frac{1}{y} \cdot \frac{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}{0.0692910599291889 \cdot \left(z \cdot z\right)}} \]
    7. Applied egg-rr11.3%

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

      \[\leadsto x + \frac{1}{\frac{1}{y} \cdot \color{blue}{14.431876219268936}} \]
    9. Step-by-step derivation
      1. associate-*l/99.7%

        \[\leadsto x + \frac{1}{\color{blue}{\frac{1 \cdot 14.431876219268936}{y}}} \]
      2. metadata-eval99.7%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{14.431876219268936}}{y}} \]
      3. clear-num99.9%

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

      \[\leadsto x + \color{blue}{\frac{y}{14.431876219268936}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.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^{+273}:\\ \;\;\;\;x + \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right) \cdot \frac{y}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 99.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+21} \lor \neg \left(z \leq 18000000000\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 -2e+21) (not (<= z 18000000000.0)))
   (+ 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 <= -2e+21) || !(z <= 18000000000.0)) {
		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 <= (-2d+21)) .or. (.not. (z <= 18000000000.0d0))) 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 <= -2e+21) || !(z <= 18000000000.0)) {
		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 <= -2e+21) or not (z <= 18000000000.0):
		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 <= -2e+21) || !(z <= 18000000000.0))
		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 <= -2e+21) || ~((z <= 18000000000.0)))
		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, -2e+21], N[Not[LessEqual[z, 18000000000.0]], $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 \cdot 10^{+21} \lor \neg \left(z \leq 18000000000\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 < -2e21 or 1.8e10 < z

    1. Initial program 29.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. Add Preprocessing
    3. Taylor expanded in z around inf 29.0%

      \[\leadsto x + \frac{\color{blue}{0.0692910599291889 \cdot \left(y \cdot {z}^{2}\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    4. Step-by-step derivation
      1. unpow229.0%

        \[\leadsto x + \frac{0.0692910599291889 \cdot \left(y \cdot \color{blue}{\left(z \cdot z\right)}\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      2. associate-*r*29.0%

        \[\leadsto x + \frac{\color{blue}{\left(0.0692910599291889 \cdot y\right) \cdot \left(z \cdot z\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      3. *-commutative29.0%

        \[\leadsto x + \frac{\color{blue}{\left(y \cdot 0.0692910599291889\right)} \cdot \left(z \cdot z\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    5. Simplified29.0%

      \[\leadsto x + \frac{\color{blue}{\left(y \cdot 0.0692910599291889\right) \cdot \left(z \cdot z\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    6. Step-by-step derivation
      1. clear-num29.0%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}{\left(y \cdot 0.0692910599291889\right) \cdot \left(z \cdot z\right)}}} \]
      2. *-un-lft-identity29.0%

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

        \[\leadsto x + \frac{1}{\frac{1 \cdot \left(\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304\right)}{\color{blue}{y \cdot \left(0.0692910599291889 \cdot \left(z \cdot z\right)\right)}}} \]
      4. times-frac43.7%

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

        \[\leadsto x + \frac{1}{\frac{1}{y} \cdot \frac{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}{0.0692910599291889 \cdot \left(z \cdot z\right)}} \]
    7. Applied egg-rr43.7%

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

      \[\leadsto x + \frac{1}{\frac{1}{y} \cdot \color{blue}{14.431876219268936}} \]
    9. Step-by-step derivation
      1. associate-*l/99.7%

        \[\leadsto x + \frac{1}{\color{blue}{\frac{1 \cdot 14.431876219268936}{y}}} \]
      2. metadata-eval99.7%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{14.431876219268936}}{y}} \]
      3. clear-num99.9%

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

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

    if -2e21 < z < 1.8e10

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+21} \lor \neg \left(z \leq 18000000000\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 5: 99.1% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 31.2%

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

      \[\leadsto x + \frac{\color{blue}{0.0692910599291889 \cdot \left(y \cdot {z}^{2}\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    4. Step-by-step derivation
      1. unpow230.9%

        \[\leadsto x + \frac{0.0692910599291889 \cdot \left(y \cdot \color{blue}{\left(z \cdot z\right)}\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      2. associate-*r*30.9%

        \[\leadsto x + \frac{\color{blue}{\left(0.0692910599291889 \cdot y\right) \cdot \left(z \cdot z\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      3. *-commutative30.9%

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

      \[\leadsto x + \frac{\color{blue}{\left(y \cdot 0.0692910599291889\right) \cdot \left(z \cdot z\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    6. Step-by-step derivation
      1. clear-num30.9%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}{\left(y \cdot 0.0692910599291889\right) \cdot \left(z \cdot z\right)}}} \]
      2. *-un-lft-identity30.9%

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

        \[\leadsto x + \frac{1}{\frac{1 \cdot \left(\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304\right)}{\color{blue}{y \cdot \left(0.0692910599291889 \cdot \left(z \cdot z\right)\right)}}} \]
      4. times-frac45.2%

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

        \[\leadsto x + \frac{1}{\frac{1}{y} \cdot \frac{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}{0.0692910599291889 \cdot \left(z \cdot z\right)}} \]
    7. Applied egg-rr45.2%

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

      \[\leadsto x + \frac{1}{\frac{1}{y} \cdot \color{blue}{14.431876219268936}} \]
    9. Step-by-step derivation
      1. associate-*l/99.5%

        \[\leadsto x + \frac{1}{\color{blue}{\frac{1 \cdot 14.431876219268936}{y}}} \]
      2. metadata-eval99.5%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{14.431876219268936}}{y}} \]
      3. clear-num99.7%

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

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

    if -5.2e6 < 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. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative99.6%

        \[\leadsto x + \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} \]
      2. flip-+99.6%

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{\frac{\left(\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)\right) \cdot \left(z \cdot z\right) + -0.07795002554762624\right) \cdot y}{z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + -0.279195317918525}}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    5. Taylor expanded in z around 0 98.9%

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

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

Alternative 6: 99.1% accurate, 1.0× speedup?

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

\mathbf{elif}\;z \leq 5:\\
\;\;\;\;x + \left(-0.00277777777751721 \cdot \left(y \cdot z\right) + 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.2e6

    1. Initial program 30.4%

      \[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. +-commutative30.4%

        \[\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. associate-/l*47.8%

        \[\leadsto \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}} + x \]
      3. fma-define47.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{0.0692910599291889 \cdot y + \left(x + -1 \cdot \frac{-0.4917317610505968 \cdot y - -0.4166096748901212 \cdot y}{z}\right)} \]
      3. *-commutative99.6%

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

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

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

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

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

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

    if -5.2e6 < 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. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative99.6%

        \[\leadsto x + \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} \]
      2. flip-+99.6%

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{\frac{\left(\left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)\right) \cdot \left(z \cdot z\right) + -0.07795002554762624\right) \cdot y}{z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + -0.279195317918525}}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    5. Taylor expanded in z around 0 98.9%

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

    if 5 < z

    1. Initial program 32.2%

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

      \[\leadsto x + \frac{\color{blue}{0.0692910599291889 \cdot \left(y \cdot {z}^{2}\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    4. Step-by-step derivation
      1. unpow232.2%

        \[\leadsto x + \frac{0.0692910599291889 \cdot \left(y \cdot \color{blue}{\left(z \cdot z\right)}\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      2. associate-*r*32.2%

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

        \[\leadsto x + \frac{\color{blue}{\left(y \cdot 0.0692910599291889\right)} \cdot \left(z \cdot z\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    5. Simplified32.2%

      \[\leadsto x + \frac{\color{blue}{\left(y \cdot 0.0692910599291889\right) \cdot \left(z \cdot z\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    6. Step-by-step derivation
      1. clear-num32.1%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}{\left(y \cdot 0.0692910599291889\right) \cdot \left(z \cdot z\right)}}} \]
      2. *-un-lft-identity32.1%

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

        \[\leadsto x + \frac{1}{\frac{1 \cdot \left(\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304\right)}{\color{blue}{y \cdot \left(0.0692910599291889 \cdot \left(z \cdot z\right)\right)}}} \]
      4. times-frac42.3%

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

        \[\leadsto x + \frac{1}{\frac{1}{y} \cdot \frac{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}{0.0692910599291889 \cdot \left(z \cdot z\right)}} \]
    7. Applied egg-rr42.3%

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

      \[\leadsto x + \frac{1}{\frac{1}{y} \cdot \color{blue}{14.431876219268936}} \]
    9. Step-by-step derivation
      1. associate-*l/99.7%

        \[\leadsto x + \frac{1}{\color{blue}{\frac{1 \cdot 14.431876219268936}{y}}} \]
      2. metadata-eval99.7%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{14.431876219268936}}{y}} \]
      3. clear-num100.0%

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

      \[\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 -5200000:\\ \;\;\;\;y \cdot 0.0692910599291889 + \left(x - \frac{y \cdot -0.07512208616047561}{z}\right)\\ \mathbf{elif}\;z \leq 5:\\ \;\;\;\;x + \left(-0.00277777777751721 \cdot \left(y \cdot z\right) + y \cdot 0.08333333333333323\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 98.9% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5200000 \lor \neg \left(z \leq 6.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 -5200000.0) (not (<= z 6.5)))
   (+ x (/ y 14.431876219268936))
   (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -5200000.0) || !(z <= 6.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 <= (-5200000.0d0)) .or. (.not. (z <= 6.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 <= -5200000.0) || !(z <= 6.5)) {
		tmp = x + (y / 14.431876219268936);
	} else {
		tmp = x + (y * 0.08333333333333323);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -5200000.0) or not (z <= 6.5):
		tmp = x + (y / 14.431876219268936)
	else:
		tmp = x + (y * 0.08333333333333323)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -5200000.0) || !(z <= 6.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 <= -5200000.0) || ~((z <= 6.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, -5200000.0], N[Not[LessEqual[z, 6.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 -5200000 \lor \neg \left(z \leq 6.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.2e6 or 6.5 < z

    1. Initial program 31.2%

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

      \[\leadsto x + \frac{\color{blue}{0.0692910599291889 \cdot \left(y \cdot {z}^{2}\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    4. Step-by-step derivation
      1. unpow230.9%

        \[\leadsto x + \frac{0.0692910599291889 \cdot \left(y \cdot \color{blue}{\left(z \cdot z\right)}\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      2. associate-*r*30.9%

        \[\leadsto x + \frac{\color{blue}{\left(0.0692910599291889 \cdot y\right) \cdot \left(z \cdot z\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
      3. *-commutative30.9%

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

      \[\leadsto x + \frac{\color{blue}{\left(y \cdot 0.0692910599291889\right) \cdot \left(z \cdot z\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    6. Step-by-step derivation
      1. clear-num30.9%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}{\left(y \cdot 0.0692910599291889\right) \cdot \left(z \cdot z\right)}}} \]
      2. *-un-lft-identity30.9%

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

        \[\leadsto x + \frac{1}{\frac{1 \cdot \left(\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304\right)}{\color{blue}{y \cdot \left(0.0692910599291889 \cdot \left(z \cdot z\right)\right)}}} \]
      4. times-frac45.2%

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

        \[\leadsto x + \frac{1}{\frac{1}{y} \cdot \frac{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}{0.0692910599291889 \cdot \left(z \cdot z\right)}} \]
    7. Applied egg-rr45.2%

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

      \[\leadsto x + \frac{1}{\frac{1}{y} \cdot \color{blue}{14.431876219268936}} \]
    9. Step-by-step derivation
      1. associate-*l/99.5%

        \[\leadsto x + \frac{1}{\color{blue}{\frac{1 \cdot 14.431876219268936}{y}}} \]
      2. metadata-eval99.5%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{14.431876219268936}}{y}} \]
      3. clear-num99.7%

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

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

    if -5.2e6 < z < 6.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. Add Preprocessing
    3. Taylor expanded in z around 0 98.2%

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

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

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

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

Alternative 8: 98.7% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5200000 \lor \neg \left(z \leq 5.6\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\

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


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

    1. Initial program 31.2%

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

      \[\leadsto x + \color{blue}{0.0692910599291889 \cdot y} \]
    4. Step-by-step derivation
      1. *-commutative99.4%

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

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

    if -5.2e6 < 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. Add Preprocessing
    3. Taylor expanded in z around 0 98.2%

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

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

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

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

Alternative 9: 60.9% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+18} \lor \neg \left(y \leq 1.08 \cdot 10^{+52}\right):\\
\;\;\;\;y \cdot 0.0692910599291889\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.3e18 or 1.07999999999999997e52 < y

    1. Initial program 56.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 inf 68.5%

      \[\leadsto x + \color{blue}{0.0692910599291889 \cdot y} \]
    4. Step-by-step derivation
      1. *-commutative68.5%

        \[\leadsto x + \color{blue}{y \cdot 0.0692910599291889} \]
    5. Simplified68.5%

      \[\leadsto x + \color{blue}{y \cdot 0.0692910599291889} \]
    6. Taylor expanded in x around 0 55.5%

      \[\leadsto \color{blue}{0.0692910599291889 \cdot y} \]

    if -1.3e18 < y < 1.07999999999999997e52

    1. Initial program 71.9%

      \[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. +-commutative71.9%

        \[\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. associate-/l*72.6%

        \[\leadsto \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}} + x \]
      3. fma-define72.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{+18} \lor \neg \left(y \leq 1.08 \cdot 10^{+52}\right):\\ \;\;\;\;y \cdot 0.0692910599291889\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 79.2% accurate, 4.2× speedup?

\[\begin{array}{l} \\ x + y \cdot 0.0692910599291889 \end{array} \]
(FPCore (x y z) :precision binary64 (+ x (* y 0.0692910599291889)))
double code(double x, double y, double z) {
	return x + (y * 0.0692910599291889);
}
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 * 0.0692910599291889d0)
end function
public static double code(double x, double y, double z) {
	return x + (y * 0.0692910599291889);
}
def code(x, y, z):
	return x + (y * 0.0692910599291889)
function code(x, y, z)
	return Float64(x + Float64(y * 0.0692910599291889))
end
function tmp = code(x, y, z)
	tmp = x + (y * 0.0692910599291889);
end
code[x_, y_, z_] := N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + y \cdot 0.0692910599291889
\end{array}
Derivation
  1. Initial program 65.1%

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

    \[\leadsto x + \color{blue}{0.0692910599291889 \cdot y} \]
  4. Step-by-step derivation
    1. *-commutative78.9%

      \[\leadsto x + \color{blue}{y \cdot 0.0692910599291889} \]
  5. Simplified78.9%

    \[\leadsto x + \color{blue}{y \cdot 0.0692910599291889} \]
  6. Add Preprocessing

Alternative 11: 50.8% 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 65.1%

    \[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. +-commutative65.1%

      \[\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. associate-/l*72.4%

      \[\leadsto \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}} + x \]
    3. fma-define72.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. 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 2024097 
(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))))