Average Error: 0.0 → 0.0
Time: 2.3s
Precision: binary64
\[\frac{x}{y + x} \]
\[\frac{x}{x + y} \]
\frac{x}{y + x}
\frac{x}{x + y}
(FPCore (x y) :precision binary64 (/ x (+ y x)))
(FPCore (x y) :precision binary64 (/ x (+ x y)))
double code(double x, double y) {
	return x / (y + x);
}
double code(double x, double y) {
	return x / (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 + x} \]
  2. Applied div-inv_binary640.2

    \[\leadsto \color{blue}{x \cdot \frac{1}{y + x}} \]
  3. Applied *-un-lft-identity_binary640.2

    \[\leadsto \color{blue}{\left(1 \cdot x\right)} \cdot \frac{1}{y + x} \]
  4. Applied associate-*l*_binary640.2

    \[\leadsto \color{blue}{1 \cdot \left(x \cdot \frac{1}{y + x}\right)} \]
  5. Simplified0.0

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

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

Reproduce

herbie shell --seed 2022125 
(FPCore (x y)
  :name "AI.Clustering.Hierarchical.Internal:average from clustering-0.2.1, B"
  :precision binary64
  (/ x (+ y x)))