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

Percentage Accurate: 94.4% → 97.5%
Time: 17.9s
Alternatives: 19
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 19 alternatives:

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

Initial Program: 94.4% accurate, 1.0× speedup?

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

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

Alternative 1: 97.5% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000016e138 < x

    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. Taylor expanded in y around inf 79.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 97.5% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.1999999999999999e136 < x

    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. Taylor expanded in y around inf 79.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 97.5% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 97.8%

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

    if 4.60000000000000015e138 < x

    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. Taylor expanded in y around inf 79.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 96.4% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 97.8%

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

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

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

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

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

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

      \[\leadsto \left(\left(\color{blue}{x \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} \]

    if 5.0000000000000002e136 < x

    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. Taylor expanded in y around inf 79.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 96.3% accurate, 1.0× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

    if 1.71999999999999999e109 < x

    1. Initial program 82.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. Taylor expanded in y around inf 82.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 83.8% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.2e-51 or 4.99999999999999972e-30 < z

    1. Initial program 88.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. Taylor expanded in y around inf 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2e-51 < z < 4.99999999999999972e-30

    1. Initial program 99.5%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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) \]
      5. metadata-eval99.5%

        \[\leadsto \left(\left(x + \color{blue}{-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) \]
      6. fma-def99.5%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      7. fma-neg99.5%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      8. metadata-eval99.5%

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

      \[\leadsto \color{blue}{\left(\left(x + -0.5\right) \cdot \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. Taylor expanded in z around 0 96.7%

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

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

Alternative 7: 83.8% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.10000000000000015e-53 or 5.19999999999999973e-30 < z

    1. Initial program 88.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. Taylor expanded in y around inf 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.10000000000000015e-53 < z < 5.19999999999999973e-30

    1. Initial program 99.5%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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) \]
      5. metadata-eval99.5%

        \[\leadsto \left(\left(x + \color{blue}{-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) \]
      6. fma-def99.5%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      7. fma-neg99.5%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      8. metadata-eval99.5%

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

      \[\leadsto \color{blue}{\left(\left(x + -0.5\right) \cdot \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. Taylor expanded in z around 0 96.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{-53} \lor \neg \left(z \leq 5.2 \cdot 10^{-30}\right):\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{y}{\frac{1}{z} \cdot \frac{x}{z}}\\ \mathbf{else}:\\ \;\;\;\;\left(\log x \cdot \left(x + -0.5\right) - x\right) + \left(0.91893853320467 + \frac{1}{x \cdot 12.000000000000048}\right)\\ \end{array} \]

Alternative 8: 83.8% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq 6.5 \cdot 10^{-30}:\\
\;\;\;\;\left(\log x \cdot \left(x + -0.5\right) - x\right) + \left(0.91893853320467 + \frac{1}{x \cdot 12.000000000000048}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.99999999999999964e-54

    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. Taylor expanded in y around inf 72.6%

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

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

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

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

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

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

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

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

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

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

    if -6.99999999999999964e-54 < z < 6.5000000000000005e-30

    1. Initial program 99.5%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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) \]
      5. metadata-eval99.5%

        \[\leadsto \left(\left(x + \color{blue}{-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) \]
      6. fma-def99.5%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      7. fma-neg99.5%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      8. metadata-eval99.5%

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

      \[\leadsto \color{blue}{\left(\left(x + -0.5\right) \cdot \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. Taylor expanded in z around 0 96.7%

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

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

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

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

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

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

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

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

    if 6.5000000000000005e-30 < z

    1. Initial program 83.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. Taylor expanded in y around inf 64.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{-54}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{y}{\frac{\frac{x}{z}}{z}}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-30}:\\ \;\;\;\;\left(\log x \cdot \left(x + -0.5\right) - x\right) + \left(0.91893853320467 + \frac{1}{x \cdot 12.000000000000048}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{y}{\frac{1}{z} \cdot \frac{x}{z}}\\ \end{array} \]

Alternative 9: 62.3% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 99.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+99.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. sub-neg99.6%

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

        \[\leadsto \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) \]
      4. sub-neg99.6%

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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) \]
      5. metadata-eval99.6%

        \[\leadsto \left(\left(x + \color{blue}{-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) \]
      6. fma-def99.6%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      7. fma-neg99.6%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      8. metadata-eval99.6%

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

      \[\leadsto \color{blue}{\left(\left(x + -0.5\right) \cdot \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. Taylor expanded in z around 0 53.9%

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

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

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

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

    if 2.10000000000000009 < x

    1. Initial program 87.3%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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) \]
      5. metadata-eval87.3%

        \[\leadsto \left(\left(x + \color{blue}{-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) \]
      6. fma-def87.3%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      7. fma-neg87.3%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      8. metadata-eval87.3%

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

      \[\leadsto \color{blue}{\left(\left(x + -0.5\right) \cdot \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. Taylor expanded in z around 0 62.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.1:\\ \;\;\;\;\log x \cdot -0.5 + \left(0.91893853320467 + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\\ \end{array} \]

Alternative 10: 62.8% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 99.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+99.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. sub-neg99.6%

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

        \[\leadsto \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) \]
      4. sub-neg99.6%

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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) \]
      5. metadata-eval99.6%

        \[\leadsto \left(\left(x + \color{blue}{-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) \]
      6. fma-def99.6%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      7. fma-neg99.6%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      8. metadata-eval99.6%

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

      \[\leadsto \color{blue}{\left(\left(x + -0.5\right) \cdot \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. Taylor expanded in z around 0 53.2%

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

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

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

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

    if 1.75000000000000008e-19 < x

    1. Initial program 87.9%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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) \]
      5. metadata-eval87.9%

        \[\leadsto \left(\left(x + \color{blue}{-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) \]
      6. fma-def87.9%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      7. fma-neg87.9%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      8. metadata-eval87.9%

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

      \[\leadsto \color{blue}{\left(\left(x + -0.5\right) \cdot \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. Taylor expanded in z around 0 62.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.75 \cdot 10^{-19}:\\ \;\;\;\;\log x \cdot -0.5 + \left(0.91893853320467 + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\log x \cdot \left(x + -0.5\right) - x\right) + \left(0.91893853320467 + \frac{0.083333333333333}{x}\right)\\ \end{array} \]

Alternative 11: 56.5% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 99.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+99.7%

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

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

        \[\leadsto \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) \]
      4. sub-neg99.7%

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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) \]
      5. metadata-eval99.7%

        \[\leadsto \left(\left(x + \color{blue}{-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) \]
      6. fma-def99.7%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      7. fma-neg99.7%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      8. metadata-eval99.7%

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

      \[\leadsto \color{blue}{\left(\left(x + -0.5\right) \cdot \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. Taylor expanded in z around 0 46.9%

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

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

        \[\leadsto \color{blue}{0.083333333333333 \cdot \frac{1}{x}} \]
    7. Applied egg-rr46.6%

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

    if 6.5e8 < x

    1. Initial program 87.0%

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

        \[\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. sub-neg87.0%

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

        \[\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) \]
      4. sub-neg87.0%

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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) \]
      5. metadata-eval87.0%

        \[\leadsto \left(\left(x + \color{blue}{-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) \]
      6. fma-def87.0%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      7. fma-neg87.0%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      8. metadata-eval87.0%

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

      \[\leadsto \color{blue}{\left(\left(x + -0.5\right) \cdot \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. Taylor expanded in z around 0 63.5%

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

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

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

Alternative 12: 56.3% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 99.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+99.7%

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

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

        \[\leadsto \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) \]
      4. sub-neg99.7%

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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) \]
      5. metadata-eval99.7%

        \[\leadsto \left(\left(x + \color{blue}{-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) \]
      6. fma-def99.7%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      7. fma-neg99.7%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      8. metadata-eval99.7%

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

      \[\leadsto \color{blue}{\left(\left(x + -0.5\right) \cdot \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. Taylor expanded in z around 0 46.9%

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

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

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

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

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

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

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

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

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

    if 6.5e8 < x

    1. Initial program 87.0%

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

        \[\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. sub-neg87.0%

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

        \[\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) \]
      4. sub-neg87.0%

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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) \]
      5. metadata-eval87.0%

        \[\leadsto \left(\left(x + \color{blue}{-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) \]
      6. fma-def87.0%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      7. fma-neg87.0%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      8. metadata-eval87.0%

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

      \[\leadsto \color{blue}{\left(\left(x + -0.5\right) \cdot \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. Taylor expanded in z around 0 63.5%

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

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

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

Alternative 13: 56.5% accurate, 1.1× speedup?

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

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

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

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

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

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

      \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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) \]
    5. metadata-eval93.5%

      \[\leadsto \left(\left(x + \color{blue}{-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) \]
    6. fma-def93.5%

      \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
    7. fma-neg93.5%

      \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
    8. metadata-eval93.5%

      \[\leadsto \left(\left(x + -0.5\right) \cdot \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.5%

    \[\leadsto \color{blue}{\left(\left(x + -0.5\right) \cdot \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. Taylor expanded in z around 0 54.9%

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

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

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

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

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

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

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

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

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

Alternative 14: 56.3% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 99.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+99.7%

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

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

        \[\leadsto \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) \]
      4. sub-neg99.7%

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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) \]
      5. metadata-eval99.7%

        \[\leadsto \left(\left(x + \color{blue}{-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) \]
      6. fma-def99.7%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      7. fma-neg99.7%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      8. metadata-eval99.7%

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

      \[\leadsto \color{blue}{\left(\left(x + -0.5\right) \cdot \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. Taylor expanded in z around 0 46.9%

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

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

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

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

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

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

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

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

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

    if 6.5e8 < x

    1. Initial program 87.0%

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

        \[\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. sub-neg87.0%

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

        \[\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) \]
      4. sub-neg87.0%

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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) \]
      5. metadata-eval87.0%

        \[\leadsto \left(\left(x + \color{blue}{-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) \]
      6. fma-def87.0%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      7. fma-neg87.0%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
      8. metadata-eval87.0%

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

      \[\leadsto \color{blue}{\left(\left(x + -0.5\right) \cdot \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. Taylor expanded in z around 0 63.5%

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

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

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

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

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

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

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

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

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

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

Alternative 15: 24.0% accurate, 17.6× speedup?

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

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

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

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

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

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

      \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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) \]
    5. metadata-eval93.5%

      \[\leadsto \left(\left(x + \color{blue}{-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) \]
    6. fma-def93.5%

      \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
    7. fma-neg93.5%

      \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
    8. metadata-eval93.5%

      \[\leadsto \left(\left(x + -0.5\right) \cdot \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.5%

    \[\leadsto \color{blue}{\left(\left(x + -0.5\right) \cdot \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. Taylor expanded in z around 0 54.9%

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{0.91893853320467 + 0.083333333333333 \cdot \frac{1}{x}} \]
  9. Final simplification25.8%

    \[\leadsto 0.91893853320467 + 0.083333333333333 \cdot \frac{1}{x} \]

Alternative 16: 23.4% accurate, 24.6× speedup?

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

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

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

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

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

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

      \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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) \]
    5. metadata-eval93.5%

      \[\leadsto \left(\left(x + \color{blue}{-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) \]
    6. fma-def93.5%

      \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
    7. fma-neg93.5%

      \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
    8. metadata-eval93.5%

      \[\leadsto \left(\left(x + -0.5\right) \cdot \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.5%

    \[\leadsto \color{blue}{\left(\left(x + -0.5\right) \cdot \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. Taylor expanded in z around 0 54.9%

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

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

    \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
  7. Step-by-step derivation
    1. div-inv25.3%

      \[\leadsto \color{blue}{0.083333333333333 \cdot \frac{1}{x}} \]
  8. Applied egg-rr25.3%

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

    \[\leadsto 0.083333333333333 \cdot \frac{1}{x} \]

Alternative 17: 24.1% 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.5%

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

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

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

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

      \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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) \]
    5. metadata-eval93.5%

      \[\leadsto \left(\left(x + \color{blue}{-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) \]
    6. fma-def93.5%

      \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
    7. fma-neg93.5%

      \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
    8. metadata-eval93.5%

      \[\leadsto \left(\left(x + -0.5\right) \cdot \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.5%

    \[\leadsto \color{blue}{\left(\left(x + -0.5\right) \cdot \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. Taylor expanded in z around 0 54.9%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 0.91893853320467 + \frac{\color{blue}{0.083333333333333}}{x} \]
  10. Simplified25.5%

    \[\leadsto \color{blue}{0.91893853320467 + \frac{0.083333333333333}{x}} \]
  11. Final simplification25.5%

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

Alternative 18: 1.5% accurate, 41.0× speedup?

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

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

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

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

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

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

      \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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) \]
    5. metadata-eval93.5%

      \[\leadsto \left(\left(x + \color{blue}{-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) \]
    6. fma-def93.5%

      \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
    7. fma-neg93.5%

      \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
    8. metadata-eval93.5%

      \[\leadsto \left(\left(x + -0.5\right) \cdot \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.5%

    \[\leadsto \color{blue}{\left(\left(x + -0.5\right) \cdot \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. Taylor expanded in z around 0 54.9%

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

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

    \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
  7. Step-by-step derivation
    1. frac-2neg24.9%

      \[\leadsto \color{blue}{\frac{-0.083333333333333}{-x}} \]
    2. div-inv25.3%

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

      \[\leadsto \color{blue}{-0.083333333333333} \cdot \frac{1}{-x} \]
    4. add-sqr-sqrt0.0%

      \[\leadsto -0.083333333333333 \cdot \frac{1}{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}} \]
    5. sqrt-unprod3.6%

      \[\leadsto -0.083333333333333 \cdot \frac{1}{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}} \]
    6. sqr-neg3.6%

      \[\leadsto -0.083333333333333 \cdot \frac{1}{\sqrt{\color{blue}{x \cdot x}}} \]
    7. sqrt-unprod1.4%

      \[\leadsto -0.083333333333333 \cdot \frac{1}{\color{blue}{\sqrt{x} \cdot \sqrt{x}}} \]
    8. add-sqr-sqrt1.4%

      \[\leadsto -0.083333333333333 \cdot \frac{1}{\color{blue}{x}} \]
  8. Applied egg-rr1.4%

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

      \[\leadsto \color{blue}{\frac{-0.083333333333333 \cdot 1}{x}} \]
    2. metadata-eval1.4%

      \[\leadsto \frac{\color{blue}{-0.083333333333333}}{x} \]
  10. Simplified1.4%

    \[\leadsto \color{blue}{\frac{-0.083333333333333}{x}} \]
  11. Final simplification1.4%

    \[\leadsto \frac{-0.083333333333333}{x} \]

Alternative 19: 23.4% accurate, 41.0× speedup?

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

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

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

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

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

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

      \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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) \]
    5. metadata-eval93.5%

      \[\leadsto \left(\left(x + \color{blue}{-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) \]
    6. fma-def93.5%

      \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
    7. fma-neg93.5%

      \[\leadsto \left(\left(x + -0.5\right) \cdot \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) \]
    8. metadata-eval93.5%

      \[\leadsto \left(\left(x + -0.5\right) \cdot \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.5%

    \[\leadsto \color{blue}{\left(\left(x + -0.5\right) \cdot \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. Taylor expanded in z around 0 54.9%

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

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

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

    \[\leadsto \frac{0.083333333333333}{x} \]

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 2023310 
(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)))