Average Error: 1.4 → 1.4
Time: 1.4s
Precision: binary64
\[\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 code(double by, double ay, double vy, double vx, double bx) {
	return ((double) (((double) (by - ay)) - ((double) (((double) (vy / vx)) * ((double) (bx - by))))));
}
double code(double by, double ay, double vy, double vx, double bx) {
	return ((double) (((double) (by - ay)) - ((double) (((double) (vy / vx)) * ((double) (bx - by))))));
}

Error

Bits error versus by

Bits error versus ay

Bits error versus vy

Bits error versus vx

Bits error versus bx

Try it out

Your Program's Arguments

Results

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 2020153 
(FPCore (by ay vy vx bx)
  :name "(- (- by ay) (* (/ vy vx) (- bx by)))"
  :precision binary64
  (- (- by ay) (* (/ vy vx) (- bx by))))