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

Percentage Accurate: 93.7% → 97.9%
Time: 17.7s
Alternatives: 16
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 16 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 93.7% 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: 97.9% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 94.9% accurate, 1.0× speedup?

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

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

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


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

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

      \[\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-neg43.3%

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

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

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

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

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

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

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

    if 2.5499999999999999e141 < x

    1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 95.7% accurate, 1.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t\_0 + \left(0.083333333333333 \cdot \frac{1}{x} + z \cdot \frac{z \cdot y}{x}\right)\\


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

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

    if 5.0000000000000002e137 < x

    1. Initial program 90.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 95.7% accurate, 1.0× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

    if 3.20000000000000019e137 < x

    1. Initial program 90.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 97.9% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 62.0% accurate, 1.0× speedup?

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

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

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


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

    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 y around 0 82.0%

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

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

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

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

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

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

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

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

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

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

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

    if 9.6000000000000005e-35 < x

    1. Initial program 92.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, -x\right) + \left(0.91893853320467 + \frac{\color{blue}{0.083333333333333}}{x}\right) \]
    6. Step-by-step derivation
      1. fma-neg66.7%

        \[\leadsto \color{blue}{\left(\left(x + -0.5\right) \cdot \log x - x\right)} + \left(0.91893853320467 + \frac{0.083333333333333}{x}\right) \]
      2. *-commutative66.7%

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

      \[\leadsto \color{blue}{\left(\log x \cdot \left(x + -0.5\right) - x\right)} + \left(0.91893853320467 + \frac{0.083333333333333}{x}\right) \]
    8. Step-by-step derivation
      1. associate-+l-66.7%

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

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

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

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

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

Alternative 7: 92.9% accurate, 1.0× speedup?

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

\\
x \cdot \left(\log x + -1\right) - \frac{z \cdot \left(0.0027777777777778 - z \cdot \left(0.0007936500793651 + y\right)\right) - 0.083333333333333}{x}
\end{array}
Derivation
  1. Initial program 95.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 94.2%

    \[\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-neg54.3%

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

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

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

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

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

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

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

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

Alternative 8: 92.9% accurate, 1.0× speedup?

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

\\
\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} + \left(x \cdot \log x - x\right)
\end{array}
Derivation
  1. Initial program 95.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 0 95.3%

    \[\leadsto \color{blue}{\left(0.91893853320467 + \left(-0.5 \cdot \log x + x \cdot \left(\log x - 1\right)\right)\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-neg95.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 56.4% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
	return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (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) + (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) + (0.083333333333333 / x);
}
def code(x, y, z):
	return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x)
function code(x, y, z)
	return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x))
end
function tmp = code(x, y, z)
	tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (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[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}
\end{array}
Derivation
  1. Initial program 95.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 55.4%

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

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

Alternative 10: 56.4% accurate, 1.1× speedup?

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

\\
\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \left(\log x \cdot \left(x + -0.5\right) - x\right)
\end{array}
Derivation
  1. Initial program 95.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. Step-by-step derivation
    1. associate-+l+95.4%

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

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

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

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

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

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

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

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

    \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, -x\right) + \left(0.91893853320467 + \frac{\color{blue}{0.083333333333333}}{x}\right) \]
  6. Step-by-step derivation
    1. fma-neg55.5%

      \[\leadsto \color{blue}{\left(\left(x + -0.5\right) \cdot \log x - x\right)} + \left(0.91893853320467 + \frac{0.083333333333333}{x}\right) \]
    2. *-commutative55.5%

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

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

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

Alternative 11: 56.4% accurate, 1.1× speedup?

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

\\
\log x \cdot \left(x + -0.5\right) + \left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) - x\right)
\end{array}
Derivation
  1. Initial program 95.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. Step-by-step derivation
    1. associate-+l+95.4%

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

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

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

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

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

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

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

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

    \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, -x\right) + \left(0.91893853320467 + \frac{\color{blue}{0.083333333333333}}{x}\right) \]
  6. Step-by-step derivation
    1. fma-neg55.5%

      \[\leadsto \color{blue}{\left(\left(x + -0.5\right) \cdot \log x - x\right)} + \left(0.91893853320467 + \frac{0.083333333333333}{x}\right) \]
    2. *-commutative55.5%

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

    \[\leadsto \color{blue}{\left(\log x \cdot \left(x + -0.5\right) - x\right)} + \left(0.91893853320467 + \frac{0.083333333333333}{x}\right) \]
  8. Step-by-step derivation
    1. associate-+l-55.5%

      \[\leadsto \color{blue}{\log x \cdot \left(x + -0.5\right) - \left(x - \left(0.91893853320467 + \frac{0.083333333333333}{x}\right)\right)} \]
  9. Applied egg-rr55.5%

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

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

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

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

Alternative 12: 55.6% accurate, 1.1× speedup?

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

\\
\frac{0.083333333333333}{x} + \left(0.91893853320467 + \left(x \cdot \log x - x\right)\right)
\end{array}
Derivation
  1. Initial program 95.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 55.4%

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

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

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

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

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

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

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

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

Alternative 13: 55.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 95.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 55.4%

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

    \[\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-neg54.3%

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

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

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

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

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

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

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

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

Alternative 14: 55.6% accurate, 1.1× speedup?

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

\\
\left(x \cdot \log x - x\right) + \frac{0.083333333333333}{x}
\end{array}
Derivation
  1. Initial program 95.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 0 95.3%

    \[\leadsto \color{blue}{\left(0.91893853320467 + \left(-0.5 \cdot \log x + x \cdot \left(\log x - 1\right)\right)\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-neg95.3%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\log x, x + -0.5, 0.91893853320467\right) - x\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 55.5%

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

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

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

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

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

      \[\leadsto \left(x \cdot \color{blue}{\log x} - x\right) + \frac{0.083333333333333}{x} \]
  9. Simplified54.3%

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

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

Alternative 15: 23.2% accurate, 41.0× speedup?

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

\\
\frac{0.083333333333333}{x}
\end{array}
Derivation
  1. Initial program 95.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. Step-by-step derivation
    1. associate-+l+95.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
  7. Final simplification20.7%

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

Alternative 16: 1.3% accurate, 61.5× speedup?

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

\\
-x
\end{array}
Derivation
  1. Initial program 95.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 0 95.3%

    \[\leadsto \color{blue}{\left(0.91893853320467 + \left(-0.5 \cdot \log x + x \cdot \left(\log x - 1\right)\right)\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-neg95.3%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\log x, x + -0.5, 0.91893853320467\right) - x\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 55.5%

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

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

    \[\leadsto \color{blue}{-1 \cdot x} \]
  9. Step-by-step derivation
    1. neg-mul-11.3%

      \[\leadsto \color{blue}{-x} \]
  10. Simplified1.3%

    \[\leadsto \color{blue}{-x} \]
  11. Final simplification1.3%

    \[\leadsto -x \]
  12. Add Preprocessing

Developer target: 98.7% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2024050 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
  :precision binary64

  :alt
  (+ (+ (+ (* (- 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)))