Average Error: 0.2 → 0.2
Time: 1.0s
Precision: binary64
\[\left(3 \cdot t\right) \cdot t - \left(\left(2 \cdot t\right) \cdot t\right) \cdot t\]
\[\left(t \cdot t\right) \cdot \left(3 - 2 \cdot t\right)\]
\left(3 \cdot t\right) \cdot t - \left(\left(2 \cdot t\right) \cdot t\right) \cdot t
\left(t \cdot t\right) \cdot \left(3 - 2 \cdot t\right)
double code(double t) {
	return ((double) (((double) (((double) (3.0 * t)) * t)) - ((double) (((double) (((double) (2.0 * t)) * t)) * t))));
}
double code(double t) {
	return ((double) (((double) (t * t)) * ((double) (3.0 - ((double) (2.0 * t))))));
}

Error

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.2

    \[\left(3 \cdot t\right) \cdot t - \left(\left(2 \cdot t\right) \cdot t\right) \cdot t\]
  2. Simplified0.2

    \[\leadsto \color{blue}{\left(t \cdot t\right) \cdot \left(3 - 2 \cdot t\right)}\]
  3. Final simplification0.2

    \[\leadsto \left(t \cdot t\right) \cdot \left(3 - 2 \cdot t\right)\]

Reproduce

herbie shell --seed 2020153 
(FPCore (t)
  :name "(- (* (* 3 t) t) (* (* (* 2 t) t) t))"
  :precision binary64
  (- (* (* 3.0 t) t) (* (* (* 2.0 t) t) t)))