Average Error: 0.1 → 0.1
Time: 5.8s
Precision: 64
\[\left(\left(x \cdot \log y - y\right) - z\right) + \log t\]
\[\mathsf{fma}\left(2, \log \left(\sqrt[3]{t}\right), \log y \cdot x\right) + \left(\log \left(\sqrt[3]{t}\right) - \left(y + z\right)\right)\]
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
\mathsf{fma}\left(2, \log \left(\sqrt[3]{t}\right), \log y \cdot x\right) + \left(\log \left(\sqrt[3]{t}\right) - \left(y + z\right)\right)
double f(double x, double y, double z, double t) {
        double r99035 = x;
        double r99036 = y;
        double r99037 = log(r99036);
        double r99038 = r99035 * r99037;
        double r99039 = r99038 - r99036;
        double r99040 = z;
        double r99041 = r99039 - r99040;
        double r99042 = t;
        double r99043 = log(r99042);
        double r99044 = r99041 + r99043;
        return r99044;
}

double f(double x, double y, double z, double t) {
        double r99045 = 2.0;
        double r99046 = t;
        double r99047 = cbrt(r99046);
        double r99048 = log(r99047);
        double r99049 = y;
        double r99050 = log(r99049);
        double r99051 = x;
        double r99052 = r99050 * r99051;
        double r99053 = fma(r99045, r99048, r99052);
        double r99054 = z;
        double r99055 = r99049 + r99054;
        double r99056 = r99048 - r99055;
        double r99057 = r99053 + r99056;
        return r99057;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Derivation

  1. Initial program 0.1

    \[\left(\left(x \cdot \log y - y\right) - z\right) + \log t\]
  2. Simplified0.1

    \[\leadsto \color{blue}{\mathsf{fma}\left(\log y, x, \log t - \left(y + z\right)\right)}\]
  3. Using strategy rm
  4. Applied fma-udef0.1

    \[\leadsto \color{blue}{\log y \cdot x + \left(\log t - \left(y + z\right)\right)}\]
  5. Using strategy rm
  6. Applied add-cube-cbrt0.1

    \[\leadsto \log y \cdot x + \left(\log \color{blue}{\left(\left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) \cdot \sqrt[3]{t}\right)} - \left(y + z\right)\right)\]
  7. Applied log-prod0.1

    \[\leadsto \log y \cdot x + \left(\color{blue}{\left(\log \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) + \log \left(\sqrt[3]{t}\right)\right)} - \left(y + z\right)\right)\]
  8. Applied associate--l+0.1

    \[\leadsto \log y \cdot x + \color{blue}{\left(\log \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) + \left(\log \left(\sqrt[3]{t}\right) - \left(y + z\right)\right)\right)}\]
  9. Applied associate-+r+0.1

    \[\leadsto \color{blue}{\left(\log y \cdot x + \log \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right)\right) + \left(\log \left(\sqrt[3]{t}\right) - \left(y + z\right)\right)}\]
  10. Simplified0.1

    \[\leadsto \color{blue}{\mathsf{fma}\left(2, \log \left(\sqrt[3]{t}\right), \log y \cdot x\right)} + \left(\log \left(\sqrt[3]{t}\right) - \left(y + z\right)\right)\]
  11. Final simplification0.1

    \[\leadsto \mathsf{fma}\left(2, \log \left(\sqrt[3]{t}\right), \log y \cdot x\right) + \left(\log \left(\sqrt[3]{t}\right) - \left(y + z\right)\right)\]

Reproduce

herbie shell --seed 2020060 +o rules:numerics
(FPCore (x y z t)
  :name "Numeric.SpecFunctions:incompleteGamma from math-functions-0.1.5.2, A"
  :precision binary64
  (+ (- (- (* x (log y)) y) z) (log t)))