Average Error: 0.0 → 0.0
Time: 5.4s
Precision: 64
\[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b\]
\[\mathsf{fma}\left(1 - y, z, \left(\mathsf{fma}\left(b, \left(y + t\right) - 2, x - a \cdot t\right) - \left(-1\right) \cdot a\right) + \left(t - 1\right) \cdot \left(\left(-a\right) + a\right)\right)\]
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\mathsf{fma}\left(1 - y, z, \left(\mathsf{fma}\left(b, \left(y + t\right) - 2, x - a \cdot t\right) - \left(-1\right) \cdot a\right) + \left(t - 1\right) \cdot \left(\left(-a\right) + a\right)\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r28792 = x;
        double r28793 = y;
        double r28794 = 1.0;
        double r28795 = r28793 - r28794;
        double r28796 = z;
        double r28797 = r28795 * r28796;
        double r28798 = r28792 - r28797;
        double r28799 = t;
        double r28800 = r28799 - r28794;
        double r28801 = a;
        double r28802 = r28800 * r28801;
        double r28803 = r28798 - r28802;
        double r28804 = r28793 + r28799;
        double r28805 = 2.0;
        double r28806 = r28804 - r28805;
        double r28807 = b;
        double r28808 = r28806 * r28807;
        double r28809 = r28803 + r28808;
        return r28809;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r28810 = 1.0;
        double r28811 = y;
        double r28812 = r28810 - r28811;
        double r28813 = z;
        double r28814 = b;
        double r28815 = t;
        double r28816 = r28811 + r28815;
        double r28817 = 2.0;
        double r28818 = r28816 - r28817;
        double r28819 = x;
        double r28820 = a;
        double r28821 = r28820 * r28815;
        double r28822 = r28819 - r28821;
        double r28823 = fma(r28814, r28818, r28822);
        double r28824 = -r28810;
        double r28825 = r28824 * r28820;
        double r28826 = r28823 - r28825;
        double r28827 = r28815 - r28810;
        double r28828 = -r28820;
        double r28829 = r28828 + r28820;
        double r28830 = r28827 * r28829;
        double r28831 = r28826 + r28830;
        double r28832 = fma(r28812, r28813, r28831);
        return r28832;
}

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

Derivation

  1. Initial program 0.0

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(b, \left(y + t\right) - 2, x\right) - \left(t - 1\right) \cdot a\right)}\]
  3. Using strategy rm
  4. Applied add-cube-cbrt0.7

    \[\leadsto \mathsf{fma}\left(1 - y, z, \color{blue}{\left(\sqrt[3]{\mathsf{fma}\left(b, \left(y + t\right) - 2, x\right)} \cdot \sqrt[3]{\mathsf{fma}\left(b, \left(y + t\right) - 2, x\right)}\right) \cdot \sqrt[3]{\mathsf{fma}\left(b, \left(y + t\right) - 2, x\right)}} - \left(t - 1\right) \cdot a\right)\]
  5. Applied prod-diff0.7

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

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

    \[\leadsto \mathsf{fma}\left(1 - y, z, \left({\left(\sqrt[3]{\mathsf{fma}\left(b, \left(y + t\right) - 2, x\right)}\right)}^{3} - a \cdot \left(t - 1\right)\right) + \color{blue}{\left(t - 1\right) \cdot \left(\left(-a\right) + a\right)}\right)\]
  8. Using strategy rm
  9. Applied sub-neg0.7

    \[\leadsto \mathsf{fma}\left(1 - y, z, \left({\left(\sqrt[3]{\mathsf{fma}\left(b, \left(y + t\right) - 2, x\right)}\right)}^{3} - a \cdot \color{blue}{\left(t + \left(-1\right)\right)}\right) + \left(t - 1\right) \cdot \left(\left(-a\right) + a\right)\right)\]
  10. Applied distribute-rgt-in0.7

    \[\leadsto \mathsf{fma}\left(1 - y, z, \left({\left(\sqrt[3]{\mathsf{fma}\left(b, \left(y + t\right) - 2, x\right)}\right)}^{3} - \color{blue}{\left(t \cdot a + \left(-1\right) \cdot a\right)}\right) + \left(t - 1\right) \cdot \left(\left(-a\right) + a\right)\right)\]
  11. Applied associate--r+0.7

    \[\leadsto \mathsf{fma}\left(1 - y, z, \color{blue}{\left(\left({\left(\sqrt[3]{\mathsf{fma}\left(b, \left(y + t\right) - 2, x\right)}\right)}^{3} - t \cdot a\right) - \left(-1\right) \cdot a\right)} + \left(t - 1\right) \cdot \left(\left(-a\right) + a\right)\right)\]
  12. Simplified0.0

    \[\leadsto \mathsf{fma}\left(1 - y, z, \left(\color{blue}{\mathsf{fma}\left(b, \left(y + t\right) - 2, x - a \cdot t\right)} - \left(-1\right) \cdot a\right) + \left(t - 1\right) \cdot \left(\left(-a\right) + a\right)\right)\]
  13. Final simplification0.0

    \[\leadsto \mathsf{fma}\left(1 - y, z, \left(\mathsf{fma}\left(b, \left(y + t\right) - 2, x - a \cdot t\right) - \left(-1\right) \cdot a\right) + \left(t - 1\right) \cdot \left(\left(-a\right) + a\right)\right)\]

Reproduce

herbie shell --seed 2019362 +o rules:numerics
(FPCore (x y z t a b)
  :name "Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2"
  :precision binary64
  (+ (- (- x (* (- y 1) z)) (* (- t 1) a)) (* (- (+ y t) 2) b)))