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

Percentage Accurate: 93.9% → 93.9%
Time: 17.7s
Alternatives: 15
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 15 alternatives:

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

Initial Program: 93.9% accurate, 1.0× speedup?

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

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

Alternative 1: 93.9% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_0 := z \cdot \sqrt{y + 0.0007936500793651}\\
\mathbf{if}\;z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) \leq 5 \cdot 10^{+306}:\\
\;\;\;\;\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)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < 4.99999999999999993e306

    1. Initial program 98.6%

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

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

        \[\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-neg98.8%

        \[\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-eval98.8%

        \[\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-def98.8%

        \[\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-neg98.8%

        \[\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-eval98.8%

        \[\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. Simplified98.8%

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

    if 4.99999999999999993e306 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z)

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\log x \cdot \left(x + -0.5\right) - \left(x + -0.91893853320467\right)\right) + \left(-0.0027777777777778 \cdot \frac{z}{x} + \left(0.083333333333333 \cdot \frac{1}{x} + \frac{z \cdot \sqrt{0.0007936500793651 + y}}{1} \cdot \frac{\color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} \cdot \sqrt{0.0007936500793651 + y}}{x}\right)\right) \]
      11. add-sqr-sqrt85.5%

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

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

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

Alternative 2: 93.9% accurate, 0.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < 4.99999999999999993e306

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999993e306 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z)

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\log x \cdot \left(x + -0.5\right) - \left(x + -0.91893853320467\right)\right) + \left(-0.0027777777777778 \cdot \frac{z}{x} + \left(0.083333333333333 \cdot \frac{1}{x} + \frac{z \cdot \sqrt{0.0007936500793651 + y}}{1} \cdot \frac{\color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} \cdot \sqrt{0.0007936500793651 + y}}{x}\right)\right) \]
      11. add-sqr-sqrt85.5%

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

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

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

Alternative 3: 93.9% accurate, 0.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < 4.99999999999999993e306

    1. Initial program 98.6%

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

        \[\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-neg98.6%

        \[\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-eval98.6%

        \[\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. *-commutative98.6%

        \[\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-neg98.6%

        \[\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-eval98.6%

        \[\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-rr98.6%

      \[\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 4.99999999999999993e306 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z)

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\log x \cdot \left(x + -0.5\right) - \left(x + -0.91893853320467\right)\right) + \left(-0.0027777777777778 \cdot \frac{z}{x} + \left(0.083333333333333 \cdot \frac{1}{x} + \frac{z \cdot \sqrt{0.0007936500793651 + y}}{1} \cdot \frac{\color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} \cdot \sqrt{0.0007936500793651 + y}}{x}\right)\right) \]
      11. add-sqr-sqrt85.5%

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

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

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

Alternative 4: 93.9% accurate, 0.4× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t\_1 + \left(-0.0027777777777778 \cdot \frac{z}{x} + \left(0.083333333333333 \cdot \frac{1}{x} + {\left(\frac{z}{\sqrt{\frac{x}{y + 0.0007936500793651}}}\right)}^{2}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < 4.99999999999999993e306

    1. Initial program 98.6%

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

        \[\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-neg98.6%

        \[\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-eval98.6%

        \[\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. *-commutative98.6%

        \[\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-neg98.6%

        \[\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-eval98.6%

        \[\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-rr98.6%

      \[\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 4.99999999999999993e306 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z)

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 94.9% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < 1.00000000000000004e201

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

        \[\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-neg98.6%

        \[\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-eval98.6%

        \[\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. *-commutative98.6%

        \[\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-neg98.6%

        \[\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-eval98.6%

        \[\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-rr98.6%

      \[\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 1.00000000000000004e201 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z)

    1. Initial program 76.9%

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

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

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

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

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

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

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

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

Alternative 6: 80.0% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < -2.79999999999999991e205 or 3.50000000000000022e289 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z)

    1. Initial program 79.9%

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

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

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

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

    if -2.79999999999999991e205 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < 3.50000000000000022e289

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 93.9% accurate, 1.0× speedup?

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

\\
\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)
\end{array}
Derivation
  1. Initial program 93.1%

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

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

Alternative 8: 93.9% accurate, 1.0× speedup?

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

\\
\left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\right) + \frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x}
\end{array}
Derivation
  1. Initial program 93.1%

    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-+l-93.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-neg93.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-eval93.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. *-commutative93.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-neg93.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-eval93.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-rr93.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} \]
  5. Final simplification93.2%

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

Alternative 9: 92.9% accurate, 1.0× speedup?

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

\\
\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right)
\end{array}
Derivation
  1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

Alternative 10: 57.2% accurate, 1.1× speedup?

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

\\
\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}
\end{array}
Derivation
  1. Initial program 93.1%

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

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

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

Alternative 11: 57.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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(x + -0.5) * log(x)) - Float64(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[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\right) + \frac{0.083333333333333}{x}
\end{array}
Derivation
  1. Initial program 93.1%

    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-+l-93.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-neg93.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-eval93.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. *-commutative93.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-neg93.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-eval93.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-rr93.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} \]
  5. Taylor expanded in z around 0 65.0%

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

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

Alternative 12: 56.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1:\\
\;\;\;\;0.91893853320467 + \frac{0.083333333333333}{x}\\

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.91893853320467 + 0.083333333333333 \cdot \frac{1}{x}} \]
    10. Step-by-step derivation
      1. associate-*r/56.2%

        \[\leadsto 0.91893853320467 + \color{blue}{\frac{0.083333333333333 \cdot 1}{x}} \]
      2. metadata-eval56.2%

        \[\leadsto 0.91893853320467 + \frac{\color{blue}{0.083333333333333}}{x} \]
      3. +-commutative56.2%

        \[\leadsto \color{blue}{\frac{0.083333333333333}{x} + 0.91893853320467} \]
    11. Simplified56.2%

      \[\leadsto \color{blue}{\frac{0.083333333333333}{x} + 0.91893853320467} \]

    if 1 < x

    1. Initial program 88.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-88.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-neg88.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-eval88.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. *-commutative88.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-neg88.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-eval88.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-rr88.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} \]
    5. Taylor expanded in z around 0 71.3%

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

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

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

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

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

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

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

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

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

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

Alternative 13: 56.2% 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 93.1%

    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-+l-93.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-neg93.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-eval93.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. *-commutative93.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-neg93.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-eval93.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-rr93.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} \]
  5. Taylor expanded in z around 0 65.0%

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

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

      \[\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-neg64.5%

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

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

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

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

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

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

Alternative 14: 23.6% accurate, 24.6× speedup?

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

\\
0.91893853320467 + \frac{0.083333333333333}{x}
\end{array}
Derivation
  1. Initial program 93.1%

    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-+l-93.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-neg93.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-eval93.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. *-commutative93.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-neg93.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-eval93.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-rr93.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} \]
  5. Taylor expanded in z around 0 65.0%

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{0.91893853320467 + 0.083333333333333 \cdot \frac{1}{x}} \]
  10. Step-by-step derivation
    1. associate-*r/26.6%

      \[\leadsto 0.91893853320467 + \color{blue}{\frac{0.083333333333333 \cdot 1}{x}} \]
    2. metadata-eval26.6%

      \[\leadsto 0.91893853320467 + \frac{\color{blue}{0.083333333333333}}{x} \]
    3. +-commutative26.6%

      \[\leadsto \color{blue}{\frac{0.083333333333333}{x} + 0.91893853320467} \]
  11. Simplified26.6%

    \[\leadsto \color{blue}{\frac{0.083333333333333}{x} + 0.91893853320467} \]
  12. Final simplification26.6%

    \[\leadsto 0.91893853320467 + \frac{0.083333333333333}{x} \]
  13. Add Preprocessing

Alternative 15: 23.0% accurate, 41.0× speedup?

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

\\
\frac{0.083333333333333}{x}
\end{array}
Derivation
  1. Initial program 93.1%

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

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

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

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

      \[\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-def93.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-neg93.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-eval93.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. Simplified93.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 65.1%

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

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

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

Developer target: 98.6% accurate, 1.0× speedup?

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

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

Reproduce

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

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

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