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

Percentage Accurate: 94.1% → 99.6%
Time: 16.4s
Alternatives: 22
Speedup: 1.0×

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 22 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, 1.0× speedup?

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

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

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


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

    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
    3. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) + \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x}} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} + \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} + \color{blue}{\left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right)} \]
      4. lift--.f64N/A

        \[\leadsto \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right)} + \frac{91893853320467}{100000000000000}\right) \]
      5. associate-+l-N/A

        \[\leadsto \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} + \color{blue}{\left(\left(x - \frac{1}{2}\right) \cdot \log x - \left(x - \frac{91893853320467}{100000000000000}\right)\right)} \]
      6. associate-+r-N/A

        \[\leadsto \color{blue}{\left(\frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} + \left(x - \frac{1}{2}\right) \cdot \log x\right) - \left(x - \frac{91893853320467}{100000000000000}\right)} \]
      7. lower--.f64N/A

        \[\leadsto \color{blue}{\left(\frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} + \left(x - \frac{1}{2}\right) \cdot \log x\right) - \left(x - \frac{91893853320467}{100000000000000}\right)} \]
    4. Applied rewrites99.7%

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

    if 2e14 < x

    1. Initial program 89.2%

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

      \[\leadsto \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) + \color{blue}{\frac{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x}} \]
    4. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) + \color{blue}{{z}^{2} \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}} \]
      2. unpow2N/A

        \[\leadsto \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) + \color{blue}{\left(z \cdot z\right)} \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x} \]
      3. associate-*l*N/A

        \[\leadsto \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) + \color{blue}{z \cdot \left(z \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}\right)} \]
      4. associate-*r/N/A

        \[\leadsto \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) + z \cdot \color{blue}{\frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x}} \]
      5. lower-*.f64N/A

        \[\leadsto \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) + \color{blue}{z \cdot \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x}} \]
      6. associate-*r/N/A

        \[\leadsto \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) + z \cdot \color{blue}{\left(z \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}\right)} \]
      7. lower-*.f64N/A

        \[\leadsto \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) + z \cdot \color{blue}{\left(z \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}\right)} \]
      8. lower-/.f64N/A

        \[\leadsto \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) + z \cdot \left(z \cdot \color{blue}{\frac{\frac{7936500793651}{10000000000000000} + y}{x}}\right) \]
      9. lower-+.f6499.6

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

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

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} + z \cdot \left(z \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}\right) \]
    7. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(\mathsf{neg}\left(1\right)\right)\right)} + z \cdot \left(z \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}\right) \]
      2. metadata-evalN/A

        \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) + \color{blue}{-1}\right) + z \cdot \left(z \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}\right) \]
      3. distribute-rgt-inN/A

        \[\leadsto \color{blue}{\left(\left(-1 \cdot \log \left(\frac{1}{x}\right)\right) \cdot x + -1 \cdot x\right)} + z \cdot \left(z \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}\right) \]
      4. neg-mul-1N/A

        \[\leadsto \left(\left(-1 \cdot \log \left(\frac{1}{x}\right)\right) \cdot x + \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) + z \cdot \left(z \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}\right) \]
      5. unsub-negN/A

        \[\leadsto \color{blue}{\left(\left(-1 \cdot \log \left(\frac{1}{x}\right)\right) \cdot x - x\right)} + z \cdot \left(z \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}\right) \]
      6. lower--.f64N/A

        \[\leadsto \color{blue}{\left(\left(-1 \cdot \log \left(\frac{1}{x}\right)\right) \cdot x - x\right)} + z \cdot \left(z \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(\color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right)\right)} - x\right) + z \cdot \left(z \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(\color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right)\right)} - x\right) + z \cdot \left(z \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}\right) \]
      9. mul-1-negN/A

        \[\leadsto \left(x \cdot \color{blue}{\left(\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)\right)} - x\right) + z \cdot \left(z \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}\right) \]
      10. log-recN/A

        \[\leadsto \left(x \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log x\right)\right)}\right)\right) - x\right) + z \cdot \left(z \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}\right) \]
      11. remove-double-negN/A

        \[\leadsto \left(x \cdot \color{blue}{\log x} - x\right) + z \cdot \left(z \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}\right) \]
      12. lower-log.f6499.6

        \[\leadsto \left(x \cdot \color{blue}{\log x} - x\right) + z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right) \]
    8. Applied rewrites99.6%

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

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

Alternative 2: 88.7% accurate, 0.3× 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^{+44}:\\ \;\;\;\;z \cdot \left(z \cdot \frac{\left(y + \frac{0.083333333333333}{z \cdot z}\right) + \left(0.0007936500793651 + \frac{-0.0027777777777778}{z}\right)}{x}\right)\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+306}:\\ \;\;\;\;0.91893853320467 + \mathsf{fma}\left(\log x, x + -0.5, \frac{1}{x \cdot 12.000000000000048} - x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\ \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+44)
     (*
      z
      (*
       z
       (/
        (+
         (+ y (/ 0.083333333333333 (* z z)))
         (+ 0.0007936500793651 (/ -0.0027777777777778 z)))
        x)))
     (if (<= t_0 5e+306)
       (+
        0.91893853320467
        (fma (log x) (+ x -0.5) (- (/ 1.0 (* x 12.000000000000048)) x)))
       (* (+ y 0.0007936500793651) (* z (/ z x)))))))
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+44) {
		tmp = z * (z * (((y + (0.083333333333333 / (z * z))) + (0.0007936500793651 + (-0.0027777777777778 / z))) / x));
	} else if (t_0 <= 5e+306) {
		tmp = 0.91893853320467 + fma(log(x), (x + -0.5), ((1.0 / (x * 12.000000000000048)) - x));
	} else {
		tmp = (y + 0.0007936500793651) * (z * (z / x));
	}
	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+44)
		tmp = Float64(z * Float64(z * Float64(Float64(Float64(y + Float64(0.083333333333333 / Float64(z * z))) + Float64(0.0007936500793651 + Float64(-0.0027777777777778 / z))) / x)));
	elseif (t_0 <= 5e+306)
		tmp = Float64(0.91893853320467 + fma(log(x), Float64(x + -0.5), Float64(Float64(1.0 / Float64(x * 12.000000000000048)) - x)));
	else
		tmp = Float64(Float64(y + 0.0007936500793651) * Float64(z * Float64(z / x)));
	end
	return 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+44], N[(z * N[(z * N[(N[(N[(y + N[(0.083333333333333 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0007936500793651 + N[(-0.0027777777777778 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+306], N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision] + N[(N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $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^{+44}:\\
\;\;\;\;z \cdot \left(z \cdot \frac{\left(y + \frac{0.083333333333333}{z \cdot z}\right) + \left(0.0007936500793651 + \frac{-0.0027777777777778}{z}\right)}{x}\right)\\

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+306}:\\
\;\;\;\;0.91893853320467 + \mathsf{fma}\left(\log x, x + -0.5, \frac{1}{x \cdot 12.000000000000048} - x\right)\\

\mathbf{else}:\\
\;\;\;\;\left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x #s(literal 1/2 binary64)) (log.f64 x)) x) #s(literal 91893853320467/100000000000000 binary64)) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) x)) < -2.0000000000000002e44

    1. Initial program 89.2%

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

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \log x \cdot \left(x - \frac{1}{2}\right)\right)\right) - x}{z} + \frac{13888888888889}{5000000000000000} \cdot \frac{1}{x}}{z} + \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} \]
    4. Applied rewrites95.2%

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

      \[\leadsto z \cdot \frac{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \log x \cdot \left(x - \frac{1}{2}\right)\right)\right) - x}{\color{blue}{z}} \]
    6. Step-by-step derivation
      1. Applied rewrites5.6%

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

        \[\leadsto z \cdot \frac{z \cdot \left(\left(\frac{7936500793651}{10000000000000000} + \left(y + \frac{83333333333333}{1000000000000000} \cdot \frac{1}{{z}^{2}}\right)\right) - \frac{13888888888889}{5000000000000000} \cdot \frac{1}{z}\right)}{\color{blue}{x}} \]
      3. Step-by-step derivation
        1. Applied rewrites90.8%

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

        if -2.0000000000000002e44 < (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x #s(literal 1/2 binary64)) (log.f64 x)) x) #s(literal 91893853320467/100000000000000 binary64)) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) x)) < 4.99999999999999993e306

        1. Initial program 99.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. Taylor expanded in z around 0

          \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \log x \cdot \left(x - \frac{1}{2}\right)\right)\right) - x} \]
        4. Step-by-step derivation
          1. associate--l+N/A

            \[\leadsto \color{blue}{\frac{91893853320467}{100000000000000} + \left(\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \log x \cdot \left(x - \frac{1}{2}\right)\right) - x\right)} \]
          2. lower-+.f64N/A

            \[\leadsto \color{blue}{\frac{91893853320467}{100000000000000} + \left(\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \log x \cdot \left(x - \frac{1}{2}\right)\right) - x\right)} \]
          3. +-commutativeN/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \left(\color{blue}{\left(\log x \cdot \left(x - \frac{1}{2}\right) + \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}\right)} - x\right) \]
          4. associate--l+N/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{\left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} - x\right)\right)} \]
          5. lower-fma.f64N/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{\mathsf{fma}\left(\log x, x - \frac{1}{2}, \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} - x\right)} \]
          6. lower-log.f64N/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\color{blue}{\log x}, x - \frac{1}{2}, \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} - x\right) \]
          7. sub-negN/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \color{blue}{x + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} - x\right) \]
          8. metadata-evalN/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, x + \color{blue}{\frac{-1}{2}}, \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} - x\right) \]
          9. +-commutativeN/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \color{blue}{\frac{-1}{2} + x}, \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} - x\right) \]
          10. lower-+.f64N/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \color{blue}{\frac{-1}{2} + x}, \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} - x\right) \]
          11. lower--.f64N/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} - x}\right) \]
          12. associate-*r/N/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{\frac{\frac{83333333333333}{1000000000000000} \cdot 1}{x}} - x\right) \]
          13. metadata-evalN/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \frac{\color{blue}{\frac{83333333333333}{1000000000000000}}}{x} - x\right) \]
          14. lower-/.f6488.0

            \[\leadsto 0.91893853320467 + \mathsf{fma}\left(\log x, -0.5 + x, \color{blue}{\frac{0.083333333333333}{x}} - x\right) \]
        5. Applied rewrites88.0%

          \[\leadsto \color{blue}{0.91893853320467 + \mathsf{fma}\left(\log x, -0.5 + x, \frac{0.083333333333333}{x} - x\right)} \]
        6. Step-by-step derivation
          1. Applied rewrites88.0%

            \[\leadsto 0.91893853320467 + \mathsf{fma}\left(\log x, -0.5 + x, \frac{1}{x \cdot 12.000000000000048} - x\right) \]

          if 4.99999999999999993e306 < (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x #s(literal 1/2 binary64)) (log.f64 x)) x) #s(literal 91893853320467/100000000000000 binary64)) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) x))

          1. Initial program 85.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. lift-+.f64N/A

              \[\leadsto \color{blue}{\left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) + \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x}} \]
            2. +-commutativeN/A

              \[\leadsto \color{blue}{\frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} + \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right)} \]
            3. lift-+.f64N/A

              \[\leadsto \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} + \color{blue}{\left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right)} \]
            4. lift--.f64N/A

              \[\leadsto \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right)} + \frac{91893853320467}{100000000000000}\right) \]
            5. associate-+l-N/A

              \[\leadsto \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} + \color{blue}{\left(\left(x - \frac{1}{2}\right) \cdot \log x - \left(x - \frac{91893853320467}{100000000000000}\right)\right)} \]
            6. associate-+r-N/A

              \[\leadsto \color{blue}{\left(\frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} + \left(x - \frac{1}{2}\right) \cdot \log x\right) - \left(x - \frac{91893853320467}{100000000000000}\right)} \]
            7. lower--.f64N/A

              \[\leadsto \color{blue}{\left(\frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} + \left(x - \frac{1}{2}\right) \cdot \log x\right) - \left(x - \frac{91893853320467}{100000000000000}\right)} \]
          4. Applied rewrites85.1%

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

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

              \[\leadsto \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) \cdot {z}^{2}} \]
            2. lower-*.f64N/A

              \[\leadsto \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) \cdot {z}^{2}} \]
            3. lower-+.f64N/A

              \[\leadsto \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} \cdot {z}^{2} \]
            4. associate-*r/N/A

              \[\leadsto \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}} + \frac{y}{x}\right) \cdot {z}^{2} \]
            5. metadata-evalN/A

              \[\leadsto \left(\frac{\color{blue}{\frac{7936500793651}{10000000000000000}}}{x} + \frac{y}{x}\right) \cdot {z}^{2} \]
            6. lower-/.f64N/A

              \[\leadsto \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000}}{x}} + \frac{y}{x}\right) \cdot {z}^{2} \]
            7. lower-/.f64N/A

              \[\leadsto \left(\frac{\frac{7936500793651}{10000000000000000}}{x} + \color{blue}{\frac{y}{x}}\right) \cdot {z}^{2} \]
            8. unpow2N/A

              \[\leadsto \left(\frac{\frac{7936500793651}{10000000000000000}}{x} + \frac{y}{x}\right) \cdot \color{blue}{\left(z \cdot z\right)} \]
            9. lower-*.f6485.0

              \[\leadsto \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \cdot \color{blue}{\left(z \cdot z\right)} \]
          7. Applied rewrites85.0%

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

            \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
          9. Step-by-step derivation
            1. distribute-rgt-inN/A

              \[\leadsto \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot {z}^{2} + \frac{y}{x} \cdot {z}^{2}} \]
            2. associate-*r/N/A

              \[\leadsto \color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}} \cdot {z}^{2} + \frac{y}{x} \cdot {z}^{2} \]
            3. metadata-evalN/A

              \[\leadsto \frac{\color{blue}{\frac{7936500793651}{10000000000000000}}}{x} \cdot {z}^{2} + \frac{y}{x} \cdot {z}^{2} \]
            4. associate-*l/N/A

              \[\leadsto \color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot {z}^{2}}{x}} + \frac{y}{x} \cdot {z}^{2} \]
            5. associate-*r/N/A

              \[\leadsto \color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{{z}^{2}}{x}} + \frac{y}{x} \cdot {z}^{2} \]
            6. associate-*l/N/A

              \[\leadsto \frac{7936500793651}{10000000000000000} \cdot \frac{{z}^{2}}{x} + \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
            7. associate-/l*N/A

              \[\leadsto \frac{7936500793651}{10000000000000000} \cdot \frac{{z}^{2}}{x} + \color{blue}{y \cdot \frac{{z}^{2}}{x}} \]
            8. distribute-rgt-outN/A

              \[\leadsto \color{blue}{\frac{{z}^{2}}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)} \]
            9. lower-*.f64N/A

              \[\leadsto \color{blue}{\frac{{z}^{2}}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)} \]
            10. unpow2N/A

              \[\leadsto \frac{\color{blue}{z \cdot z}}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) \]
            11. associate-/l*N/A

              \[\leadsto \color{blue}{\left(z \cdot \frac{z}{x}\right)} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) \]
            12. lower-*.f64N/A

              \[\leadsto \color{blue}{\left(z \cdot \frac{z}{x}\right)} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) \]
            13. lower-/.f64N/A

              \[\leadsto \left(z \cdot \color{blue}{\frac{z}{x}}\right) \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) \]
            14. lower-+.f6489.3

              \[\leadsto \left(z \cdot \frac{z}{x}\right) \cdot \color{blue}{\left(0.0007936500793651 + y\right)} \]
          10. Applied rewrites89.3%

            \[\leadsto \color{blue}{\left(z \cdot \frac{z}{x}\right) \cdot \left(0.0007936500793651 + y\right)} \]
        7. Recombined 3 regimes into one program.
        8. Final simplification88.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^{+44}:\\ \;\;\;\;z \cdot \left(z \cdot \frac{\left(y + \frac{0.083333333333333}{z \cdot z}\right) + \left(0.0007936500793651 + \frac{-0.0027777777777778}{z}\right)}{x}\right)\\ \mathbf{elif}\;\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 5 \cdot 10^{+306}:\\ \;\;\;\;0.91893853320467 + \mathsf{fma}\left(\log x, x + -0.5, \frac{1}{x \cdot 12.000000000000048} - x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\ \end{array} \]
        9. Add Preprocessing

        Developer Target 1: 98.7% accurate, 0.9× 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 2024228 
        (FPCore (x y z)
          :name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
          :precision binary64
        
          :alt
          (! :herbie-platform default (+ (+ (+ (* (- x 1/2) (log x)) (- 91893853320467/100000000000000 x)) (/ 83333333333333/1000000000000000 x)) (* (/ z x) (- (* z (+ y 7936500793651/10000000000000000)) 13888888888889/5000000000000000))))
        
          (+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ (+ (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z) 0.083333333333333) x)))