Average Error: 0.1 → 0.1
Time: 2.0s
Precision: binary64
Cost: 320
\[\frac{841}{108} \cdot x + \frac{4}{29}\]
\[0.13793103448275862 + x \cdot 7.787037037037037\]
\frac{841}{108} \cdot x + \frac{4}{29}
0.13793103448275862 + x \cdot 7.787037037037037
(FPCore (x) :precision binary64 (+ (* (/ 841.0 108.0) x) (/ 4.0 29.0)))
(FPCore (x)
 :precision binary64
 (+ 0.13793103448275862 (* x 7.787037037037037)))
double code(double x) {
	return ((841.0 / 108.0) * x) + (4.0 / 29.0);
}
double code(double x) {
	return 0.13793103448275862 + (x * 7.787037037037037);
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Alternatives

Alternative 1
Error1.4
Cost520
\[\begin{array}{l} \mathbf{if}\;x \leq -0.017613985957795644 \lor \neg \left(x \leq 0.017810429117498975\right):\\ \;\;\;\;x \cdot 7.787037037037037\\ \mathbf{else}:\\ \;\;\;\;0.13793103448275862\\ \end{array}\]
Alternative 2
Error32.1
Cost64
\[0.13793103448275862\]
Alternative 3
Error57.8
Cost64
\[1\]

Error

Derivation

  1. Initial program 0.1

    \[\frac{841}{108} \cdot x + \frac{4}{29}\]
  2. Simplified0.1

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

    \[\leadsto \color{blue}{0.13793103448275862 + x \cdot 7.787037037037037}\]
  4. Final simplification0.1

    \[\leadsto 0.13793103448275862 + x \cdot 7.787037037037037\]

Reproduce

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