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

Percentage Accurate: 94.3% → 98.8%
Time: 16.5s
Alternatives: 17
Speedup: 1.1×

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: 94.3% accurate, 1.0× speedup?

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

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

Alternative 1: 98.8% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 99.7%

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

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

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

        \[\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} \]
      4. fma-udef99.7%

        \[\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} \]
      5. fma-neg99.7%

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

        \[\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} \]
    3. Applied egg-rr99.7%

      \[\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(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}\right)}^{-1}} \]
    4. Taylor expanded in x around 0 99.7%

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

    if 3.9999999999999997e23 < x

    1. Initial program 89.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 98.8% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.7%

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

    if 3.9999999999999997e23 < x

    1. Initial program 89.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 97.8% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.7%

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

        \[\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{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. pow299.7%

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

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

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

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

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

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

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

    if 1.55000000000000008e-10 < x

    1. Initial program 90.8%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in z around inf 90.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}} \]
    3. Step-by-step derivation
      1. associate-/l*95.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 97.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_0 := z \cdot \left(0.0007936500793651 + y\right)\\
\mathbf{if}\;x \leq 0.42:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(t_0 - 0.0027777777777778\right)}{x} - x\\

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


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

    1. Initial program 99.7%

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

        \[\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{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. pow299.7%

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

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

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

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

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

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

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

    if 0.419999999999999984 < x

    1. Initial program 90.5%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in z around inf 90.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}} \]
    3. Step-by-step derivation
      1. associate-/l*96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 83.9% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;x \leq 9.5 \cdot 10^{+36} \lor \neg \left(x \leq 6.2 \cdot 10^{+43}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\

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


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

    1. Initial program 99.7%

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

        \[\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{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. pow299.7%

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

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

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

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

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

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

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

    if 2.15000000000000004e27 < x < 9.49999999999999974e36 or 6.2000000000000003e43 < x

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

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

    if 9.49999999999999974e36 < x < 6.2000000000000003e43

    1. Initial program 84.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. add-sqr-sqrt84.2%

        \[\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{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. pow284.2%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.15 \cdot 10^{+27}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} - x\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+36} \lor \neg \left(x \leq 6.2 \cdot 10^{+43}\right):\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{z \cdot z}{\frac{x}{0.0007936500793651 + y}} - x\\ \end{array} \]

Alternative 6: 83.7% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 8.3 \cdot 10^{+15}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} - x\\ \mathbf{elif}\;x \leq 9 \cdot 10^{+36}:\\ \;\;\;\;\left(0.91893853320467 + \left(x \cdot \log x - x\right)\right) + \frac{0.083333333333333}{x}\\ \mathbf{elif}\;x \leq 8.4 \cdot 10^{+43}:\\ \;\;\;\;\frac{z \cdot z}{\frac{x}{0.0007936500793651 + y}} - 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 8.3e+15)
   (-
    (/
     (+
      0.083333333333333
      (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
     x)
    x)
   (if (<= x 9e+36)
     (+ (+ 0.91893853320467 (- (* x (log x)) x)) (/ 0.083333333333333 x))
     (if (<= x 8.4e+43)
       (- (/ (* z z) (/ x (+ 0.0007936500793651 y))) x)
       (+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 8.3e+15) {
		tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x;
	} else if (x <= 9e+36) {
		tmp = (0.91893853320467 + ((x * log(x)) - x)) + (0.083333333333333 / x);
	} else if (x <= 8.4e+43) {
		tmp = ((z * z) / (x / (0.0007936500793651 + y))) - 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 <= 8.3d+15) then
        tmp = ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x) - x
    else if (x <= 9d+36) then
        tmp = (0.91893853320467d0 + ((x * log(x)) - x)) + (0.083333333333333d0 / x)
    else if (x <= 8.4d+43) then
        tmp = ((z * z) / (x / (0.0007936500793651d0 + y))) - 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 <= 8.3e+15) {
		tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x;
	} else if (x <= 9e+36) {
		tmp = (0.91893853320467 + ((x * Math.log(x)) - x)) + (0.083333333333333 / x);
	} else if (x <= 8.4e+43) {
		tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x;
	} else {
		tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= 8.3e+15:
		tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x
	elif x <= 9e+36:
		tmp = (0.91893853320467 + ((x * math.log(x)) - x)) + (0.083333333333333 / x)
	elif x <= 8.4e+43:
		tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x
	else:
		tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= 8.3e+15)
		tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x);
	elseif (x <= 9e+36)
		tmp = Float64(Float64(0.91893853320467 + Float64(Float64(x * log(x)) - x)) + Float64(0.083333333333333 / x));
	elseif (x <= 8.4e+43)
		tmp = Float64(Float64(Float64(z * z) / Float64(x / Float64(0.0007936500793651 + y))) - 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 <= 8.3e+15)
		tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x;
	elseif (x <= 9e+36)
		tmp = (0.91893853320467 + ((x * log(x)) - x)) + (0.083333333333333 / x);
	elseif (x <= 8.4e+43)
		tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x;
	else
		tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, 8.3e+15], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[x, 9e+36], N[(N[(0.91893853320467 + N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.4e+43], N[(N[(N[(z * z), $MachinePrecision] / N[(x / N[(0.0007936500793651 + y), $MachinePrecision]), $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 8.3 \cdot 10^{+15}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} - x\\

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

\mathbf{elif}\;x \leq 8.4 \cdot 10^{+43}:\\
\;\;\;\;\frac{z \cdot z}{\frac{x}{0.0007936500793651 + y}} - x\\

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


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

    1. Initial program 99.7%

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

        \[\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{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. pow299.7%

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

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

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

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

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

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

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

    if 8.3e15 < x < 8.99999999999999994e36

    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. Taylor expanded in z around 0 67.7%

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

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

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

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

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

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

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

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

    if 8.99999999999999994e36 < x < 8.40000000000000007e43

    1. Initial program 84.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. add-sqr-sqrt84.2%

        \[\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{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. pow284.2%

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

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

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

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

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

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

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

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

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

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

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

    if 8.40000000000000007e43 < x

    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. Taylor expanded in z around 0 77.2%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 8.3 \cdot 10^{+15}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} - x\\ \mathbf{elif}\;x \leq 9 \cdot 10^{+36}:\\ \;\;\;\;\left(0.91893853320467 + \left(x \cdot \log x - x\right)\right) + \frac{0.083333333333333}{x}\\ \mathbf{elif}\;x \leq 8.4 \cdot 10^{+43}:\\ \;\;\;\;\frac{z \cdot z}{\frac{x}{0.0007936500793651 + y}} - x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\ \end{array} \]

Alternative 7: 90.7% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 99.7%

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

        \[\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{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. pow299.7%

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

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

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

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

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

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

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

    if 17000 < x

    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. Taylor expanded in z around inf 90.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(\log x + -1\right)} + \left(z \cdot \left(0.0007936500793651 + y\right)\right) \cdot \frac{z}{x} \]
    12. Taylor expanded in y around 0 80.6%

      \[\leadsto x \cdot \left(\log x + -1\right) + \color{blue}{0.0007936500793651 \cdot \frac{{z}^{2}}{x}} \]
    13. Step-by-step derivation
      1. unpow280.6%

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

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

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

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

Alternative 8: 92.2% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 99.7%

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

        \[\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{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. pow299.7%

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

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

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

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

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

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

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

    if 2e13 < x

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 60.7% accurate, 8.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.52 \cdot 10^{-12} \lor \neg \left(z \leq 1.25 \cdot 10^{-5}\right):\\
\;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{z \cdot z}{x} - x\\

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


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

    1. Initial program 91.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. add-sqr-sqrt91.3%

        \[\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{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. pow291.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-x\right) + \frac{{z}^{2}}{\frac{x}{\color{blue}{y + 0.0007936500793651}}} \]
      3. associate-/r/76.5%

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

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

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

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

    if -1.52e-12 < z < 1.25000000000000006e-5

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 60.6% accurate, 8.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{-12}:\\ \;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{z \cdot z}{x} - x\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-5}:\\ \;\;\;\;0.91893853320467 + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{z \cdot z}{\frac{x}{0.0007936500793651 + y}} - x\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -4.2e-12)
   (- (* (+ 0.0007936500793651 y) (/ (* z z) x)) x)
   (if (<= z 1.3e-5)
     (+ 0.91893853320467 (/ 0.083333333333333 x))
     (- (/ (* z z) (/ x (+ 0.0007936500793651 y))) x))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -4.2e-12) {
		tmp = ((0.0007936500793651 + y) * ((z * z) / x)) - x;
	} else if (z <= 1.3e-5) {
		tmp = 0.91893853320467 + (0.083333333333333 / x);
	} else {
		tmp = ((z * z) / (x / (0.0007936500793651 + y))) - 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 <= (-4.2d-12)) then
        tmp = ((0.0007936500793651d0 + y) * ((z * z) / x)) - x
    else if (z <= 1.3d-5) then
        tmp = 0.91893853320467d0 + (0.083333333333333d0 / x)
    else
        tmp = ((z * z) / (x / (0.0007936500793651d0 + y))) - x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -4.2e-12) {
		tmp = ((0.0007936500793651 + y) * ((z * z) / x)) - x;
	} else if (z <= 1.3e-5) {
		tmp = 0.91893853320467 + (0.083333333333333 / x);
	} else {
		tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -4.2e-12:
		tmp = ((0.0007936500793651 + y) * ((z * z) / x)) - x
	elif z <= 1.3e-5:
		tmp = 0.91893853320467 + (0.083333333333333 / x)
	else:
		tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -4.2e-12)
		tmp = Float64(Float64(Float64(0.0007936500793651 + y) * Float64(Float64(z * z) / x)) - x);
	elseif (z <= 1.3e-5)
		tmp = Float64(0.91893853320467 + Float64(0.083333333333333 / x));
	else
		tmp = Float64(Float64(Float64(z * z) / Float64(x / Float64(0.0007936500793651 + y))) - x);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -4.2e-12)
		tmp = ((0.0007936500793651 + y) * ((z * z) / x)) - x;
	elseif (z <= 1.3e-5)
		tmp = 0.91893853320467 + (0.083333333333333 / x);
	else
		tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -4.2e-12], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[z, 1.3e-5], N[(0.91893853320467 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * z), $MachinePrecision] / N[(x / N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-12}:\\
\;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{z \cdot z}{x} - x\\

\mathbf{elif}\;z \leq 1.3 \cdot 10^{-5}:\\
\;\;\;\;0.91893853320467 + \frac{0.083333333333333}{x}\\

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


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

    1. Initial program 90.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. add-sqr-sqrt90.0%

        \[\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{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. pow290.0%

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

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

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

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

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

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

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

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

        \[\leadsto \left(-x\right) + \color{blue}{\frac{{z}^{2}}{\frac{x}{0.0007936500793651 + y}}} \]
      2. +-commutative72.1%

        \[\leadsto \left(-x\right) + \frac{{z}^{2}}{\frac{x}{\color{blue}{y + 0.0007936500793651}}} \]
      3. associate-/r/72.1%

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

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

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

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

    if -4.19999999999999988e-12 < z < 1.29999999999999992e-5

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.29999999999999992e-5 < z

    1. Initial program 92.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. add-sqr-sqrt92.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{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. pow292.6%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 62.8% accurate, 8.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+15}:\\ \;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{z \cdot z}{x} - x\\ \mathbf{elif}\;z \leq 6.6:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot y\right)}{x} - x\\ \mathbf{else}:\\ \;\;\;\;\frac{z \cdot z}{\frac{x}{0.0007936500793651 + y}} - x\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -4.2e+15)
   (- (* (+ 0.0007936500793651 y) (/ (* z z) x)) x)
   (if (<= z 6.6)
     (- (/ (+ 0.083333333333333 (* z (* z y))) x) x)
     (- (/ (* z z) (/ x (+ 0.0007936500793651 y))) x))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -4.2e+15) {
		tmp = ((0.0007936500793651 + y) * ((z * z) / x)) - x;
	} else if (z <= 6.6) {
		tmp = ((0.083333333333333 + (z * (z * y))) / x) - x;
	} else {
		tmp = ((z * z) / (x / (0.0007936500793651 + y))) - 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 <= (-4.2d+15)) then
        tmp = ((0.0007936500793651d0 + y) * ((z * z) / x)) - x
    else if (z <= 6.6d0) then
        tmp = ((0.083333333333333d0 + (z * (z * y))) / x) - x
    else
        tmp = ((z * z) / (x / (0.0007936500793651d0 + y))) - x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -4.2e+15) {
		tmp = ((0.0007936500793651 + y) * ((z * z) / x)) - x;
	} else if (z <= 6.6) {
		tmp = ((0.083333333333333 + (z * (z * y))) / x) - x;
	} else {
		tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -4.2e+15:
		tmp = ((0.0007936500793651 + y) * ((z * z) / x)) - x
	elif z <= 6.6:
		tmp = ((0.083333333333333 + (z * (z * y))) / x) - x
	else:
		tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -4.2e+15)
		tmp = Float64(Float64(Float64(0.0007936500793651 + y) * Float64(Float64(z * z) / x)) - x);
	elseif (z <= 6.6)
		tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(z * y))) / x) - x);
	else
		tmp = Float64(Float64(Float64(z * z) / Float64(x / Float64(0.0007936500793651 + y))) - x);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -4.2e+15)
		tmp = ((0.0007936500793651 + y) * ((z * z) / x)) - x;
	elseif (z <= 6.6)
		tmp = ((0.083333333333333 + (z * (z * y))) / x) - x;
	else
		tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -4.2e+15], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[z, 6.6], N[(N[(N[(0.083333333333333 + N[(z * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(N[(N[(z * z), $MachinePrecision] / N[(x / N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+15}:\\
\;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{z \cdot z}{x} - x\\

\mathbf{elif}\;z \leq 6.6:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot y\right)}{x} - x\\

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


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

    1. Initial program 89.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. add-sqr-sqrt89.0%

        \[\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{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. pow289.0%

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

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

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

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

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

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

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

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

        \[\leadsto \left(-x\right) + \color{blue}{\frac{{z}^{2}}{\frac{x}{0.0007936500793651 + y}}} \]
      2. +-commutative73.9%

        \[\leadsto \left(-x\right) + \frac{{z}^{2}}{\frac{x}{\color{blue}{y + 0.0007936500793651}}} \]
      3. associate-/r/73.9%

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

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

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

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

    if -4.2e15 < z < 6.5999999999999996

    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. add-sqr-sqrt99.3%

        \[\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{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. pow299.3%

        \[\leadsto \left(\left(\color{blue}{{\left(\sqrt{\left(x - 0.5\right) \cdot \log x}\right)}^{2}} - 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({\left(\sqrt{\color{blue}{\left(x + \left(-0.5\right)\right)} \cdot \log x}\right)}^{2} - 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(\sqrt{\left(x + \color{blue}{-0.5}\right) \cdot \log x}\right)}^{2} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    3. Applied egg-rr99.3%

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

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

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

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

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

        \[\leadsto \left(-x\right) + \frac{\color{blue}{{z}^{2} \cdot y} + 0.083333333333333}{x} \]
      2. unpow249.0%

        \[\leadsto \left(-x\right) + \frac{\color{blue}{\left(z \cdot z\right)} \cdot y + 0.083333333333333}{x} \]
      3. associate-*r*49.0%

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

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

    if 6.5999999999999996 < z

    1. Initial program 92.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. add-sqr-sqrt92.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{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. pow292.6%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+15}:\\ \;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{z \cdot z}{x} - x\\ \mathbf{elif}\;z \leq 6.6:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot y\right)}{x} - x\\ \mathbf{else}:\\ \;\;\;\;\frac{z \cdot z}{\frac{x}{0.0007936500793651 + y}} - x\\ \end{array} \]

Alternative 12: 62.6% accurate, 8.2× speedup?

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

\\
\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} - x
\end{array}
Derivation
  1. Initial program 95.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. add-sqr-sqrt95.1%

      \[\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{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. pow295.1%

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

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

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

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

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

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

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

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

Alternative 13: 50.5% accurate, 9.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{-12} \lor \neg \left(z \leq 2.15 \cdot 10^{-5}\right):\\
\;\;\;\;\frac{y}{\frac{x}{z \cdot z}} - x\\

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


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

    1. Initial program 91.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. add-sqr-sqrt91.3%

        \[\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{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. pow291.3%

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

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

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

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

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

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

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

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

        \[\leadsto \left(-x\right) + \color{blue}{\frac{y}{\frac{x}{{z}^{2}}}} \]
      2. unpow252.8%

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

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

    if -4.39999999999999983e-12 < z < 2.1500000000000001e-5

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 28.2% accurate, 13.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{+91}:\\ \;\;\;\;\frac{z}{x} \cdot -0.0027777777777778 - x\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + \frac{0.083333333333333}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -4.8e+91)
   (- (* (/ z x) -0.0027777777777778) x)
   (+ 0.91893853320467 (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -4.8e+91) {
		tmp = ((z / x) * -0.0027777777777778) - x;
	} else {
		tmp = 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 <= (-4.8d+91)) then
        tmp = ((z / x) * (-0.0027777777777778d0)) - x
    else
        tmp = 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 <= -4.8e+91) {
		tmp = ((z / x) * -0.0027777777777778) - x;
	} else {
		tmp = 0.91893853320467 + (0.083333333333333 / x);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -4.8e+91:
		tmp = ((z / x) * -0.0027777777777778) - x
	else:
		tmp = 0.91893853320467 + (0.083333333333333 / x)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -4.8e+91)
		tmp = Float64(Float64(Float64(z / x) * -0.0027777777777778) - x);
	else
		tmp = Float64(0.91893853320467 + Float64(0.083333333333333 / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -4.8e+91)
		tmp = ((z / x) * -0.0027777777777778) - x;
	else
		tmp = 0.91893853320467 + (0.083333333333333 / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -4.8e+91], N[(N[(N[(z / x), $MachinePrecision] * -0.0027777777777778), $MachinePrecision] - x), $MachinePrecision], N[(0.91893853320467 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.79999999999999966e91

    1. Initial program 85.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. add-sqr-sqrt85.2%

        \[\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{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. pow285.2%

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

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

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

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

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

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

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

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

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

    if -4.79999999999999966e91 < z

    1. Initial program 97.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. Taylor expanded in z around 0 65.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{0.083333333333333}{x} + 0.91893853320467} \]
    8. Simplified28.0%

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

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

Alternative 15: 24.1% accurate, 24.6× speedup?

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

\\
0.91893853320467 + \frac{0.083333333333333}{x}
\end{array}
Derivation
  1. Initial program 95.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. Taylor expanded in z around 0 57.2%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{0.083333333333333}{x} + 0.91893853320467} \]
  8. Simplified23.9%

    \[\leadsto \color{blue}{\frac{0.083333333333333}{x} + 0.91893853320467} \]
  9. Final simplification23.9%

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

Alternative 16: 23.5% accurate, 41.0× speedup?

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

\\
\frac{0.083333333333333}{x}
\end{array}
Derivation
  1. Initial program 95.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. add-sqr-sqrt95.1%

      \[\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{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. pow295.1%

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

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

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

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

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

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

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

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

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

    \[\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 95.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. add-sqr-sqrt95.1%

      \[\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{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. pow295.1%

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{-1 \cdot x} \]
  9. Step-by-step derivation
    1. neg-mul-11.3%

      \[\leadsto \color{blue}{-x} \]
  10. Simplified1.3%

    \[\leadsto \color{blue}{-x} \]
  11. Final simplification1.3%

    \[\leadsto -x \]

Developer target: 98.8% 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 2023240 
(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)))