Average Error: 0.4 → 0.4
Time: 1.8s
Precision: binary64
\[x + \frac{\left(\left(v + 2 \cdot \left(v1 + v2\right)\right) + v3\right) \cdot dt}{6}\]
\[x + \frac{\left(\left(v + 2 \cdot \left(v1 + v2\right)\right) + v3\right) \cdot dt}{6}\]
x + \frac{\left(\left(v + 2 \cdot \left(v1 + v2\right)\right) + v3\right) \cdot dt}{6}
x + \frac{\left(\left(v + 2 \cdot \left(v1 + v2\right)\right) + v3\right) \cdot dt}{6}
double code(double x, double v, double v1, double v2, double v3, double dt) {
	return ((double) (x + ((double) (((double) (((double) (((double) (v + ((double) (2.0 * ((double) (v1 + v2)))))) + v3)) * dt)) / 6.0))));
}
double code(double x, double v, double v1, double v2, double v3, double dt) {
	return ((double) (x + ((double) (((double) (((double) (((double) (v + ((double) (2.0 * ((double) (v1 + v2)))))) + v3)) * dt)) / 6.0))));
}

Error

Bits error versus x

Bits error versus v

Bits error versus v1

Bits error versus v2

Bits error versus v3

Bits error versus dt

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.4

    \[x + \frac{\left(\left(v + 2 \cdot \left(v1 + v2\right)\right) + v3\right) \cdot dt}{6}\]
  2. Final simplification0.4

    \[\leadsto x + \frac{\left(\left(v + 2 \cdot \left(v1 + v2\right)\right) + v3\right) \cdot dt}{6}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (x v v1 v2 v3 dt)
  :name "(+ x (/ (* (+ (+ v (* 2 (+ v1 v2))) v3) dt) 6))"
  :precision binary64
  (+ x (/ (* (+ (+ v (* 2.0 (+ v1 v2))) v3) dt) 6.0)))