Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B

Percentage Accurate: 94.1% → 99.6%
Time: 18.6s
Alternatives: 15
Speedup: 0.9×

Specification

?
\[\begin{array}{l} \\ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
  (/
   (+
    (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
    0.083333333333333)
   x)))
double code(double x, double y, double z) {
	return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / 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 - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
	return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z):
	return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z)
	return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x))
end
function tmp = code(x, y, z)
	tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\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 15 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: 94.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
  (/
   (+
    (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
    0.083333333333333)
   x)))
double code(double x, double y, double z) {
	return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / 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 - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
	return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z):
	return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z)
	return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x))
end
function tmp = code(x, y, z)
	tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}

Alternative 1: 99.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.6 \cdot 10^{+21}:\\ \;\;\;\;\left(\left(\frac{\left({x}^{3} + -0.125\right) \cdot \log x}{\mathsf{fma}\left(x, x, 0.25 - x \cdot -0.5\right)} - x\right) + 0.91893853320467\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + z \cdot \frac{-1}{\frac{\frac{-x}{z}}{y + 0.0007936500793651}}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 1.6e+21)
   (+
    (+
     (- (/ (* (+ (pow x 3.0) -0.125) (log x)) (fma x x (- 0.25 (* x -0.5)))) x)
     0.91893853320467)
    (/
     (+
      0.083333333333333
      (* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
     x))
   (+
    (+
     (+ 0.91893853320467 (/ 0.083333333333333 x))
     (- (* (log x) (+ x -0.5)) x))
    (* z (/ -1.0 (/ (/ (- x) z) (+ y 0.0007936500793651)))))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 1.6e+21) {
		tmp = (((((pow(x, 3.0) + -0.125) * log(x)) / fma(x, x, (0.25 - (x * -0.5)))) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
	} else {
		tmp = ((0.91893853320467 + (0.083333333333333 / x)) + ((log(x) * (x + -0.5)) - x)) + (z * (-1.0 / ((-x / z) / (y + 0.0007936500793651))));
	}
	return tmp;
}
function code(x, y, z)
	tmp = 0.0
	if (x <= 1.6e+21)
		tmp = Float64(Float64(Float64(Float64(Float64(Float64((x ^ 3.0) + -0.125) * log(x)) / fma(x, x, Float64(0.25 - Float64(x * -0.5)))) - x) + 0.91893853320467) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x));
	else
		tmp = Float64(Float64(Float64(0.91893853320467 + Float64(0.083333333333333 / x)) + Float64(Float64(log(x) * Float64(x + -0.5)) - x)) + Float64(z * Float64(-1.0 / Float64(Float64(Float64(-x) / z) / Float64(y + 0.0007936500793651)))));
	end
	return tmp
end
code[x_, y_, z_] := If[LessEqual[x, 1.6e+21], N[(N[(N[(N[(N[(N[(N[Power[x, 3.0], $MachinePrecision] + -0.125), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] / N[(x * x + N[(0.25 - N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.91893853320467 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(-1.0 / N[(N[((-x) / z), $MachinePrecision] / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.6 \cdot 10^{+21}:\\
\;\;\;\;\left(\left(\frac{\left({x}^{3} + -0.125\right) \cdot \log x}{\mathsf{fma}\left(x, x, 0.25 - x \cdot -0.5\right)} - x\right) + 0.91893853320467\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\

\mathbf{else}:\\
\;\;\;\;\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + z \cdot \frac{-1}{\frac{\frac{-x}{z}}{y + 0.0007936500793651}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 1.6e21

    1. Initial program 99.8%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sub-neg99.8%

        \[\leadsto \left(\left(\color{blue}{\left(x + \left(-0.5\right)\right)} \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. metadata-eval99.8%

        \[\leadsto \left(\left(\left(x + \color{blue}{-0.5}\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      3. flip3-+99.7%

        \[\leadsto \left(\left(\color{blue}{\frac{{x}^{3} + {-0.5}^{3}}{x \cdot x + \left(-0.5 \cdot -0.5 - x \cdot -0.5\right)}} \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      4. metadata-eval99.7%

        \[\leadsto \left(\left(\frac{{x}^{3} + \color{blue}{-0.125}}{x \cdot x + \left(-0.5 \cdot -0.5 - x \cdot -0.5\right)} \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      5. metadata-eval99.7%

        \[\leadsto \left(\left(\frac{{x}^{3} + \color{blue}{\left(-0.125\right)}}{x \cdot x + \left(-0.5 \cdot -0.5 - x \cdot -0.5\right)} \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      6. metadata-eval99.7%

        \[\leadsto \left(\left(\frac{{x}^{3} + \left(-\color{blue}{{0.5}^{3}}\right)}{x \cdot x + \left(-0.5 \cdot -0.5 - x \cdot -0.5\right)} \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      7. sub-neg99.7%

        \[\leadsto \left(\left(\frac{\color{blue}{{x}^{3} - {0.5}^{3}}}{x \cdot x + \left(-0.5 \cdot -0.5 - x \cdot -0.5\right)} \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      8. associate-*l/99.8%

        \[\leadsto \left(\left(\color{blue}{\frac{\left({x}^{3} - {0.5}^{3}\right) \cdot \log x}{x \cdot x + \left(-0.5 \cdot -0.5 - x \cdot -0.5\right)}} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      9. sub-neg99.8%

        \[\leadsto \left(\left(\frac{\color{blue}{\left({x}^{3} + \left(-{0.5}^{3}\right)\right)} \cdot \log x}{x \cdot x + \left(-0.5 \cdot -0.5 - x \cdot -0.5\right)} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      10. metadata-eval99.8%

        \[\leadsto \left(\left(\frac{\left({x}^{3} + \left(-\color{blue}{0.125}\right)\right) \cdot \log x}{x \cdot x + \left(-0.5 \cdot -0.5 - x \cdot -0.5\right)} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      11. metadata-eval99.8%

        \[\leadsto \left(\left(\frac{\left({x}^{3} + \color{blue}{-0.125}\right) \cdot \log x}{x \cdot x + \left(-0.5 \cdot -0.5 - x \cdot -0.5\right)} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      12. fma-def99.8%

        \[\leadsto \left(\left(\frac{\left({x}^{3} + -0.125\right) \cdot \log x}{\color{blue}{\mathsf{fma}\left(x, x, -0.5 \cdot -0.5 - x \cdot -0.5\right)}} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      13. metadata-eval99.8%

        \[\leadsto \left(\left(\frac{\left({x}^{3} + -0.125\right) \cdot \log x}{\mathsf{fma}\left(x, x, \color{blue}{0.25} - x \cdot -0.5\right)} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    4. Applied egg-rr99.8%

      \[\leadsto \left(\left(\color{blue}{\frac{\left({x}^{3} + -0.125\right) \cdot \log x}{\mathsf{fma}\left(x, x, 0.25 - x \cdot -0.5\right)}} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]

    if 1.6e21 < x

    1. Initial program 81.4%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num81.4%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{1}{\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}}} \]
      2. inv-pow81.4%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}\right)}^{-1}} \]
      3. *-commutative81.4%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)} + 0.083333333333333}\right)}^{-1} \]
      4. fma-udef81.4%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{\mathsf{fma}\left(z, \left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778, 0.083333333333333\right)}}\right)}^{-1} \]
      5. fma-neg81.4%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)}, 0.083333333333333\right)}\right)}^{-1} \]
      6. metadata-eval81.4%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}\right)}^{-1} \]
    4. Applied egg-rr81.4%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}\right)}^{-1}} \]
    5. Taylor expanded in x around 0 81.4%

      \[\leadsto \color{blue}{0.91893853320467 + \left(-0.5 \cdot \log x + \left(x \cdot \left(\log x - 1\right) + \left(0.083333333333333 \cdot \frac{1}{x} + \frac{z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\right)\right)\right)} \]
    6. Simplified95.5%

      \[\leadsto \color{blue}{\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{x}{\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right)}}} \]
    7. Step-by-step derivation
      1. frac-2neg95.5%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \color{blue}{\frac{-z}{-\frac{x}{\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right)}}} \]
      2. div-inv95.5%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \color{blue}{\left(-z\right) \cdot \frac{1}{-\frac{x}{\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right)}}} \]
      3. distribute-neg-frac95.5%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \left(-z\right) \cdot \frac{1}{\color{blue}{\frac{-x}{\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right)}}} \]
    8. Applied egg-rr95.5%

      \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \color{blue}{\left(-z\right) \cdot \frac{1}{\frac{-x}{\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right)}}} \]
    9. Taylor expanded in z around inf 95.5%

      \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \left(-z\right) \cdot \frac{1}{\color{blue}{-1 \cdot \frac{x}{z \cdot \left(0.0007936500793651 + y\right)}}} \]
    10. Step-by-step derivation
      1. mul-1-neg95.5%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \left(-z\right) \cdot \frac{1}{\color{blue}{-\frac{x}{z \cdot \left(0.0007936500793651 + y\right)}}} \]
      2. associate-/r*98.7%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \left(-z\right) \cdot \frac{1}{-\color{blue}{\frac{\frac{x}{z}}{0.0007936500793651 + y}}} \]
      3. distribute-neg-frac98.7%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \left(-z\right) \cdot \frac{1}{\color{blue}{\frac{-\frac{x}{z}}{0.0007936500793651 + y}}} \]
    11. Simplified98.7%

      \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \left(-z\right) \cdot \frac{1}{\color{blue}{\frac{-\frac{x}{z}}{0.0007936500793651 + y}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.6 \cdot 10^{+21}:\\ \;\;\;\;\left(\left(\frac{\left({x}^{3} + -0.125\right) \cdot \log x}{\mathsf{fma}\left(x, x, 0.25 - x \cdot -0.5\right)} - x\right) + 0.91893853320467\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + z \cdot \frac{-1}{\frac{\frac{-x}{z}}{y + 0.0007936500793651}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 94.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)\\ \mathbf{if}\;t\_0 \leq 2 \cdot 10^{+307}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{x}{0.0007936500793651 \cdot z - 0.0027777777777778}}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0
         (+
          (/
           (+
            0.083333333333333
            (* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
           x)
          (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)))))
   (if (<= t_0 2e+307)
     t_0
     (+
      (+
       (+ 0.91893853320467 (/ 0.083333333333333 x))
       (- (* (log x) (+ x -0.5)) x))
      (/ z (/ x (- (* 0.0007936500793651 z) 0.0027777777777778)))))))
double code(double x, double y, double z) {
	double t_0 = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x));
	double tmp;
	if (t_0 <= 2e+307) {
		tmp = t_0;
	} else {
		tmp = ((0.91893853320467 + (0.083333333333333 / x)) + ((log(x) * (x + -0.5)) - x)) + (z / (x / ((0.0007936500793651 * z) - 0.0027777777777778)));
	}
	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.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x))
    if (t_0 <= 2d+307) then
        tmp = t_0
    else
        tmp = ((0.91893853320467d0 + (0.083333333333333d0 / x)) + ((log(x) * (x + (-0.5d0))) - x)) + (z / (x / ((0.0007936500793651d0 * z) - 0.0027777777777778d0)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x));
	double tmp;
	if (t_0 <= 2e+307) {
		tmp = t_0;
	} else {
		tmp = ((0.91893853320467 + (0.083333333333333 / x)) + ((Math.log(x) * (x + -0.5)) - x)) + (z / (x / ((0.0007936500793651 * z) - 0.0027777777777778)));
	}
	return tmp;
}
def code(x, y, z):
	t_0 = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x))
	tmp = 0
	if t_0 <= 2e+307:
		tmp = t_0
	else:
		tmp = ((0.91893853320467 + (0.083333333333333 / x)) + ((math.log(x) * (x + -0.5)) - x)) + (z / (x / ((0.0007936500793651 * z) - 0.0027777777777778)))
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) + Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)))
	tmp = 0.0
	if (t_0 <= 2e+307)
		tmp = t_0;
	else
		tmp = Float64(Float64(Float64(0.91893853320467 + Float64(0.083333333333333 / x)) + Float64(Float64(log(x) * Float64(x + -0.5)) - x)) + Float64(z / Float64(x / Float64(Float64(0.0007936500793651 * z) - 0.0027777777777778))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x));
	tmp = 0.0;
	if (t_0 <= 2e+307)
		tmp = t_0;
	else
		tmp = ((0.91893853320467 + (0.083333333333333 / x)) + ((log(x) * (x + -0.5)) - x)) + (z / (x / ((0.0007936500793651 * z) - 0.0027777777777778)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 2e+307], t$95$0, N[(N[(N[(0.91893853320467 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(z / N[(x / N[(N[(0.0007936500793651 * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)\\
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{x}{0.0007936500793651 \cdot z - 0.0027777777777778}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x 1/2) (log.f64 x)) x) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)) < 1.99999999999999997e307

    1. Initial program 98.1%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing

    if 1.99999999999999997e307 < (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x 1/2) (log.f64 x)) x) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x))

    1. Initial program 68.1%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num68.1%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{1}{\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}}} \]
      2. inv-pow68.1%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}\right)}^{-1}} \]
      3. *-commutative68.1%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)} + 0.083333333333333}\right)}^{-1} \]
      4. fma-udef68.1%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{\mathsf{fma}\left(z, \left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778, 0.083333333333333\right)}}\right)}^{-1} \]
      5. fma-neg68.1%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)}, 0.083333333333333\right)}\right)}^{-1} \]
      6. metadata-eval68.1%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}\right)}^{-1} \]
    4. Applied egg-rr68.1%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}\right)}^{-1}} \]
    5. Taylor expanded in x around 0 68.1%

      \[\leadsto \color{blue}{0.91893853320467 + \left(-0.5 \cdot \log x + \left(x \cdot \left(\log x - 1\right) + \left(0.083333333333333 \cdot \frac{1}{x} + \frac{z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\right)\right)\right)} \]
    6. Simplified94.9%

      \[\leadsto \color{blue}{\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{x}{\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right)}}} \]
    7. Taylor expanded in y around 0 91.7%

      \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\color{blue}{\frac{x}{0.0007936500793651 \cdot z - 0.0027777777777778}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification96.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) \leq 2 \cdot 10^{+307}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{x}{0.0007936500793651 \cdot z - 0.0027777777777778}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 97.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\\ \mathbf{if}\;y + 0.0007936500793651 \leq -0.1 \lor \neg \left(y + 0.0007936500793651 \leq 0.0007936500795\right):\\ \;\;\;\;t\_0 + \frac{z}{\frac{x}{y \cdot z}}\\ \mathbf{else}:\\ \;\;\;\;t\_0 + \frac{z}{\frac{x}{0.0007936500793651 \cdot z - 0.0027777777777778}}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0
         (+
          (+ 0.91893853320467 (/ 0.083333333333333 x))
          (- (* (log x) (+ x -0.5)) x))))
   (if (or (<= (+ y 0.0007936500793651) -0.1)
           (not (<= (+ y 0.0007936500793651) 0.0007936500795)))
     (+ t_0 (/ z (/ x (* y z))))
     (+ t_0 (/ z (/ x (- (* 0.0007936500793651 z) 0.0027777777777778)))))))
double code(double x, double y, double z) {
	double t_0 = (0.91893853320467 + (0.083333333333333 / x)) + ((log(x) * (x + -0.5)) - x);
	double tmp;
	if (((y + 0.0007936500793651) <= -0.1) || !((y + 0.0007936500793651) <= 0.0007936500795)) {
		tmp = t_0 + (z / (x / (y * z)));
	} else {
		tmp = t_0 + (z / (x / ((0.0007936500793651 * z) - 0.0027777777777778)));
	}
	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.91893853320467d0 + (0.083333333333333d0 / x)) + ((log(x) * (x + (-0.5d0))) - x)
    if (((y + 0.0007936500793651d0) <= (-0.1d0)) .or. (.not. ((y + 0.0007936500793651d0) <= 0.0007936500795d0))) then
        tmp = t_0 + (z / (x / (y * z)))
    else
        tmp = t_0 + (z / (x / ((0.0007936500793651d0 * z) - 0.0027777777777778d0)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (0.91893853320467 + (0.083333333333333 / x)) + ((Math.log(x) * (x + -0.5)) - x);
	double tmp;
	if (((y + 0.0007936500793651) <= -0.1) || !((y + 0.0007936500793651) <= 0.0007936500795)) {
		tmp = t_0 + (z / (x / (y * z)));
	} else {
		tmp = t_0 + (z / (x / ((0.0007936500793651 * z) - 0.0027777777777778)));
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (0.91893853320467 + (0.083333333333333 / x)) + ((math.log(x) * (x + -0.5)) - x)
	tmp = 0
	if ((y + 0.0007936500793651) <= -0.1) or not ((y + 0.0007936500793651) <= 0.0007936500795):
		tmp = t_0 + (z / (x / (y * z)))
	else:
		tmp = t_0 + (z / (x / ((0.0007936500793651 * z) - 0.0027777777777778)))
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(0.91893853320467 + Float64(0.083333333333333 / x)) + Float64(Float64(log(x) * Float64(x + -0.5)) - x))
	tmp = 0.0
	if ((Float64(y + 0.0007936500793651) <= -0.1) || !(Float64(y + 0.0007936500793651) <= 0.0007936500795))
		tmp = Float64(t_0 + Float64(z / Float64(x / Float64(y * z))));
	else
		tmp = Float64(t_0 + Float64(z / Float64(x / Float64(Float64(0.0007936500793651 * z) - 0.0027777777777778))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (0.91893853320467 + (0.083333333333333 / x)) + ((log(x) * (x + -0.5)) - x);
	tmp = 0.0;
	if (((y + 0.0007936500793651) <= -0.1) || ~(((y + 0.0007936500793651) <= 0.0007936500795)))
		tmp = t_0 + (z / (x / (y * z)));
	else
		tmp = t_0 + (z / (x / ((0.0007936500793651 * z) - 0.0027777777777778)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(0.91893853320467 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[N[(y + 0.0007936500793651), $MachinePrecision], -0.1], N[Not[LessEqual[N[(y + 0.0007936500793651), $MachinePrecision], 0.0007936500795]], $MachinePrecision]], N[(t$95$0 + N[(z / N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(z / N[(x / N[(N[(0.0007936500793651 * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\\
\mathbf{if}\;y + 0.0007936500793651 \leq -0.1 \lor \neg \left(y + 0.0007936500793651 \leq 0.0007936500795\right):\\
\;\;\;\;t\_0 + \frac{z}{\frac{x}{y \cdot z}}\\

\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{z}{\frac{x}{0.0007936500793651 \cdot z - 0.0027777777777778}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 y 7936500793651/10000000000000000) < -0.10000000000000001 or 7.9365007950000003e-4 < (+.f64 y 7936500793651/10000000000000000)

    1. Initial program 91.3%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num91.2%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{1}{\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}}} \]
      2. inv-pow91.2%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}\right)}^{-1}} \]
      3. *-commutative91.2%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)} + 0.083333333333333}\right)}^{-1} \]
      4. fma-udef91.2%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{\mathsf{fma}\left(z, \left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778, 0.083333333333333\right)}}\right)}^{-1} \]
      5. fma-neg91.2%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)}, 0.083333333333333\right)}\right)}^{-1} \]
      6. metadata-eval91.2%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}\right)}^{-1} \]
    4. Applied egg-rr91.2%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}\right)}^{-1}} \]
    5. Taylor expanded in x around 0 91.3%

      \[\leadsto \color{blue}{0.91893853320467 + \left(-0.5 \cdot \log x + \left(x \cdot \left(\log x - 1\right) + \left(0.083333333333333 \cdot \frac{1}{x} + \frac{z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\right)\right)\right)} \]
    6. Simplified93.3%

      \[\leadsto \color{blue}{\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{x}{\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right)}}} \]
    7. Taylor expanded in y around inf 93.3%

      \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\color{blue}{\frac{x}{y \cdot z}}} \]
    8. Step-by-step derivation
      1. *-commutative93.3%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{x}{\color{blue}{z \cdot y}}} \]
    9. Simplified93.3%

      \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\color{blue}{\frac{x}{z \cdot y}}} \]

    if -0.10000000000000001 < (+.f64 y 7936500793651/10000000000000000) < 7.9365007950000003e-4

    1. Initial program 91.4%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num91.4%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{1}{\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}}} \]
      2. inv-pow91.4%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}\right)}^{-1}} \]
      3. *-commutative91.4%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)} + 0.083333333333333}\right)}^{-1} \]
      4. fma-udef91.4%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{\mathsf{fma}\left(z, \left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778, 0.083333333333333\right)}}\right)}^{-1} \]
      5. fma-neg91.4%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)}, 0.083333333333333\right)}\right)}^{-1} \]
      6. metadata-eval91.4%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}\right)}^{-1} \]
    4. Applied egg-rr91.4%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}\right)}^{-1}} \]
    5. Taylor expanded in x around 0 91.3%

      \[\leadsto \color{blue}{0.91893853320467 + \left(-0.5 \cdot \log x + \left(x \cdot \left(\log x - 1\right) + \left(0.083333333333333 \cdot \frac{1}{x} + \frac{z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\right)\right)\right)} \]
    6. Simplified99.6%

      \[\leadsto \color{blue}{\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{x}{\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right)}}} \]
    7. Taylor expanded in y around 0 99.4%

      \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\color{blue}{\frac{x}{0.0007936500793651 \cdot z - 0.0027777777777778}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification96.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y + 0.0007936500793651 \leq -0.1 \lor \neg \left(y + 0.0007936500793651 \leq 0.0007936500795\right):\\ \;\;\;\;\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{x}{y \cdot z}}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{x}{0.0007936500793651 \cdot z - 0.0027777777777778}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 99.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 10^{+34}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + z \cdot \frac{-1}{\frac{\frac{-x}{z}}{y + 0.0007936500793651}}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 1e+34)
   (+
    (/
     (+
      0.083333333333333
      (* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
     x)
    (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)))
   (+
    (+
     (+ 0.91893853320467 (/ 0.083333333333333 x))
     (- (* (log x) (+ x -0.5)) x))
    (* z (/ -1.0 (/ (/ (- x) z) (+ y 0.0007936500793651)))))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 1e+34) {
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x));
	} else {
		tmp = ((0.91893853320467 + (0.083333333333333 / x)) + ((log(x) * (x + -0.5)) - x)) + (z * (-1.0 / ((-x / z) / (y + 0.0007936500793651))));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (x <= 1d+34) then
        tmp = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x))
    else
        tmp = ((0.91893853320467d0 + (0.083333333333333d0 / x)) + ((log(x) * (x + (-0.5d0))) - x)) + (z * ((-1.0d0) / ((-x / z) / (y + 0.0007936500793651d0))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= 1e+34) {
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x));
	} else {
		tmp = ((0.91893853320467 + (0.083333333333333 / x)) + ((Math.log(x) * (x + -0.5)) - x)) + (z * (-1.0 / ((-x / z) / (y + 0.0007936500793651))));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= 1e+34:
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x))
	else:
		tmp = ((0.91893853320467 + (0.083333333333333 / x)) + ((math.log(x) * (x + -0.5)) - x)) + (z * (-1.0 / ((-x / z) / (y + 0.0007936500793651))))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= 1e+34)
		tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) + Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)));
	else
		tmp = Float64(Float64(Float64(0.91893853320467 + Float64(0.083333333333333 / x)) + Float64(Float64(log(x) * Float64(x + -0.5)) - x)) + Float64(z * Float64(-1.0 / Float64(Float64(Float64(-x) / z) / Float64(y + 0.0007936500793651)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= 1e+34)
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x));
	else
		tmp = ((0.91893853320467 + (0.083333333333333 / x)) + ((log(x) * (x + -0.5)) - x)) + (z * (-1.0 / ((-x / z) / (y + 0.0007936500793651))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, 1e+34], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.91893853320467 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(-1.0 / N[(N[((-x) / z), $MachinePrecision] / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 10^{+34}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + z \cdot \frac{-1}{\frac{\frac{-x}{z}}{y + 0.0007936500793651}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 9.99999999999999946e33

    1. Initial program 99.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing

    if 9.99999999999999946e33 < x

    1. Initial program 80.8%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num80.8%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{1}{\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}}} \]
      2. inv-pow80.8%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}\right)}^{-1}} \]
      3. *-commutative80.8%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)} + 0.083333333333333}\right)}^{-1} \]
      4. fma-udef80.8%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{\mathsf{fma}\left(z, \left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778, 0.083333333333333\right)}}\right)}^{-1} \]
      5. fma-neg80.8%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)}, 0.083333333333333\right)}\right)}^{-1} \]
      6. metadata-eval80.8%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}\right)}^{-1} \]
    4. Applied egg-rr80.8%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}\right)}^{-1}} \]
    5. Taylor expanded in x around 0 80.8%

      \[\leadsto \color{blue}{0.91893853320467 + \left(-0.5 \cdot \log x + \left(x \cdot \left(\log x - 1\right) + \left(0.083333333333333 \cdot \frac{1}{x} + \frac{z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\right)\right)\right)} \]
    6. Simplified95.3%

      \[\leadsto \color{blue}{\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{x}{\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right)}}} \]
    7. Step-by-step derivation
      1. frac-2neg95.3%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \color{blue}{\frac{-z}{-\frac{x}{\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right)}}} \]
      2. div-inv95.3%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \color{blue}{\left(-z\right) \cdot \frac{1}{-\frac{x}{\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right)}}} \]
      3. distribute-neg-frac95.3%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \left(-z\right) \cdot \frac{1}{\color{blue}{\frac{-x}{\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right)}}} \]
    8. Applied egg-rr95.3%

      \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \color{blue}{\left(-z\right) \cdot \frac{1}{\frac{-x}{\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right)}}} \]
    9. Taylor expanded in z around inf 95.3%

      \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \left(-z\right) \cdot \frac{1}{\color{blue}{-1 \cdot \frac{x}{z \cdot \left(0.0007936500793651 + y\right)}}} \]
    10. Step-by-step derivation
      1. mul-1-neg95.3%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \left(-z\right) \cdot \frac{1}{\color{blue}{-\frac{x}{z \cdot \left(0.0007936500793651 + y\right)}}} \]
      2. associate-/r*98.7%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \left(-z\right) \cdot \frac{1}{-\color{blue}{\frac{\frac{x}{z}}{0.0007936500793651 + y}}} \]
      3. distribute-neg-frac98.7%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \left(-z\right) \cdot \frac{1}{\color{blue}{\frac{-\frac{x}{z}}{0.0007936500793651 + y}}} \]
    11. Simplified98.7%

      \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \left(-z\right) \cdot \frac{1}{\color{blue}{\frac{-\frac{x}{z}}{0.0007936500793651 + y}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 10^{+34}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + z \cdot \frac{-1}{\frac{\frac{-x}{z}}{y + 0.0007936500793651}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 93.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 4100000000000:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{1}{\frac{z}{\frac{x}{y}}}}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 4100000000000.0)
   (+
    (/
     (+
      0.083333333333333
      (* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
     x)
    (+ 0.91893853320467 (* (log x) -0.5)))
   (+
    (+
     (+ 0.91893853320467 (/ 0.083333333333333 x))
     (- (* (log x) (+ x -0.5)) x))
    (/ z (/ 1.0 (/ z (/ x y)))))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 4100000000000.0) {
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (log(x) * -0.5));
	} else {
		tmp = ((0.91893853320467 + (0.083333333333333 / x)) + ((log(x) * (x + -0.5)) - x)) + (z / (1.0 / (z / (x / y))));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (x <= 4100000000000.0d0) then
        tmp = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + (0.91893853320467d0 + (log(x) * (-0.5d0)))
    else
        tmp = ((0.91893853320467d0 + (0.083333333333333d0 / x)) + ((log(x) * (x + (-0.5d0))) - x)) + (z / (1.0d0 / (z / (x / y))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= 4100000000000.0) {
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (Math.log(x) * -0.5));
	} else {
		tmp = ((0.91893853320467 + (0.083333333333333 / x)) + ((Math.log(x) * (x + -0.5)) - x)) + (z / (1.0 / (z / (x / y))));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= 4100000000000.0:
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (math.log(x) * -0.5))
	else:
		tmp = ((0.91893853320467 + (0.083333333333333 / x)) + ((math.log(x) * (x + -0.5)) - x)) + (z / (1.0 / (z / (x / y))))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= 4100000000000.0)
		tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) + Float64(0.91893853320467 + Float64(log(x) * -0.5)));
	else
		tmp = Float64(Float64(Float64(0.91893853320467 + Float64(0.083333333333333 / x)) + Float64(Float64(log(x) * Float64(x + -0.5)) - x)) + Float64(z / Float64(1.0 / Float64(z / Float64(x / y)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= 4100000000000.0)
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (log(x) * -0.5));
	else
		tmp = ((0.91893853320467 + (0.083333333333333 / x)) + ((log(x) * (x + -0.5)) - x)) + (z / (1.0 / (z / (x / y))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, 4100000000000.0], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.91893853320467 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(z / N[(1.0 / N[(z / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 4100000000000:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{1}{\frac{z}{\frac{x}{y}}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 4.1e12

    1. Initial program 99.8%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 97.7%

      \[\leadsto \color{blue}{\left(0.91893853320467 + -0.5 \cdot \log x\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]

    if 4.1e12 < x

    1. Initial program 82.0%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{1}{\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}}} \]
      2. inv-pow82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}\right)}^{-1}} \]
      3. *-commutative82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)} + 0.083333333333333}\right)}^{-1} \]
      4. fma-udef82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{\mathsf{fma}\left(z, \left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778, 0.083333333333333\right)}}\right)}^{-1} \]
      5. fma-neg82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)}, 0.083333333333333\right)}\right)}^{-1} \]
      6. metadata-eval82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}\right)}^{-1} \]
    4. Applied egg-rr82.0%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}\right)}^{-1}} \]
    5. Taylor expanded in x around 0 82.0%

      \[\leadsto \color{blue}{0.91893853320467 + \left(-0.5 \cdot \log x + \left(x \cdot \left(\log x - 1\right) + \left(0.083333333333333 \cdot \frac{1}{x} + \frac{z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\right)\right)\right)} \]
    6. Simplified95.6%

      \[\leadsto \color{blue}{\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{x}{\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right)}}} \]
    7. Taylor expanded in y around inf 85.4%

      \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\color{blue}{\frac{x}{y \cdot z}}} \]
    8. Step-by-step derivation
      1. *-commutative85.4%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{x}{\color{blue}{z \cdot y}}} \]
    9. Simplified85.4%

      \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\color{blue}{\frac{x}{z \cdot y}}} \]
    10. Step-by-step derivation
      1. clear-num85.4%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\color{blue}{\frac{1}{\frac{z \cdot y}{x}}}} \]
      2. inv-pow85.4%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\color{blue}{{\left(\frac{z \cdot y}{x}\right)}^{-1}}} \]
    11. Applied egg-rr85.4%

      \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\color{blue}{{\left(\frac{z \cdot y}{x}\right)}^{-1}}} \]
    12. Step-by-step derivation
      1. unpow-185.4%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\color{blue}{\frac{1}{\frac{z \cdot y}{x}}}} \]
      2. associate-/l*88.6%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{1}{\color{blue}{\frac{z}{\frac{x}{y}}}}} \]
    13. Simplified88.6%

      \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\color{blue}{\frac{1}{\frac{z}{\frac{x}{y}}}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification93.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 4100000000000:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{1}{\frac{z}{\frac{x}{y}}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 92.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2100000000000:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{x}{y \cdot z}}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 2100000000000.0)
   (+
    (/
     (+
      0.083333333333333
      (* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
     x)
    (+ 0.91893853320467 (* (log x) -0.5)))
   (+
    (+
     (+ 0.91893853320467 (/ 0.083333333333333 x))
     (- (* (log x) (+ x -0.5)) x))
    (/ z (/ x (* y z))))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 2100000000000.0) {
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (log(x) * -0.5));
	} else {
		tmp = ((0.91893853320467 + (0.083333333333333 / x)) + ((log(x) * (x + -0.5)) - x)) + (z / (x / (y * z)));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (x <= 2100000000000.0d0) then
        tmp = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + (0.91893853320467d0 + (log(x) * (-0.5d0)))
    else
        tmp = ((0.91893853320467d0 + (0.083333333333333d0 / x)) + ((log(x) * (x + (-0.5d0))) - x)) + (z / (x / (y * z)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= 2100000000000.0) {
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (Math.log(x) * -0.5));
	} else {
		tmp = ((0.91893853320467 + (0.083333333333333 / x)) + ((Math.log(x) * (x + -0.5)) - x)) + (z / (x / (y * z)));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= 2100000000000.0:
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (math.log(x) * -0.5))
	else:
		tmp = ((0.91893853320467 + (0.083333333333333 / x)) + ((math.log(x) * (x + -0.5)) - x)) + (z / (x / (y * z)))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= 2100000000000.0)
		tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) + Float64(0.91893853320467 + Float64(log(x) * -0.5)));
	else
		tmp = Float64(Float64(Float64(0.91893853320467 + Float64(0.083333333333333 / x)) + Float64(Float64(log(x) * Float64(x + -0.5)) - x)) + Float64(z / Float64(x / Float64(y * z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= 2100000000000.0)
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (log(x) * -0.5));
	else
		tmp = ((0.91893853320467 + (0.083333333333333 / x)) + ((log(x) * (x + -0.5)) - x)) + (z / (x / (y * z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, 2100000000000.0], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.91893853320467 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(z / N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 2100000000000:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{x}{y \cdot z}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 2.1e12

    1. Initial program 99.8%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 97.7%

      \[\leadsto \color{blue}{\left(0.91893853320467 + -0.5 \cdot \log x\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]

    if 2.1e12 < x

    1. Initial program 82.0%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{1}{\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}}} \]
      2. inv-pow82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}\right)}^{-1}} \]
      3. *-commutative82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)} + 0.083333333333333}\right)}^{-1} \]
      4. fma-udef82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{\mathsf{fma}\left(z, \left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778, 0.083333333333333\right)}}\right)}^{-1} \]
      5. fma-neg82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)}, 0.083333333333333\right)}\right)}^{-1} \]
      6. metadata-eval82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}\right)}^{-1} \]
    4. Applied egg-rr82.0%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}\right)}^{-1}} \]
    5. Taylor expanded in x around 0 82.0%

      \[\leadsto \color{blue}{0.91893853320467 + \left(-0.5 \cdot \log x + \left(x \cdot \left(\log x - 1\right) + \left(0.083333333333333 \cdot \frac{1}{x} + \frac{z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\right)\right)\right)} \]
    6. Simplified95.6%

      \[\leadsto \color{blue}{\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{x}{\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right)}}} \]
    7. Taylor expanded in y around inf 85.4%

      \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\color{blue}{\frac{x}{y \cdot z}}} \]
    8. Step-by-step derivation
      1. *-commutative85.4%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{x}{\color{blue}{z \cdot y}}} \]
    9. Simplified85.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2100000000000:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{x}{y \cdot z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 84.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2800000000000:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 2800000000000.0)
   (+
    (/
     (+
      0.083333333333333
      (* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
     x)
    (+ 0.91893853320467 (* (log x) -0.5)))
   (+ 0.91893853320467 (- (* (log x) (+ x -0.5)) x))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 2800000000000.0) {
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (log(x) * -0.5));
	} else {
		tmp = 0.91893853320467 + ((log(x) * (x + -0.5)) - x);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (x <= 2800000000000.0d0) then
        tmp = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + (0.91893853320467d0 + (log(x) * (-0.5d0)))
    else
        tmp = 0.91893853320467d0 + ((log(x) * (x + (-0.5d0))) - x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= 2800000000000.0) {
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (Math.log(x) * -0.5));
	} else {
		tmp = 0.91893853320467 + ((Math.log(x) * (x + -0.5)) - x);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= 2800000000000.0:
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (math.log(x) * -0.5))
	else:
		tmp = 0.91893853320467 + ((math.log(x) * (x + -0.5)) - x)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= 2800000000000.0)
		tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) + Float64(0.91893853320467 + Float64(log(x) * -0.5)));
	else
		tmp = Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x + -0.5)) - x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= 2800000000000.0)
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (log(x) * -0.5));
	else
		tmp = 0.91893853320467 + ((log(x) * (x + -0.5)) - x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, 2800000000000.0], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 2800000000000:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\

\mathbf{else}:\\
\;\;\;\;0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\\


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

    1. Initial program 99.8%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 97.7%

      \[\leadsto \color{blue}{\left(0.91893853320467 + -0.5 \cdot \log x\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]

    if 2.8e12 < x

    1. Initial program 82.0%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{1}{\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}}} \]
      2. inv-pow82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}\right)}^{-1}} \]
      3. *-commutative82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)} + 0.083333333333333}\right)}^{-1} \]
      4. fma-udef82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{\mathsf{fma}\left(z, \left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778, 0.083333333333333\right)}}\right)}^{-1} \]
      5. fma-neg82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)}, 0.083333333333333\right)}\right)}^{-1} \]
      6. metadata-eval82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}\right)}^{-1} \]
    4. Applied egg-rr82.0%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}\right)}^{-1}} \]
    5. Taylor expanded in x around inf 74.3%

      \[\leadsto \color{blue}{0.91893853320467 + \left(0.5 \cdot \log \left(\frac{1}{x}\right) + x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right)} \]
    6. Step-by-step derivation
      1. sub-neg74.3%

        \[\leadsto 0.91893853320467 + \left(0.5 \cdot \log \left(\frac{1}{x}\right) + x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)}\right) \]
      2. mul-1-neg74.3%

        \[\leadsto 0.91893853320467 + \left(0.5 \cdot \log \left(\frac{1}{x}\right) + x \cdot \left(\color{blue}{\left(-\log \left(\frac{1}{x}\right)\right)} + \left(-1\right)\right)\right) \]
      3. log-rec74.3%

        \[\leadsto 0.91893853320467 + \left(0.5 \cdot \log \left(\frac{1}{x}\right) + x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right)\right) \]
      4. remove-double-neg74.3%

        \[\leadsto 0.91893853320467 + \left(0.5 \cdot \log \left(\frac{1}{x}\right) + x \cdot \left(\color{blue}{\log x} + \left(-1\right)\right)\right) \]
      5. metadata-eval74.3%

        \[\leadsto 0.91893853320467 + \left(0.5 \cdot \log \left(\frac{1}{x}\right) + x \cdot \left(\log x + \color{blue}{-1}\right)\right) \]
      6. distribute-rgt-in74.3%

        \[\leadsto 0.91893853320467 + \left(0.5 \cdot \log \left(\frac{1}{x}\right) + \color{blue}{\left(\log x \cdot x + -1 \cdot x\right)}\right) \]
      7. *-commutative74.3%

        \[\leadsto 0.91893853320467 + \left(0.5 \cdot \log \left(\frac{1}{x}\right) + \left(\color{blue}{x \cdot \log x} + -1 \cdot x\right)\right) \]
      8. neg-mul-174.3%

        \[\leadsto 0.91893853320467 + \left(0.5 \cdot \log \left(\frac{1}{x}\right) + \left(x \cdot \log x + \color{blue}{\left(-x\right)}\right)\right) \]
      9. associate-+r+74.3%

        \[\leadsto 0.91893853320467 + \color{blue}{\left(\left(0.5 \cdot \log \left(\frac{1}{x}\right) + x \cdot \log x\right) + \left(-x\right)\right)} \]
    7. Simplified74.3%

      \[\leadsto \color{blue}{0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification86.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2800000000000:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 92.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2100000000000:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{\frac{x}{y \cdot z}} + \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(x \cdot \log x - x\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 2100000000000.0)
   (+
    (/
     (+
      0.083333333333333
      (* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
     x)
    (+ 0.91893853320467 (* (log x) -0.5)))
   (+
    (/ z (/ x (* y z)))
    (+ (+ 0.91893853320467 (/ 0.083333333333333 x)) (- (* x (log x)) x)))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 2100000000000.0) {
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (log(x) * -0.5));
	} else {
		tmp = (z / (x / (y * z))) + ((0.91893853320467 + (0.083333333333333 / x)) + ((x * log(x)) - x));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (x <= 2100000000000.0d0) then
        tmp = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + (0.91893853320467d0 + (log(x) * (-0.5d0)))
    else
        tmp = (z / (x / (y * z))) + ((0.91893853320467d0 + (0.083333333333333d0 / x)) + ((x * log(x)) - x))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= 2100000000000.0) {
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (Math.log(x) * -0.5));
	} else {
		tmp = (z / (x / (y * z))) + ((0.91893853320467 + (0.083333333333333 / x)) + ((x * Math.log(x)) - x));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= 2100000000000.0:
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (math.log(x) * -0.5))
	else:
		tmp = (z / (x / (y * z))) + ((0.91893853320467 + (0.083333333333333 / x)) + ((x * math.log(x)) - x))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= 2100000000000.0)
		tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) + Float64(0.91893853320467 + Float64(log(x) * -0.5)));
	else
		tmp = Float64(Float64(z / Float64(x / Float64(y * z))) + Float64(Float64(0.91893853320467 + Float64(0.083333333333333 / x)) + Float64(Float64(x * log(x)) - x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= 2100000000000.0)
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (log(x) * -0.5));
	else
		tmp = (z / (x / (y * z))) + ((0.91893853320467 + (0.083333333333333 / x)) + ((x * log(x)) - x));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, 2100000000000.0], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(0.91893853320467 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 2100000000000:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{x}{y \cdot z}} + \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(x \cdot \log x - x\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 2.1e12

    1. Initial program 99.8%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 97.7%

      \[\leadsto \color{blue}{\left(0.91893853320467 + -0.5 \cdot \log x\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]

    if 2.1e12 < x

    1. Initial program 82.0%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{1}{\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}}} \]
      2. inv-pow82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}\right)}^{-1}} \]
      3. *-commutative82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)} + 0.083333333333333}\right)}^{-1} \]
      4. fma-udef82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{\mathsf{fma}\left(z, \left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778, 0.083333333333333\right)}}\right)}^{-1} \]
      5. fma-neg82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)}, 0.083333333333333\right)}\right)}^{-1} \]
      6. metadata-eval82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}\right)}^{-1} \]
    4. Applied egg-rr82.0%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}\right)}^{-1}} \]
    5. Taylor expanded in x around 0 82.0%

      \[\leadsto \color{blue}{0.91893853320467 + \left(-0.5 \cdot \log x + \left(x \cdot \left(\log x - 1\right) + \left(0.083333333333333 \cdot \frac{1}{x} + \frac{z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\right)\right)\right)} \]
    6. Simplified95.6%

      \[\leadsto \color{blue}{\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{x}{\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right)}}} \]
    7. Taylor expanded in y around inf 85.4%

      \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\color{blue}{\frac{x}{y \cdot z}}} \]
    8. Step-by-step derivation
      1. *-commutative85.4%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{x}{\color{blue}{z \cdot y}}} \]
    9. Simplified85.4%

      \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\color{blue}{\frac{x}{z \cdot y}}} \]
    10. Taylor expanded in x around inf 85.3%

      \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\color{blue}{-1 \cdot \left(x \cdot \log \left(\frac{1}{x}\right)\right)} - x\right)\right) + \frac{z}{\frac{x}{z \cdot y}} \]
    11. Step-by-step derivation
      1. mul-1-neg85.3%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\color{blue}{\left(-x \cdot \log \left(\frac{1}{x}\right)\right)} - x\right)\right) + \frac{z}{\frac{x}{z \cdot y}} \]
      2. distribute-rgt-neg-in85.3%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\color{blue}{x \cdot \left(-\log \left(\frac{1}{x}\right)\right)} - x\right)\right) + \frac{z}{\frac{x}{z \cdot y}} \]
      3. log-rec85.3%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(x \cdot \left(-\color{blue}{\left(-\log x\right)}\right) - x\right)\right) + \frac{z}{\frac{x}{z \cdot y}} \]
      4. remove-double-neg85.3%

        \[\leadsto \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(x \cdot \color{blue}{\log x} - x\right)\right) + \frac{z}{\frac{x}{z \cdot y}} \]
    12. Simplified85.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2100000000000:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{\frac{x}{y \cdot z}} + \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(x \cdot \log x - x\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 84.5% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 7500000000000:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 7500000000000.0)
   (/
    (+
     0.083333333333333
     (* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
    x)
   (+ 0.91893853320467 (- (* (log x) (+ x -0.5)) x))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 7500000000000.0) {
		tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
	} else {
		tmp = 0.91893853320467 + ((log(x) * (x + -0.5)) - x);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (x <= 7500000000000.0d0) then
        tmp = (0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x
    else
        tmp = 0.91893853320467d0 + ((log(x) * (x + (-0.5d0))) - x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= 7500000000000.0) {
		tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
	} else {
		tmp = 0.91893853320467 + ((Math.log(x) * (x + -0.5)) - x);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= 7500000000000.0:
		tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x
	else:
		tmp = 0.91893853320467 + ((math.log(x) * (x + -0.5)) - x)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= 7500000000000.0)
		tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x);
	else
		tmp = Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x + -0.5)) - x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= 7500000000000.0)
		tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
	else
		tmp = 0.91893853320467 + ((log(x) * (x + -0.5)) - x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, 7500000000000.0], N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 7500000000000:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\

\mathbf{else}:\\
\;\;\;\;0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 7.5e12

    1. Initial program 99.8%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num99.7%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{1}{\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}}} \]
      2. inv-pow99.7%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}\right)}^{-1}} \]
      3. *-commutative99.7%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)} + 0.083333333333333}\right)}^{-1} \]
      4. fma-udef99.7%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{\mathsf{fma}\left(z, \left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778, 0.083333333333333\right)}}\right)}^{-1} \]
      5. fma-neg99.7%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)}, 0.083333333333333\right)}\right)}^{-1} \]
      6. metadata-eval99.7%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}\right)}^{-1} \]
    4. Applied egg-rr99.7%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}\right)}^{-1}} \]
    5. Taylor expanded in x around 0 97.1%

      \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]

    if 7.5e12 < x

    1. Initial program 82.0%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{1}{\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}}} \]
      2. inv-pow82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}\right)}^{-1}} \]
      3. *-commutative82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)} + 0.083333333333333}\right)}^{-1} \]
      4. fma-udef82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{\mathsf{fma}\left(z, \left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778, 0.083333333333333\right)}}\right)}^{-1} \]
      5. fma-neg82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)}, 0.083333333333333\right)}\right)}^{-1} \]
      6. metadata-eval82.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}\right)}^{-1} \]
    4. Applied egg-rr82.0%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}\right)}^{-1}} \]
    5. Taylor expanded in x around inf 74.3%

      \[\leadsto \color{blue}{0.91893853320467 + \left(0.5 \cdot \log \left(\frac{1}{x}\right) + x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right)} \]
    6. Step-by-step derivation
      1. sub-neg74.3%

        \[\leadsto 0.91893853320467 + \left(0.5 \cdot \log \left(\frac{1}{x}\right) + x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)}\right) \]
      2. mul-1-neg74.3%

        \[\leadsto 0.91893853320467 + \left(0.5 \cdot \log \left(\frac{1}{x}\right) + x \cdot \left(\color{blue}{\left(-\log \left(\frac{1}{x}\right)\right)} + \left(-1\right)\right)\right) \]
      3. log-rec74.3%

        \[\leadsto 0.91893853320467 + \left(0.5 \cdot \log \left(\frac{1}{x}\right) + x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right)\right) \]
      4. remove-double-neg74.3%

        \[\leadsto 0.91893853320467 + \left(0.5 \cdot \log \left(\frac{1}{x}\right) + x \cdot \left(\color{blue}{\log x} + \left(-1\right)\right)\right) \]
      5. metadata-eval74.3%

        \[\leadsto 0.91893853320467 + \left(0.5 \cdot \log \left(\frac{1}{x}\right) + x \cdot \left(\log x + \color{blue}{-1}\right)\right) \]
      6. distribute-rgt-in74.3%

        \[\leadsto 0.91893853320467 + \left(0.5 \cdot \log \left(\frac{1}{x}\right) + \color{blue}{\left(\log x \cdot x + -1 \cdot x\right)}\right) \]
      7. *-commutative74.3%

        \[\leadsto 0.91893853320467 + \left(0.5 \cdot \log \left(\frac{1}{x}\right) + \left(\color{blue}{x \cdot \log x} + -1 \cdot x\right)\right) \]
      8. neg-mul-174.3%

        \[\leadsto 0.91893853320467 + \left(0.5 \cdot \log \left(\frac{1}{x}\right) + \left(x \cdot \log x + \color{blue}{\left(-x\right)}\right)\right) \]
      9. associate-+r+74.3%

        \[\leadsto 0.91893853320467 + \color{blue}{\left(\left(0.5 \cdot \log \left(\frac{1}{x}\right) + x \cdot \log x\right) + \left(-x\right)\right)} \]
    7. Simplified74.3%

      \[\leadsto \color{blue}{0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification86.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 7500000000000:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 84.5% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 6600000000000:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 6600000000000.0)
   (/
    (+
     0.083333333333333
     (* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
    x)
   (* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 6600000000000.0) {
		tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
	} else {
		tmp = x * (log(x) + -1.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) :: tmp
    if (x <= 6600000000000.0d0) then
        tmp = (0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x
    else
        tmp = x * (log(x) + (-1.0d0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= 6600000000000.0) {
		tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
	} else {
		tmp = x * (Math.log(x) + -1.0);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= 6600000000000.0:
		tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x
	else:
		tmp = x * (math.log(x) + -1.0)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= 6600000000000.0)
		tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x);
	else
		tmp = Float64(x * Float64(log(x) + -1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= 6600000000000.0)
		tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
	else
		tmp = x * (log(x) + -1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, 6600000000000.0], N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 6600000000000:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 6.6e12

    1. Initial program 99.8%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num99.7%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{1}{\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}}} \]
      2. inv-pow99.7%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}\right)}^{-1}} \]
      3. *-commutative99.7%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)} + 0.083333333333333}\right)}^{-1} \]
      4. fma-udef99.7%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{\mathsf{fma}\left(z, \left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778, 0.083333333333333\right)}}\right)}^{-1} \]
      5. fma-neg99.7%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)}, 0.083333333333333\right)}\right)}^{-1} \]
      6. metadata-eval99.7%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}\right)}^{-1} \]
    4. Applied egg-rr99.7%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}\right)}^{-1}} \]
    5. Taylor expanded in x around 0 97.1%

      \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]

    if 6.6e12 < x

    1. Initial program 82.0%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 74.2%

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} \]
    4. Step-by-step derivation
      1. sub-neg74.2%

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)} \]
      2. mul-1-neg74.2%

        \[\leadsto x \cdot \left(\color{blue}{\left(-\log \left(\frac{1}{x}\right)\right)} + \left(-1\right)\right) \]
      3. log-rec74.2%

        \[\leadsto x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right) \]
      4. remove-double-neg74.2%

        \[\leadsto x \cdot \left(\color{blue}{\log x} + \left(-1\right)\right) \]
      5. metadata-eval74.2%

        \[\leadsto x \cdot \left(\log x + \color{blue}{-1}\right) \]
    5. Simplified74.2%

      \[\leadsto \color{blue}{x \cdot \left(\log x + -1\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification86.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 6600000000000:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 84.5% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 3000000000000:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \log x - x\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 3000000000000.0)
   (/
    (+
     0.083333333333333
     (* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
    x)
   (- (* x (log x)) x)))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 3000000000000.0) {
		tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
	} else {
		tmp = (x * log(x)) - x;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (x <= 3000000000000.0d0) then
        tmp = (0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x
    else
        tmp = (x * log(x)) - x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= 3000000000000.0) {
		tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
	} else {
		tmp = (x * Math.log(x)) - x;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= 3000000000000.0:
		tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x
	else:
		tmp = (x * math.log(x)) - x
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= 3000000000000.0)
		tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x);
	else
		tmp = Float64(Float64(x * log(x)) - x);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= 3000000000000.0)
		tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
	else
		tmp = (x * log(x)) - x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, 3000000000000.0], N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 3000000000000:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \log x - x\\


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

    1. Initial program 99.8%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num99.7%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{1}{\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}}} \]
      2. inv-pow99.7%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}\right)}^{-1}} \]
      3. *-commutative99.7%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)} + 0.083333333333333}\right)}^{-1} \]
      4. fma-udef99.7%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{\mathsf{fma}\left(z, \left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778, 0.083333333333333\right)}}\right)}^{-1} \]
      5. fma-neg99.7%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)}, 0.083333333333333\right)}\right)}^{-1} \]
      6. metadata-eval99.7%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}\right)}^{-1} \]
    4. Applied egg-rr99.7%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}\right)}^{-1}} \]
    5. Taylor expanded in x around 0 97.1%

      \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]

    if 3e12 < x

    1. Initial program 82.0%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 74.2%

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} \]
    4. Step-by-step derivation
      1. sub-neg74.2%

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)} \]
      2. mul-1-neg74.2%

        \[\leadsto x \cdot \left(\color{blue}{\left(-\log \left(\frac{1}{x}\right)\right)} + \left(-1\right)\right) \]
      3. log-rec74.2%

        \[\leadsto x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right) \]
      4. remove-double-neg74.2%

        \[\leadsto x \cdot \left(\color{blue}{\log x} + \left(-1\right)\right) \]
      5. metadata-eval74.2%

        \[\leadsto x \cdot \left(\log x + \color{blue}{-1}\right) \]
    5. Simplified74.2%

      \[\leadsto \color{blue}{x \cdot \left(\log x + -1\right)} \]
    6. Step-by-step derivation
      1. add-cube-cbrt73.3%

        \[\leadsto \color{blue}{\left(\sqrt[3]{x \cdot \left(\log x + -1\right)} \cdot \sqrt[3]{x \cdot \left(\log x + -1\right)}\right) \cdot \sqrt[3]{x \cdot \left(\log x + -1\right)}} \]
      2. pow373.2%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{x \cdot \left(\log x + -1\right)}\right)}^{3}} \]
    7. Applied egg-rr73.2%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{x \cdot \left(\log x + -1\right)}\right)}^{3}} \]
    8. Step-by-step derivation
      1. rem-cube-cbrt74.2%

        \[\leadsto \color{blue}{x \cdot \left(\log x + -1\right)} \]
      2. distribute-rgt-in74.2%

        \[\leadsto \color{blue}{\log x \cdot x + -1 \cdot x} \]
      3. neg-mul-174.2%

        \[\leadsto \log x \cdot x + \color{blue}{\left(-x\right)} \]
    9. Applied egg-rr74.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 3000000000000:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \log x - x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 64.3% accurate, 9.5× speedup?

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

\\
\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}
\end{array}
Derivation
  1. Initial program 91.3%

    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. clear-num91.3%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{1}{\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}}} \]
    2. inv-pow91.3%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}\right)}^{-1}} \]
    3. *-commutative91.3%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)} + 0.083333333333333}\right)}^{-1} \]
    4. fma-udef91.3%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{\mathsf{fma}\left(z, \left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778, 0.083333333333333\right)}}\right)}^{-1} \]
    5. fma-neg91.3%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)}, 0.083333333333333\right)}\right)}^{-1} \]
    6. metadata-eval91.3%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}\right)}^{-1} \]
  4. Applied egg-rr91.3%

    \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}\right)}^{-1}} \]
  5. Taylor expanded in x around 0 61.5%

    \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
  6. Final simplification61.5%

    \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} \]
  7. Add Preprocessing

Alternative 13: 8.1% accurate, 17.6× speedup?

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

\\
\frac{1}{\frac{x}{z} \cdot -359.9999999999971}
\end{array}
Derivation
  1. Initial program 91.3%

    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  2. Add Preprocessing
  3. Taylor expanded in z around inf 35.5%

    \[\leadsto \color{blue}{-0.0027777777777778 \cdot \frac{z}{x} + {z}^{2} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
  4. Taylor expanded in z around 0 9.4%

    \[\leadsto \color{blue}{-0.0027777777777778 \cdot \frac{z}{x}} \]
  5. Step-by-step derivation
    1. associate-*r/9.4%

      \[\leadsto \color{blue}{\frac{-0.0027777777777778 \cdot z}{x}} \]
  6. Applied egg-rr9.4%

    \[\leadsto \color{blue}{\frac{-0.0027777777777778 \cdot z}{x}} \]
  7. Step-by-step derivation
    1. clear-num9.4%

      \[\leadsto \color{blue}{\frac{1}{\frac{x}{-0.0027777777777778 \cdot z}}} \]
    2. inv-pow9.4%

      \[\leadsto \color{blue}{{\left(\frac{x}{-0.0027777777777778 \cdot z}\right)}^{-1}} \]
    3. *-commutative9.4%

      \[\leadsto {\left(\frac{x}{\color{blue}{z \cdot -0.0027777777777778}}\right)}^{-1} \]
  8. Applied egg-rr9.4%

    \[\leadsto \color{blue}{{\left(\frac{x}{z \cdot -0.0027777777777778}\right)}^{-1}} \]
  9. Step-by-step derivation
    1. unpow-19.4%

      \[\leadsto \color{blue}{\frac{1}{\frac{x}{z \cdot -0.0027777777777778}}} \]
    2. *-rgt-identity9.4%

      \[\leadsto \frac{1}{\frac{\color{blue}{x \cdot 1}}{z \cdot -0.0027777777777778}} \]
    3. times-frac9.4%

      \[\leadsto \frac{1}{\color{blue}{\frac{x}{z} \cdot \frac{1}{-0.0027777777777778}}} \]
    4. metadata-eval9.4%

      \[\leadsto \frac{1}{\frac{x}{z} \cdot \color{blue}{-359.9999999999971}} \]
  10. Simplified9.4%

    \[\leadsto \color{blue}{\frac{1}{\frac{x}{z} \cdot -359.9999999999971}} \]
  11. Final simplification9.4%

    \[\leadsto \frac{1}{\frac{x}{z} \cdot -359.9999999999971} \]
  12. Add Preprocessing

Alternative 14: 8.2% accurate, 24.6× speedup?

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

\\
-0.0027777777777778 \cdot \frac{z}{x}
\end{array}
Derivation
  1. Initial program 91.3%

    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  2. Add Preprocessing
  3. Taylor expanded in z around inf 35.5%

    \[\leadsto \color{blue}{-0.0027777777777778 \cdot \frac{z}{x} + {z}^{2} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
  4. Taylor expanded in z around 0 9.4%

    \[\leadsto \color{blue}{-0.0027777777777778 \cdot \frac{z}{x}} \]
  5. Final simplification9.4%

    \[\leadsto -0.0027777777777778 \cdot \frac{z}{x} \]
  6. Add Preprocessing

Alternative 15: 8.1% accurate, 24.6× speedup?

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

\\
\frac{-0.0027777777777778}{\frac{x}{z}}
\end{array}
Derivation
  1. Initial program 91.3%

    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  2. Add Preprocessing
  3. Taylor expanded in z around inf 35.5%

    \[\leadsto \color{blue}{-0.0027777777777778 \cdot \frac{z}{x} + {z}^{2} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
  4. Taylor expanded in z around 0 9.4%

    \[\leadsto \color{blue}{-0.0027777777777778 \cdot \frac{z}{x}} \]
  5. Step-by-step derivation
    1. associate-*r/9.4%

      \[\leadsto \color{blue}{\frac{-0.0027777777777778 \cdot z}{x}} \]
  6. Applied egg-rr9.4%

    \[\leadsto \color{blue}{\frac{-0.0027777777777778 \cdot z}{x}} \]
  7. Step-by-step derivation
    1. *-un-lft-identity9.4%

      \[\leadsto \color{blue}{1 \cdot \frac{-0.0027777777777778 \cdot z}{x}} \]
    2. associate-/l*9.4%

      \[\leadsto 1 \cdot \color{blue}{\frac{-0.0027777777777778}{\frac{x}{z}}} \]
  8. Applied egg-rr9.4%

    \[\leadsto \color{blue}{1 \cdot \frac{-0.0027777777777778}{\frac{x}{z}}} \]
  9. Final simplification9.4%

    \[\leadsto \frac{-0.0027777777777778}{\frac{x}{z}} \]
  10. Add Preprocessing

Developer target: 98.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(x - 0.5\right) \cdot \log x + \left(0.91893853320467 - x\right)\right) + \frac{0.083333333333333}{x}\right) + \frac{z}{x} \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  (+ (+ (* (- x 0.5) (log x)) (- 0.91893853320467 x)) (/ 0.083333333333333 x))
  (* (/ z x) (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))))
double code(double x, double y, double z) {
	return ((((x - 0.5) * log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = ((((x - 0.5d0) * log(x)) + (0.91893853320467d0 - x)) + (0.083333333333333d0 / x)) + ((z / x) * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))
end function
public static double code(double x, double y, double z) {
	return ((((x - 0.5) * Math.log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
}
def code(x, y, z):
	return ((((x - 0.5) * math.log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))
function code(x, y, z)
	return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) + Float64(0.91893853320467 - x)) + Float64(0.083333333333333 / x)) + Float64(Float64(z / x) * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778)))
end
function tmp = code(x, y, z)
	tmp = ((((x - 0.5) * log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(z / x), $MachinePrecision] * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(x - 0.5\right) \cdot \log x + \left(0.91893853320467 - x\right)\right) + \frac{0.083333333333333}{x}\right) + \frac{z}{x} \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)
\end{array}

Reproduce

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

  :herbie-target
  (+ (+ (+ (* (- x 0.5) (log x)) (- 0.91893853320467 x)) (/ 0.083333333333333 x)) (* (/ z x) (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))

  (+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ (+ (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z) 0.083333333333333) x)))