Average Error: 0.0 → 0.0
Time: 1.8s
Precision: 64
\[500 \cdot \left(x - y\right)\]
\[500 \cdot \left(x - y\right)\]
500 \cdot \left(x - y\right)
500 \cdot \left(x - y\right)
double f(double x, double y) {
        double r268094 = 500.0;
        double r268095 = x;
        double r268096 = y;
        double r268097 = r268095 - r268096;
        double r268098 = r268094 * r268097;
        return r268098;
}

double f(double x, double y) {
        double r268099 = 500.0;
        double r268100 = x;
        double r268101 = y;
        double r268102 = r268100 - r268101;
        double r268103 = r268099 * r268102;
        return r268103;
}

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

    \[500 \cdot \left(x - y\right)\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt0.8

    \[\leadsto \color{blue}{\left(\sqrt{500} \cdot \sqrt{500}\right)} \cdot \left(x - y\right)\]
  4. Applied associate-*l*0.6

    \[\leadsto \color{blue}{\sqrt{500} \cdot \left(\sqrt{500} \cdot \left(x - y\right)\right)}\]
  5. Using strategy rm
  6. Applied add-cube-cbrt0.6

    \[\leadsto \sqrt{500} \cdot \left(\sqrt{\color{blue}{\left(\sqrt[3]{500} \cdot \sqrt[3]{500}\right) \cdot \sqrt[3]{500}}} \cdot \left(x - y\right)\right)\]
  7. Applied sqrt-prod0.6

    \[\leadsto \sqrt{500} \cdot \left(\color{blue}{\left(\sqrt{\sqrt[3]{500} \cdot \sqrt[3]{500}} \cdot \sqrt{\sqrt[3]{500}}\right)} \cdot \left(x - y\right)\right)\]
  8. Applied associate-*l*0.4

    \[\leadsto \sqrt{500} \cdot \color{blue}{\left(\sqrt{\sqrt[3]{500} \cdot \sqrt[3]{500}} \cdot \left(\sqrt{\sqrt[3]{500}} \cdot \left(x - y\right)\right)\right)}\]
  9. Taylor expanded around 0 0.8

    \[\leadsto \color{blue}{x \cdot {\left(\sqrt{500}\right)}^{2} - y \cdot {\left(\sqrt{500}\right)}^{2}}\]
  10. Simplified0.0

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

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

Reproduce

herbie shell --seed 2020062 
(FPCore (x y)
  :name "Data.Colour.CIE:cieLABView from colour-2.3.3, B"
  :precision binary64
  (* 500 (- x y)))