?

Average Error: 6.1 → 3.7
Time: 42.9s
Precision: binary64
Cost: 14468

?

\[\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} t_0 := \left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\\ t_1 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t_0 + y \cdot \frac{{z}^{2}}{x}\\ \mathbf{elif}\;t_1 \leq 10^{+258}:\\ \;\;\;\;t_0 + \frac{1}{\frac{x}{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x - 1\right) + \frac{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)))
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467))
        (t_1 (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)))
   (if (<= t_1 (- INFINITY))
     (+ t_0 (* y (/ (pow z 2.0) x)))
     (if (<= t_1 1e+258)
       (+
        t_0
        (/
         1.0
         (/
          x
          (+
           (* z (+ (* z (+ y 0.0007936500793651)) -0.0027777777777778))
           0.083333333333333))))
       (+ (* x (- (log x) 1.0)) (/ 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);
}
double code(double x, double y, double z) {
	double t_0 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
	double t_1 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = t_0 + (y * (pow(z, 2.0) / x));
	} else if (t_1 <= 1e+258) {
		tmp = t_0 + (1.0 / (x / ((z * ((z * (y + 0.0007936500793651)) + -0.0027777777777778)) + 0.083333333333333)));
	} else {
		tmp = (x * (log(x) - 1.0)) + (0.083333333333333 / x);
	}
	return tmp;
}
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);
}
public static double code(double x, double y, double z) {
	double t_0 = (((x - 0.5) * Math.log(x)) - x) + 0.91893853320467;
	double t_1 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = t_0 + (y * (Math.pow(z, 2.0) / x));
	} else if (t_1 <= 1e+258) {
		tmp = t_0 + (1.0 / (x / ((z * ((z * (y + 0.0007936500793651)) + -0.0027777777777778)) + 0.083333333333333)));
	} else {
		tmp = (x * (Math.log(x) - 1.0)) + (0.083333333333333 / x);
	}
	return tmp;
}
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)
def code(x, y, z):
	t_0 = (((x - 0.5) * math.log(x)) - x) + 0.91893853320467
	t_1 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z
	tmp = 0
	if t_1 <= -math.inf:
		tmp = t_0 + (y * (math.pow(z, 2.0) / x))
	elif t_1 <= 1e+258:
		tmp = t_0 + (1.0 / (x / ((z * ((z * (y + 0.0007936500793651)) + -0.0027777777777778)) + 0.083333333333333)))
	else:
		tmp = (x * (math.log(x) - 1.0)) + (0.083333333333333 / x)
	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)
	t_0 = Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467)
	t_1 = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z)
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(t_0 + Float64(y * Float64((z ^ 2.0) / x)));
	elseif (t_1 <= 1e+258)
		tmp = Float64(t_0 + Float64(1.0 / Float64(x / Float64(Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) + -0.0027777777777778)) + 0.083333333333333))));
	else
		tmp = Float64(Float64(x * Float64(log(x) - 1.0)) + Float64(0.083333333333333 / x));
	end
	return tmp
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
function tmp_2 = code(x, y, z)
	t_0 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
	t_1 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = t_0 + (y * ((z ^ 2.0) / x));
	elseif (t_1 <= 1e+258)
		tmp = t_0 + (1.0 / (x / ((z * ((z * (y + 0.0007936500793651)) + -0.0027777777777778)) + 0.083333333333333)));
	else
		tmp = (x * (log(x) - 1.0)) + (0.083333333333333 / x);
	end
	tmp_2 = 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_] := Block[{t$95$0 = N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(t$95$0 + N[(y * N[(N[Power[z, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+258], N[(t$95$0 + N[(1.0 / N[(x / N[(N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] + -0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $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}
t_0 := \left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
t_1 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;t_0 + y \cdot \frac{{z}^{2}}{x}\\

\mathbf{elif}\;t_1 \leq 10^{+258}:\\
\;\;\;\;t_0 + \frac{1}{\frac{x}{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}}\\

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


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original6.1
Target1.4
Herbie3.7
\[\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 3 regimes
  2. if (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < -inf.0

    1. Initial program 64.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. Taylor expanded in y around inf 64.0

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

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

      [Start]64.0

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

      rational.json-simplify-2 [=>]64.0

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

      rational.json-simplify-49 [=>]24.0

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

    if -inf.0 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < 1.00000000000000006e258

    1. Initial program 0.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. Applied egg-rr0.4

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

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

    if 1.00000000000000006e258 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z)

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
    3. Taylor expanded in x around inf 30.7

      \[\leadsto \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \cdot x} + \frac{0.083333333333333}{x} \]
    4. Simplified30.7

      \[\leadsto \color{blue}{x \cdot \left(-1 - \log \left(\frac{1}{x}\right)\right)} + \frac{0.083333333333333}{x} \]
      Proof

      [Start]30.7

      \[ \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \cdot x + \frac{0.083333333333333}{x} \]

      rational.json-simplify-2 [=>]30.7

      \[ \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} + \frac{0.083333333333333}{x} \]

      rational.json-simplify-2 [=>]30.7

      \[ x \cdot \left(\color{blue}{\log \left(\frac{1}{x}\right) \cdot -1} - 1\right) + \frac{0.083333333333333}{x} \]

      rational.json-simplify-9 [=>]30.7

      \[ x \cdot \left(\color{blue}{\left(-\log \left(\frac{1}{x}\right)\right)} - 1\right) + \frac{0.083333333333333}{x} \]

      rational.json-simplify-12 [=>]30.7

      \[ x \cdot \left(\color{blue}{\left(0 - \log \left(\frac{1}{x}\right)\right)} - 1\right) + \frac{0.083333333333333}{x} \]

      rational.json-simplify-42 [=>]30.7

      \[ x \cdot \color{blue}{\left(\left(0 - 1\right) - \log \left(\frac{1}{x}\right)\right)} + \frac{0.083333333333333}{x} \]

      metadata-eval [=>]30.7

      \[ x \cdot \left(\color{blue}{-1} - \log \left(\frac{1}{x}\right)\right) + \frac{0.083333333333333}{x} \]
    5. Taylor expanded in x around 0 30.7

      \[\leadsto \color{blue}{-1 \cdot \left(\left(1 + -1 \cdot \log x\right) \cdot x\right)} + \frac{0.083333333333333}{x} \]
    6. Simplified30.7

      \[\leadsto \color{blue}{x \cdot \left(\log x - 1\right)} + \frac{0.083333333333333}{x} \]
      Proof

      [Start]30.7

      \[ -1 \cdot \left(\left(1 + -1 \cdot \log x\right) \cdot x\right) + \frac{0.083333333333333}{x} \]

      rational.json-simplify-2 [=>]30.7

      \[ -1 \cdot \color{blue}{\left(x \cdot \left(1 + -1 \cdot \log x\right)\right)} + \frac{0.083333333333333}{x} \]

      rational.json-simplify-43 [=>]30.7

      \[ \color{blue}{x \cdot \left(\left(1 + -1 \cdot \log x\right) \cdot -1\right)} + \frac{0.083333333333333}{x} \]

      rational.json-simplify-9 [=>]30.7

      \[ x \cdot \color{blue}{\left(-\left(1 + -1 \cdot \log x\right)\right)} + \frac{0.083333333333333}{x} \]

      rational.json-simplify-12 [=>]30.7

      \[ x \cdot \color{blue}{\left(0 - \left(1 + -1 \cdot \log x\right)\right)} + \frac{0.083333333333333}{x} \]

      rational.json-simplify-17 [=>]30.7

      \[ x \cdot \left(0 - \color{blue}{\left(-1 \cdot \log x - -1\right)}\right) + \frac{0.083333333333333}{x} \]

      rational.json-simplify-2 [=>]30.7

      \[ x \cdot \left(0 - \left(\color{blue}{\log x \cdot -1} - -1\right)\right) + \frac{0.083333333333333}{x} \]

      rational.json-simplify-9 [=>]30.7

      \[ x \cdot \left(0 - \left(\color{blue}{\left(-\log x\right)} - -1\right)\right) + \frac{0.083333333333333}{x} \]

      rational.json-simplify-12 [=>]30.7

      \[ x \cdot \left(0 - \left(\color{blue}{\left(0 - \log x\right)} - -1\right)\right) + \frac{0.083333333333333}{x} \]

      rational.json-simplify-42 [=>]30.7

      \[ x \cdot \left(0 - \color{blue}{\left(\left(0 - -1\right) - \log x\right)}\right) + \frac{0.083333333333333}{x} \]

      metadata-eval [=>]30.7

      \[ x \cdot \left(0 - \left(\color{blue}{1} - \log x\right)\right) + \frac{0.083333333333333}{x} \]

      rational.json-simplify-45 [=>]30.7

      \[ x \cdot \color{blue}{\left(\log x - \left(1 - 0\right)\right)} + \frac{0.083333333333333}{x} \]

      metadata-eval [=>]30.7

      \[ x \cdot \left(\log x - \color{blue}{1}\right) + \frac{0.083333333333333}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification3.7

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

Alternatives

Alternative 1
Error5.7
Cost31436
\[\begin{array}{l} t_0 := x \cdot \left(\log x - 1\right)\\ t_1 := \left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\\ t_2 := \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\ t_3 := t_1 + t_2\\ \mathbf{if}\;t_3 \leq -1 \cdot 10^{+287}:\\ \;\;\;\;\left(0.91893853320467 + -0.5 \cdot \log x\right) + y \cdot \frac{{z}^{2}}{x}\\ \mathbf{elif}\;t_3 \leq 5 \cdot 10^{+49}:\\ \;\;\;\;t_1 + \frac{\frac{2}{x}}{\frac{2}{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}}\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;t_0 + t_2\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 2
Error5.8
Cost23880
\[\begin{array}{l} t_0 := \left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\\ t_1 := t_0 + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\ \mathbf{if}\;t_1 \leq -5 \cdot 10^{+170}:\\ \;\;\;\;\left(0.91893853320467 + -0.5 \cdot \log x\right) + \left(0.0007936500793651 + y\right) \cdot \frac{{z}^{2}}{x}\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;t_0 + \frac{1}{\frac{x}{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x - 1\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 3
Error5.3
Cost23880
\[\begin{array}{l} t_0 := \left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\\ t_1 := t_0 + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\ \mathbf{if}\;t_1 \leq -5 \cdot 10^{+170}:\\ \;\;\;\;t_0 + \left(0.0007936500793651 + y\right) \cdot \frac{{z}^{2}}{x}\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;t_0 + \frac{1}{\frac{x}{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x - 1\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 4
Error3.3
Cost8132
\[\begin{array}{l} \mathbf{if}\;x \leq 2.2 \cdot 10^{+125}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{x} \cdot \left(z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z + -0.0027777777777778\right) + 0.083333333333333\right)\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + x \cdot \left(-1 - \log \left(\frac{1}{x}\right)\right)\\ \end{array} \]
Alternative 5
Error3.3
Cost8132
\[\begin{array}{l} \mathbf{if}\;x \leq 3.3 \cdot 10^{+125}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{\frac{x}{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}}\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + x \cdot \left(-1 - \log \left(\frac{1}{x}\right)\right)\\ \end{array} \]
Alternative 6
Error3.3
Cost8004
\[\begin{array}{l} \mathbf{if}\;x \leq 5.4 \cdot 10^{+125}:\\ \;\;\;\;0.91893853320467 + \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + \frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + x \cdot \left(-1 - \log \left(\frac{1}{x}\right)\right)\\ \end{array} \]
Alternative 7
Error9.4
Cost7752
\[\begin{array}{l} t_0 := 0.91893853320467 + -0.5 \cdot \log x\\ \mathbf{if}\;x \leq 10^{-177}:\\ \;\;\;\;t_0 + \frac{\left(0.0007936500793651 \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\ \mathbf{elif}\;x \leq 1.38 \cdot 10^{-8}:\\ \;\;\;\;t_0 + \frac{\left(z \cdot y - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{x \cdot 12.000000000000048}\\ \end{array} \]
Alternative 8
Error4.3
Cost7748
\[\begin{array}{l} \mathbf{if}\;x \leq 1.25 \cdot 10^{+113}:\\ \;\;\;\;x \cdot \left(\log x - 1\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + x \cdot \left(-1 - \log \left(\frac{1}{x}\right)\right)\\ \end{array} \]
Alternative 9
Error9.3
Cost7620
\[\begin{array}{l} \mathbf{if}\;x \leq 3.55 \cdot 10^{-6}:\\ \;\;\;\;\left(0.91893853320467 + -0.5 \cdot \log x\right) + \frac{\left(0.0007936500793651 \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{x \cdot 12.000000000000048}\\ \end{array} \]
Alternative 10
Error12.1
Cost7488
\[0.91893853320467 + \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + \frac{-0.0027777777777778 \cdot z + 0.083333333333333}{x}\right) \]
Alternative 11
Error12.1
Cost7360
\[0.91893853320467 + \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 24.000000000000096 \cdot \frac{0.0034722222222221943}{x}\right) \]
Alternative 12
Error12.1
Cost7360
\[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{x \cdot 12.000000000000048} \]
Alternative 13
Error12.1
Cost7232
\[0.91893853320467 + \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + \frac{0.083333333333333}{x}\right) \]
Alternative 14
Error12.9
Cost7108
\[\begin{array}{l} \mathbf{if}\;x \leq 1.75:\\ \;\;\;\;0.91893853320467 + 24.000000000000096 \cdot \frac{0.0034722222222221943}{x}\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + x \cdot \left(-1 - \log \left(\frac{1}{x}\right)\right)\\ \end{array} \]
Alternative 15
Error12.9
Cost6976
\[x \cdot \left(\log x - 1\right) + \frac{0.083333333333333}{x} \]
Alternative 16
Error42.6
Cost448
\[0.91893853320467 + 0.083333333333333 \cdot \frac{1}{x} \]
Alternative 17
Error42.6
Cost448
\[0.91893853320467 + 24.000000000000096 \cdot \frac{0.0034722222222221943}{x} \]
Alternative 18
Error43.1
Cost320
\[24.000000000000096 \cdot \frac{0.0034722222222221943}{x} \]
Alternative 19
Error42.6
Cost320
\[0.91893853320467 + \frac{0.083333333333333}{x} \]
Alternative 20
Error43.1
Cost192
\[\frac{0.083333333333333}{x} \]
Alternative 21
Error61.0
Cost64
\[0.91893853320467 \]

Error

Reproduce?

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