Average Error: 0.0 → 0.0
Time: 8.2s
Precision: 64
\[\left(x + y\right) \cdot \left(x - y\right)\]
\[{x}^{2} - {y}^{2}\]
\left(x + y\right) \cdot \left(x - y\right)
{x}^{2} - {y}^{2}
double f(double x, double y) {
        double r114592 = x;
        double r114593 = y;
        double r114594 = r114592 + r114593;
        double r114595 = r114592 - r114593;
        double r114596 = r114594 * r114595;
        return r114596;
}

double f(double x, double y) {
        double r114597 = x;
        double r114598 = 2.0;
        double r114599 = pow(r114597, r114598);
        double r114600 = y;
        double r114601 = pow(r114600, r114598);
        double r114602 = r114599 - r114601;
        return r114602;
}

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) \cdot \left(x - y\right)\]
  2. Using strategy rm
  3. Applied pow10.0

    \[\leadsto \left(x + y\right) \cdot \color{blue}{{\left(x - y\right)}^{1}}\]
  4. Applied pow10.0

    \[\leadsto \color{blue}{{\left(x + y\right)}^{1}} \cdot {\left(x - y\right)}^{1}\]
  5. Applied pow-prod-down0.0

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

    \[\leadsto {\color{blue}{\left({x}^{2} - {y}^{2}\right)}}^{1}\]
  7. Final simplification0.0

    \[\leadsto {x}^{2} - {y}^{2}\]

Reproduce

herbie shell --seed 2019323 
(FPCore (x y)
  :name "Examples.Basics.BasicTests:f1 from sbv-4.4"
  :precision binary64
  (* (+ x y) (- x y)))