Average Error: 0.1 → 0.1
Time: 10.3s
Precision: 64
\[\frac{841.0}{108.0} \cdot x + \frac{4.0}{29.0}\]
\[\mathsf{fma}\left(7.787037037037037, x, 0.13793103448275862\right)\]
\frac{841.0}{108.0} \cdot x + \frac{4.0}{29.0}
\mathsf{fma}\left(7.787037037037037, x, 0.13793103448275862\right)
double f(double x) {
        double r12751506 = 841.0;
        double r12751507 = 108.0;
        double r12751508 = r12751506 / r12751507;
        double r12751509 = x;
        double r12751510 = r12751508 * r12751509;
        double r12751511 = 4.0;
        double r12751512 = 29.0;
        double r12751513 = r12751511 / r12751512;
        double r12751514 = r12751510 + r12751513;
        return r12751514;
}

double f(double x) {
        double r12751515 = 7.787037037037037;
        double r12751516 = x;
        double r12751517 = 0.13793103448275862;
        double r12751518 = fma(r12751515, r12751516, r12751517);
        return r12751518;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.1

    \[\frac{841.0}{108.0} \cdot x + \frac{4.0}{29.0}\]
  2. Taylor expanded around 0 0.1

    \[\leadsto \color{blue}{7.787037037037037 \cdot x + 0.13793103448275862}\]
  3. Simplified0.1

    \[\leadsto \color{blue}{\mathsf{fma}\left(7.787037037037037, x, 0.13793103448275862\right)}\]
  4. Final simplification0.1

    \[\leadsto \mathsf{fma}\left(7.787037037037037, x, 0.13793103448275862\right)\]

Reproduce

herbie shell --seed 2019163 +o rules:numerics
(FPCore (x)
  :name "Data.Colour.CIE:cieLABView from colour-2.3.3, A"
  (+ (* (/ 841.0 108.0) x) (/ 4.0 29.0)))