Average Error: 0.0 → 0.0
Time: 8.7s
Precision: binary64
\[[x, y]=\mathsf{sort}([x, y])\]
\[\left(x + y\right) - x \cdot y\]
\[y + x \cdot \left(1 - y\right)\]
\left(x + y\right) - x \cdot y
y + x \cdot \left(1 - y\right)
(FPCore (x y) :precision binary64 (- (+ x y) (* x y)))
(FPCore (x y) :precision binary64 (+ y (* x (- 1.0 y))))
double code(double x, double y) {
	return (x + y) - (x * y);
}
double code(double x, double y) {
	return y + (x * (1.0 - 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

    \[\left(x + y\right) - x \cdot y\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt_binary64_657932.5

    \[\leadsto \color{blue}{\sqrt{\left(x + y\right) - x \cdot y} \cdot \sqrt{\left(x + y\right) - x \cdot y}}\]
  4. Simplified32.5

    \[\leadsto \color{blue}{\sqrt{\left(y + x\right) - y \cdot x}} \cdot \sqrt{\left(x + y\right) - x \cdot y}\]
  5. Simplified32.5

    \[\leadsto \sqrt{\left(y + x\right) - y \cdot x} \cdot \color{blue}{\sqrt{\left(y + x\right) - y \cdot x}}\]
  6. Using strategy rm
  7. Applied add-cube-cbrt_binary64_659232.9

    \[\leadsto \color{blue}{\left(\sqrt[3]{\sqrt{\left(y + x\right) - y \cdot x} \cdot \sqrt{\left(y + x\right) - y \cdot x}} \cdot \sqrt[3]{\sqrt{\left(y + x\right) - y \cdot x} \cdot \sqrt{\left(y + x\right) - y \cdot x}}\right) \cdot \sqrt[3]{\sqrt{\left(y + x\right) - y \cdot x} \cdot \sqrt{\left(y + x\right) - y \cdot x}}}\]
  8. Simplified33.0

    \[\leadsto \color{blue}{{\left(\sqrt[3]{\sqrt{\left(x + y\right) - x \cdot y}}\right)}^{4}} \cdot \sqrt[3]{\sqrt{\left(y + x\right) - y \cdot x} \cdot \sqrt{\left(y + x\right) - y \cdot x}}\]
  9. Simplified33.0

    \[\leadsto {\left(\sqrt[3]{\sqrt{\left(x + y\right) - x \cdot y}}\right)}^{4} \cdot \color{blue}{\sqrt[3]{\left(x + y\right) - x \cdot y}}\]
  10. Taylor expanded around 0 0.0

    \[\leadsto \color{blue}{\left(x + y\right) - x \cdot y}\]
  11. Simplified0.0

    \[\leadsto \color{blue}{y + x \cdot \left(1 - y\right)}\]
  12. Final simplification0.0

    \[\leadsto y + x \cdot \left(1 - y\right)\]

Reproduce

herbie shell --seed 2021090 
(FPCore (x y)
  :name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, A"
  :precision binary64
  (- (+ x y) (* x y)))