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

Percentage Accurate: 93.9% → 93.9%
Time: 19.2s
Alternatives: 16
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 16 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.9% 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: 93.9% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(x + -0.5, \log x, \mathsf{fma}\left(x, -1, 0.91893853320467\right)\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  (fma (+ x -0.5) (log x) (fma x -1.0 0.91893853320467))
  (/
   (fma
    z
    (fma (+ y 0.0007936500793651) z -0.0027777777777778)
    0.083333333333333)
   x)))
double code(double x, double y, double z) {
	return fma((x + -0.5), log(x), fma(x, -1.0, 0.91893853320467)) + (fma(z, fma((y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x);
}
function code(x, y, z)
	return Float64(fma(Float64(x + -0.5), log(x), fma(x, -1.0, 0.91893853320467)) + Float64(fma(z, fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x))
end
code[x_, y_, z_] := N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(x * -1.0 + 0.91893853320467), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(x + -0.5, \log x, \mathsf{fma}\left(x, -1, 0.91893853320467\right)\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x}
\end{array}
Derivation
  1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 93.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) - \left(0.083333333333333 + z \cdot \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)\right) \cdot \frac{-1}{x} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (-
  (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
  (*
   (+
    0.083333333333333
    (* z (fma (+ y 0.0007936500793651) z -0.0027777777777778)))
   (/ -1.0 x))))
double code(double x, double y, double z) {
	return (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) - ((0.083333333333333 + (z * fma((y + 0.0007936500793651), z, -0.0027777777777778))) * (-1.0 / x));
}
function code(x, y, z)
	return Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) - Float64(Float64(0.083333333333333 + Float64(z * fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778))) * Float64(-1.0 / x)))
end
code[x_, y_, z_] := N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] - N[(N[(0.083333333333333 + N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) - \left(0.083333333333333 + z \cdot \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)\right) \cdot \frac{-1}{x}
\end{array}
Derivation
  1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 93.9% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 93.9% accurate, 1.0× speedup?

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

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

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

Alternative 5: 93.9% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 92.9% accurate, 1.0× speedup?

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

\\
\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + x \cdot \left(\log x + -1\right)
\end{array}
Derivation
  1. Initial program 95.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. Taylor expanded in x around inf 95.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} \]
  3. Step-by-step derivation
    1. sub-neg58.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-neg58.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-rec58.8%

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

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

      \[\leadsto x \cdot \left(\log x + \color{blue}{-1}\right) + \frac{0.083333333333333}{x} \]
  4. Simplified95.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} \]
  5. Final simplification95.1%

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

Alternative 7: 84.2% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 99.6%

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

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

        \[\leadsto \left(\left(\left(x + \color{blue}{-0.5}\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      3. add-cube-cbrt99.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} \]
      4. pow399.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. *-commutative99.6%

        \[\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. Applied egg-rr99.6%

      \[\leadsto \left(\left(\color{blue}{{\left(\sqrt[3]{\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} \]
    4. Taylor expanded in x around inf 96.8%

      \[\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} \]
    5. Step-by-step derivation
      1. neg-mul-196.8%

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

        \[\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} \]
    6. Simplified96.8%

      \[\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 4.79999999999999962e28 < x

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

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

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

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

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

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

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

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

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

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

Alternative 8: 63.5% accurate, 6.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2e-3 or 1.45e16 < y

    1. Initial program 97.6%

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

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

        \[\leadsto \left(\left(\left(x + \color{blue}{-0.5}\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      3. add-cube-cbrt97.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} \]
      4. pow397.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. *-commutative97.2%

        \[\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. Applied egg-rr97.2%

      \[\leadsto \left(\left(\color{blue}{{\left(\sqrt[3]{\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} \]
    4. Taylor expanded in x around inf 71.6%

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

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

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

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

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

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

    if -2e-3 < y < 1.45e16

    1. Initial program 93.7%

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

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

        \[\leadsto \left(\left(\left(x + \color{blue}{-0.5}\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      3. add-cube-cbrt93.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} \]
      4. pow393.0%

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

        \[\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. Applied egg-rr93.0%

      \[\leadsto \left(\left(\color{blue}{{\left(\sqrt[3]{\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} \]
    4. Taylor expanded in x around inf 54.3%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{0.083333333333333}}{x} + \left(\frac{z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x} - x\right) \]
      4. associate-/l*55.4%

        \[\leadsto \frac{0.083333333333333}{x} + \left(\color{blue}{\frac{z}{\frac{x}{0.0007936500793651 \cdot z - 0.0027777777777778}}} - x\right) \]
      5. associate-/r/55.4%

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

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

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

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

      \[\leadsto \color{blue}{\frac{0.083333333333333}{x} + \left(\frac{z}{x} \cdot \mathsf{fma}\left(z, 0.0007936500793651, -0.0027777777777778\right) - x\right)} \]
    10. Taylor expanded in z around 0 55.4%

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

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

Alternative 9: 63.1% accurate, 7.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2e-3 or 2e16 < y

    1. Initial program 97.6%

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

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

        \[\leadsto \left(\left(\left(x + \color{blue}{-0.5}\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      3. add-cube-cbrt97.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} \]
      4. pow397.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. *-commutative97.2%

        \[\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. Applied egg-rr97.2%

      \[\leadsto \left(\left(\color{blue}{{\left(\sqrt[3]{\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} \]
    4. Taylor expanded in x around inf 71.6%

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

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

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

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

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

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

    if -2e-3 < y < 2e16

    1. Initial program 93.7%

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

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

        \[\leadsto \left(\left(\left(x + \color{blue}{-0.5}\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      3. add-cube-cbrt93.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} \]
      4. pow393.0%

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

        \[\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. Applied egg-rr93.0%

      \[\leadsto \left(\left(\color{blue}{{\left(\sqrt[3]{\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} \]
    4. Taylor expanded in x around inf 54.3%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{0.083333333333333}}{x} + \left(\frac{z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x} - x\right) \]
      4. associate-/l*55.4%

        \[\leadsto \frac{0.083333333333333}{x} + \left(\color{blue}{\frac{z}{\frac{x}{0.0007936500793651 \cdot z - 0.0027777777777778}}} - x\right) \]
      5. associate-/r/55.4%

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

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

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

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

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

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

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

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

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

Alternative 10: 62.5% 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 95.7%

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

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

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

      \[\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. Applied egg-rr95.2%

    \[\leadsto \left(\left(\color{blue}{{\left(\sqrt[3]{\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} \]
  4. Taylor expanded in x around inf 63.2%

    \[\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} \]
  5. Step-by-step derivation
    1. neg-mul-163.2%

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

      \[\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} \]
  6. Simplified63.2%

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

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

Alternative 11: 62.5% 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 95.7%

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

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

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

      \[\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. Applied egg-rr95.2%

    \[\leadsto \left(\left(\color{blue}{{\left(\sqrt[3]{\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} \]
  4. Taylor expanded in x around inf 63.2%

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

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

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

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

Alternative 12: 46.0% accurate, 9.5× speedup?

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

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

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

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

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

      \[\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. Applied egg-rr95.2%

    \[\leadsto \left(\left(\color{blue}{{\left(\sqrt[3]{\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} \]
  4. Taylor expanded in x around inf 63.2%

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{0.083333333333333}}{x} + \left(\frac{z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x} - x\right) \]
    4. associate-/l*44.5%

      \[\leadsto \frac{0.083333333333333}{x} + \left(\color{blue}{\frac{z}{\frac{x}{0.0007936500793651 \cdot z - 0.0027777777777778}}} - x\right) \]
    5. associate-/r/44.5%

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

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

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

      \[\leadsto \frac{0.083333333333333}{x} + \left(\frac{z}{x} \cdot \mathsf{fma}\left(z, 0.0007936500793651, \color{blue}{-0.0027777777777778}\right) - x\right) \]
  9. Simplified44.5%

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

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

      \[\leadsto \frac{0.083333333333333}{x} + \left(\frac{z}{x} \cdot \color{blue}{\left(z \cdot 0.0007936500793651\right)} - x\right) \]
  12. Simplified44.2%

    \[\leadsto \frac{0.083333333333333}{x} + \left(\frac{z}{x} \cdot \color{blue}{\left(z \cdot 0.0007936500793651\right)} - x\right) \]
  13. Final simplification44.2%

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

Alternative 13: 46.1% accurate, 9.5× speedup?

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

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

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

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

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

      \[\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. Applied egg-rr95.2%

    \[\leadsto \left(\left(\color{blue}{{\left(\sqrt[3]{\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} \]
  4. Taylor expanded in x around inf 63.2%

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

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

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

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

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

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

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

Alternative 14: 27.7% accurate, 13.7× speedup?

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

\\
\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x} - x
\end{array}
Derivation
  1. Initial program 95.7%

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

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

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

      \[\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. Applied egg-rr95.2%

    \[\leadsto \left(\left(\color{blue}{{\left(\sqrt[3]{\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} \]
  4. Taylor expanded in x around inf 63.2%

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

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

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

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

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

    \[\leadsto \left(-x\right) + \frac{\color{blue}{z \cdot -0.0027777777777778} + 0.083333333333333}{x} \]
  10. Final simplification28.0%

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

Alternative 15: 23.6% accurate, 24.6× speedup?

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

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

    \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
  3. Step-by-step derivation
    1. add-cube-cbrt58.9%

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

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

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

      \[\leadsto \left({\left(\sqrt[3]{\log x \cdot \color{blue}{\left(x + \left(-0.5\right)\right)} - x}\right)}^{3} + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
    5. metadata-eval59.0%

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

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

      \[\leadsto \left({\left(\sqrt[3]{\log x \cdot \color{blue}{\left(x - 0.5\right)} - x}\right)}^{3} + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
    8. *-commutative59.0%

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

      \[\leadsto \left({\left(\sqrt[3]{\color{blue}{\left(x + \left(-0.5\right)\right)} \cdot \log x - x}\right)}^{3} + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
    10. metadata-eval59.0%

      \[\leadsto \left({\left(\sqrt[3]{\left(x + \color{blue}{-0.5}\right) \cdot \log x - x}\right)}^{3} + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
  4. Applied egg-rr59.0%

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

    \[\leadsto \color{blue}{0.91893853320467} + \frac{0.083333333333333}{x} \]
  6. Final simplification26.1%

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

Alternative 16: 1.3% accurate, 61.5× speedup?

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

\\
-x
\end{array}
Derivation
  1. Initial program 95.7%

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

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

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

      \[\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. Applied egg-rr95.2%

    \[\leadsto \left(\left(\color{blue}{{\left(\sqrt[3]{\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} \]
  4. Taylor expanded in x around inf 63.2%

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

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

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

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

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

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

    \[\leadsto -x \]

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 2023298 
(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)))