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

Percentage Accurate: 94.0% → 99.6%
Time: 14.2s
Alternatives: 12
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 12 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.0% accurate, 1.0× speedup?

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

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

Alternative 1: 99.6% accurate, 0.4× speedup?

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

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

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


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

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

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

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

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

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

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

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

    if 4e8 < x

    1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 95.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{-5} \lor \neg \left(z \leq 2.55 \cdot 10^{-39}\right):\\
\;\;\;\;t_0 + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\

\mathbf{else}:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.5000000000000002e-5 or 2.54999999999999994e-39 < z

    1. Initial program 90.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. sub-neg90.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.5000000000000002e-5 < z < 2.54999999999999994e-39

    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. sub-neg99.5%

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

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

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

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

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

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

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

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

Alternative 3: 99.6% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.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 4e8 < x

    1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 92.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{-5} \lor \neg \left(z \leq 1.9 \cdot 10^{-39}\right):\\
\;\;\;\;t_0 + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\

\mathbf{else}:\\
\;\;\;\;t_0 + \frac{0.083333333333333}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.9000000000000001e-5 or 1.9000000000000001e-39 < z

    1. Initial program 90.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. sub-neg90.3%

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

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

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

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

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

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

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

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

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

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

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

    if -1.9000000000000001e-5 < z < 1.9000000000000001e-39

    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. sub-neg99.5%

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

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

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

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

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

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

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

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

Alternative 5: 92.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{-5} \lor \neg \left(z \leq 2.4 \cdot 10^{-39}\right):\\
\;\;\;\;t_0 + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\

\mathbf{else}:\\
\;\;\;\;t_0 + \left(\frac{0.083333333333333}{x} + \frac{z \cdot -0.0027777777777778}{x}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.9000000000000001e-5 or 2.40000000000000016e-39 < z

    1. Initial program 90.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. sub-neg90.3%

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

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

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

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

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

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

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

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

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

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

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

    if -1.9000000000000001e-5 < z < 2.40000000000000016e-39

    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. sub-neg99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 95.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{-5} \lor \neg \left(z \leq 7.2 \cdot 10^{-40}\right):\\
\;\;\;\;t_0 + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\

\mathbf{else}:\\
\;\;\;\;t_0 + \left(\frac{0.083333333333333}{x} + \frac{z \cdot -0.0027777777777778}{x}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.8000000000000002e-5 or 7.2e-40 < z

    1. Initial program 90.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. sub-neg90.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.8000000000000002e-5 < z < 7.2e-40

    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. sub-neg99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 71.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq -7.5 \cdot 10^{+131}:\\
\;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + \left(x \cdot \log x - x\right)\right)\\

\mathbf{elif}\;z \leq -5.2 \cdot 10^{+48} \lor \neg \left(z \leq 7.5 \cdot 10^{+129}\right):\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.0000000000000002e152 or -7.4999999999999995e131 < z < -5.1999999999999999e48 or 7.4999999999999998e129 < z

    1. Initial program 88.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.0000000000000002e152 < z < -7.4999999999999995e131

    1. Initial program 85.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. sub-neg85.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(\log x \cdot x - x\right)} + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
      10. *-commutative59.9%

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

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

    if -5.1999999999999999e48 < z < 7.4999999999999998e129

    1. Initial program 98.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. sub-neg98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+152}:\\ \;\;\;\;\left(0.91893853320467 + -0.5 \cdot \log x\right) + y \cdot \frac{z \cdot z}{x}\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{+131}:\\ \;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + \left(x \cdot \log x - x\right)\right)\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{+48} \lor \neg \left(z \leq 7.5 \cdot 10^{+129}\right):\\ \;\;\;\;\left(0.91893853320467 + -0.5 \cdot \log x\right) + y \cdot \frac{z \cdot z}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right)\\ \end{array} \]

Alternative 8: 72.4% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq -6.2 \cdot 10^{+131}:\\
\;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + \left(x \cdot \log x - x\right)\right)\\

\mathbf{elif}\;z \leq -2.4 \cdot 10^{+50} \lor \neg \left(z \leq 2.5 \cdot 10^{+130}\right):\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.6000000000000001e152 or -6.20000000000000032e131 < z < -2.4000000000000002e50 or 2.4999999999999998e130 < z

    1. Initial program 88.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.6000000000000001e152 < z < -6.20000000000000032e131

    1. Initial program 85.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. sub-neg85.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(\log x \cdot x - x\right)} + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
      10. *-commutative59.9%

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

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

    if -2.4000000000000002e50 < z < 2.4999999999999998e130

    1. Initial program 98.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. sub-neg98.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.6 \cdot 10^{+152}:\\ \;\;\;\;\left(0.91893853320467 + -0.5 \cdot \log x\right) + y \cdot \frac{z \cdot z}{x}\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{+131}:\\ \;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + \left(x \cdot \log x - x\right)\right)\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{+50} \lor \neg \left(z \leq 2.5 \cdot 10^{+130}\right):\\ \;\;\;\;\left(0.91893853320467 + -0.5 \cdot \log x\right) + y \cdot \frac{z \cdot z}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\ \end{array} \]

Alternative 9: 83.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{-5} \lor \neg \left(z \leq 2.55 \cdot 10^{-39}\right):\\
\;\;\;\;\left(0.91893853320467 + \left(x \cdot \log x - x\right)\right) + y \cdot \left(z \cdot \frac{z}{x}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.9000000000000001e-5 or 2.54999999999999994e-39 < z

    1. Initial program 90.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. sub-neg90.3%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\mathsf{fma}\left(\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}} \]
    4. Taylor expanded in y around inf 68.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}} \]
    5. Step-by-step derivation
      1. *-lft-identity68.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(\log x \cdot x - x\right)} + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
      10. *-commutative26.9%

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

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

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

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

        \[\leadsto \left(\left(x \cdot \log x - x\right) + 0.91893853320467\right) + y \cdot \color{blue}{\left(z \cdot \frac{z}{x}\right)} \]
    12. Simplified75.7%

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

    if -1.9000000000000001e-5 < z < 2.54999999999999994e-39

    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. sub-neg99.5%

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

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

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

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

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

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

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

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

Alternative 10: 56.3% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 22.6% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 2.5% accurate, 1.2× speedup?

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

\\
0.91893853320467 - \log x \cdot 0.5
\end{array}
Derivation
  1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 0.91893853320467 + 0.5 \cdot \color{blue}{\left(-\log x\right)} \]
  9. Simplified2.6%

    \[\leadsto \color{blue}{0.91893853320467 + 0.5 \cdot \left(-\log x\right)} \]
  10. Final simplification2.6%

    \[\leadsto 0.91893853320467 - \log x \cdot 0.5 \]

Developer target: 98.7% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2023268 
(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)))