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

?

Percentage Accurate: 93.7% → 99.6%
Time: 23.7s
Precision: binary64
Cost: 26820

?

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

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


\end{array}

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.

Herbie found 16 alternatives:

AlternativeAccuracySpeedup

Accuracy vs Speed

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.

Bogosity?

Bogosity

Target

Original93.7%
Target98.6%
Herbie99.6%
\[\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) \]

Derivation?

  1. Split input into 2 regimes
  2. if x < 2e20

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

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

      [Start]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} \]

      remove-double-neg [<=]99.7%

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

      sub-neg [=>]99.7%

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

      associate-+l+ [=>]99.7%

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

      fma-def [=>]99.7%

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

      sub-neg [=>]99.7%

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

      metadata-eval [=>]99.7%

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

      +-commutative [=>]99.7%

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

      unsub-neg [=>]99.7%

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

      remove-double-neg [=>]99.7%

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

      *-commutative [=>]99.7%

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

      fma-def [=>]99.7%

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

      fma-neg [=>]99.7%

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

      metadata-eval [=>]99.7%

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

    if 2e20 < x

    1. Initial program 89.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. Taylor expanded in z around inf 87.8%

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{z \cdot z}{x} \cdot \left(0.0007936500793651 + y\right)} \]
      Step-by-step derivation

      [Start]87.8%

      \[ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x} \]

      associate-/l* [=>]91.0%

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

      +-commutative [<=]91.0%

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

      associate-/r/ [=>]91.8%

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

      unpow2 [=>]91.8%

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

      +-commutative [=>]91.8%

      \[ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{z \cdot z}{x} \cdot \color{blue}{\left(0.0007936500793651 + y\right)} \]
    4. Taylor expanded in z around 0 91.8%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{{z}^{2}}{x}} \cdot \left(0.0007936500793651 + y\right) \]
    5. Simplified98.9%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{z}{\frac{x}{z}}} \cdot \left(0.0007936500793651 + y\right) \]
      Step-by-step derivation

      [Start]91.8%

      \[ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{{z}^{2}}{x} \cdot \left(0.0007936500793651 + y\right) \]

      unpow2 [=>]91.8%

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

      associate-/l* [=>]98.9%

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.0007936500793651 + y}{\frac{\frac{x}{z}}{z}}} \]
      Step-by-step derivation

      [Start]98.9%

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

      *-commutative [=>]98.9%

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

      clear-num [=>]98.9%

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

      un-div-inv [=>]99.5%

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

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

Alternatives

Alternative 1
Accuracy99.6%
Cost26820
\[\begin{array}{l} \mathbf{if}\;x \leq 2 \cdot 10^{+20}:\\ \;\;\;\;\mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{y + 0.0007936500793651}{\frac{\frac{x}{z}}{z}}\\ \end{array} \]
Alternative 2
Accuracy99.5%
Cost8004
\[\begin{array}{l} t_0 := 0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\\ \mathbf{if}\;x \leq 5000:\\ \;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{y + 0.0007936500793651}{\frac{\frac{x}{z}}{z}}\\ \end{array} \]
Alternative 3
Accuracy97.9%
Cost7753
\[\begin{array}{l} t_0 := x \cdot \left(\log x + -1\right)\\ \mathbf{if}\;z \leq -1.9 \cdot 10^{+16} \lor \neg \left(z \leq 7.6\right):\\ \;\;\;\;t_0 + \left(y + 0.0007936500793651\right) \cdot \frac{z}{\frac{x}{z}}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x}\\ \end{array} \]
Alternative 4
Accuracy98.3%
Cost7748
\[\begin{array}{l} t_0 := x \cdot \left(\log x + -1\right)\\ \mathbf{if}\;x \leq 3.5 \cdot 10^{+58}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + t_0\\ \mathbf{else}:\\ \;\;\;\;t_0 + \left(y + 0.0007936500793651\right) \cdot \frac{z}{\frac{x}{z}}\\ \end{array} \]
Alternative 5
Accuracy98.7%
Cost7748
\[\begin{array}{l} \mathbf{if}\;x \leq 0.37:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + x \cdot \left(\log x + -1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\ \end{array} \]
Alternative 6
Accuracy98.7%
Cost7748
\[\begin{array}{l} \mathbf{if}\;x \leq 0.37:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + x \cdot \left(\log x + -1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{y + 0.0007936500793651}{\frac{\frac{x}{z}}{z}}\\ \end{array} \]
Alternative 7
Accuracy95.8%
Cost7625
\[\begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{-50} \lor \neg \left(z \leq 3.7 \cdot 10^{-16}\right):\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z}{\frac{x}{z}}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 8
Accuracy97.9%
Cost7625
\[\begin{array}{l} t_0 := x \cdot \left(\log x + -1\right)\\ \mathbf{if}\;z \leq -1.9 \cdot 10^{+16} \lor \neg \left(z \leq 6.4\right):\\ \;\;\;\;t_0 + \left(y + 0.0007936500793651\right) \cdot \frac{z}{\frac{x}{z}}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot y\right)}{x}\\ \end{array} \]
Alternative 9
Accuracy81.4%
Cost7496
\[\begin{array}{l} \mathbf{if}\;z \leq -6800000000000:\\ \;\;\;\;\left(z \cdot z\right) \cdot \frac{y + 0.0007936500793651}{x}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(y + 0.0007936500793651\right) \cdot {z}^{2}}{x}\\ \end{array} \]
Alternative 10
Accuracy82.4%
Cost7496
\[\begin{array}{l} \mathbf{if}\;z \leq -680000000000:\\ \;\;\;\;\left(z \cdot z\right) \cdot \frac{y + 0.0007936500793651}{x}\\ \mathbf{elif}\;z \leq 8.4 \cdot 10^{+61}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(y + 0.0007936500793651\right) \cdot {z}^{2}}{x}\\ \end{array} \]
Alternative 11
Accuracy81.4%
Cost7368
\[\begin{array}{l} \mathbf{if}\;z \leq -37000000000:\\ \;\;\;\;\left(z \cdot z\right) \cdot \frac{y + 0.0007936500793651}{x}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+61}:\\ \;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + \left(x \cdot \log x - x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(y + 0.0007936500793651\right) \cdot {z}^{2}}{x}\\ \end{array} \]
Alternative 12
Accuracy81.4%
Cost7240
\[\begin{array}{l} \mathbf{if}\;z \leq -1320000000000:\\ \;\;\;\;\left(z \cdot z\right) \cdot \frac{y + 0.0007936500793651}{x}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+61}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(y + 0.0007936500793651\right) \cdot {z}^{2}}{x}\\ \end{array} \]
Alternative 13
Accuracy60.1%
Cost841
\[\begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{-28} \lor \neg \left(z \leq 1.35 \cdot 10^{-13}\right):\\ \;\;\;\;\left(z \cdot z\right) \cdot \frac{y + 0.0007936500793651}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 14
Accuracy48.4%
Cost713
\[\begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{-27} \lor \neg \left(z \leq 1.15 \cdot 10^{-13}\right):\\ \;\;\;\;z \cdot \left(y \cdot \frac{z}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 15
Accuracy48.3%
Cost713
\[\begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{-50} \lor \neg \left(z \leq 8.2 \cdot 10^{-16}\right):\\ \;\;\;\;\frac{y \cdot \left(z \cdot z\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 16
Accuracy23.6%
Cost192
\[\frac{0.083333333333333}{x} \]

Reproduce?

herbie shell --seed 2023263 
(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)))