Average Error: 0.1 → 0.1
Time: 4.6s
Precision: 64
\[\left(x \cdot \log y - z\right) - y\]
\[\left(\mathsf{fma}\left(x, 2 \cdot \log \left(\sqrt[3]{y}\right), x \cdot \log \left(\sqrt[3]{y}\right)\right) - z\right) - y\]
\left(x \cdot \log y - z\right) - y
\left(\mathsf{fma}\left(x, 2 \cdot \log \left(\sqrt[3]{y}\right), x \cdot \log \left(\sqrt[3]{y}\right)\right) - z\right) - y
double f(double x, double y, double z) {
        double r23164 = x;
        double r23165 = y;
        double r23166 = log(r23165);
        double r23167 = r23164 * r23166;
        double r23168 = z;
        double r23169 = r23167 - r23168;
        double r23170 = r23169 - r23165;
        return r23170;
}

double f(double x, double y, double z) {
        double r23171 = x;
        double r23172 = 2.0;
        double r23173 = y;
        double r23174 = cbrt(r23173);
        double r23175 = log(r23174);
        double r23176 = r23172 * r23175;
        double r23177 = r23171 * r23175;
        double r23178 = fma(r23171, r23176, r23177);
        double r23179 = z;
        double r23180 = r23178 - r23179;
        double r23181 = r23180 - r23173;
        return r23181;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Derivation

  1. Initial program 0.1

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

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

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

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

    \[\leadsto \left(\left(\color{blue}{x \cdot \left(2 \cdot \log \left(\sqrt[3]{y}\right)\right)} + x \cdot \log \left(\sqrt[3]{y}\right)\right) - z\right) - y\]
  7. Using strategy rm
  8. Applied fma-def0.1

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

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

Reproduce

herbie shell --seed 2020039 +o rules:numerics
(FPCore (x y z)
  :name "Statistics.Distribution.Poisson:$clogProbability from math-functions-0.1.5.2"
  :precision binary64
  (- (- (* x (log y)) z) y))