Average Error: 0.1 → 0.1
Time: 1.4s
Precision: 64
\[\frac{841}{108} \cdot x + \frac{4}{29}\]
\[\mathsf{fma}\left(7.7870370370370372, x, 0.13793103448275862\right)\]
\frac{841}{108} \cdot x + \frac{4}{29}
\mathsf{fma}\left(7.7870370370370372, x, 0.13793103448275862\right)
double code(double x) {
	return ((double) (((double) (((double) (841.0 / 108.0)) * x)) + ((double) (4.0 / 29.0))));
}
double code(double x) {
	return ((double) fma(7.787037037037037, x, 0.13793103448275862));
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[\frac{841}{108} \cdot x + \frac{4}{29}\]
  2. Taylor expanded around 0 0.1

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

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

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

Reproduce

herbie shell --seed 2020121 +o rules:numerics
(FPCore (x)
  :name "Data.Colour.CIE:cieLABView from colour-2.3.3, A"
  :precision binary64
  (+ (* (/ 841 108) x) (/ 4 29)))