Average Error: 0.0 → 0.0
Time: 3.3s
Precision: 64
\[\mathsf{fma}\left(a, a, b \cdot b\right)\]
\[\mathsf{fma}\left(a, a, b \cdot b\right)\]
\mathsf{fma}\left(a, a, b \cdot b\right)
\mathsf{fma}\left(a, a, b \cdot b\right)
double f(double a, double b) {
        double r389209 = a;
        double r389210 = b;
        double r389211 = r389210 * r389210;
        double r389212 = fma(r389209, r389209, r389211);
        return r389212;
}

double f(double a, double b) {
        double r389213 = a;
        double r389214 = b;
        double r389215 = r389214 * r389214;
        double r389216 = fma(r389213, r389213, r389215);
        return r389216;
}

Error

Bits error versus a

Bits error versus b

Derivation

  1. Initial program 0.0

    \[\mathsf{fma}\left(a, a, b \cdot b\right)\]
  2. Final simplification0.0

    \[\leadsto \mathsf{fma}\left(a, a, b \cdot b\right)\]

Reproduce

herbie shell --seed 1 
(FPCore (a b)
  :name "fma(a, a, b*b)"
  :precision binary64
  (fma a a (* b b)))