Average Error: 18.6 → 18.6
Time: 1.6s
Precision: binary64
\[\frac{{b}^{3} - {a}^{3}}{3 \cdot \left(b - a\right)}\]
\[\frac{{b}^{3} - {a}^{3}}{3 \cdot \left(b - a\right)}\]
\frac{{b}^{3} - {a}^{3}}{3 \cdot \left(b - a\right)}
\frac{{b}^{3} - {a}^{3}}{3 \cdot \left(b - a\right)}
double code(double b, double a) {
	return ((double) (((double) (((double) pow(b, 3.0)) - ((double) pow(a, 3.0)))) / ((double) (3.0 * ((double) (b - a))))));
}
double code(double b, double a) {
	return ((double) (((double) (((double) pow(b, 3.0)) - ((double) pow(a, 3.0)))) / ((double) (3.0 * ((double) (b - a))))));
}

Error

Bits error versus b

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 18.6

    \[\frac{{b}^{3} - {a}^{3}}{3 \cdot \left(b - a\right)}\]
  2. Final simplification18.6

    \[\leadsto \frac{{b}^{3} - {a}^{3}}{3 \cdot \left(b - a\right)}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (b a)
  :name "(/ (- (pow b 3) (pow a 3)) (* 3 (- b a)))"
  :precision binary64
  (/ (- (pow b 3.0) (pow a 3.0)) (* 3.0 (- b a))))