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

Percentage Accurate: 93.7% → 96.8%
Time: 24.6s
Alternatives: 18
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 93.7% accurate, 1.0× speedup?

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

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

Alternative 1: 96.8% accurate, 0.4× speedup?

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

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

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


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

    1. Initial program 98.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. Add Preprocessing
    3. Step-by-step derivation
      1. div-inv98.7%

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

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

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

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

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

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

    if 2.2e149 < x

    1. Initial program 81.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. Add Preprocessing
    3. Taylor expanded in y around inf 79.6%

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

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

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

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

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

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

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

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

Alternative 2: 96.8% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 98.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. Add Preprocessing
    3. Step-by-step derivation
      1. div-inv98.7%

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

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

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

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

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

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

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

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

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

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

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

    if 4.6999999999999997e148 < x

    1. Initial program 81.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. Add Preprocessing
    3. Taylor expanded in y around inf 79.6%

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

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

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

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

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

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

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

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

Alternative 3: 96.8% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 98.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt98.5%

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

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

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

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

      \[\leadsto \left(\left(\color{blue}{{\left(\sqrt[3]{\left(x + -0.5\right) \cdot \log x}\right)}^{3}} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    5. Step-by-step derivation
      1. cbrt-prod98.4%

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

      \[\leadsto \left(\left({\color{blue}{\left(\sqrt[3]{x + -0.5} \cdot \sqrt[3]{\log x}\right)}}^{3} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    7. Step-by-step derivation
      1. cbrt-unprod98.5%

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

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

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

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

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

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

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

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

    if 5.9000000000000002e149 < x

    1. Initial program 81.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. Add Preprocessing
    3. Taylor expanded in y around inf 79.6%

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

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

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

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

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

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

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

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

Alternative 4: 96.8% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 98.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. Add Preprocessing

    if 1.8500000000000001e148 < x

    1. Initial program 81.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. Add Preprocessing
    3. Taylor expanded in y around inf 79.6%

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

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

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

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

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

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

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

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

Alternative 5: 94.9% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 97.1%

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

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

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

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

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

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

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

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

    if 7.4499999999999997e230 < x

    1. Initial program 73.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. Add Preprocessing
    3. Taylor expanded in y around inf 69.1%

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

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

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

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

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

        \[\leadsto \left(-x\right) + \color{blue}{\left(\frac{y}{x} \cdot z\right) \cdot z} \]
    7. Applied egg-rr93.3%

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

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

Alternative 6: 95.8% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 98.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. Add Preprocessing
    3. Taylor expanded in x around inf 97.4%

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

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

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

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

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

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

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

    if 9.1999999999999997e147 < x

    1. Initial program 81.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. Add Preprocessing
    3. Taylor expanded in y around inf 79.6%

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

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

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

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

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

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

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

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

Alternative 7: 91.1% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.6%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.5%

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

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

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

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

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

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

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

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

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

    if 1.04e52 < x

    1. Initial program 85.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. Add Preprocessing
    3. Taylor expanded in y around inf 80.4%

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

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

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

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

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

        \[\leadsto \left(-x\right) + \color{blue}{\left(\frac{y}{x} \cdot z\right) \cdot z} \]
    7. Applied egg-rr88.3%

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

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

Alternative 8: 90.2% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.6%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.5%

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

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

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

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

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

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

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

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

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

    if 1.04e52 < x

    1. Initial program 85.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. Add Preprocessing
    3. Taylor expanded in y around inf 80.4%

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

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

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

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

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

        \[\leadsto \left(-x\right) + \color{blue}{\left(\frac{y}{x} \cdot z\right) \cdot z} \]
    7. Applied egg-rr88.3%

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

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

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

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

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

Alternative 9: 84.1% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 99.6%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.5%

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

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

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

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

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

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

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

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

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

    if 2.7e52 < x

    1. Initial program 85.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. Add Preprocessing
    3. Taylor expanded in z around 0 71.7%

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

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

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

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

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

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

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

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

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

Alternative 10: 55.5% accurate, 5.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -92000000 \lor \neg \left(y \leq 9.5 \cdot 10^{+76}\right):\\
\;\;\;\;\frac{y}{\frac{1}{z} \cdot \frac{x}{z}} - x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.2e7 or 9.5000000000000003e76 < y

    1. Initial program 96.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt96.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(-x\right) + \color{blue}{\frac{y}{\frac{x}{{z}^{2}}}} \]
    11. Step-by-step derivation
      1. *-un-lft-identity82.3%

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

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

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

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

    if -9.2e7 < y < 9.5000000000000003e76

    1. Initial program 92.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt92.1%

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot x} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    6. Step-by-step derivation
      1. neg-mul-160.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. Simplified60.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -92000000 \lor \neg \left(y \leq 9.5 \cdot 10^{+76}\right):\\ \;\;\;\;\frac{y}{\frac{1}{z} \cdot \frac{x}{z}} - x\\ \mathbf{else}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x} - x\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 61.8% accurate, 5.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.00000000000000038e-4 or 3.99999999999999982e37 < y

    1. Initial program 95.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt95.2%

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

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

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

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

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

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

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

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

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

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

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

    if -8.00000000000000038e-4 < y < 3.99999999999999982e37

    1. Initial program 93.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt92.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-x\right) + \frac{\left(\color{blue}{z \cdot 0.0007936500793651} - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    10. Simplified61.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -0.0008 \lor \neg \left(y \leq 4 \cdot 10^{+37}\right):\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x} - x\\ \mathbf{else}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x} - x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 50.9% accurate, 5.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{-8} \lor \neg \left(z \leq 1.96 \cdot 10^{-44}\right):\\
\;\;\;\;\frac{y}{\frac{1}{z} \cdot \frac{x}{z}} - x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.2e-8 or 1.9599999999999999e-44 < z

    1. Initial program 90.4%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt90.1%

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot x} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    6. Step-by-step derivation
      1. neg-mul-176.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. Simplified76.4%

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

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

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

      \[\leadsto \left(-x\right) + \color{blue}{\frac{y}{\frac{x}{{z}^{2}}}} \]
    11. Step-by-step derivation
      1. *-un-lft-identity67.7%

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

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

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

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

    if -6.2e-8 < z < 1.9599999999999999e-44

    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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt98.8%

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot x} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    6. Step-by-step derivation
      1. neg-mul-155.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. Simplified55.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x + \frac{0.083333333333333}{x}} \]
    12. Simplified56.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{-8} \lor \neg \left(z \leq 1.96 \cdot 10^{-44}\right):\\ \;\;\;\;\frac{y}{\frac{1}{z} \cdot \frac{x}{z}} - x\\ \mathbf{else}:\\ \;\;\;\;x + \frac{0.083333333333333}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 49.1% accurate, 6.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{-7} \lor \neg \left(z \leq 550\right):\\
\;\;\;\;z \cdot \left(z \cdot \frac{y}{x}\right) - x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.55e-7 or 550 < z

    1. Initial program 89.3%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt89.1%

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot x} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    6. Step-by-step derivation
      1. neg-mul-177.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. Simplified77.6%

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

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

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

      \[\leadsto \left(-x\right) + \color{blue}{\frac{y}{\frac{x}{{z}^{2}}}} \]
    11. Step-by-step derivation
      1. associate-/r/52.9%

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

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

        \[\leadsto \left(-x\right) + \color{blue}{\left(\frac{y}{x} \cdot z\right) \cdot z} \]
    12. Applied egg-rr50.8%

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

    if -1.55e-7 < z < 550

    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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x + \frac{0.083333333333333}{x}} \]
    12. Simplified53.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{-7} \lor \neg \left(z \leq 550\right):\\ \;\;\;\;z \cdot \left(z \cdot \frac{y}{x}\right) - x\\ \mathbf{else}:\\ \;\;\;\;x + \frac{0.083333333333333}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 62.1% accurate, 7.2× speedup?

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

\\
\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 - x\right)
\end{array}
Derivation
  1. Initial program 94.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. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrt93.8%

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

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

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

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

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

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

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

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

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

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

Alternative 15: 62.1% accurate, 8.2× speedup?

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

\\
\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} - x
\end{array}
Derivation
  1. Initial program 94.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. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrt93.8%

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

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

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

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

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

    \[\leadsto \color{blue}{-1 \cdot x} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  6. Step-by-step derivation
    1. neg-mul-167.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. Simplified67.5%

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

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

Alternative 16: 27.2% accurate, 24.6× speedup?

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

\\
x + \frac{0.083333333333333}{x}
\end{array}
Derivation
  1. Initial program 94.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. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrt93.8%

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

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

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

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

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

    \[\leadsto \color{blue}{-1 \cdot x} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  6. Step-by-step derivation
    1. neg-mul-167.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. Simplified67.5%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \frac{0.083333333333333}{x}} \]
  12. Simplified29.0%

    \[\leadsto \color{blue}{x + \frac{0.083333333333333}{x}} \]
  13. Final simplification29.0%

    \[\leadsto x + \frac{0.083333333333333}{x} \]
  14. Add Preprocessing

Alternative 17: 23.2% accurate, 41.0× speedup?

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

\\
\frac{0.083333333333333}{x}
\end{array}
Derivation
  1. Initial program 94.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. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrt93.8%

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

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

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

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

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

    \[\leadsto \color{blue}{-1 \cdot x} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  6. Step-by-step derivation
    1. neg-mul-167.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. Simplified67.5%

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

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

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

    \[\leadsto \frac{0.083333333333333}{x} \]
  11. Add Preprocessing

Alternative 18: 1.3% accurate, 61.5× speedup?

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

\\
-x
\end{array}
Derivation
  1. Initial program 94.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. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrt93.8%

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

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

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

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

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

    \[\leadsto \color{blue}{-1 \cdot x} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  6. Step-by-step derivation
    1. neg-mul-167.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. Simplified67.5%

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

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

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

      \[\leadsto \color{blue}{-x} \]
  11. Simplified1.2%

    \[\leadsto \color{blue}{-x} \]
  12. Final simplification1.2%

    \[\leadsto -x \]
  13. Add Preprocessing

Developer target: 98.7% accurate, 1.0× speedup?

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

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

Reproduce

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