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

Percentage Accurate: 93.3% → 99.5%
Time: 15.7s
Alternatives: 11
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 11 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: 93.3% 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.5% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 620000000:\\
\;\;\;\;\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}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(\frac{0.083333333333333}{x} + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\right)\right)\\


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

    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. Step-by-step derivation
      1. sub-neg99.7%

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

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

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

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

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

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

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

        \[\leadsto \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} \]
      9. fma-def99.7%

        \[\leadsto \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} \]
      10. fma-neg99.7%

        \[\leadsto \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} \]
      11. metadata-eval99.7%

        \[\leadsto \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} \]
    3. 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}} \]
    4. Add Preprocessing

    if 6.2e8 < x

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(-0.0027777777777778 \cdot \frac{z}{x} + \left(0.083333333333333 \cdot \frac{1}{x} + \frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-+r+91.1%

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

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{0.083333333333333}{x} + \color{blue}{\mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}\right)}\right) \]
      7. associate-/l*92.7%

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

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{0.083333333333333}{x} + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \frac{\color{blue}{z \cdot z}}{x} \cdot \left(0.0007936500793651 + y\right)\right)\right) \]
      2. *-un-lft-identity92.7%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 620000000:\\ \;\;\;\;\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}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \left(\frac{0.083333333333333}{x} + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 99.6% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(\frac{0.083333333333333}{x} + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\right)\right)\\


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

    1. Initial program 99.7%

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

    if 1e17 < x

    1. Initial program 91.0%

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(-0.0027777777777778 \cdot \frac{z}{x} + \left(0.083333333333333 \cdot \frac{1}{x} + \frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-+r+91.0%

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

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{0.083333333333333}{x} + \color{blue}{\mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}\right)}\right) \]
      7. associate-/l*92.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 99.6% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.7%

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

    if 2e27 < x

    1. Initial program 90.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. Taylor expanded in x around inf 90.8%

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    4. Step-by-step derivation
      1. sub-neg99.7%

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

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

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

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

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

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

      \[\leadsto x \cdot \left(\log x + -1\right) + \color{blue}{\frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}} \]
    7. Step-by-step derivation
      1. associate-/l*92.4%

        \[\leadsto x \cdot \left(\log x + -1\right) + \color{blue}{\frac{{z}^{2}}{\frac{x}{0.0007936500793651 + y}}} \]
    8. Simplified92.4%

      \[\leadsto x \cdot \left(\log x + -1\right) + \color{blue}{\frac{{z}^{2}}{\frac{x}{0.0007936500793651 + y}}} \]
    9. Step-by-step derivation
      1. unpow292.4%

        \[\leadsto x \cdot \left(\log x + -1\right) + \frac{\color{blue}{z \cdot z}}{\frac{x}{0.0007936500793651 + y}} \]
      2. *-un-lft-identity92.4%

        \[\leadsto x \cdot \left(\log x + -1\right) + \frac{z \cdot z}{\color{blue}{1 \cdot \frac{x}{0.0007936500793651 + y}}} \]
      3. times-frac99.7%

        \[\leadsto x \cdot \left(\log x + -1\right) + \color{blue}{\frac{z}{1} \cdot \frac{z}{\frac{x}{0.0007936500793651 + y}}} \]
    10. Applied egg-rr99.7%

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

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

Alternative 4: 98.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \left(\log x + -1\right)\\ \mathbf{if}\;z \leq -300000000000 \lor \neg \left(z \leq 5.2 \cdot 10^{-6}\right):\\ \;\;\;\;t_0 + z \cdot \frac{z}{\frac{x}{y + 0.0007936500793651}}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (* x (+ (log x) -1.0))))
   (if (or (<= z -300000000000.0) (not (<= z 5.2e-6)))
     (+ t_0 (* z (/ z (/ x (+ y 0.0007936500793651)))))
     (+
      t_0
      (/ (+ 0.083333333333333 (* z (- (* z y) 0.0027777777777778))) x)))))
double code(double x, double y, double z) {
	double t_0 = x * (log(x) + -1.0);
	double tmp;
	if ((z <= -300000000000.0) || !(z <= 5.2e-6)) {
		tmp = t_0 + (z * (z / (x / (y + 0.0007936500793651))));
	} else {
		tmp = t_0 + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x * (log(x) + (-1.0d0))
    if ((z <= (-300000000000.0d0)) .or. (.not. (z <= 5.2d-6))) then
        tmp = t_0 + (z * (z / (x / (y + 0.0007936500793651d0))))
    else
        tmp = t_0 + ((0.083333333333333d0 + (z * ((z * y) - 0.0027777777777778d0))) / x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = x * (Math.log(x) + -1.0);
	double tmp;
	if ((z <= -300000000000.0) || !(z <= 5.2e-6)) {
		tmp = t_0 + (z * (z / (x / (y + 0.0007936500793651))));
	} else {
		tmp = t_0 + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x);
	}
	return tmp;
}
def code(x, y, z):
	t_0 = x * (math.log(x) + -1.0)
	tmp = 0
	if (z <= -300000000000.0) or not (z <= 5.2e-6):
		tmp = t_0 + (z * (z / (x / (y + 0.0007936500793651))))
	else:
		tmp = t_0 + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x)
	return tmp
function code(x, y, z)
	t_0 = Float64(x * Float64(log(x) + -1.0))
	tmp = 0.0
	if ((z <= -300000000000.0) || !(z <= 5.2e-6))
		tmp = Float64(t_0 + Float64(z * Float64(z / Float64(x / Float64(y + 0.0007936500793651)))));
	else
		tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * y) - 0.0027777777777778))) / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = x * (log(x) + -1.0);
	tmp = 0.0;
	if ((z <= -300000000000.0) || ~((z <= 5.2e-6)))
		tmp = t_0 + (z * (z / (x / (y + 0.0007936500793651))));
	else
		tmp = t_0 + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -300000000000.0], N[Not[LessEqual[z, 5.2e-6]], $MachinePrecision]], N[(t$95$0 + N[(z * N[(z / N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(z * y), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;z \leq -300000000000 \lor \neg \left(z \leq 5.2 \cdot 10^{-6}\right):\\
\;\;\;\;t_0 + z \cdot \frac{z}{\frac{x}{y + 0.0007936500793651}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3e11 or 5.20000000000000019e-6 < z

    1. Initial program 91.8%

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

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    4. Step-by-step derivation
      1. sub-neg83.5%

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

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

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

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

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

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

      \[\leadsto x \cdot \left(\log x + -1\right) + \color{blue}{\frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}} \]
    7. Step-by-step derivation
      1. associate-/l*92.7%

        \[\leadsto x \cdot \left(\log x + -1\right) + \color{blue}{\frac{{z}^{2}}{\frac{x}{0.0007936500793651 + y}}} \]
    8. Simplified92.7%

      \[\leadsto x \cdot \left(\log x + -1\right) + \color{blue}{\frac{{z}^{2}}{\frac{x}{0.0007936500793651 + y}}} \]
    9. Step-by-step derivation
      1. unpow292.7%

        \[\leadsto x \cdot \left(\log x + -1\right) + \frac{\color{blue}{z \cdot z}}{\frac{x}{0.0007936500793651 + y}} \]
      2. *-un-lft-identity92.7%

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

        \[\leadsto x \cdot \left(\log x + -1\right) + \color{blue}{\frac{z}{1} \cdot \frac{z}{\frac{x}{0.0007936500793651 + y}}} \]
    10. Applied egg-rr99.1%

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

    if -3e11 < z < 5.20000000000000019e-6

    1. Initial program 99.5%

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

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    4. Step-by-step derivation
      1. sub-neg96.6%

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

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

        \[\leadsto x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right) + \left(\frac{0.083333333333333}{x} + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \left(\frac{z}{1} \cdot \frac{z}{x}\right) \cdot \left(0.0007936500793651 + y\right)\right)\right) \]
      4. remove-double-neg96.6%

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

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

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

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

        \[\leadsto x \cdot \left(\log x + -1\right) + \frac{\left(\color{blue}{z \cdot y} - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    8. Simplified96.4%

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

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

Alternative 5: 98.5% accurate, 1.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t_0 + z \cdot \frac{z}{\frac{x}{y + 0.0007936500793651}}\\


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

    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. Taylor expanded in x around inf 96.5%

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    4. Step-by-step derivation
      1. sub-neg82.7%

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)} + \left(\frac{0.083333333333333}{x} + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \left(\frac{z}{1} \cdot \frac{z}{x}\right) \cdot \left(0.0007936500793651 + y\right)\right)\right) \]
      2. mul-1-neg82.7%

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

        \[\leadsto x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right) + \left(\frac{0.083333333333333}{x} + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \left(\frac{z}{1} \cdot \frac{z}{x}\right) \cdot \left(0.0007936500793651 + y\right)\right)\right) \]
      4. remove-double-neg82.7%

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

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

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

    if 2.0000000000000001e26 < x

    1. Initial program 90.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. Taylor expanded in x around inf 90.8%

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    4. Step-by-step derivation
      1. sub-neg99.7%

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

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

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

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

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

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

      \[\leadsto x \cdot \left(\log x + -1\right) + \color{blue}{\frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}} \]
    7. Step-by-step derivation
      1. associate-/l*92.4%

        \[\leadsto x \cdot \left(\log x + -1\right) + \color{blue}{\frac{{z}^{2}}{\frac{x}{0.0007936500793651 + y}}} \]
    8. Simplified92.4%

      \[\leadsto x \cdot \left(\log x + -1\right) + \color{blue}{\frac{{z}^{2}}{\frac{x}{0.0007936500793651 + y}}} \]
    9. Step-by-step derivation
      1. unpow292.4%

        \[\leadsto x \cdot \left(\log x + -1\right) + \frac{\color{blue}{z \cdot z}}{\frac{x}{0.0007936500793651 + y}} \]
      2. *-un-lft-identity92.4%

        \[\leadsto x \cdot \left(\log x + -1\right) + \frac{z \cdot z}{\color{blue}{1 \cdot \frac{x}{0.0007936500793651 + y}}} \]
      3. times-frac99.7%

        \[\leadsto x \cdot \left(\log x + -1\right) + \color{blue}{\frac{z}{1} \cdot \frac{z}{\frac{x}{0.0007936500793651 + y}}} \]
    10. Applied egg-rr99.7%

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

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

Alternative 6: 98.9% accurate, 1.0× speedup?

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

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

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


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

    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. Taylor expanded in x around 0 99.5%

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

    if 0.13 < x

    1. Initial program 91.5%

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

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    4. Step-by-step derivation
      1. sub-neg97.8%

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)} + \left(\frac{0.083333333333333}{x} + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \left(\frac{z}{1} \cdot \frac{z}{x}\right) \cdot \left(0.0007936500793651 + y\right)\right)\right) \]
      2. mul-1-neg97.8%

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

        \[\leadsto x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right) + \left(\frac{0.083333333333333}{x} + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \left(\frac{z}{1} \cdot \frac{z}{x}\right) \cdot \left(0.0007936500793651 + y\right)\right)\right) \]
      4. remove-double-neg97.8%

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

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

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

      \[\leadsto x \cdot \left(\log x + -1\right) + \color{blue}{\frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}} \]
    7. Step-by-step derivation
      1. associate-/l*91.1%

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

      \[\leadsto x \cdot \left(\log x + -1\right) + \color{blue}{\frac{{z}^{2}}{\frac{x}{0.0007936500793651 + y}}} \]
    9. Step-by-step derivation
      1. unpow291.1%

        \[\leadsto x \cdot \left(\log x + -1\right) + \frac{\color{blue}{z \cdot z}}{\frac{x}{0.0007936500793651 + y}} \]
      2. *-un-lft-identity91.1%

        \[\leadsto x \cdot \left(\log x + -1\right) + \frac{z \cdot z}{\color{blue}{1 \cdot \frac{x}{0.0007936500793651 + y}}} \]
      3. times-frac97.7%

        \[\leadsto x \cdot \left(\log x + -1\right) + \color{blue}{\frac{z}{1} \cdot \frac{z}{\frac{x}{0.0007936500793651 + y}}} \]
    10. Applied egg-rr97.7%

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

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

Alternative 7: 95.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{-5} \lor \neg \left(z \leq 2.4 \cdot 10^{-67}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + z \cdot \frac{z}{\frac{x}{y + 0.0007936500793651}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.20000000000000018e-5 or 2.4e-67 < z

    1. Initial program 92.5%

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

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    4. Step-by-step derivation
      1. sub-neg84.4%

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)} + \left(\frac{0.083333333333333}{x} + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \left(\frac{z}{1} \cdot \frac{z}{x}\right) \cdot \left(0.0007936500793651 + y\right)\right)\right) \]
      2. mul-1-neg84.4%

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

        \[\leadsto x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right) + \left(\frac{0.083333333333333}{x} + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \left(\frac{z}{1} \cdot \frac{z}{x}\right) \cdot \left(0.0007936500793651 + y\right)\right)\right) \]
      4. remove-double-neg84.4%

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

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

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

      \[\leadsto x \cdot \left(\log x + -1\right) + \color{blue}{\frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}} \]
    7. Step-by-step derivation
      1. associate-/l*91.9%

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

      \[\leadsto x \cdot \left(\log x + -1\right) + \color{blue}{\frac{{z}^{2}}{\frac{x}{0.0007936500793651 + y}}} \]
    9. Step-by-step derivation
      1. unpow291.9%

        \[\leadsto x \cdot \left(\log x + -1\right) + \frac{\color{blue}{z \cdot z}}{\frac{x}{0.0007936500793651 + y}} \]
      2. *-un-lft-identity91.9%

        \[\leadsto x \cdot \left(\log x + -1\right) + \frac{z \cdot z}{\color{blue}{1 \cdot \frac{x}{0.0007936500793651 + y}}} \]
      3. times-frac97.8%

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

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

    if -7.20000000000000018e-5 < z < 2.4e-67

    1. Initial program 99.5%

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\color{blue}{\left(x \cdot \frac{1}{0.083333333333333}\right)}}^{-1} \]
      4. metadata-eval93.7%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(x \cdot \color{blue}{12.000000000000048}\right)}^{-1} \]
    5. Applied egg-rr93.7%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(x \cdot 12.000000000000048\right)}^{-1}} \]
    6. Step-by-step derivation
      1. unpow-193.7%

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

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

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

Alternative 8: 61.4% accurate, 1.1× speedup?

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

\\
x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}
\end{array}
Derivation
  1. Initial program 95.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. Taylor expanded in x around inf 94.0%

    \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  4. Step-by-step derivation
    1. sub-neg90.2%

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

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

      \[\leadsto x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right) + \left(\frac{0.083333333333333}{x} + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \left(\frac{z}{1} \cdot \frac{z}{x}\right) \cdot \left(0.0007936500793651 + y\right)\right)\right) \]
    4. remove-double-neg90.2%

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

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

    \[\leadsto \color{blue}{x \cdot \left(\log x + -1\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  6. Taylor expanded in z around 0 61.1%

    \[\leadsto x \cdot \left(\log x + -1\right) + \frac{\color{blue}{-0.0027777777777778 \cdot z} + 0.083333333333333}{x} \]
  7. Final simplification61.1%

    \[\leadsto x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x} \]
  8. Add Preprocessing

Alternative 9: 55.9% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 5.9 \cdot 10^{-8}:\\
\;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + -0.5 \cdot \log x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 5.8999999999999999e-8

    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. Taylor expanded in z around 0 38.2%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
    4. Taylor expanded in x around 0 38.2%

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

    if 5.8999999999999999e-8 < x

    1. Initial program 91.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. Step-by-step derivation
      1. sub-neg91.7%

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

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

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

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

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

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

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

        \[\leadsto \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} \]
      9. fma-def91.8%

        \[\leadsto \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} \]
      10. fma-neg91.8%

        \[\leadsto \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} \]
      11. metadata-eval91.8%

        \[\leadsto \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} \]
    3. Simplified91.8%

      \[\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}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 72.1%

      \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\color{blue}{0.083333333333333}}{x} \]
    6. Taylor expanded in x around inf 70.4%

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

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

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

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

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

        \[\leadsto x \cdot \left(\log x + \color{blue}{-1}\right) \]
    8. Simplified70.4%

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

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

Alternative 10: 55.8% accurate, 1.1× speedup?

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

\\
\frac{0.083333333333333}{x} + \left(0.91893853320467 + \left(x \cdot \log x - x\right)\right)
\end{array}
Derivation
  1. Initial program 95.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. Taylor expanded in z around 0 54.9%

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

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

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

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

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

      \[\leadsto \left(\left(x \cdot \color{blue}{\log x} - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
  6. Simplified53.5%

    \[\leadsto \left(\left(\color{blue}{x \cdot \log x} - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
  7. Final simplification53.5%

    \[\leadsto \frac{0.083333333333333}{x} + \left(0.91893853320467 + \left(x \cdot \log x - x\right)\right) \]
  8. Add Preprocessing

Alternative 11: 35.5% accurate, 1.2× speedup?

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

\\
x \cdot \left(\log x + -1\right)
\end{array}
Derivation
  1. Initial program 95.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. Step-by-step derivation
    1. sub-neg95.7%

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

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

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

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

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

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

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

      \[\leadsto \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} \]
    9. fma-def95.8%

      \[\leadsto \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} \]
    10. fma-neg95.8%

      \[\leadsto \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} \]
    11. metadata-eval95.8%

      \[\leadsto \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} \]
  3. Simplified95.8%

    \[\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}} \]
  4. Add Preprocessing
  5. Taylor expanded in z around 0 54.9%

    \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\color{blue}{0.083333333333333}}{x} \]
  6. Taylor expanded in x around inf 35.4%

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

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

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

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

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

      \[\leadsto x \cdot \left(\log x + \color{blue}{-1}\right) \]
  8. Simplified35.4%

    \[\leadsto \color{blue}{x \cdot \left(\log x + -1\right)} \]
  9. Final simplification35.4%

    \[\leadsto x \cdot \left(\log x + -1\right) \]
  10. Add Preprocessing

Developer target: 98.5% accurate, 1.0× speedup?

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

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

Reproduce

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