Average Error: 0.1 → 0.1
Time: 1.7s
Precision: 64
\[\frac{841}{108} \cdot x + \frac{4}{29}\]
\[841 \cdot \frac{x}{108} + \frac{4}{29}\]
\frac{841}{108} \cdot x + \frac{4}{29}
841 \cdot \frac{x}{108} + \frac{4}{29}
double code(double x) {
	return (((841.0 / 108.0) * x) + (4.0 / 29.0));
}
double code(double x) {
	return ((841.0 * (x / 108.0)) + (4.0 / 29.0));
}

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. Using strategy rm
  3. Applied div-inv0.3

    \[\leadsto \color{blue}{\left(841 \cdot \frac{1}{108}\right)} \cdot x + \frac{4}{29}\]
  4. Applied associate-*l*0.2

    \[\leadsto \color{blue}{841 \cdot \left(\frac{1}{108} \cdot x\right)} + \frac{4}{29}\]
  5. Simplified0.1

    \[\leadsto 841 \cdot \color{blue}{\frac{x}{108}} + \frac{4}{29}\]
  6. Final simplification0.1

    \[\leadsto 841 \cdot \frac{x}{108} + \frac{4}{29}\]

Reproduce

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