Average Error: 0.3 → 0.3
Time: 57.4s
Precision: 64
\[\left(\left(dy - cy\right) - \left(by - ay\right)\right) - \frac{vy}{vx} \cdot \left(\left(dx - cx\right) - \left(bx - ax\right)\right)\]
\[\left(\left(dy - cy\right) - \left(by - ay\right)\right) - \left(dx \cdot \frac{vy}{vx} + \left(\left(-cx\right) - \left(bx - ax\right)\right) \cdot \frac{vy}{vx}\right)\]
\left(\left(dy - cy\right) - \left(by - ay\right)\right) - \frac{vy}{vx} \cdot \left(\left(dx - cx\right) - \left(bx - ax\right)\right)
\left(\left(dy - cy\right) - \left(by - ay\right)\right) - \left(dx \cdot \frac{vy}{vx} + \left(\left(-cx\right) - \left(bx - ax\right)\right) \cdot \frac{vy}{vx}\right)
double f(double dy, double cy, double by, double ay, double vy, double vx, double dx, double cx, double bx, double ax) {
        double r2391357 = dy;
        double r2391358 = cy;
        double r2391359 = r2391357 - r2391358;
        double r2391360 = by;
        double r2391361 = ay;
        double r2391362 = r2391360 - r2391361;
        double r2391363 = r2391359 - r2391362;
        double r2391364 = vy;
        double r2391365 = vx;
        double r2391366 = r2391364 / r2391365;
        double r2391367 = dx;
        double r2391368 = cx;
        double r2391369 = r2391367 - r2391368;
        double r2391370 = bx;
        double r2391371 = ax;
        double r2391372 = r2391370 - r2391371;
        double r2391373 = r2391369 - r2391372;
        double r2391374 = r2391366 * r2391373;
        double r2391375 = r2391363 - r2391374;
        return r2391375;
}

double f(double dy, double cy, double by, double ay, double vy, double vx, double dx, double cx, double bx, double ax) {
        double r2391376 = dy;
        double r2391377 = cy;
        double r2391378 = r2391376 - r2391377;
        double r2391379 = by;
        double r2391380 = ay;
        double r2391381 = r2391379 - r2391380;
        double r2391382 = r2391378 - r2391381;
        double r2391383 = dx;
        double r2391384 = vy;
        double r2391385 = vx;
        double r2391386 = r2391384 / r2391385;
        double r2391387 = r2391383 * r2391386;
        double r2391388 = cx;
        double r2391389 = -r2391388;
        double r2391390 = bx;
        double r2391391 = ax;
        double r2391392 = r2391390 - r2391391;
        double r2391393 = r2391389 - r2391392;
        double r2391394 = r2391393 * r2391386;
        double r2391395 = r2391387 + r2391394;
        double r2391396 = r2391382 - r2391395;
        return r2391396;
}

Error

Bits error versus dy

Bits error versus cy

Bits error versus by

Bits error versus ay

Bits error versus vy

Bits error versus vx

Bits error versus dx

Bits error versus cx

Bits error versus bx

Bits error versus ax

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.3

    \[\left(\left(dy - cy\right) - \left(by - ay\right)\right) - \frac{vy}{vx} \cdot \left(\left(dx - cx\right) - \left(bx - ax\right)\right)\]
  2. Using strategy rm
  3. Applied sub-neg0.3

    \[\leadsto \left(\left(dy - cy\right) - \left(by - ay\right)\right) - \frac{vy}{vx} \cdot \left(\color{blue}{\left(dx + \left(-cx\right)\right)} - \left(bx - ax\right)\right)\]
  4. Applied associate--l+0.3

    \[\leadsto \left(\left(dy - cy\right) - \left(by - ay\right)\right) - \frac{vy}{vx} \cdot \color{blue}{\left(dx + \left(\left(-cx\right) - \left(bx - ax\right)\right)\right)}\]
  5. Applied distribute-rgt-in0.3

    \[\leadsto \left(\left(dy - cy\right) - \left(by - ay\right)\right) - \color{blue}{\left(dx \cdot \frac{vy}{vx} + \left(\left(-cx\right) - \left(bx - ax\right)\right) \cdot \frac{vy}{vx}\right)}\]
  6. Final simplification0.3

    \[\leadsto \left(\left(dy - cy\right) - \left(by - ay\right)\right) - \left(dx \cdot \frac{vy}{vx} + \left(\left(-cx\right) - \left(bx - ax\right)\right) \cdot \frac{vy}{vx}\right)\]

Reproduce

herbie shell --seed 1 
(FPCore (dy cy by ay vy vx dx cx bx ax)
  :name "(((dy - cy) - (by - ay)) - (vy/vx) * ((dx - cx) - (bx - ax)))"
  :precision binary64
  (- (- (- dy cy) (- by ay)) (* (/ vy vx) (- (- dx cx) (- bx ax)))))