Average Error: 0.3 → 0.3
Time: 39.2s
Precision: 64
\[\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t\]
\[\mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{t}\right), a - 0.5, \mathsf{fma}\left(2, \log \left(\sqrt[3]{z}\right), \log \left(x + y\right)\right) + \left(\log \left(\sqrt[3]{z}\right) - t\right)\right) + \left(a - 0.5\right) \cdot \log \left({t}^{\frac{1}{3}}\right)\]
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{t}\right), a - 0.5, \mathsf{fma}\left(2, \log \left(\sqrt[3]{z}\right), \log \left(x + y\right)\right) + \left(\log \left(\sqrt[3]{z}\right) - t\right)\right) + \left(a - 0.5\right) \cdot \log \left({t}^{\frac{1}{3}}\right)
double f(double x, double y, double z, double t, double a) {
        double r57290 = x;
        double r57291 = y;
        double r57292 = r57290 + r57291;
        double r57293 = log(r57292);
        double r57294 = z;
        double r57295 = log(r57294);
        double r57296 = r57293 + r57295;
        double r57297 = t;
        double r57298 = r57296 - r57297;
        double r57299 = a;
        double r57300 = 0.5;
        double r57301 = r57299 - r57300;
        double r57302 = log(r57297);
        double r57303 = r57301 * r57302;
        double r57304 = r57298 + r57303;
        return r57304;
}

double f(double x, double y, double z, double t, double a) {
        double r57305 = 2.0;
        double r57306 = t;
        double r57307 = cbrt(r57306);
        double r57308 = log(r57307);
        double r57309 = r57305 * r57308;
        double r57310 = a;
        double r57311 = 0.5;
        double r57312 = r57310 - r57311;
        double r57313 = z;
        double r57314 = cbrt(r57313);
        double r57315 = log(r57314);
        double r57316 = x;
        double r57317 = y;
        double r57318 = r57316 + r57317;
        double r57319 = log(r57318);
        double r57320 = fma(r57305, r57315, r57319);
        double r57321 = r57315 - r57306;
        double r57322 = r57320 + r57321;
        double r57323 = fma(r57309, r57312, r57322);
        double r57324 = 0.3333333333333333;
        double r57325 = pow(r57306, r57324);
        double r57326 = log(r57325);
        double r57327 = r57312 * r57326;
        double r57328 = r57323 + r57327;
        return r57328;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Derivation

  1. Initial program 0.3

    \[\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t\]
  2. Using strategy rm
  3. Applied add-cube-cbrt0.3

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

    \[\leadsto \left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \color{blue}{\left(\log \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) + \log \left(\sqrt[3]{t}\right)\right)}\]
  5. Applied distribute-lft-in0.3

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{t}\right), a - 0.5, \log \left(x + y\right) + \left(\log z - t\right)\right)} + \left(a - 0.5\right) \cdot \log \left(\sqrt[3]{t}\right)\]
  8. Using strategy rm
  9. Applied add-cube-cbrt0.3

    \[\leadsto \mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{t}\right), a - 0.5, \log \left(x + y\right) + \left(\log \color{blue}{\left(\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}\right)} - t\right)\right) + \left(a - 0.5\right) \cdot \log \left(\sqrt[3]{t}\right)\]
  10. Applied log-prod0.3

    \[\leadsto \mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{t}\right), a - 0.5, \log \left(x + y\right) + \left(\color{blue}{\left(\log \left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) + \log \left(\sqrt[3]{z}\right)\right)} - t\right)\right) + \left(a - 0.5\right) \cdot \log \left(\sqrt[3]{t}\right)\]
  11. Applied associate--l+0.3

    \[\leadsto \mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{t}\right), a - 0.5, \log \left(x + y\right) + \color{blue}{\left(\log \left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) + \left(\log \left(\sqrt[3]{z}\right) - t\right)\right)}\right) + \left(a - 0.5\right) \cdot \log \left(\sqrt[3]{t}\right)\]
  12. Applied associate-+r+0.3

    \[\leadsto \mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{t}\right), a - 0.5, \color{blue}{\left(\log \left(x + y\right) + \log \left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right)\right) + \left(\log \left(\sqrt[3]{z}\right) - t\right)}\right) + \left(a - 0.5\right) \cdot \log \left(\sqrt[3]{t}\right)\]
  13. Simplified0.3

    \[\leadsto \mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{t}\right), a - 0.5, \color{blue}{\mathsf{fma}\left(2, \log \left(\sqrt[3]{z}\right), \log \left(x + y\right)\right)} + \left(\log \left(\sqrt[3]{z}\right) - t\right)\right) + \left(a - 0.5\right) \cdot \log \left(\sqrt[3]{t}\right)\]
  14. Using strategy rm
  15. Applied pow1/30.3

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

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

Reproduce

herbie shell --seed 2019322 +o rules:numerics
(FPCore (x y z t a)
  :name "Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2"
  :precision binary64
  (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))