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

Percentage Accurate: 93.3% → 99.6%
Time: 16.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: 93.3% accurate, 1.0× speedup?

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

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

Alternative 1: 99.6% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3e15 < x

    1. Initial program 85.0%

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

        \[\leadsto \left(\left(\color{blue}{\left(-\left(-\left(x - 0.5\right)\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. remove-double-neg85.0%

        \[\leadsto \left(\left(\color{blue}{\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} \]
      3. sub-neg85.0%

        \[\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} \]
      4. metadata-eval85.0%

        \[\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} \]
      5. *-commutative85.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]
    7. Step-by-step derivation
      1. associate-/l*91.5%

        \[\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/92.2%

        \[\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. unpow292.2%

        \[\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) \]
      4. associate-/l*99.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\color{blue}{\left(\log \left(\frac{1}{x}\right) + 1\right)} \cdot -1\right) + \frac{z}{\frac{x}{z}} \cdot \left(0.0007936500793651 + y\right) \]
      8. distribute-lft1-in99.7%

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

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

        \[\leadsto x \cdot \left(\color{blue}{\left(-\log \left(\frac{1}{x}\right)\right)} + -1\right) + \frac{z}{\frac{x}{z}} \cdot \left(0.0007936500793651 + y\right) \]
      11. log-rec99.7%

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

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

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

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

Alternative 2: 95.1% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.8e8 or 5.4999999999999997e-35 < z

    1. Initial program 85.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. remove-double-neg85.5%

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

        \[\leadsto \left(\left(\color{blue}{\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} \]
      3. sub-neg85.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} \]
      4. metadata-eval85.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} \]
      5. *-commutative85.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]
    7. 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{{z}^{2}}{\frac{x}{0.0007936500793651 + y}}} \]
      2. associate-/r/91.6%

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

        \[\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) \]
      4. associate-/l*98.8%

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

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

    if -6.8e8 < z < 5.4999999999999997e-35

    1. Initial program 99.4%

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

        \[\leadsto \left(\left(\color{blue}{\left(-\left(-\left(x - 0.5\right)\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. remove-double-neg99.4%

        \[\leadsto \left(\left(\color{blue}{\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} \]
      3. sub-neg99.4%

        \[\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} \]
      4. metadata-eval99.4%

        \[\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} \]
      5. *-commutative99.4%

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

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

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

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

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

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

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

Alternative 3: 99.6% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.6%

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

    if 1.06e14 < x

    1. Initial program 85.0%

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

        \[\leadsto \left(\left(\color{blue}{\left(-\left(-\left(x - 0.5\right)\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. remove-double-neg85.0%

        \[\leadsto \left(\left(\color{blue}{\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} \]
      3. sub-neg85.0%

        \[\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} \]
      4. metadata-eval85.0%

        \[\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} \]
      5. *-commutative85.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]
    7. Step-by-step derivation
      1. associate-/l*91.5%

        \[\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/92.2%

        \[\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. unpow292.2%

        \[\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) \]
      4. associate-/l*99.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\color{blue}{\left(\log \left(\frac{1}{x}\right) + 1\right)} \cdot -1\right) + \frac{z}{\frac{x}{z}} \cdot \left(0.0007936500793651 + y\right) \]
      8. distribute-lft1-in99.7%

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

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

        \[\leadsto x \cdot \left(\color{blue}{\left(-\log \left(\frac{1}{x}\right)\right)} + -1\right) + \frac{z}{\frac{x}{z}} \cdot \left(0.0007936500793651 + y\right) \]
      11. log-rec99.7%

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

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

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

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

Alternative 4: 94.9% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.2e8 or 1.64999999999999991e-34 < z

    1. Initial program 85.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. remove-double-neg85.5%

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

        \[\leadsto \left(\left(\color{blue}{\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} \]
      3. sub-neg85.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} \]
      4. metadata-eval85.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} \]
      5. *-commutative85.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]
    7. 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{{z}^{2}}{\frac{x}{0.0007936500793651 + y}}} \]
      2. associate-/r/91.6%

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

        \[\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) \]
      4. associate-/l*98.8%

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

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

    if -5.2e8 < z < 1.64999999999999991e-34

    1. Initial program 99.4%

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

        \[\leadsto \left(\left(\color{blue}{\left(-\left(-\left(x - 0.5\right)\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. remove-double-neg99.4%

        \[\leadsto \left(\left(\color{blue}{\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} \]
      3. sub-neg99.4%

        \[\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} \]
      4. metadata-eval99.4%

        \[\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} \]
      5. *-commutative99.4%

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

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

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

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

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

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

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

Alternative 5: 69.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := 0.91893853320467 + \log x \cdot -0.5\\
t_1 := t_0 + 0.0007936500793651 \cdot \frac{z \cdot z}{x}\\
\mathbf{if}\;z \leq -8.8 \cdot 10^{+223}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -2.15 \cdot 10^{+126}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\

\mathbf{elif}\;z \leq -2.8 \cdot 10^{+61}:\\
\;\;\;\;t_0 + 0.0007936500793651 \cdot \frac{z}{\frac{x}{z}}\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.7999999999999999e223 or 1.40000000000000009e43 < z

    1. Initial program 92.4%

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

        \[\leadsto \left(\left(\color{blue}{\left(-\left(-\left(x - 0.5\right)\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. remove-double-neg92.4%

        \[\leadsto \left(\left(\color{blue}{\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} \]
      3. sub-neg92.4%

        \[\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} \]
      4. metadata-eval92.4%

        \[\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} \]
      5. *-commutative92.4%

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

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

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

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

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

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

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

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

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

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

    if -8.7999999999999999e223 < z < -2.1500000000000001e126

    1. Initial program 57.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. remove-double-neg57.6%

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

        \[\leadsto \left(\left(\color{blue}{\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} \]
      3. sub-neg57.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} \]
      4. metadata-eval57.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} \]
      5. *-commutative57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.1500000000000001e126 < z < -2.8000000000000001e61

    1. Initial program 92.4%

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

        \[\leadsto \left(\left(\color{blue}{\left(-\left(-\left(x - 0.5\right)\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. remove-double-neg92.4%

        \[\leadsto \left(\left(\color{blue}{\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} \]
      3. sub-neg92.4%

        \[\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} \]
      4. metadata-eval92.4%

        \[\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} \]
      5. *-commutative92.4%

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

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

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

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

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

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

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

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

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

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

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

    if -2.8000000000000001e61 < z < 1.40000000000000009e43

    1. Initial program 97.1%

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

        \[\leadsto \left(\left(\color{blue}{\left(-\left(-\left(x - 0.5\right)\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. remove-double-neg97.1%

        \[\leadsto \left(\left(\color{blue}{\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} \]
      3. sub-neg97.1%

        \[\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} \]
      4. metadata-eval97.1%

        \[\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} \]
      5. *-commutative97.1%

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x}} \]
    4. Taylor expanded in z around 0 89.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 4 regimes into one program.
  4. Final simplification77.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.8 \cdot 10^{+223}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + 0.0007936500793651 \cdot \frac{z \cdot z}{x}\\ \mathbf{elif}\;z \leq -2.15 \cdot 10^{+126}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{+61}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + 0.0007936500793651 \cdot \frac{z}{\frac{x}{z}}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+43}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + 0.0007936500793651 \cdot \frac{z \cdot z}{x}\\ \end{array} \]

Alternative 6: 70.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := 0.91893853320467 + \log x \cdot -0.5\\
t_1 := t_0 + 0.0007936500793651 \cdot \frac{z \cdot z}{x}\\
\mathbf{if}\;z \leq -8.5 \cdot 10^{+223}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -5.6 \cdot 10^{+125}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\

\mathbf{elif}\;z \leq -1.2 \cdot 10^{+64}:\\
\;\;\;\;t_0 + 0.0007936500793651 \cdot \frac{z}{\frac{x}{z}}\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.5000000000000005e223 or 3.20000000000000002e42 < z

    1. Initial program 92.4%

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

        \[\leadsto \left(\left(\color{blue}{\left(-\left(-\left(x - 0.5\right)\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. remove-double-neg92.4%

        \[\leadsto \left(\left(\color{blue}{\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} \]
      3. sub-neg92.4%

        \[\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} \]
      4. metadata-eval92.4%

        \[\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} \]
      5. *-commutative92.4%

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

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

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

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

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

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

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

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

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

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

    if -8.5000000000000005e223 < z < -5.6000000000000002e125

    1. Initial program 57.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. remove-double-neg57.6%

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

        \[\leadsto \left(\left(\color{blue}{\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} \]
      3. sub-neg57.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} \]
      4. metadata-eval57.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} \]
      5. *-commutative57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.6000000000000002e125 < z < -1.2e64

    1. Initial program 92.4%

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

        \[\leadsto \left(\left(\color{blue}{\left(-\left(-\left(x - 0.5\right)\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. remove-double-neg92.4%

        \[\leadsto \left(\left(\color{blue}{\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} \]
      3. sub-neg92.4%

        \[\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} \]
      4. metadata-eval92.4%

        \[\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} \]
      5. *-commutative92.4%

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

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

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

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

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

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

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

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

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

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

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

    if -1.2e64 < z < 3.20000000000000002e42

    1. Initial program 97.1%

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

        \[\leadsto \left(\left(\color{blue}{\left(-\left(-\left(x - 0.5\right)\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. remove-double-neg97.1%

        \[\leadsto \left(\left(\color{blue}{\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} \]
      3. sub-neg97.1%

        \[\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} \]
      4. metadata-eval97.1%

        \[\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} \]
      5. *-commutative97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+223}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + 0.0007936500793651 \cdot \frac{z \cdot z}{x}\\ \mathbf{elif}\;z \leq -5.6 \cdot 10^{+125}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{+64}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + 0.0007936500793651 \cdot \frac{z}{\frac{x}{z}}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+42}:\\ \;\;\;\;\left(\log x \cdot \left(x + -0.5\right) - \left(x + -0.91893853320467\right)\right) + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + 0.0007936500793651 \cdot \frac{z \cdot z}{x}\\ \end{array} \]

Alternative 7: 95.1% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.2e8 or 1.5999999999999999e-10 < z

    1. Initial program 85.0%

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

        \[\leadsto \left(\left(\color{blue}{\left(-\left(-\left(x - 0.5\right)\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. remove-double-neg85.0%

        \[\leadsto \left(\left(\color{blue}{\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} \]
      3. sub-neg85.0%

        \[\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} \]
      4. metadata-eval85.0%

        \[\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} \]
      5. *-commutative85.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]
    7. Step-by-step derivation
      1. associate-/l*91.3%

        \[\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/92.0%

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

        \[\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) \]
      4. 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{x}{z}}} \cdot \left(0.0007936500793651 + y\right) \]
    8. Simplified99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.2e8 < z < 1.5999999999999999e-10

    1. Initial program 99.4%

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

        \[\leadsto \left(\left(\color{blue}{\left(-\left(-\left(x - 0.5\right)\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. remove-double-neg99.4%

        \[\leadsto \left(\left(\color{blue}{\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} \]
      3. sub-neg99.4%

        \[\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} \]
      4. metadata-eval99.4%

        \[\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} \]
      5. *-commutative99.4%

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

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

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

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

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

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

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

Alternative 8: 95.1% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4400 or 6.4999999999999999e-35 < z

    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. remove-double-neg85.8%

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

        \[\leadsto \left(\left(\color{blue}{\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} \]
      3. 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} \]
      4. 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} \]
      5. *-commutative85.8%

        \[\leadsto \left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\color{blue}{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)} + 0.083333333333333}{x} \]
      6. 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(z, \left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778, 0.083333333333333\right)}}{x} \]
      7. fma-neg85.8%

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

        \[\leadsto \left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
    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(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x}} \]
    4. Step-by-step derivation
      1. clear-num85.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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/91.8%

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

        \[\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) \]
      4. associate-/l*98.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\color{blue}{\left(\log \left(\frac{1}{x}\right) + 1\right)} \cdot -1\right) + \frac{z}{\frac{x}{z}} \cdot \left(0.0007936500793651 + y\right) \]
      8. distribute-lft1-in98.7%

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

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

        \[\leadsto x \cdot \left(\color{blue}{\left(-\log \left(\frac{1}{x}\right)\right)} + -1\right) + \frac{z}{\frac{x}{z}} \cdot \left(0.0007936500793651 + y\right) \]
      11. log-rec98.7%

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

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

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

    if -4400 < z < 6.4999999999999999e-35

    1. Initial program 99.4%

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

        \[\leadsto \left(\left(\color{blue}{\left(-\left(-\left(x - 0.5\right)\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. remove-double-neg99.4%

        \[\leadsto \left(\left(\color{blue}{\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} \]
      3. sub-neg99.4%

        \[\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} \]
      4. metadata-eval99.4%

        \[\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} \]
      5. *-commutative99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 69.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+223} \lor \neg \left(z \leq 5.4 \cdot 10^{+90}\right):\\
\;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + 0.0007936500793651 \cdot \frac{z}{\frac{x}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.5000000000000005e223 or 5.4e90 < z

    1. Initial program 94.9%

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

        \[\leadsto \left(\left(\color{blue}{\left(-\left(-\left(x - 0.5\right)\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. remove-double-neg94.9%

        \[\leadsto \left(\left(\color{blue}{\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} \]
      3. sub-neg94.9%

        \[\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} \]
      4. metadata-eval94.9%

        \[\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} \]
      5. *-commutative94.9%

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

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

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

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

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

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

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

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

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

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

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

    if -8.5000000000000005e223 < z < 5.4e90

    1. Initial program 91.7%

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

        \[\leadsto \left(\left(\color{blue}{\left(-\left(-\left(x - 0.5\right)\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. remove-double-neg91.7%

        \[\leadsto \left(\left(\color{blue}{\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} \]
      3. sub-neg91.7%

        \[\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} \]
      4. metadata-eval91.7%

        \[\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} \]
      5. *-commutative91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+223} \lor \neg \left(z \leq 5.4 \cdot 10^{+90}\right):\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + 0.0007936500793651 \cdot \frac{z}{\frac{x}{z}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\ \end{array} \]

Alternative 10: 69.5% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+223} \lor \neg \left(z \leq 2.85 \cdot 10^{+91}\right):\\
\;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + 0.0007936500793651 \cdot \frac{z \cdot z}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.5000000000000005e223 or 2.84999999999999982e91 < z

    1. Initial program 94.9%

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

        \[\leadsto \left(\left(\color{blue}{\left(-\left(-\left(x - 0.5\right)\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. remove-double-neg94.9%

        \[\leadsto \left(\left(\color{blue}{\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} \]
      3. sub-neg94.9%

        \[\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} \]
      4. metadata-eval94.9%

        \[\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} \]
      5. *-commutative94.9%

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

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

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

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

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

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

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

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

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

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

    if -8.5000000000000005e223 < z < 2.84999999999999982e91

    1. Initial program 91.7%

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

        \[\leadsto \left(\left(\color{blue}{\left(-\left(-\left(x - 0.5\right)\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. remove-double-neg91.7%

        \[\leadsto \left(\left(\color{blue}{\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} \]
      3. sub-neg91.7%

        \[\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} \]
      4. metadata-eval91.7%

        \[\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} \]
      5. *-commutative91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+223} \lor \neg \left(z \leq 2.85 \cdot 10^{+91}\right):\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + 0.0007936500793651 \cdot \frac{z \cdot z}{x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\ \end{array} \]

Alternative 11: 61.5% accurate, 1.1× speedup?

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

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

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

      \[\leadsto \left(\left(\color{blue}{\left(-\left(-\left(x - 0.5\right)\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. remove-double-neg92.4%

      \[\leadsto \left(\left(\color{blue}{\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} \]
    3. sub-neg92.4%

      \[\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} \]
    4. metadata-eval92.4%

      \[\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} \]
    5. *-commutative92.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 56.1% accurate, 1.1× speedup?

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

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

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

      \[\leadsto \left(\left(\color{blue}{\left(-\left(-\left(x - 0.5\right)\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. remove-double-neg92.4%

      \[\leadsto \left(\left(\color{blue}{\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} \]
    3. sub-neg92.4%

      \[\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} \]
    4. metadata-eval92.4%

      \[\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} \]
    5. *-commutative92.4%

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

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

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

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

    \[\leadsto \color{blue}{\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x}} \]
  4. Taylor expanded in z around 0 61.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 60.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Developer target: 98.5% 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 2023199 
(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)))