Average Error: 5.8 → 0.4
Time: 5.5s
Precision: binary64
\[\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 4529838.128365544:\\ \;\;\;\;\sqrt[3]{\log x \cdot \left(x - 0.5\right)} \cdot \left(\sqrt[3]{\log x \cdot \left(x - 0.5\right)} \cdot \sqrt[3]{\log x \cdot \left(x - 0.5\right)}\right) + \left(0.91893853320467 + \left(\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x} - x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x - 0.5\right) \cdot \log \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) + \left(\left(\left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right) - 0.0027777777777778 \cdot \frac{z}{x}\right) + \left(\left(0.91893853320467 - x\right) + \left(x - 0.5\right) \cdot \log \left(\sqrt[3]{x}\right)\right)\right)\\ \end{array}\]
\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 4529838.128365544:\\
\;\;\;\;\sqrt[3]{\log x \cdot \left(x - 0.5\right)} \cdot \left(\sqrt[3]{\log x \cdot \left(x - 0.5\right)} \cdot \sqrt[3]{\log x \cdot \left(x - 0.5\right)}\right) + \left(0.91893853320467 + \left(\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x} - x\right)\right)\\

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

\end{array}
double code(double x, double y, double z) {
	return ((double) (((double) (((double) (((double) (((double) (x - 0.5)) * ((double) log(x)))) - x)) + 0.91893853320467)) + (((double) (((double) (((double) (((double) (((double) (y + 0.0007936500793651)) * z)) - 0.0027777777777778)) * z)) + 0.083333333333333)) / x)));
}
double code(double x, double y, double z) {
	double VAR;
	if ((x <= 4529838.128365544)) {
		VAR = ((double) (((double) (((double) cbrt(((double) (((double) log(x)) * ((double) (x - 0.5)))))) * ((double) (((double) cbrt(((double) (((double) log(x)) * ((double) (x - 0.5)))))) * ((double) cbrt(((double) (((double) log(x)) * ((double) (x - 0.5)))))))))) + ((double) (0.91893853320467 + ((double) ((((double) (((double) (z * ((double) (((double) (z * ((double) (y + 0.0007936500793651)))) - 0.0027777777777778)))) + 0.083333333333333)) / x) - x))))));
	} else {
		VAR = ((double) (((double) (((double) (x - 0.5)) * ((double) log(((double) (((double) cbrt(x)) * ((double) cbrt(x)))))))) + ((double) (((double) (((double) (((double) (y + 0.0007936500793651)) * ((double) (z * (z / x))))) - ((double) (0.0027777777777778 * (z / x))))) + ((double) (((double) (0.91893853320467 - x)) + ((double) (((double) (x - 0.5)) * ((double) log(((double) cbrt(x))))))))))));
	}
	return VAR;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original5.8
Target1.1
Herbie0.4
\[\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 < 4529838.12836554367

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

      \[\leadsto \color{blue}{\left(x - 0.5\right) \cdot \log x + \left(0.91893853320467 + \left(\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} - x\right)\right)}\]
    3. Using strategy rm
    4. Applied add-cube-cbrt0.2

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

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

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

    if 4529838.12836554367 < x

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

      \[\leadsto \color{blue}{\left(x - 0.5\right) \cdot \log x + \left(0.91893853320467 + \left(\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} - x\right)\right)}\]
    3. Using strategy rm
    4. Applied add-cube-cbrt10.1

      \[\leadsto \left(x - 0.5\right) \cdot \log \color{blue}{\left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}\right)} + \left(0.91893853320467 + \left(\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} - x\right)\right)\]
    5. Applied log-prod10.2

      \[\leadsto \left(x - 0.5\right) \cdot \color{blue}{\left(\log \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) + \log \left(\sqrt[3]{x}\right)\right)} + \left(0.91893853320467 + \left(\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} - x\right)\right)\]
    6. Applied distribute-lft-in10.2

      \[\leadsto \color{blue}{\left(\left(x - 0.5\right) \cdot \log \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) + \left(x - 0.5\right) \cdot \log \left(\sqrt[3]{x}\right)\right)} + \left(0.91893853320467 + \left(\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} - x\right)\right)\]
    7. Applied associate-+l+10.2

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

      \[\leadsto \left(x - 0.5\right) \cdot \log \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) + \color{blue}{\left(\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(\left(0.91893853320467 - x\right) + \left(x - 0.5\right) \cdot \log \left(\sqrt[3]{x}\right)\right)\right)}\]
    9. Taylor expanded around inf 10.2

      \[\leadsto \left(x - 0.5\right) \cdot \log \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) + \left(\color{blue}{\left(\left(0.0007936500793651 \cdot \frac{{z}^{2}}{x} + \frac{{z}^{2} \cdot y}{x}\right) - 0.0027777777777778 \cdot \frac{z}{x}\right)} + \left(\left(0.91893853320467 - x\right) + \left(x - 0.5\right) \cdot \log \left(\sqrt[3]{x}\right)\right)\right)\]
    10. Simplified0.5

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

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

Reproduce

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