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

Percentage Accurate: 93.7% → 99.6%
Time: 19.1s
Alternatives: 17
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 17 alternatives:

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

Initial Program: 93.7% accurate, 1.0× speedup?

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

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

Alternative 1: 99.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 4 \cdot 10^{+22}:\\ \;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\frac{1}{x}}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, y + 0.0007936500793651, -0.0027777777777778\right), 0.083333333333333\right)}}\\ \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 4e+22)
   (+
    (+ (- (* (+ x -0.5) (log x)) x) 0.91893853320467)
    (/
     (/ 1.0 x)
     (/
      1.0
      (fma
       z
       (fma z (+ y 0.0007936500793651) -0.0027777777777778)
       0.083333333333333))))
   (+ (* x (+ (log x) -1.0)) (* (+ y 0.0007936500793651) (/ z (/ x z))))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 4e+22) {
		tmp = ((((x + -0.5) * log(x)) - x) + 0.91893853320467) + ((1.0 / x) / (1.0 / fma(z, fma(z, (y + 0.0007936500793651), -0.0027777777777778), 0.083333333333333)));
	} 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 <= 4e+22)
		tmp = Float64(Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(1.0 / x) / Float64(1.0 / fma(z, fma(z, Float64(y + 0.0007936500793651), -0.0027777777777778), 0.083333333333333))));
	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, 4e+22], N[(N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] / N[(1.0 / N[(z * N[(z * N[(y + 0.0007936500793651), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision]), $MachinePrecision]), $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 4 \cdot 10^{+22}:\\
\;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\frac{1}{x}}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, y + 0.0007936500793651, -0.0027777777777778\right), 0.083333333333333\right)}}\\

\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 < 4e22

    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(\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.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-neg99.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-eval99.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. *-commutative99.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-def99.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-neg99.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-eval99.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. Simplified99.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. Step-by-step derivation
      1. clear-num99.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-eval99.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-neg99.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-udef99.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. *-commutative99.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-pow99.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. *-commutative99.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-udef99.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-neg99.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-eval99.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-udef99.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. *-commutative99.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-def99.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-rr99.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. Step-by-step derivation
      1. unpow-199.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(z, y + 0.0007936500793651, -0.0027777777777778\right), 0.083333333333333\right)}}} \]
      2. div-inv99.7%

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

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

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

    if 4e22 < x

    1. Initial program 88.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-neg88.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-neg88.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-neg88.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-eval88.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. *-commutative88.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-def88.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-neg88.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-eval88.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. Simplified88.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. Step-by-step derivation
      1. clear-num88.1%

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

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

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

        \[\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. *-commutative88.1%

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

        \[\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. *-commutative88.1%

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

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

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

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

        \[\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. *-commutative88.1%

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

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

      \[\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. Step-by-step derivation
      1. unpow-188.1%

        \[\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(z, y + 0.0007936500793651, -0.0027777777777778\right), 0.083333333333333\right)}}} \]
      2. div-inv88.1%

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

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

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

      \[\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}} \]
    9. Step-by-step derivation
      1. *-commutative87.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 10^{+23}:\\ \;\;\;\;\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}\\ \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 1e+23)
   (+
    (+ (- (* (+ x -0.5) (log x)) x) 0.91893853320467)
    (/
     (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 <= 1e+23) {
		tmp = ((((x + -0.5) * log(x)) - x) + 0.91893853320467) + (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 <= 1e+23)
		tmp = Float64(Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - x) + 0.91893853320467) + 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, 1e+23], N[(N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $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 10^{+23}:\\
\;\;\;\;\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}\\

\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 < 9.9999999999999992e22

    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(\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.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-neg99.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-eval99.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. *-commutative99.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-def99.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-neg99.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-eval99.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. Simplified99.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}} \]

    if 9.9999999999999992e22 < x

    1. Initial program 88.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-neg88.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-neg88.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-neg88.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-eval88.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. *-commutative88.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-def88.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-neg88.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-eval88.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. Simplified88.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-num88.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-eval88.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-neg88.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-udef88.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. *-commutative88.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-pow88.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. *-commutative88.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-udef88.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-neg88.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-eval88.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-udef88.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. *-commutative88.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-def88.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-rr88.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. Step-by-step derivation
      1. unpow-188.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(z, y + 0.0007936500793651, -0.0027777777777778\right), 0.083333333333333\right)}}} \]
      2. div-inv88.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 10^{+23}:\\ \;\;\;\;\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}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z}{\frac{x}{z}}\\ \end{array} \]

Alternative 3: 98.8% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -22500 or 5.6e20 < z

    1. Initial program 89.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-neg89.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-neg89.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-neg89.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-eval89.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. *-commutative89.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-def89.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-neg89.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-eval89.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. Simplified89.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. Step-by-step derivation
      1. clear-num89.4%

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

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

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

        \[\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. *-commutative89.4%

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

        \[\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. *-commutative89.4%

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

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

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

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

        \[\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. *-commutative89.4%

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

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

      \[\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. Step-by-step derivation
      1. unpow-189.4%

        \[\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(z, y + 0.0007936500793651, -0.0027777777777778\right), 0.083333333333333\right)}}} \]
      2. div-inv89.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -22500 < z < 5.6e20

    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 inf 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 98.8% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -22500 or 5.6e20 < z

    1. Initial program 89.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-neg89.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-neg89.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-neg89.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-eval89.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. *-commutative89.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-def89.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-neg89.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-eval89.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. Simplified89.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. Step-by-step derivation
      1. clear-num89.4%

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

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

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

        \[\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. *-commutative89.4%

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

        \[\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. *-commutative89.4%

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

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

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

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

        \[\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. *-commutative89.4%

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

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

      \[\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. Step-by-step derivation
      1. unpow-189.4%

        \[\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(z, y + 0.0007936500793651, -0.0027777777777778\right), 0.083333333333333\right)}}} \]
      2. div-inv89.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -22500 < z < 5.6e20

    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 inf 99.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 99.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 5.6 \cdot 10^{+23}:\\ \;\;\;\;\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 5.6e+23)
   (+
    (+ 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 <= 5.6e+23) {
		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 <= 5.6d+23) 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 <= 5.6e+23) {
		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 <= 5.6e+23:
		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 <= 5.6e+23)
		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 <= 5.6e+23)
		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, 5.6e+23], 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 5.6 \cdot 10^{+23}:\\
\;\;\;\;\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 < 5.6e23

    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 5.6e23 < x

    1. Initial program 88.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-neg88.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-neg88.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-neg88.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-eval88.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. *-commutative88.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-def88.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-neg88.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-eval88.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. Simplified88.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-num88.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-eval88.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-neg88.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-udef88.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. *-commutative88.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-pow88.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. *-commutative88.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-udef88.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-neg88.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-eval88.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-udef88.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. *-commutative88.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-def88.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-rr88.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. Step-by-step derivation
      1. unpow-188.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(z, y + 0.0007936500793651, -0.0027777777777778\right), 0.083333333333333\right)}}} \]
      2. div-inv88.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 5.6 \cdot 10^{+23}:\\ \;\;\;\;\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 6: 95.8% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.99999999999999982e-21 or 5.3999999999999996e-47 < z

    1. Initial program 90.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-neg90.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-neg90.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-neg90.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-eval90.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. *-commutative90.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-def90.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-neg90.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-eval90.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. Simplified90.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. Step-by-step derivation
      1. clear-num90.4%

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

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

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

        \[\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. *-commutative90.4%

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

        \[\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. *-commutative90.4%

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

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

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

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

        \[\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. *-commutative90.4%

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

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

      \[\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. Step-by-step derivation
      1. unpow-190.4%

        \[\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(z, y + 0.0007936500793651, -0.0027777777777778\right), 0.083333333333333\right)}}} \]
      2. div-inv90.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.99999999999999982e-21 < z < 5.3999999999999996e-47

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

Alternative 7: 95.8% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.2000000000000002e-21 or 4.5e-47 < z

    1. Initial program 90.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-neg90.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-neg90.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-neg90.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-eval90.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. *-commutative90.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-def90.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-neg90.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-eval90.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. Simplified90.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. Step-by-step derivation
      1. clear-num90.4%

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

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

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

        \[\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. *-commutative90.4%

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

        \[\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. *-commutative90.4%

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

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

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

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

        \[\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. *-commutative90.4%

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

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

      \[\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. Step-by-step derivation
      1. unpow-190.4%

        \[\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(z, y + 0.0007936500793651, -0.0027777777777778\right), 0.083333333333333\right)}}} \]
      2. div-inv90.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.2000000000000002e-21 < z < 4.5e-47

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\log x + -1\right) + {\color{blue}{\left(x \cdot \frac{1}{0.083333333333333}\right)}}^{-1} \]
      4. metadata-eval92.0%

        \[\leadsto x \cdot \left(\log x + -1\right) + {\left(x \cdot \color{blue}{12.000000000000048}\right)}^{-1} \]
    6. Applied egg-rr94.0%

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

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

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

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

Alternative 8: 71.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+76} \lor \neg \left(z \leq 1.12 \cdot 10^{+103}\right):\\
\;\;\;\;\frac{y}{\frac{x}{z \cdot z}} + \left(0.91893853320467 + -0.5 \cdot \log x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.1e76 or 1.12000000000000007e103 < z

    1. Initial program 86.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-neg86.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-neg86.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-neg86.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-eval86.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. *-commutative86.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-def86.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-neg86.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-eval86.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. Simplified86.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. Taylor expanded in y around inf 64.5%

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

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

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

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

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

    if -1.1e76 < z < 1.12000000000000007e103

    1. Initial program 98.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-neg98.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-neg98.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-neg98.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-eval98.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. *-commutative98.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-def98.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-neg98.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-eval98.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. Simplified98.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. Taylor expanded in z around 0 80.7%

      \[\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 79.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. *-commutative61.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\log x + -1\right) + {\left(x \cdot \color{blue}{12.000000000000048}\right)}^{-1} \]
    9. Applied egg-rr79.4%

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

        \[\leadsto x \cdot \left(\log x + -1\right) + \color{blue}{\frac{1}{x \cdot 12.000000000000048}} \]
    11. Simplified79.4%

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

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

Alternative 9: 72.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+75} \lor \neg \left(z \leq 2.5 \cdot 10^{+103}\right):\\
\;\;\;\;\frac{y}{\frac{x}{z \cdot z}} + \left(0.91893853320467 + -0.5 \cdot \log x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.99999999999999941e75 or 2.5e103 < z

    1. Initial program 86.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-neg86.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-neg86.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-neg86.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-eval86.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. *-commutative86.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-def86.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-neg86.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-eval86.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. Simplified86.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. Taylor expanded in y around inf 64.5%

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

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

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

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

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

    if -7.99999999999999941e75 < z < 2.5e103

    1. Initial program 98.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-neg98.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-neg98.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-neg98.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-eval98.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. *-commutative98.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-def98.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-neg98.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-eval98.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. Simplified98.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. Taylor expanded in z around 0 80.7%

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

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

Alternative 10: 61.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.9 \cdot 10^{-11}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\

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


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

    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(\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.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-neg99.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-eval99.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. *-commutative99.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-def99.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-neg99.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-eval99.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. Simplified99.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 60.8%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{0.083333333333333 + -0.0027777777777778 \cdot z}{x}} \]

    if 1.8999999999999999e-11 < x

    1. Initial program 89.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-neg89.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-neg89.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-neg89.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-eval89.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. *-commutative89.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-def89.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-neg89.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-eval89.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. Simplified89.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 62.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\log x + -1\right) + {\left(x \cdot \color{blue}{12.000000000000048}\right)}^{-1} \]
    9. Applied egg-rr60.5%

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

        \[\leadsto x \cdot \left(\log x + -1\right) + \color{blue}{\frac{1}{x \cdot 12.000000000000048}} \]
    11. Simplified60.5%

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

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

Alternative 11: 61.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 9.2 \cdot 10^{-10}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\

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


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

    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(\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.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-neg99.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-eval99.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. *-commutative99.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-def99.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-neg99.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-eval99.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. Simplified99.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 60.8%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{0.083333333333333 + -0.0027777777777778 \cdot z}{x}} \]

    if 9.20000000000000028e-10 < x

    1. Initial program 89.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-neg89.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-neg89.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-neg89.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-eval89.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. *-commutative89.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-def89.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-neg89.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-eval89.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. Simplified89.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 62.2%

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

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

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

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

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

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

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

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

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

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

Alternative 12: 33.5% accurate, 7.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.85 \cdot 10^{-10}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\

\mathbf{else}:\\
\;\;\;\;\frac{x \cdot x - \frac{0.0069444444444443885}{x \cdot x}}{x - \frac{0.083333333333333}{x}}\\


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

    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(\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.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-neg99.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-eval99.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. *-commutative99.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-def99.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-neg99.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-eval99.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. Simplified99.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 60.8%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{0.083333333333333 + -0.0027777777777778 \cdot z}{x}} \]

    if 1.85000000000000007e-10 < x

    1. Initial program 89.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-neg89.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-neg89.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-neg89.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-eval89.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. *-commutative89.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-def89.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-neg89.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-eval89.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. Simplified89.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 62.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. add-sqr-sqrt61.9%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot x} + \frac{0.083333333333333}{x} \]
    8. Step-by-step derivation
      1. mul-1-neg2.0%

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

      \[\leadsto \color{blue}{\left(-x\right)} + \frac{0.083333333333333}{x} \]
    10. Step-by-step derivation
      1. flip-+4.1%

        \[\leadsto \color{blue}{\frac{\left(-x\right) \cdot \left(-x\right) - \frac{0.083333333333333}{x} \cdot \frac{0.083333333333333}{x}}{\left(-x\right) - \frac{0.083333333333333}{x}}} \]
      2. div-sub4.1%

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

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

        \[\leadsto \frac{x \cdot x}{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}} - \frac{0.083333333333333}{x}} - \frac{\frac{0.083333333333333}{x} \cdot \frac{0.083333333333333}{x}}{\left(-x\right) - \frac{0.083333333333333}{x}} \]
      5. sqrt-unprod5.2%

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

        \[\leadsto \frac{x \cdot x}{\sqrt{\color{blue}{x \cdot x}} - \frac{0.083333333333333}{x}} - \frac{\frac{0.083333333333333}{x} \cdot \frac{0.083333333333333}{x}}{\left(-x\right) - \frac{0.083333333333333}{x}} \]
      7. sqrt-unprod13.0%

        \[\leadsto \frac{x \cdot x}{\color{blue}{\sqrt{x} \cdot \sqrt{x}} - \frac{0.083333333333333}{x}} - \frac{\frac{0.083333333333333}{x} \cdot \frac{0.083333333333333}{x}}{\left(-x\right) - \frac{0.083333333333333}{x}} \]
      8. add-sqr-sqrt13.0%

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

        \[\leadsto \frac{x \cdot x}{x - \frac{0.083333333333333}{x}} - \frac{\color{blue}{\frac{0.083333333333333 \cdot 0.083333333333333}{x \cdot x}}}{\left(-x\right) - \frac{0.083333333333333}{x}} \]
      10. metadata-eval13.0%

        \[\leadsto \frac{x \cdot x}{x - \frac{0.083333333333333}{x}} - \frac{\frac{\color{blue}{0.0069444444444443885}}{x \cdot x}}{\left(-x\right) - \frac{0.083333333333333}{x}} \]
      11. add-sqr-sqrt0.0%

        \[\leadsto \frac{x \cdot x}{x - \frac{0.083333333333333}{x}} - \frac{\frac{0.0069444444444443885}{x \cdot x}}{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}} - \frac{0.083333333333333}{x}} \]
      12. sqrt-unprod13.0%

        \[\leadsto \frac{x \cdot x}{x - \frac{0.083333333333333}{x}} - \frac{\frac{0.0069444444444443885}{x \cdot x}}{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} - \frac{0.083333333333333}{x}} \]
      13. sqr-neg13.0%

        \[\leadsto \frac{x \cdot x}{x - \frac{0.083333333333333}{x}} - \frac{\frac{0.0069444444444443885}{x \cdot x}}{\sqrt{\color{blue}{x \cdot x}} - \frac{0.083333333333333}{x}} \]
      14. sqrt-unprod13.0%

        \[\leadsto \frac{x \cdot x}{x - \frac{0.083333333333333}{x}} - \frac{\frac{0.0069444444444443885}{x \cdot x}}{\color{blue}{\sqrt{x} \cdot \sqrt{x}} - \frac{0.083333333333333}{x}} \]
      15. add-sqr-sqrt13.0%

        \[\leadsto \frac{x \cdot x}{x - \frac{0.083333333333333}{x}} - \frac{\frac{0.0069444444444443885}{x \cdot x}}{\color{blue}{x} - \frac{0.083333333333333}{x}} \]
    11. Applied egg-rr13.0%

      \[\leadsto \color{blue}{\frac{x \cdot x}{x - \frac{0.083333333333333}{x}} - \frac{\frac{0.0069444444444443885}{x \cdot x}}{x - \frac{0.083333333333333}{x}}} \]
    12. Step-by-step derivation
      1. div-sub13.0%

        \[\leadsto \color{blue}{\frac{x \cdot x - \frac{0.0069444444444443885}{x \cdot x}}{x - \frac{0.083333333333333}{x}}} \]
    13. Simplified13.0%

      \[\leadsto \color{blue}{\frac{x \cdot x - \frac{0.0069444444444443885}{x \cdot x}}{x - \frac{0.083333333333333}{x}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification35.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.85 \cdot 10^{-10}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot x - \frac{0.0069444444444443885}{x \cdot x}}{x - \frac{0.083333333333333}{x}}\\ \end{array} \]

Alternative 13: 28.7% accurate, 13.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -30 \lor \neg \left(z \leq 1.15 \cdot 10^{+50}\right):\\
\;\;\;\;-0.0027777777777778 \cdot \frac{z}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -30 or 1.14999999999999998e50 < z

    1. Initial program 89.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.0027777777777778 \cdot \frac{z}{x}} \]

    if -30 < z < 1.14999999999999998e50

    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 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. add-sqr-sqrt88.8%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot x} + \frac{0.083333333333333}{x} \]
    8. Step-by-step derivation
      1. mul-1-neg45.8%

        \[\leadsto \color{blue}{\left(-x\right)} + \frac{0.083333333333333}{x} \]
    9. Simplified45.8%

      \[\leadsto \color{blue}{\left(-x\right)} + \frac{0.083333333333333}{x} \]
    10. Taylor expanded in x around 0 47.0%

      \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification30.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -30 \lor \neg \left(z \leq 1.15 \cdot 10^{+50}\right):\\ \;\;\;\;-0.0027777777777778 \cdot \frac{z}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \end{array} \]

Alternative 14: 31.6% accurate, 13.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+99} \lor \neg \left(z \leq 10^{+150}\right):\\
\;\;\;\;-0.0027777777777778 \cdot \frac{z}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.9999999999999999e99 or 9.99999999999999981e149 < z

    1. Initial program 87.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.0027777777777778 \cdot \frac{z}{x}} \]

    if -3.9999999999999999e99 < z < 9.99999999999999981e149

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

      \[\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. add-sqr-sqrt73.6%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot x} + \frac{0.083333333333333}{x} \]
    8. Step-by-step derivation
      1. mul-1-neg33.3%

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

      \[\leadsto \color{blue}{\left(-x\right)} + \frac{0.083333333333333}{x} \]
    10. Step-by-step derivation
      1. expm1-log1p-u30.4%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(-x\right) + \frac{0.083333333333333}{x}\right)\right)} \]
      2. expm1-udef30.4%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left(-x\right) + \frac{0.083333333333333}{x}\right)} - 1} \]
      3. add-sqr-sqrt0.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{-x} \cdot \sqrt{-x}} + \frac{0.083333333333333}{x}\right)} - 1 \]
      4. sqrt-unprod35.8%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} + \frac{0.083333333333333}{x}\right)} - 1 \]
      5. sqr-neg35.8%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{x \cdot x}} + \frac{0.083333333333333}{x}\right)} - 1 \]
      6. sqrt-unprod36.3%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{x} \cdot \sqrt{x}} + \frac{0.083333333333333}{x}\right)} - 1 \]
      7. add-sqr-sqrt36.3%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{x} + \frac{0.083333333333333}{x}\right)} - 1 \]
    11. Applied egg-rr36.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(x + \frac{0.083333333333333}{x}\right)} - 1} \]
    12. Step-by-step derivation
      1. expm1-def36.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x + \frac{0.083333333333333}{x}\right)\right)} \]
      2. expm1-log1p38.8%

        \[\leadsto \color{blue}{x + \frac{0.083333333333333}{x}} \]
    13. Simplified38.8%

      \[\leadsto \color{blue}{x + \frac{0.083333333333333}{x}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification33.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+99} \lor \neg \left(z \leq 10^{+150}\right):\\ \;\;\;\;-0.0027777777777778 \cdot \frac{z}{x}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{0.083333333333333}{x}\\ \end{array} \]

Alternative 15: 32.6% accurate, 13.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.35 \cdot 10^{-9}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\

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


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

    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(\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.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-neg99.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-eval99.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. *-commutative99.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-def99.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-neg99.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-eval99.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. Simplified99.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 60.8%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{0.083333333333333 + -0.0027777777777778 \cdot z}{x}} \]

    if 1.3500000000000001e-9 < x

    1. Initial program 89.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-neg89.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-neg89.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-neg89.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-eval89.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. *-commutative89.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-def89.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-neg89.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-eval89.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. Simplified89.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 62.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. add-sqr-sqrt61.9%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot x} + \frac{0.083333333333333}{x} \]
    8. Step-by-step derivation
      1. mul-1-neg2.0%

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

      \[\leadsto \color{blue}{\left(-x\right)} + \frac{0.083333333333333}{x} \]
    10. Step-by-step derivation
      1. expm1-log1p-u1.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(-x\right) + \frac{0.083333333333333}{x}\right)\right)} \]
      2. expm1-udef1.0%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left(-x\right) + \frac{0.083333333333333}{x}\right)} - 1} \]
      3. add-sqr-sqrt0.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{-x} \cdot \sqrt{-x}} + \frac{0.083333333333333}{x}\right)} - 1 \]
      4. sqrt-unprod13.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} + \frac{0.083333333333333}{x}\right)} - 1 \]
      5. sqr-neg13.0%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{x \cdot x}} + \frac{0.083333333333333}{x}\right)} - 1 \]
      6. sqrt-unprod10.6%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{x} \cdot \sqrt{x}} + \frac{0.083333333333333}{x}\right)} - 1 \]
      7. add-sqr-sqrt10.6%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{x} + \frac{0.083333333333333}{x}\right)} - 1 \]
    11. Applied egg-rr10.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(x + \frac{0.083333333333333}{x}\right)} - 1} \]
    12. Step-by-step derivation
      1. expm1-def10.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x + \frac{0.083333333333333}{x}\right)\right)} \]
      2. expm1-log1p10.6%

        \[\leadsto \color{blue}{x + \frac{0.083333333333333}{x}} \]
    13. Simplified10.6%

      \[\leadsto \color{blue}{x + \frac{0.083333333333333}{x}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification34.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.35 \cdot 10^{-9}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{0.083333333333333}{x}\\ \end{array} \]

Alternative 16: 22.7% accurate, 41.0× speedup?

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

\\
\frac{0.083333333333333}{x}
\end{array}
Derivation
  1. Initial program 94.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-neg94.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-neg94.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-neg94.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-eval94.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. *-commutative94.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-def94.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-neg94.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-eval94.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. Simplified94.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 56.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. add-sqr-sqrt55.8%

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

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

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

    \[\leadsto \color{blue}{-1 \cdot x} + \frac{0.083333333333333}{x} \]
  8. Step-by-step derivation
    1. mul-1-neg24.5%

      \[\leadsto \color{blue}{\left(-x\right)} + \frac{0.083333333333333}{x} \]
  9. Simplified24.5%

    \[\leadsto \color{blue}{\left(-x\right)} + \frac{0.083333333333333}{x} \]
  10. Taylor expanded in x around 0 25.4%

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

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

Alternative 17: 1.3% accurate, 61.5× speedup?

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

\\
-x
\end{array}
Derivation
  1. Initial program 94.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-neg94.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-neg94.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-neg94.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-eval94.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. *-commutative94.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-def94.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-neg94.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-eval94.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. Simplified94.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 56.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. add-sqr-sqrt55.8%

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

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

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

    \[\leadsto \color{blue}{-1 \cdot x} + \frac{0.083333333333333}{x} \]
  8. Step-by-step derivation
    1. mul-1-neg24.5%

      \[\leadsto \color{blue}{\left(-x\right)} + \frac{0.083333333333333}{x} \]
  9. Simplified24.5%

    \[\leadsto \color{blue}{\left(-x\right)} + \frac{0.083333333333333}{x} \]
  10. Taylor expanded in x around inf 1.4%

    \[\leadsto \color{blue}{-1 \cdot x} \]
  11. Step-by-step derivation
    1. mul-1-neg1.4%

      \[\leadsto \color{blue}{-x} \]
  12. Simplified1.4%

    \[\leadsto \color{blue}{-x} \]
  13. Final simplification1.4%

    \[\leadsto -x \]

Developer target: 98.6% accurate, 1.0× speedup?

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

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

Reproduce

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