Average Error: 0.0 → 0.1
Time: 4.8s
Precision: 64
\[\frac{x + y}{y + 1}\]
\[\frac{1}{\frac{y + 1}{x + y}}\]
\frac{x + y}{y + 1}
\frac{1}{\frac{y + 1}{x + y}}
double code(double x, double y) {
	return ((x + y) / (y + 1.0));
}
double code(double x, double y) {
	return (1.0 / ((y + 1.0) / (x + y)));
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\frac{x + y}{y + 1}\]
  2. Using strategy rm
  3. Applied clear-num0.1

    \[\leadsto \color{blue}{\frac{1}{\frac{y + 1}{x + y}}}\]
  4. Final simplification0.1

    \[\leadsto \frac{1}{\frac{y + 1}{x + y}}\]

Reproduce

herbie shell --seed 2020053 
(FPCore (x y)
  :name "Data.Colour.SRGB:invTransferFunction from colour-2.3.3"
  :precision binary64
  (/ (+ x y) (+ y 1)))