Average Error: 0.1 → 0.1
Time: 43.5s
Precision: 64
\[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\]
\[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \mathsf{fma}\left(2 \cdot \log \left({c}^{\frac{1}{3}}\right), b - 0.5, \log \left(\sqrt[3]{c}\right) \cdot \left(b - 0.5\right)\right)\right) + y \cdot i\]
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \mathsf{fma}\left(2 \cdot \log \left({c}^{\frac{1}{3}}\right), b - 0.5, \log \left(\sqrt[3]{c}\right) \cdot \left(b - 0.5\right)\right)\right) + y \cdot i
double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r68193 = x;
        double r68194 = y;
        double r68195 = log(r68194);
        double r68196 = r68193 * r68195;
        double r68197 = z;
        double r68198 = r68196 + r68197;
        double r68199 = t;
        double r68200 = r68198 + r68199;
        double r68201 = a;
        double r68202 = r68200 + r68201;
        double r68203 = b;
        double r68204 = 0.5;
        double r68205 = r68203 - r68204;
        double r68206 = c;
        double r68207 = log(r68206);
        double r68208 = r68205 * r68207;
        double r68209 = r68202 + r68208;
        double r68210 = i;
        double r68211 = r68194 * r68210;
        double r68212 = r68209 + r68211;
        return r68212;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r68213 = x;
        double r68214 = y;
        double r68215 = log(r68214);
        double r68216 = r68213 * r68215;
        double r68217 = z;
        double r68218 = r68216 + r68217;
        double r68219 = t;
        double r68220 = r68218 + r68219;
        double r68221 = a;
        double r68222 = r68220 + r68221;
        double r68223 = 2.0;
        double r68224 = c;
        double r68225 = 0.3333333333333333;
        double r68226 = pow(r68224, r68225);
        double r68227 = log(r68226);
        double r68228 = r68223 * r68227;
        double r68229 = b;
        double r68230 = 0.5;
        double r68231 = r68229 - r68230;
        double r68232 = cbrt(r68224);
        double r68233 = log(r68232);
        double r68234 = r68233 * r68231;
        double r68235 = fma(r68228, r68231, r68234);
        double r68236 = r68222 + r68235;
        double r68237 = i;
        double r68238 = r68214 * r68237;
        double r68239 = r68236 + r68238;
        return r68239;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus i

Derivation

  1. Initial program 0.1

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

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

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

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

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

    \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(\left(2 \cdot \log \left(\sqrt[3]{c}\right)\right) \cdot \left(b - 0.5\right) + \color{blue}{\log \left(\sqrt[3]{c}\right) \cdot \left(b - 0.5\right)}\right)\right) + y \cdot i\]
  8. Using strategy rm
  9. Applied fma-def0.1

    \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{c}\right), b - 0.5, \log \left(\sqrt[3]{c}\right) \cdot \left(b - 0.5\right)\right)}\right) + y \cdot i\]
  10. Using strategy rm
  11. Applied pow1/30.1

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

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

Reproduce

herbie shell --seed 2019199 +o rules:numerics
(FPCore (x y z t a b c i)
  :name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, B"
  (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))