Average Error: 0.4 → 0.4
Time: 2.5s
Precision: binary64
\[\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) - \frac{vy}{vx} \cdot \left(\left(dx - cx\right) - \left(bx - ax\right)\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) - \frac{vy}{vx} \cdot \left(\left(dx - cx\right) - \left(bx - ax\right)\right)
double code(double dy, double cy, double by, double ay, double vy, double vx, double dx, double cx, double bx, double ax) {
	return ((double) (((double) (((double) (dy - cy)) - ((double) (by - ay)))) - ((double) (((double) (vy / vx)) * ((double) (((double) (dx - cx)) - ((double) (bx - ax))))))));
}
double code(double dy, double cy, double by, double ay, double vy, double vx, double dx, double cx, double bx, double ax) {
	return ((double) (((double) (((double) (dy - cy)) - ((double) (by - ay)))) - ((double) (((double) (vy / vx)) * ((double) (((double) (dx - cx)) - ((double) (bx - ax))))))));
}

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.4

    \[\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. Final simplification0.4

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

Reproduce

herbie shell --seed 2020153 
(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)))))