Average Error: 0.0 → 0.0
Time: 2.3s
Precision: binary64
Cost: 192
\[x + \frac{1}{3}\]
\[x + 0.3333333333333333\]
x + \frac{1}{3}
x + 0.3333333333333333
(FPCore (x) :precision binary64 (+ x (/ 1.0 3.0)))
(FPCore (x) :precision binary64 (+ x 0.3333333333333333))
double code(double x) {
	return x + (1.0 / 3.0);
}
double code(double x) {
	return x + 0.3333333333333333;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Alternatives

Alternative 1
Error31.6
Cost12992
\[\log \left(e^{x + 0.3333333333333333}\right)\]
Alternative 2
Error21.0
Cost7168
\[\frac{{x}^{3} + 0.037037037037037035}{0.1111111111111111 + x \cdot \left(x - 0.3333333333333333\right)}\]
Alternative 3
Error15.7
Cost576
\[\frac{x \cdot x - 0.1111111111111111}{x - 0.3333333333333333}\]
Alternative 4
Error31.6
Cost64
\[x\]
Alternative 5
Error31.5
Cost64
\[0.3333333333333333\]
Alternative 6
Error57.3
Cost64
\[1\]
Alternative 7
Error62.3
Cost64
\[0\]
Alternative 8
Error62.4
Cost64
\[-1\]

Error

Derivation

  1. Initial program 0.0

    \[x + \frac{1}{3}\]
  2. Simplified0.0

    \[\leadsto \color{blue}{x + 0.3333333333333333}\]
  3. Final simplification0.0

    \[\leadsto x + 0.3333333333333333\]

Reproduce

herbie shell --seed 2021042 
(FPCore (x)
  :name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, F"
  :precision binary64
  (+ x (/ 1.0 3.0)))