Average Error: 0.2 → 0.1
Time: 13.5s
Precision: 64
$\left(3 \cdot t\right) \cdot t - \left(\left(2 \cdot t\right) \cdot t\right) \cdot t$
$\left(3 \cdot t\right) \cdot t + \left(-2 \cdot {t}^{3}\right)$
\left(3 \cdot t\right) \cdot t - \left(\left(2 \cdot t\right) \cdot t\right) \cdot t
\left(3 \cdot t\right) \cdot t + \left(-2 \cdot {t}^{3}\right)
double f(double t) {
double r1070998 = 3.0;
double r1070999 = t;
double r1071000 = r1070998 * r1070999;
double r1071001 = r1071000 * r1070999;
double r1071002 = 2.0;
double r1071003 = r1071002 * r1070999;
double r1071004 = r1071003 * r1070999;
double r1071005 = r1071004 * r1070999;
double r1071006 = r1071001 - r1071005;
return r1071006;
}


double f(double t) {
double r1071007 = 3.0;
double r1071008 = t;
double r1071009 = r1071007 * r1071008;
double r1071010 = r1071009 * r1071008;
double r1071011 = 2.0;
double r1071012 = 3.0;
double r1071013 = pow(r1071008, r1071012);
double r1071014 = r1071011 * r1071013;
double r1071015 = -r1071014;
double r1071016 = r1071010 + r1071015;
return r1071016;
}



Try it out

Results

 In Out
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. Using strategy rm
3. Applied sub-neg0.2

$\leadsto \color{blue}{\left(3 \cdot t\right) \cdot t + \left(-\left(\left(2 \cdot t\right) \cdot t\right) \cdot t\right)}$
4. Simplified0.1

$\leadsto \left(3 \cdot t\right) \cdot t + \color{blue}{\left(-2 \cdot {t}^{3}\right)}$
5. Final simplification0.1

$\leadsto \left(3 \cdot t\right) \cdot t + \left(-2 \cdot {t}^{3}\right)$

Reproduce

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