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

Percentage Accurate: 67.9% → 99.4%
Time: 12.3s
Alternatives: 13
Speedup: 4.2×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 67.9% accurate, 1.0× speedup?

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

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

Alternative 1: 99.4% accurate, 0.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(0.279195317918525 + z \cdot \left(0.4917317610505968 + z \cdot 0.0692910599291889\right)\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 2 \cdot 10^{+298}:\\
\;\;\;\;\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 + y \cdot 0.0692910599291889\\


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

    1. Initial program 96.6%

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} + x} \]
      2. associate-/l*99.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-define99.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. *-commutative99.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) \]
      5. fma-define99.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) \]
      6. fma-define99.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) \]
      7. *-commutative99.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) \]
      8. fma-define99.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. Simplified99.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

    if 1.9999999999999999e298 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000))

    1. Initial program 0.6%

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} + x} \]
      2. associate-/l*11.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-define11.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. *-commutative11.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) \]
      5. fma-define11.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) \]
      6. fma-define11.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) \]
      7. *-commutative11.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) \]
      8. fma-define11.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. Simplified11.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.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y \cdot \left(0.279195317918525 + z \cdot \left(0.4917317610505968 + z \cdot 0.0692910599291889\right)\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 2 \cdot 10^{+298}:\\ \;\;\;\;\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 + y \cdot 0.0692910599291889\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 99.4% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

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

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

    if 1.9999999999999999e298 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000))

    1. Initial program 0.6%

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} + x} \]
      2. associate-/l*11.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-define11.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. *-commutative11.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) \]
      5. fma-define11.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) \]
      6. fma-define11.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) \]
      7. *-commutative11.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) \]
      8. fma-define11.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. Simplified11.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.5%

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

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

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

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

Alternative 3: 98.3% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9999999999999999e298 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000))

    1. Initial program 0.6%

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} + x} \]
      2. associate-/l*11.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-define11.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. *-commutative11.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) \]
      5. fma-define11.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) \]
      6. fma-define11.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) \]
      7. *-commutative11.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) \]
      8. fma-define11.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. Simplified11.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.5%

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

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

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

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

Alternative 4: 99.6% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 37.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. remove-double-neg37.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.75e7 < z < 6.5e11

    1. Initial program 99.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

    if 6.5e11 < z

    1. Initial program 35.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. +-commutative35.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*50.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-define50.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. *-commutative50.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) \]
      5. fma-define50.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) \]
      6. fma-define50.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) \]
      7. *-commutative50.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) \]
      8. fma-define50.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. Simplified50.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. Taylor expanded in z around inf 99.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -27500000:\\ \;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\ \mathbf{elif}\;z \leq 650000000000:\\ \;\;\;\;\frac{y \cdot \left(0.279195317918525 + z \cdot \left(0.4917317610505968 + z \cdot 0.0692910599291889\right)\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} + x\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 0.0692910599291889\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 99.1% accurate, 0.8× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\right)\\


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

    1. Initial program 38.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.5 < z < 1.85000000000000002e-7

    1. Initial program 99.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. Step-by-step derivation
      1. remove-double-neg99.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.85000000000000002e-7 < z

    1. Initial program 42.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 99.1% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 1.85 \cdot 10^{-7}\right):\\ \;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot 0.0007936505811533442 - 0.00277777777751721\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -5.5) (not (<= z 1.85e-7)))
   (+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z))))
   (+
    x
    (*
     y
     (+
      0.08333333333333323
      (* z (- (* z 0.0007936505811533442) 0.00277777777751721)))))))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -5.5) || !(z <= 1.85e-7)) {
		tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
	} else {
		tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((z <= (-5.5d0)) .or. (.not. (z <= 1.85d-7))) then
        tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
    else
        tmp = x + (y * (0.08333333333333323d0 + (z * ((z * 0.0007936505811533442d0) - 0.00277777777751721d0))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -5.5) || !(z <= 1.85e-7)) {
		tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
	} else {
		tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -5.5) or not (z <= 1.85e-7):
		tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)))
	else:
		tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -5.5) || !(z <= 1.85e-7))
		tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z))));
	else
		tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * Float64(Float64(z * 0.0007936505811533442) - 0.00277777777751721)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -5.5) || ~((z <= 1.85e-7)))
		tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
	else
		tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 1.85e-7]], $MachinePrecision]], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.08333333333333323 + N[(z * N[(N[(z * 0.0007936505811533442), $MachinePrecision] - 0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


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

    1. Initial program 40.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. Step-by-step derivation
      1. remove-double-neg40.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.5 < z < 1.85000000000000002e-7

    1. Initial program 99.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. Step-by-step derivation
      1. remove-double-neg99.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 99.1% accurate, 0.9× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\right)\\


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

    1. Initial program 38.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.5 < z < 1.85000000000000002e-7

    1. Initial program 99.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. Step-by-step derivation
      1. remove-double-neg99.7%

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

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

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

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

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

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

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

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

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

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

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

    if 1.85000000000000002e-7 < z

    1. Initial program 42.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 99.0% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5000 \lor \neg \left(z \leq 1.85 \cdot 10^{-7}\right):\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5e3 or 1.85000000000000002e-7 < z

    1. Initial program 39.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5e3 < z < 1.85000000000000002e-7

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.7%

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

        \[\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. *-commutative99.9%

        \[\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) \]
      5. fma-define99.9%

        \[\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) \]
      6. fma-define99.9%

        \[\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) \]
      7. *-commutative99.9%

        \[\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) \]
      8. fma-define99.9%

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

      \[\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 0 99.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5000 \lor \neg \left(z \leq 1.85 \cdot 10^{-7}\right):\\ \;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 0.08333333333333323\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 99.1% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 40.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. Step-by-step derivation
      1. remove-double-neg40.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.5 < z < 1.85000000000000002e-7

    1. Initial program 99.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. Step-by-step derivation
      1. remove-double-neg99.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 98.8% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5000 \lor \neg \left(z \leq 1.85 \cdot 10^{-7}\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 -5000.0) (not (<= z 1.85e-7)))
   (+ x (* y 0.0692910599291889))
   (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -5000.0) || !(z <= 1.85e-7)) {
		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 <= (-5000.0d0)) .or. (.not. (z <= 1.85d-7))) 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 <= -5000.0) || !(z <= 1.85e-7)) {
		tmp = x + (y * 0.0692910599291889);
	} else {
		tmp = x + (y * 0.08333333333333323);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -5000.0) or not (z <= 1.85e-7):
		tmp = x + (y * 0.0692910599291889)
	else:
		tmp = x + (y * 0.08333333333333323)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -5000.0) || !(z <= 1.85e-7))
		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 <= -5000.0) || ~((z <= 1.85e-7)))
		tmp = x + (y * 0.0692910599291889);
	else
		tmp = x + (y * 0.08333333333333323);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[z, -5000.0], N[Not[LessEqual[z, 1.85e-7]], $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 -5000 \lor \neg \left(z \leq 1.85 \cdot 10^{-7}\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 < -5e3 or 1.85000000000000002e-7 < z

    1. Initial program 39.8%

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

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

        \[\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-define50.2%

        \[\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. *-commutative50.2%

        \[\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) \]
      5. fma-define50.2%

        \[\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) \]
      6. fma-define50.2%

        \[\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) \]
      7. *-commutative50.2%

        \[\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) \]
      8. fma-define50.2%

        \[\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. Simplified50.2%

      \[\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 98.7%

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

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

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

    if -5e3 < z < 1.85000000000000002e-7

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.7%

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

        \[\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. *-commutative99.9%

        \[\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) \]
      5. fma-define99.9%

        \[\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) \]
      6. fma-define99.9%

        \[\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) \]
      7. *-commutative99.9%

        \[\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) \]
      8. fma-define99.9%

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

      \[\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 0 99.2%

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

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

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

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

Alternative 11: 62.1% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.8 \cdot 10^{+130} \lor \neg \left(y \leq 5.4 \cdot 10^{+60}\right):\\
\;\;\;\;y \cdot 0.0692910599291889\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.79999999999999974e130 or 5.3999999999999999e60 < y

    1. Initial program 52.8%

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} + x} \]
      2. associate-/l*67.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-define67.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. *-commutative67.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) \]
      5. fma-define67.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) \]
      6. fma-define67.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) \]
      7. *-commutative67.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) \]
      8. fma-define67.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. Simplified67.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. Taylor expanded in z around inf 74.3%

      \[\leadsto \color{blue}{x + 0.0692910599291889 \cdot y} \]
    6. Step-by-step derivation
      1. +-commutative74.3%

        \[\leadsto \color{blue}{0.0692910599291889 \cdot y + x} \]
    7. Simplified74.3%

      \[\leadsto \color{blue}{0.0692910599291889 \cdot y + x} \]
    8. Taylor expanded in y around inf 60.7%

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

    if -8.79999999999999974e130 < y < 5.3999999999999999e60

    1. Initial program 74.5%

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

        \[\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*76.1%

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

        \[\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. *-commutative76.1%

        \[\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) \]
      5. fma-define76.1%

        \[\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) \]
      6. fma-define76.1%

        \[\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) \]
      7. *-commutative76.1%

        \[\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) \]
      8. fma-define76.1%

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

      \[\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.0%

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

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

Alternative 12: 80.1% 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 68.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. +-commutative68.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*73.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-define73.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. *-commutative73.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) \]
    5. fma-define73.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) \]
    6. fma-define73.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) \]
    7. *-commutative73.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) \]
    8. fma-define73.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. Simplified73.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. Taylor expanded in z around inf 84.8%

    \[\leadsto \color{blue}{x + 0.0692910599291889 \cdot y} \]
  6. Step-by-step derivation
    1. +-commutative84.8%

      \[\leadsto \color{blue}{0.0692910599291889 \cdot y + x} \]
  7. Simplified84.8%

    \[\leadsto \color{blue}{0.0692910599291889 \cdot y + x} \]
  8. Final simplification84.8%

    \[\leadsto x + y \cdot 0.0692910599291889 \]
  9. Add Preprocessing

Alternative 13: 51.4% accurate, 21.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 68.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. +-commutative68.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*73.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-define73.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. *-commutative73.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) \]
    5. fma-define73.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) \]
    6. fma-define73.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) \]
    7. *-commutative73.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) \]
    8. fma-define73.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. Simplified73.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. Taylor expanded in y around 0 58.0%

    \[\leadsto \color{blue}{x} \]
  6. Final simplification58.0%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 99.4% 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 2024096 
(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))))