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

Percentage Accurate: 94.3% → 96.7%
Time: 17.1s
Alternatives: 13
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 13 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: 94.3% accurate, 1.0× speedup?

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

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

Alternative 1: 96.7% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

    if 5.3e215 < x

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

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{y}{\frac{x}{{z}^{2}}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity74.0%

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{y}{\color{blue}{\frac{1}{z} \cdot \frac{x}{z}}} \]
    7. Applied egg-rr95.8%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{y}{\color{blue}{\frac{1}{z} \cdot \frac{x}{z}}} \]
    8. Step-by-step derivation
      1. associate-*r/95.9%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{y}{\color{blue}{\frac{\frac{1}{z} \cdot x}{z}}} \]
    9. Applied egg-rr95.9%

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

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

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

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

        \[\leadsto x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right) + \frac{y}{\frac{\frac{1}{z} \cdot x}{z}} \]
      4. remove-double-neg96.2%

        \[\leadsto x \cdot \left(\color{blue}{\log x} + \left(-1\right)\right) + \frac{y}{\frac{\frac{1}{z} \cdot x}{z}} \]
      5. metadata-eval96.2%

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

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

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

Alternative 2: 96.8% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 97.4%

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

    if 1.9999999999999999e214 < x

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

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{y}{\frac{x}{{z}^{2}}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity74.0%

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{y}{\color{blue}{\frac{1}{z} \cdot \frac{x}{z}}} \]
    7. Applied egg-rr95.8%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{y}{\color{blue}{\frac{1}{z} \cdot \frac{x}{z}}} \]
    8. Step-by-step derivation
      1. associate-*r/95.9%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{y}{\color{blue}{\frac{\frac{1}{z} \cdot x}{z}}} \]
    9. Applied egg-rr95.9%

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

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

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

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

        \[\leadsto x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right) + \frac{y}{\frac{\frac{1}{z} \cdot x}{z}} \]
      4. remove-double-neg96.2%

        \[\leadsto x \cdot \left(\color{blue}{\log x} + \left(-1\right)\right) + \frac{y}{\frac{\frac{1}{z} \cdot x}{z}} \]
      5. metadata-eval96.2%

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

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

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

Alternative 3: 86.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;y \leq -1.15 \cdot 10^{+94} \lor \neg \left(y \leq 1.08 \cdot 10^{+94}\right):\\
\;\;\;\;t\_0 + \frac{y}{\frac{1}{z} \cdot \frac{x}{z}}\\

\mathbf{else}:\\
\;\;\;\;t\_0 + \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 < -1.15e94 or 1.08e94 < y

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

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{y}{\frac{x}{{z}^{2}}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity82.1%

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

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

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

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

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

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

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

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

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

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

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

    if -1.15e94 < y < 1.08e94

    1. Initial program 91.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 x around inf 90.8%

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

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

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

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

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

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

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

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

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

Alternative 4: 92.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;y \leq -0.00092 \lor \neg \left(y \leq 3.5 \cdot 10^{-73}\right):\\
\;\;\;\;t\_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x}\\

\mathbf{else}:\\
\;\;\;\;t\_0 + \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 < -9.2000000000000003e-4 or 3.4999999999999998e-73 < y

    1. Initial program 89.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 x around inf 89.5%

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

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

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

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

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

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

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

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

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

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

    if -9.2000000000000003e-4 < y < 3.4999999999999998e-73

    1. Initial program 93.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. Add Preprocessing
    3. Taylor expanded in x around inf 92.1%

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

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

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

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

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

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

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

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

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

Alternative 5: 83.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{-43} \lor \neg \left(z \leq 1.15 \cdot 10^{-10}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{y}{\frac{1}{z} \cdot \frac{x}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.3e-43 or 1.15000000000000004e-10 < z

    1. Initial program 85.7%

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

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{y}{\frac{x}{{z}^{2}}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity58.7%

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{y}{\color{blue}{\frac{1}{z} \cdot \frac{x}{z}}} \]
    7. Applied egg-rr66.8%

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

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

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

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

        \[\leadsto x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right) + \frac{y}{\frac{\frac{1}{z} \cdot x}{z}} \]
      4. remove-double-neg66.9%

        \[\leadsto x \cdot \left(\color{blue}{\log x} + \left(-1\right)\right) + \frac{y}{\frac{\frac{1}{z} \cdot x}{z}} \]
      5. metadata-eval66.9%

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

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

    if -1.3e-43 < z < 1.15000000000000004e-10

    1. Initial program 99.4%

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

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

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

Alternative 6: 83.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.3 \cdot 10^{-45} \lor \neg \left(z \leq 1.4 \cdot 10^{-14}\right):\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{y}{\frac{x \cdot \frac{1}{z}}{z}}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -5.3e-45) (not (<= z 1.4e-14)))
   (+ (* x (+ (log x) -1.0)) (/ y (/ (* x (/ 1.0 z)) z)))
   (+
    (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
    (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -5.3e-45) || !(z <= 1.4e-14)) {
		tmp = (x * (log(x) + -1.0)) + (y / ((x * (1.0 / z)) / z));
	} else {
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (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.3d-45)) .or. (.not. (z <= 1.4d-14))) then
        tmp = (x * (log(x) + (-1.0d0))) + (y / ((x * (1.0d0 / z)) / z))
    else
        tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (0.083333333333333d0 / x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -5.3e-45) || !(z <= 1.4e-14)) {
		tmp = (x * (Math.log(x) + -1.0)) + (y / ((x * (1.0 / z)) / z));
	} else {
		tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -5.3e-45) or not (z <= 1.4e-14):
		tmp = (x * (math.log(x) + -1.0)) + (y / ((x * (1.0 / z)) / z))
	else:
		tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -5.3e-45) || !(z <= 1.4e-14))
		tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(y / Float64(Float64(x * Float64(1.0 / z)) / z)));
	else
		tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -5.3e-45) || ~((z <= 1.4e-14)))
		tmp = (x * (log(x) + -1.0)) + (y / ((x * (1.0 / z)) / z));
	else
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.3e-45], N[Not[LessEqual[z, 1.4e-14]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[(x * N[(1.0 / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.3 \cdot 10^{-45} \lor \neg \left(z \leq 1.4 \cdot 10^{-14}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{y}{\frac{x \cdot \frac{1}{z}}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.2999999999999997e-45 or 1.4e-14 < z

    1. Initial program 85.7%

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

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{y}{\frac{x}{{z}^{2}}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity58.7%

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{y}{\color{blue}{\frac{1}{z} \cdot \frac{x}{z}}} \]
    7. Applied egg-rr66.8%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{y}{\color{blue}{\frac{1}{z} \cdot \frac{x}{z}}} \]
    8. Step-by-step derivation
      1. associate-*r/66.8%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{y}{\color{blue}{\frac{\frac{1}{z} \cdot x}{z}}} \]
    9. Applied egg-rr66.8%

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

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

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

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

        \[\leadsto x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right) + \frac{y}{\frac{\frac{1}{z} \cdot x}{z}} \]
      4. remove-double-neg66.9%

        \[\leadsto x \cdot \left(\color{blue}{\log x} + \left(-1\right)\right) + \frac{y}{\frac{\frac{1}{z} \cdot x}{z}} \]
      5. metadata-eval66.9%

        \[\leadsto x \cdot \left(\log x + \color{blue}{-1}\right) + \frac{y}{\frac{\frac{1}{z} \cdot x}{z}} \]
    12. Simplified66.9%

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

    if -5.2999999999999997e-45 < z < 1.4e-14

    1. Initial program 99.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.3 \cdot 10^{-45} \lor \neg \left(z \leq 1.4 \cdot 10^{-14}\right):\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{y}{\frac{x \cdot \frac{1}{z}}{z}}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 95.7% accurate, 1.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{y}{\frac{x \cdot \frac{1}{z}}{z}}\\


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

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

    if 1.5000000000000001e214 < x

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

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{y}{\frac{x}{{z}^{2}}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity74.0%

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{y}{\color{blue}{\frac{1}{z} \cdot \frac{x}{z}}} \]
    7. Applied egg-rr95.8%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{y}{\color{blue}{\frac{1}{z} \cdot \frac{x}{z}}} \]
    8. Step-by-step derivation
      1. associate-*r/95.9%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{y}{\color{blue}{\frac{\frac{1}{z} \cdot x}{z}}} \]
    9. Applied egg-rr95.9%

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

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

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

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

        \[\leadsto x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right) + \frac{y}{\frac{\frac{1}{z} \cdot x}{z}} \]
      4. remove-double-neg96.2%

        \[\leadsto x \cdot \left(\color{blue}{\log x} + \left(-1\right)\right) + \frac{y}{\frac{\frac{1}{z} \cdot x}{z}} \]
      5. metadata-eval96.2%

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

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

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

Alternative 8: 35.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.62:\\
\;\;\;\;{\left(\frac{x}{0.083333333333333}\right)}^{-1} - x\\

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


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

    1. Initial program 99.7%

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

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

        \[\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{0.083333333333333}{x} \]
      2. pow247.4%

        \[\leadsto \left(\left(\color{blue}{{\left(\sqrt{\left(x - 0.5\right) \cdot \log x}\right)}^{2}} - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
      3. sub-neg47.4%

        \[\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{0.083333333333333}{x} \]
      4. metadata-eval47.4%

        \[\leadsto \left(\left({\left(\sqrt{\left(x + \color{blue}{-0.5}\right) \cdot \log x}\right)}^{2} - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
    5. Applied egg-rr47.4%

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

      \[\leadsto \color{blue}{-1 \cdot x} + \frac{0.083333333333333}{x} \]
    7. Step-by-step derivation
      1. neg-mul-147.1%

        \[\leadsto \color{blue}{\left(-x\right)} + \frac{0.083333333333333}{x} \]
    8. Simplified47.1%

      \[\leadsto \color{blue}{\left(-x\right)} + \frac{0.083333333333333}{x} \]
    9. Step-by-step derivation
      1. clear-num47.2%

        \[\leadsto \left(-x\right) + \color{blue}{\frac{1}{\frac{x}{0.083333333333333}}} \]
      2. inv-pow47.2%

        \[\leadsto \left(-x\right) + \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}} \]
    10. Applied egg-rr47.2%

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

    if 0.619999999999999996 < x

    1. Initial program 84.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. Add Preprocessing
    3. Taylor expanded in z around 0 66.9%

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

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

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)} + \frac{y}{\frac{\frac{1}{z} \cdot x}{z}} \]
      2. mul-1-neg87.6%

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

        \[\leadsto x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right) + \frac{y}{\frac{\frac{1}{z} \cdot x}{z}} \]
      4. remove-double-neg87.6%

        \[\leadsto x \cdot \left(\color{blue}{\log x} + \left(-1\right)\right) + \frac{y}{\frac{\frac{1}{z} \cdot x}{z}} \]
      5. metadata-eval87.6%

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

      \[\leadsto \color{blue}{x \cdot \left(\log x + -1\right)} + \frac{0.083333333333333}{x} \]
    7. Step-by-step derivation
      1. div-inv0.9%

        \[\leadsto \left(-x\right) + \color{blue}{0.083333333333333 \cdot \frac{1}{x}} \]
      2. expm1-log1p-u0.9%

        \[\leadsto \left(-x\right) + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.083333333333333 \cdot \frac{1}{x}\right)\right)} \]
      3. expm1-udef0.9%

        \[\leadsto \left(-x\right) + \color{blue}{\left(e^{\mathsf{log1p}\left(0.083333333333333 \cdot \frac{1}{x}\right)} - 1\right)} \]
      4. *-commutative0.9%

        \[\leadsto \left(-x\right) + \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{1}{x} \cdot 0.083333333333333}\right)} - 1\right) \]
      5. add-exp-log0.9%

        \[\leadsto \left(-x\right) + \left(e^{\mathsf{log1p}\left(\color{blue}{e^{\log \left(\frac{1}{x}\right)}} \cdot 0.083333333333333\right)} - 1\right) \]
      6. neg-log0.9%

        \[\leadsto \left(-x\right) + \left(e^{\mathsf{log1p}\left(e^{\color{blue}{-\log x}} \cdot 0.083333333333333\right)} - 1\right) \]
      7. add-sqr-sqrt0.0%

        \[\leadsto \left(-x\right) + \left(e^{\mathsf{log1p}\left(e^{\color{blue}{\sqrt{-\log x} \cdot \sqrt{-\log x}}} \cdot 0.083333333333333\right)} - 1\right) \]
      8. sqrt-unprod0.9%

        \[\leadsto \left(-x\right) + \left(e^{\mathsf{log1p}\left(e^{\color{blue}{\sqrt{\left(-\log x\right) \cdot \left(-\log x\right)}}} \cdot 0.083333333333333\right)} - 1\right) \]
      9. sqr-neg0.9%

        \[\leadsto \left(-x\right) + \left(e^{\mathsf{log1p}\left(e^{\sqrt{\color{blue}{\log x \cdot \log x}}} \cdot 0.083333333333333\right)} - 1\right) \]
      10. sqrt-unprod0.9%

        \[\leadsto \left(-x\right) + \left(e^{\mathsf{log1p}\left(e^{\color{blue}{\sqrt{\log x} \cdot \sqrt{\log x}}} \cdot 0.083333333333333\right)} - 1\right) \]
      11. add-sqr-sqrt0.9%

        \[\leadsto \left(-x\right) + \left(e^{\mathsf{log1p}\left(e^{\color{blue}{\log x}} \cdot 0.083333333333333\right)} - 1\right) \]
      12. add-exp-log0.9%

        \[\leadsto \left(-x\right) + \left(e^{\mathsf{log1p}\left(\color{blue}{x} \cdot 0.083333333333333\right)} - 1\right) \]
    8. Applied egg-rr26.3%

      \[\leadsto x \cdot \left(\log x + -1\right) + \color{blue}{\left(e^{\mathsf{log1p}\left(x \cdot 0.083333333333333\right)} - 1\right)} \]
    9. Step-by-step derivation
      1. expm1-def0.9%

        \[\leadsto \left(-x\right) + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot 0.083333333333333\right)\right)} \]
      2. expm1-log1p0.9%

        \[\leadsto \left(-x\right) + \color{blue}{x \cdot 0.083333333333333} \]
    10. Simplified26.3%

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

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

Alternative 9: 62.5% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 56.6% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 22.3% accurate, 1.2× speedup?

\[\begin{array}{l} \\ {\left(\frac{x}{0.083333333333333}\right)}^{-1} - x \end{array} \]
(FPCore (x y z) :precision binary64 (- (pow (/ x 0.083333333333333) -1.0) x))
double code(double x, double y, double z) {
	return pow((x / 0.083333333333333), -1.0) - 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.083333333333333d0) ** (-1.0d0)) - x
end function
public static double code(double x, double y, double z) {
	return Math.pow((x / 0.083333333333333), -1.0) - x;
}
def code(x, y, z):
	return math.pow((x / 0.083333333333333), -1.0) - x
function code(x, y, z)
	return Float64((Float64(x / 0.083333333333333) ^ -1.0) - x)
end
function tmp = code(x, y, z)
	tmp = ((x / 0.083333333333333) ^ -1.0) - x;
end
code[x_, y_, z_] := N[(N[Power[N[(x / 0.083333333333333), $MachinePrecision], -1.0], $MachinePrecision] - x), $MachinePrecision]
\begin{array}{l}

\\
{\left(\frac{x}{0.083333333333333}\right)}^{-1} - x
\end{array}
Derivation
  1. Initial program 91.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. Add Preprocessing
  3. Taylor expanded in z around 0 57.5%

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

      \[\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{0.083333333333333}{x} \]
    2. pow257.4%

      \[\leadsto \left(\left(\color{blue}{{\left(\sqrt{\left(x - 0.5\right) \cdot \log x}\right)}^{2}} - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
    3. sub-neg57.4%

      \[\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{0.083333333333333}{x} \]
    4. metadata-eval57.4%

      \[\leadsto \left(\left({\left(\sqrt{\left(x + \color{blue}{-0.5}\right) \cdot \log x}\right)}^{2} - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
  5. Applied egg-rr57.4%

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

    \[\leadsto \color{blue}{-1 \cdot x} + \frac{0.083333333333333}{x} \]
  7. Step-by-step derivation
    1. neg-mul-123.1%

      \[\leadsto \color{blue}{\left(-x\right)} + \frac{0.083333333333333}{x} \]
  8. Simplified23.1%

    \[\leadsto \color{blue}{\left(-x\right)} + \frac{0.083333333333333}{x} \]
  9. Step-by-step derivation
    1. clear-num23.2%

      \[\leadsto \left(-x\right) + \color{blue}{\frac{1}{\frac{x}{0.083333333333333}}} \]
    2. inv-pow23.2%

      \[\leadsto \left(-x\right) + \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}} \]
  10. Applied egg-rr23.2%

    \[\leadsto \left(-x\right) + \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}} \]
  11. Final simplification23.2%

    \[\leadsto {\left(\frac{x}{0.083333333333333}\right)}^{-1} - x \]
  12. Add Preprocessing

Alternative 12: 1.3% accurate, 24.6× speedup?

\[\begin{array}{l} \\ x \cdot 0.083333333333333 - x \end{array} \]
(FPCore (x y z) :precision binary64 (- (* x 0.083333333333333) x))
double code(double x, double y, double z) {
	return (x * 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.083333333333333d0) - x
end function
public static double code(double x, double y, double z) {
	return (x * 0.083333333333333) - x;
}
def code(x, y, z):
	return (x * 0.083333333333333) - x
function code(x, y, z)
	return Float64(Float64(x * 0.083333333333333) - x)
end
function tmp = code(x, y, z)
	tmp = (x * 0.083333333333333) - x;
end
code[x_, y_, z_] := N[(N[(x * 0.083333333333333), $MachinePrecision] - x), $MachinePrecision]
\begin{array}{l}

\\
x \cdot 0.083333333333333 - x
\end{array}
Derivation
  1. Initial program 91.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. Add Preprocessing
  3. Taylor expanded in z around 0 57.5%

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

      \[\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{0.083333333333333}{x} \]
    2. pow257.4%

      \[\leadsto \left(\left(\color{blue}{{\left(\sqrt{\left(x - 0.5\right) \cdot \log x}\right)}^{2}} - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
    3. sub-neg57.4%

      \[\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{0.083333333333333}{x} \]
    4. metadata-eval57.4%

      \[\leadsto \left(\left({\left(\sqrt{\left(x + \color{blue}{-0.5}\right) \cdot \log x}\right)}^{2} - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
  5. Applied egg-rr57.4%

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

    \[\leadsto \color{blue}{-1 \cdot x} + \frac{0.083333333333333}{x} \]
  7. Step-by-step derivation
    1. neg-mul-123.1%

      \[\leadsto \color{blue}{\left(-x\right)} + \frac{0.083333333333333}{x} \]
  8. Simplified23.1%

    \[\leadsto \color{blue}{\left(-x\right)} + \frac{0.083333333333333}{x} \]
  9. Step-by-step derivation
    1. div-inv22.8%

      \[\leadsto \left(-x\right) + \color{blue}{0.083333333333333 \cdot \frac{1}{x}} \]
    2. expm1-log1p-u21.1%

      \[\leadsto \left(-x\right) + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.083333333333333 \cdot \frac{1}{x}\right)\right)} \]
    3. expm1-udef21.1%

      \[\leadsto \left(-x\right) + \color{blue}{\left(e^{\mathsf{log1p}\left(0.083333333333333 \cdot \frac{1}{x}\right)} - 1\right)} \]
    4. *-commutative21.1%

      \[\leadsto \left(-x\right) + \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{1}{x} \cdot 0.083333333333333}\right)} - 1\right) \]
    5. add-exp-log21.0%

      \[\leadsto \left(-x\right) + \left(e^{\mathsf{log1p}\left(\color{blue}{e^{\log \left(\frac{1}{x}\right)}} \cdot 0.083333333333333\right)} - 1\right) \]
    6. neg-log21.0%

      \[\leadsto \left(-x\right) + \left(e^{\mathsf{log1p}\left(e^{\color{blue}{-\log x}} \cdot 0.083333333333333\right)} - 1\right) \]
    7. add-sqr-sqrt20.2%

      \[\leadsto \left(-x\right) + \left(e^{\mathsf{log1p}\left(e^{\color{blue}{\sqrt{-\log x} \cdot \sqrt{-\log x}}} \cdot 0.083333333333333\right)} - 1\right) \]
    8. sqrt-unprod21.0%

      \[\leadsto \left(-x\right) + \left(e^{\mathsf{log1p}\left(e^{\color{blue}{\sqrt{\left(-\log x\right) \cdot \left(-\log x\right)}}} \cdot 0.083333333333333\right)} - 1\right) \]
    9. sqr-neg21.0%

      \[\leadsto \left(-x\right) + \left(e^{\mathsf{log1p}\left(e^{\sqrt{\color{blue}{\log x \cdot \log x}}} \cdot 0.083333333333333\right)} - 1\right) \]
    10. sqrt-unprod0.5%

      \[\leadsto \left(-x\right) + \left(e^{\mathsf{log1p}\left(e^{\color{blue}{\sqrt{\log x} \cdot \sqrt{\log x}}} \cdot 0.083333333333333\right)} - 1\right) \]
    11. add-sqr-sqrt1.2%

      \[\leadsto \left(-x\right) + \left(e^{\mathsf{log1p}\left(e^{\color{blue}{\log x}} \cdot 0.083333333333333\right)} - 1\right) \]
    12. add-exp-log1.2%

      \[\leadsto \left(-x\right) + \left(e^{\mathsf{log1p}\left(\color{blue}{x} \cdot 0.083333333333333\right)} - 1\right) \]
  10. Applied egg-rr1.2%

    \[\leadsto \left(-x\right) + \color{blue}{\left(e^{\mathsf{log1p}\left(x \cdot 0.083333333333333\right)} - 1\right)} \]
  11. Step-by-step derivation
    1. expm1-def1.2%

      \[\leadsto \left(-x\right) + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot 0.083333333333333\right)\right)} \]
    2. expm1-log1p1.2%

      \[\leadsto \left(-x\right) + \color{blue}{x \cdot 0.083333333333333} \]
  12. Simplified1.2%

    \[\leadsto \left(-x\right) + \color{blue}{x \cdot 0.083333333333333} \]
  13. Final simplification1.2%

    \[\leadsto x \cdot 0.083333333333333 - x \]
  14. Add Preprocessing

Alternative 13: 22.3% accurate, 24.6× speedup?

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

\\
\frac{0.083333333333333}{x} - x
\end{array}
Derivation
  1. Initial program 91.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. Add Preprocessing
  3. Taylor expanded in z around 0 57.5%

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

      \[\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{0.083333333333333}{x} \]
    2. pow257.4%

      \[\leadsto \left(\left(\color{blue}{{\left(\sqrt{\left(x - 0.5\right) \cdot \log x}\right)}^{2}} - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
    3. sub-neg57.4%

      \[\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{0.083333333333333}{x} \]
    4. metadata-eval57.4%

      \[\leadsto \left(\left({\left(\sqrt{\left(x + \color{blue}{-0.5}\right) \cdot \log x}\right)}^{2} - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
  5. Applied egg-rr57.4%

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

    \[\leadsto \color{blue}{-1 \cdot x} + \frac{0.083333333333333}{x} \]
  7. Step-by-step derivation
    1. neg-mul-123.1%

      \[\leadsto \color{blue}{\left(-x\right)} + \frac{0.083333333333333}{x} \]
  8. Simplified23.1%

    \[\leadsto \color{blue}{\left(-x\right)} + \frac{0.083333333333333}{x} \]
  9. Final simplification23.1%

    \[\leadsto \frac{0.083333333333333}{x} - x \]
  10. Add Preprocessing

Developer target: 98.6% 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 2024027 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
  :precision binary64

  :herbie-target
  (+ (+ (+ (* (- x 0.5) (log x)) (- 0.91893853320467 x)) (/ 0.083333333333333 x)) (* (/ z x) (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))

  (+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ (+ (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z) 0.083333333333333) x)))