Average Error: 1.4 → 1.4
Time: 11.5s
Precision: 64
$\left(by - ay\right) - \frac{vy}{vx} \cdot \left(bx - by\right)$
$\left(by - ay\right) - \frac{vy}{vx} \cdot \left(bx - by\right)$
\left(by - ay\right) - \frac{vy}{vx} \cdot \left(bx - by\right)
\left(by - ay\right) - \frac{vy}{vx} \cdot \left(bx - by\right)
double f(double by, double ay, double vy, double vx, double bx) {
double r2368541 = by;
double r2368542 = ay;
double r2368543 = r2368541 - r2368542;
double r2368544 = vy;
double r2368545 = vx;
double r2368546 = r2368544 / r2368545;
double r2368547 = bx;
double r2368548 = r2368547 - r2368541;
double r2368549 = r2368546 * r2368548;
double r2368550 = r2368543 - r2368549;
return r2368550;
}


double f(double by, double ay, double vy, double vx, double bx) {
double r2368551 = by;
double r2368552 = ay;
double r2368553 = r2368551 - r2368552;
double r2368554 = vy;
double r2368555 = vx;
double r2368556 = r2368554 / r2368555;
double r2368557 = bx;
double r2368558 = r2368557 - r2368551;
double r2368559 = r2368556 * r2368558;
double r2368560 = r2368553 - r2368559;
return r2368560;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 1.4

$\left(by - ay\right) - \frac{vy}{vx} \cdot \left(bx - by\right)$
2. Final simplification1.4

$\leadsto \left(by - ay\right) - \frac{vy}{vx} \cdot \left(bx - by\right)$

# Reproduce

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