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

Percentage Accurate: 93.9% → 99.6%
Time: 15.2s
Alternatives: 14
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 14 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.9% accurate, 1.0× speedup?

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

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

Alternative 1: 99.6% accurate, 0.3× speedup?

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

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

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


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

    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-define99.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-define99.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 5e16 < x

    1. Initial program 86.3%

      \[\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. associate-+l+86.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(\color{blue}{z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)\right)} + \log x \cdot \left(x - 0.5\right)\right)\right)\right) - x \]
        5. distribute-rgt-in99.5%

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

          \[\leadsto \left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot z}{x}} + \frac{y}{x} \cdot z\right) + \log x \cdot \left(x - 0.5\right)\right)\right)\right) - x \]
        7. associate-*r/99.5%

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

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

          \[\leadsto \left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) + \log x \cdot \left(x - 0.5\right)\right)\right)\right) - x \]
        10. distribute-rgt-out99.5%

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

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

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

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

    Alternative 2: 97.0% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) \leq 2 \cdot 10^{-64}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right) + x \cdot \log x\right)\right)\right) - x\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (if (<= (* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)) 2e-64)
       (+
        (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
        (/ (+ 0.083333333333333 (* z (- (* z y) 0.0027777777777778))) x))
       (-
        (+
         0.91893853320467
         (+
          (/ 0.083333333333333 x)
          (+ (* z (* (/ z x) (+ y 0.0007936500793651))) (* x (log x)))))
        x)))
    double code(double x, double y, double z) {
    	double tmp;
    	if ((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) <= 2e-64) {
    		tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x);
    	} else {
    		tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * log(x))))) - 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) :: tmp
        if ((z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0)) <= 2d-64) then
            tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + ((0.083333333333333d0 + (z * ((z * y) - 0.0027777777777778d0))) / x)
        else
            tmp = (0.91893853320467d0 + ((0.083333333333333d0 / x) + ((z * ((z / x) * (y + 0.0007936500793651d0))) + (x * log(x))))) - x
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z) {
    	double tmp;
    	if ((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) <= 2e-64) {
    		tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x);
    	} else {
    		tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * Math.log(x))))) - x;
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	tmp = 0
    	if (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) <= 2e-64:
    		tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x)
    	else:
    		tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * math.log(x))))) - x
    	return tmp
    
    function code(x, y, z)
    	tmp = 0.0
    	if (Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778)) <= 2e-64)
    		tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * y) - 0.0027777777777778))) / x));
    	else
    		tmp = Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 / x) + Float64(Float64(z * Float64(Float64(z / x) * Float64(y + 0.0007936500793651))) + Float64(x * log(x))))) - x);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	tmp = 0.0;
    	if ((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) <= 2e-64)
    		tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x);
    	else
    		tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * log(x))))) - x;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := If[LessEqual[N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision], 2e-64], 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 * y), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(z * N[(N[(z / x), $MachinePrecision] * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) \leq 2 \cdot 10^{-64}:\\
    \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x}\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right) + x \cdot \log x\right)\right)\right) - x\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 1.99999999999999993e-64

      1. Initial program 97.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 y around inf 97.5%

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

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

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

      if 1.99999999999999993e-64 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z)

      1. Initial program 88.6%

        \[\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. associate-+l+88.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(\color{blue}{z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)\right)} + \log x \cdot \left(x - 0.5\right)\right)\right)\right) - x \]
          5. distribute-rgt-in95.4%

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

            \[\leadsto \left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot z}{x}} + \frac{y}{x} \cdot z\right) + \log x \cdot \left(x - 0.5\right)\right)\right)\right) - x \]
          7. associate-*r/95.4%

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

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

            \[\leadsto \left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) + \log x \cdot \left(x - 0.5\right)\right)\right)\right) - x \]
          10. distribute-rgt-out98.0%

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

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

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

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

      Alternative 3: 99.6% accurate, 1.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 5 \cdot 10^{+16}:\\ \;\;\;\;\left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right) + x \cdot \log x\right)\right)\right) - x\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (if (<= x 5e+16)
         (+
          (- (* (+ x -0.5) (log x)) (+ x -0.91893853320467))
          (/
           (+
            0.083333333333333
            (* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
           x))
         (-
          (+
           0.91893853320467
           (+
            (/ 0.083333333333333 x)
            (+ (* z (* (/ z x) (+ y 0.0007936500793651))) (* x (log x)))))
          x)))
      double code(double x, double y, double z) {
      	double tmp;
      	if (x <= 5e+16) {
      		tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
      	} else {
      		tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * log(x))))) - 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) :: tmp
          if (x <= 5d+16) then
              tmp = (((x + (-0.5d0)) * log(x)) - (x + (-0.91893853320467d0))) + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
          else
              tmp = (0.91893853320467d0 + ((0.083333333333333d0 / x) + ((z * ((z / x) * (y + 0.0007936500793651d0))) + (x * log(x))))) - x
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z) {
      	double tmp;
      	if (x <= 5e+16) {
      		tmp = (((x + -0.5) * Math.log(x)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
      	} else {
      		tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * Math.log(x))))) - x;
      	}
      	return tmp;
      }
      
      def code(x, y, z):
      	tmp = 0
      	if x <= 5e+16:
      		tmp = (((x + -0.5) * math.log(x)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x)
      	else:
      		tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * math.log(x))))) - x
      	return tmp
      
      function code(x, y, z)
      	tmp = 0.0
      	if (x <= 5e+16)
      		tmp = Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - Float64(x + -0.91893853320467)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x));
      	else
      		tmp = Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 / x) + Float64(Float64(z * Float64(Float64(z / x) * Float64(y + 0.0007936500793651))) + Float64(x * log(x))))) - x);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z)
      	tmp = 0.0;
      	if (x <= 5e+16)
      		tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
      	else
      		tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * log(x))))) - x;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_] := If[LessEqual[x, 5e+16], N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $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[(0.91893853320467 + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(z * N[(N[(z / x), $MachinePrecision] * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;x \leq 5 \cdot 10^{+16}:\\
      \;\;\;\;\left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right) + x \cdot \log x\right)\right)\right) - x\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < 5e16

        1. Initial program 99.7%

          \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. associate-+l-99.7%

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

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

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

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

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

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

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

        if 5e16 < x

        1. Initial program 86.3%

          \[\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. associate-+l+86.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(\color{blue}{z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)\right)} + \log x \cdot \left(x - 0.5\right)\right)\right)\right) - x \]
            5. distribute-rgt-in99.5%

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

              \[\leadsto \left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot z}{x}} + \frac{y}{x} \cdot z\right) + \log x \cdot \left(x - 0.5\right)\right)\right)\right) - x \]
            7. associate-*r/99.5%

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

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

              \[\leadsto \left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) + \log x \cdot \left(x - 0.5\right)\right)\right)\right) - x \]
            10. distribute-rgt-out99.5%

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

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

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

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

        Alternative 4: 99.6% accurate, 1.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 5 \cdot 10^{+16}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right) + x \cdot \log x\right)\right)\right) - x\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= x 5e+16)
           (+
            (/
             (+
              0.083333333333333
              (* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
             x)
            (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)))
           (-
            (+
             0.91893853320467
             (+
              (/ 0.083333333333333 x)
              (+ (* z (* (/ z x) (+ y 0.0007936500793651))) (* x (log x)))))
            x)))
        double code(double x, double y, double z) {
        	double tmp;
        	if (x <= 5e+16) {
        		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x));
        	} else {
        		tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * log(x))))) - 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) :: tmp
            if (x <= 5d+16) then
                tmp = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x))
            else
                tmp = (0.91893853320467d0 + ((0.083333333333333d0 / x) + ((z * ((z / x) * (y + 0.0007936500793651d0))) + (x * log(x))))) - x
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double tmp;
        	if (x <= 5e+16) {
        		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x));
        	} else {
        		tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * Math.log(x))))) - x;
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	tmp = 0
        	if x <= 5e+16:
        		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x))
        	else:
        		tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * math.log(x))))) - x
        	return tmp
        
        function code(x, y, z)
        	tmp = 0.0
        	if (x <= 5e+16)
        		tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) + Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)));
        	else
        		tmp = Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 / x) + Float64(Float64(z * Float64(Float64(z / x) * Float64(y + 0.0007936500793651))) + Float64(x * log(x))))) - x);
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	tmp = 0.0;
        	if (x <= 5e+16)
        		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x));
        	else
        		tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * log(x))))) - x;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := If[LessEqual[x, 5e+16], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(z * N[(N[(z / x), $MachinePrecision] * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq 5 \cdot 10^{+16}:\\
        \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right) + x \cdot \log x\right)\right)\right) - x\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < 5e16

          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 5e16 < x

          1. Initial program 86.3%

            \[\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. associate-+l+86.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(\color{blue}{z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)\right)} + \log x \cdot \left(x - 0.5\right)\right)\right)\right) - x \]
              5. distribute-rgt-in99.5%

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

                \[\leadsto \left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot z}{x}} + \frac{y}{x} \cdot z\right) + \log x \cdot \left(x - 0.5\right)\right)\right)\right) - x \]
              7. associate-*r/99.5%

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

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

                \[\leadsto \left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) + \log x \cdot \left(x - 0.5\right)\right)\right)\right) - x \]
              10. distribute-rgt-out99.5%

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

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

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

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

          Alternative 5: 98.9% accurate, 1.0× speedup?

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

            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. associate-+l+99.7%

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

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

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

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

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

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

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

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

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

            if 3 < x

            1. Initial program 87.2%

              \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
            2. Step-by-step derivation
              1. associate-+l+87.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(\color{blue}{z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)\right)} + \log x \cdot \left(x - 0.5\right)\right)\right)\right) - x \]
                5. distribute-rgt-in99.5%

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

                  \[\leadsto \left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot z}{x}} + \frac{y}{x} \cdot z\right) + \log x \cdot \left(x - 0.5\right)\right)\right)\right) - x \]
                7. associate-*r/99.5%

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

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

                  \[\leadsto \left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) + \log x \cdot \left(x - 0.5\right)\right)\right)\right) - x \]
                10. distribute-rgt-out99.5%

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

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

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

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

            Alternative 6: 93.5% accurate, 1.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \left(\log x + -1\right)\\ \mathbf{if}\;x \leq 10^{+260}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (let* ((t_0 (* x (+ (log x) -1.0))))
               (if (<= x 1e+260)
                 (+
                  (/
                   (+
                    0.083333333333333
                    (* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
                   x)
                  t_0)
                 t_0)))
            double code(double x, double y, double z) {
            	double t_0 = x * (log(x) + -1.0);
            	double tmp;
            	if (x <= 1e+260) {
            		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + t_0;
            	} else {
            		tmp = t_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) :: t_0
                real(8) :: tmp
                t_0 = x * (log(x) + (-1.0d0))
                if (x <= 1d+260) then
                    tmp = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + t_0
                else
                    tmp = t_0
                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 <= 1e+260) {
            		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + t_0;
            	} else {
            		tmp = t_0;
            	}
            	return tmp;
            }
            
            def code(x, y, z):
            	t_0 = x * (math.log(x) + -1.0)
            	tmp = 0
            	if x <= 1e+260:
            		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + t_0
            	else:
            		tmp = t_0
            	return tmp
            
            function code(x, y, z)
            	t_0 = Float64(x * Float64(log(x) + -1.0))
            	tmp = 0.0
            	if (x <= 1e+260)
            		tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) + t_0);
            	else
            		tmp = t_0;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z)
            	t_0 = x * (log(x) + -1.0);
            	tmp = 0.0;
            	if (x <= 1e+260)
            		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + t_0;
            	else
            		tmp = t_0;
            	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, 1e+260], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + t$95$0), $MachinePrecision], t$95$0]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := x \cdot \left(\log x + -1\right)\\
            \mathbf{if}\;x \leq 10^{+260}:\\
            \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + t\_0\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_0\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if x < 1.00000000000000007e260

              1. Initial program 96.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. Step-by-step derivation
                1. add-sqr-sqrt95.9%

                  \[\leadsto \left(\left(\color{blue}{\sqrt{\left(x - 0.5\right) \cdot \log x} \cdot \sqrt{\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. pow295.9%

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

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

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

                  \[\leadsto \left(\left({\left(\sqrt{\color{blue}{\log x \cdot \left(x + -0.5\right)}}\right)}^{2} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
              4. Applied egg-rr95.9%

                \[\leadsto \left(\left(\color{blue}{{\left(\sqrt{\log x \cdot \left(x + -0.5\right)}\right)}^{2}} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
              5. Taylor expanded in x around inf 93.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} \]
              6. Step-by-step derivation
                1. sub-neg93.3%

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

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

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

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

                  \[\leadsto x \cdot \left(\log x + \color{blue}{-1}\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
              7. Simplified93.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} \]

              if 1.00000000000000007e260 < x

              1. Initial program 73.6%

                \[\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. associate-+l+73.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 7: 83.2% accurate, 1.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2.8 \cdot 10^{-15}:\\ \;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\right)\right) - x\\ \mathbf{else}:\\ \;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<= x 2.8e-15)
               (-
                (+
                 0.91893853320467
                 (+
                  (/ 0.083333333333333 x)
                  (/ (* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)) x)))
                x)
               (+
                (/ 0.083333333333333 x)
                (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)))))
            double code(double x, double y, double z) {
            	double tmp;
            	if (x <= 2.8e-15) {
            		tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) / x))) - x;
            	} else {
            		tmp = (0.083333333333333 / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - 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) :: tmp
                if (x <= 2.8d-15) then
                    tmp = (0.91893853320467d0 + ((0.083333333333333d0 / x) + ((z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0)) / x))) - x
                else
                    tmp = (0.083333333333333d0 / x) + (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x))
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z) {
            	double tmp;
            	if (x <= 2.8e-15) {
            		tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) / x))) - x;
            	} else {
            		tmp = (0.083333333333333 / x) + (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x));
            	}
            	return tmp;
            }
            
            def code(x, y, z):
            	tmp = 0
            	if x <= 2.8e-15:
            		tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) / x))) - x
            	else:
            		tmp = (0.083333333333333 / x) + (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x))
            	return tmp
            
            function code(x, y, z)
            	tmp = 0.0
            	if (x <= 2.8e-15)
            		tmp = Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 / x) + Float64(Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778)) / x))) - x);
            	else
            		tmp = Float64(Float64(0.083333333333333 / x) + Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)));
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z)
            	tmp = 0.0;
            	if (x <= 2.8e-15)
            		tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) / x))) - x;
            	else
            		tmp = (0.083333333333333 / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x));
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_] := If[LessEqual[x, 2.8e-15], N[(N[(0.91893853320467 + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;x \leq 2.8 \cdot 10^{-15}:\\
            \;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\right)\right) - x\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if x < 2.80000000000000014e-15

              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. associate-+l+99.7%

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

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

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

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

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

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

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

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

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

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

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

                if 2.80000000000000014e-15 < x

                1. Initial program 87.9%

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

                  \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
              7. Recombined 2 regimes into one program.
              8. Final simplification87.0%

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

              Alternative 8: 84.2% accurate, 1.1× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 5.8 \cdot 10^{+16}:\\ \;\;\;\;\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)\\ \end{array} \end{array} \]
              (FPCore (x y z)
               :precision binary64
               (if (<= x 5.8e+16)
                 (/
                  (+
                   0.083333333333333
                   (* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
                  x)
                 (* x (+ (log x) -1.0))))
              double code(double x, double y, double z) {
              	double tmp;
              	if (x <= 5.8e+16) {
              		tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / 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.8d+16) then
                      tmp = (0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / 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.8e+16) {
              		tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
              	} else {
              		tmp = x * (Math.log(x) + -1.0);
              	}
              	return tmp;
              }
              
              def code(x, y, z):
              	tmp = 0
              	if x <= 5.8e+16:
              		tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x
              	else:
              		tmp = x * (math.log(x) + -1.0)
              	return tmp
              
              function code(x, y, z)
              	tmp = 0.0
              	if (x <= 5.8e+16)
              		tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / 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.8e+16)
              		tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
              	else
              		tmp = x * (log(x) + -1.0);
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_] := If[LessEqual[x, 5.8e+16], N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;x \leq 5.8 \cdot 10^{+16}:\\
              \;\;\;\;\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)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if x < 5.8e16

                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. associate-+l+99.7%

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

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

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

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

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

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

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

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

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

                if 5.8e16 < x

                1. Initial program 86.3%

                  \[\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. associate-+l+86.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 5.8 \cdot 10^{+16}:\\ \;\;\;\;\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)\\ \end{array} \]
              5. Add Preprocessing

              Alternative 9: 66.3% accurate, 4.1× speedup?

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

                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. associate-+l+99.7%

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

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

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

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

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

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

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

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

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

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

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

                  if 2 < x

                  1. Initial program 87.2%

                    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                  2. Step-by-step derivation
                    1. associate-+l+87.3%

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

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

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

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

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

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

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

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

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

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

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

                Alternative 10: 62.4% accurate, 5.8× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{+20} \lor \neg \left(y \leq 0.0008\right):\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\ \end{array} \end{array} \]
                (FPCore (x y z)
                 :precision binary64
                 (if (or (<= y -6e+20) (not (<= y 0.0008)))
                   (/ (+ 0.083333333333333 (* z (- (* z y) 0.0027777777777778))) x)
                   (/
                    (+ 0.083333333333333 (* z (- (* z 0.0007936500793651) 0.0027777777777778)))
                    x)))
                double code(double x, double y, double z) {
                	double tmp;
                	if ((y <= -6e+20) || !(y <= 0.0008)) {
                		tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x;
                	} else {
                		tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 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) :: tmp
                    if ((y <= (-6d+20)) .or. (.not. (y <= 0.0008d0))) then
                        tmp = (0.083333333333333d0 + (z * ((z * y) - 0.0027777777777778d0))) / x
                    else
                        tmp = (0.083333333333333d0 + (z * ((z * 0.0007936500793651d0) - 0.0027777777777778d0))) / x
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z) {
                	double tmp;
                	if ((y <= -6e+20) || !(y <= 0.0008)) {
                		tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x;
                	} else {
                		tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x;
                	}
                	return tmp;
                }
                
                def code(x, y, z):
                	tmp = 0
                	if (y <= -6e+20) or not (y <= 0.0008):
                		tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x
                	else:
                		tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x
                	return tmp
                
                function code(x, y, z)
                	tmp = 0.0
                	if ((y <= -6e+20) || !(y <= 0.0008))
                		tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * y) - 0.0027777777777778))) / x);
                	else
                		tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * 0.0007936500793651) - 0.0027777777777778))) / x);
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z)
                	tmp = 0.0;
                	if ((y <= -6e+20) || ~((y <= 0.0008)))
                		tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x;
                	else
                		tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_] := If[Or[LessEqual[y, -6e+20], N[Not[LessEqual[y, 0.0008]], $MachinePrecision]], N[(N[(0.083333333333333 + N[(z * N[(N[(z * y), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(0.083333333333333 + N[(z * N[(N[(z * 0.0007936500793651), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;y \leq -6 \cdot 10^{+20} \lor \neg \left(y \leq 0.0008\right):\\
                \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if y < -6e20 or 8.00000000000000038e-4 < y

                  1. Initial program 94.6%

                    \[\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. associate-+l+94.6%

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

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

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

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

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

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

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

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

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

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

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

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

                  if -6e20 < y < 8.00000000000000038e-4

                  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. Step-by-step derivation
                    1. associate-+l+92.5%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{0.083333333333333 + z \cdot \left(\color{blue}{z \cdot 0.0007936500793651} - 0.0027777777777778\right)}{x} \]
                  8. Simplified57.5%

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

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

                Alternative 11: 49.3% accurate, 7.2× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{-22} \lor \neg \left(z \leq 8 \cdot 10^{+18}\right):\\ \;\;\;\;y \cdot \frac{z \cdot z}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \end{array} \end{array} \]
                (FPCore (x y z)
                 :precision binary64
                 (if (or (<= z -5.8e-22) (not (<= z 8e+18)))
                   (* y (/ (* z z) x))
                   (/ 0.083333333333333 x)))
                double code(double x, double y, double z) {
                	double tmp;
                	if ((z <= -5.8e-22) || !(z <= 8e+18)) {
                		tmp = y * ((z * z) / x);
                	} else {
                		tmp = 0.083333333333333 / 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) :: tmp
                    if ((z <= (-5.8d-22)) .or. (.not. (z <= 8d+18))) then
                        tmp = y * ((z * z) / x)
                    else
                        tmp = 0.083333333333333d0 / x
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z) {
                	double tmp;
                	if ((z <= -5.8e-22) || !(z <= 8e+18)) {
                		tmp = y * ((z * z) / x);
                	} else {
                		tmp = 0.083333333333333 / x;
                	}
                	return tmp;
                }
                
                def code(x, y, z):
                	tmp = 0
                	if (z <= -5.8e-22) or not (z <= 8e+18):
                		tmp = y * ((z * z) / x)
                	else:
                		tmp = 0.083333333333333 / x
                	return tmp
                
                function code(x, y, z)
                	tmp = 0.0
                	if ((z <= -5.8e-22) || !(z <= 8e+18))
                		tmp = Float64(y * Float64(Float64(z * z) / x));
                	else
                		tmp = Float64(0.083333333333333 / x);
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z)
                	tmp = 0.0;
                	if ((z <= -5.8e-22) || ~((z <= 8e+18)))
                		tmp = y * ((z * z) / x);
                	else
                		tmp = 0.083333333333333 / x;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_] := If[Or[LessEqual[z, -5.8e-22], N[Not[LessEqual[z, 8e+18]], $MachinePrecision]], N[(y * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(0.083333333333333 / x), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;z \leq -5.8 \cdot 10^{-22} \lor \neg \left(z \leq 8 \cdot 10^{+18}\right):\\
                \;\;\;\;y \cdot \frac{z \cdot z}{x}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{0.083333333333333}{x}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if z < -5.8000000000000003e-22 or 8e18 < z

                  1. Initial program 87.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. Step-by-step derivation
                    1. associate-+l+87.1%

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
                  6. Step-by-step derivation
                    1. associate-/l*49.2%

                      \[\leadsto \color{blue}{y \cdot \frac{{z}^{2}}{x}} \]
                  7. Simplified49.2%

                    \[\leadsto \color{blue}{y \cdot \frac{{z}^{2}}{x}} \]
                  8. Step-by-step derivation
                    1. unpow249.2%

                      \[\leadsto y \cdot \frac{\color{blue}{z \cdot z}}{x} \]
                  9. Applied egg-rr49.2%

                    \[\leadsto y \cdot \frac{\color{blue}{z \cdot z}}{x} \]

                  if -5.8000000000000003e-22 < z < 8e18

                  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. Step-by-step derivation
                    1. associate-+l+99.5%

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

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
                3. Recombined 2 regimes into one program.
                4. Final simplification48.2%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{-22} \lor \neg \left(z \leq 8 \cdot 10^{+18}\right):\\ \;\;\;\;y \cdot \frac{z \cdot z}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \end{array} \]
                5. Add Preprocessing

                Alternative 12: 54.4% accurate, 7.7× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{+20}:\\ \;\;\;\;y \cdot \frac{z \cdot z}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\ \end{array} \end{array} \]
                (FPCore (x y z)
                 :precision binary64
                 (if (<= y -7.2e+20)
                   (* y (/ (* z z) x))
                   (/
                    (+ 0.083333333333333 (* z (- (* z 0.0007936500793651) 0.0027777777777778)))
                    x)))
                double code(double x, double y, double z) {
                	double tmp;
                	if (y <= -7.2e+20) {
                		tmp = y * ((z * z) / x);
                	} else {
                		tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 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) :: tmp
                    if (y <= (-7.2d+20)) then
                        tmp = y * ((z * z) / x)
                    else
                        tmp = (0.083333333333333d0 + (z * ((z * 0.0007936500793651d0) - 0.0027777777777778d0))) / x
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z) {
                	double tmp;
                	if (y <= -7.2e+20) {
                		tmp = y * ((z * z) / x);
                	} else {
                		tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x;
                	}
                	return tmp;
                }
                
                def code(x, y, z):
                	tmp = 0
                	if y <= -7.2e+20:
                		tmp = y * ((z * z) / x)
                	else:
                		tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x
                	return tmp
                
                function code(x, y, z)
                	tmp = 0.0
                	if (y <= -7.2e+20)
                		tmp = Float64(y * Float64(Float64(z * z) / x));
                	else
                		tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * 0.0007936500793651) - 0.0027777777777778))) / x);
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z)
                	tmp = 0.0;
                	if (y <= -7.2e+20)
                		tmp = y * ((z * z) / x);
                	else
                		tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_] := If[LessEqual[y, -7.2e+20], N[(y * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.083333333333333 + N[(z * N[(N[(z * 0.0007936500793651), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;y \leq -7.2 \cdot 10^{+20}:\\
                \;\;\;\;y \cdot \frac{z \cdot z}{x}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if y < -7.2e20

                  1. Initial program 95.9%

                    \[\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. associate-+l+95.9%

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
                  6. Step-by-step derivation
                    1. associate-/l*50.8%

                      \[\leadsto \color{blue}{y \cdot \frac{{z}^{2}}{x}} \]
                  7. Simplified50.8%

                    \[\leadsto \color{blue}{y \cdot \frac{{z}^{2}}{x}} \]
                  8. Step-by-step derivation
                    1. unpow250.8%

                      \[\leadsto y \cdot \frac{\color{blue}{z \cdot z}}{x} \]
                  9. Applied egg-rr50.8%

                    \[\leadsto y \cdot \frac{\color{blue}{z \cdot z}}{x} \]

                  if -7.2e20 < y

                  1. Initial program 92.9%

                    \[\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. associate-+l+92.9%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{0.083333333333333 + z \cdot \left(\color{blue}{z \cdot 0.0007936500793651} - 0.0027777777777778\right)}{x} \]
                  8. Simplified54.7%

                    \[\leadsto \frac{0.083333333333333 + z \cdot \left(\color{blue}{z \cdot 0.0007936500793651} - 0.0027777777777778\right)}{x} \]
                3. Recombined 2 regimes into one program.
                4. Add Preprocessing

                Alternative 13: 63.5% accurate, 9.5× speedup?

                \[\begin{array}{l} \\ \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} \end{array} \]
                (FPCore (x y z)
                 :precision binary64
                 (/
                  (+
                   0.083333333333333
                   (* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
                  x))
                double code(double x, double y, double z) {
                	return (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 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 = (0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x
                end function
                
                public static double code(double x, double y, double z) {
                	return (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
                }
                
                def code(x, y, z):
                	return (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x
                
                function code(x, y, z)
                	return Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x)
                end
                
                function tmp = code(x, y, z)
                	tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
                end
                
                code[x_, y_, z_] := N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
                
                \begin{array}{l}
                
                \\
                \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}
                \end{array}
                
                Derivation
                1. Initial program 93.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. Step-by-step derivation
                  1. associate-+l+93.5%

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} \]
                7. Add Preprocessing

                Alternative 14: 23.5% accurate, 41.0× speedup?

                \[\begin{array}{l} \\ \frac{0.083333333333333}{x} \end{array} \]
                (FPCore (x y z) :precision binary64 (/ 0.083333333333333 x))
                double code(double x, double y, double z) {
                	return 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 = 0.083333333333333d0 / x
                end function
                
                public static double code(double x, double y, double z) {
                	return 0.083333333333333 / x;
                }
                
                def code(x, y, z):
                	return 0.083333333333333 / x
                
                function code(x, y, z)
                	return Float64(0.083333333333333 / x)
                end
                
                function tmp = code(x, y, z)
                	tmp = 0.083333333333333 / x;
                end
                
                code[x_, y_, z_] := N[(0.083333333333333 / x), $MachinePrecision]
                
                \begin{array}{l}
                
                \\
                \frac{0.083333333333333}{x}
                \end{array}
                
                Derivation
                1. Initial program 93.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. Step-by-step derivation
                  1. associate-+l+93.5%

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

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
                7. Add Preprocessing

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