Average Error: 1.1 → 0.9
Time: 25.4s
Precision: 64
$0.0 \le t \le 1$
$\left(\left({\left(1 - t\right)}^{3} \cdot a + \left(\left(3 \cdot {\left(1 - t\right)}^{2}\right) \cdot t\right) \cdot b\right) + \left(\left(3 \cdot \left(1 - t\right)\right) \cdot {t}^{2}\right) \cdot c\right) + {t}^{3} \cdot d$
$\left(\left({\left(1 - t\right)}^{3} \cdot a + \left(\left(3 \cdot {\left(1 - t\right)}^{2}\right) \cdot t\right) \cdot b\right) + \left(\left(3 \cdot \left(1 - t\right)\right) \cdot {t}^{2}\right) \cdot c\right) + {t}^{\left(\frac{3}{2}\right)} \cdot \left({t}^{\left(\frac{3}{2}\right)} \cdot d\right)$
\left(\left({\left(1 - t\right)}^{3} \cdot a + \left(\left(3 \cdot {\left(1 - t\right)}^{2}\right) \cdot t\right) \cdot b\right) + \left(\left(3 \cdot \left(1 - t\right)\right) \cdot {t}^{2}\right) \cdot c\right) + {t}^{3} \cdot d
\left(\left({\left(1 - t\right)}^{3} \cdot a + \left(\left(3 \cdot {\left(1 - t\right)}^{2}\right) \cdot t\right) \cdot b\right) + \left(\left(3 \cdot \left(1 - t\right)\right) \cdot {t}^{2}\right) \cdot c\right) + {t}^{\left(\frac{3}{2}\right)} \cdot \left({t}^{\left(\frac{3}{2}\right)} \cdot d\right)
double f(double t, double a, double b, double c, double d) {
double r2047130 = 1.0;
double r2047131 = t;
double r2047132 = r2047130 - r2047131;
double r2047133 = 3.0;
double r2047134 = pow(r2047132, r2047133);
double r2047135 = a;
double r2047136 = r2047134 * r2047135;
double r2047137 = 2.0;
double r2047138 = pow(r2047132, r2047137);
double r2047139 = r2047133 * r2047138;
double r2047140 = r2047139 * r2047131;
double r2047141 = b;
double r2047142 = r2047140 * r2047141;
double r2047143 = r2047136 + r2047142;
double r2047144 = r2047133 * r2047132;
double r2047145 = pow(r2047131, r2047137);
double r2047146 = r2047144 * r2047145;
double r2047147 = c;
double r2047148 = r2047146 * r2047147;
double r2047149 = r2047143 + r2047148;
double r2047150 = pow(r2047131, r2047133);
double r2047151 = d;
double r2047152 = r2047150 * r2047151;
double r2047153 = r2047149 + r2047152;
return r2047153;
}


double f(double t, double a, double b, double c, double d) {
double r2047154 = 1.0;
double r2047155 = t;
double r2047156 = r2047154 - r2047155;
double r2047157 = 3.0;
double r2047158 = pow(r2047156, r2047157);
double r2047159 = a;
double r2047160 = r2047158 * r2047159;
double r2047161 = 2.0;
double r2047162 = pow(r2047156, r2047161);
double r2047163 = r2047157 * r2047162;
double r2047164 = r2047163 * r2047155;
double r2047165 = b;
double r2047166 = r2047164 * r2047165;
double r2047167 = r2047160 + r2047166;
double r2047168 = r2047157 * r2047156;
double r2047169 = pow(r2047155, r2047161);
double r2047170 = r2047168 * r2047169;
double r2047171 = c;
double r2047172 = r2047170 * r2047171;
double r2047173 = r2047167 + r2047172;
double r2047174 = 2.0;
double r2047175 = r2047157 / r2047174;
double r2047176 = pow(r2047155, r2047175);
double r2047177 = d;
double r2047178 = r2047176 * r2047177;
double r2047179 = r2047176 * r2047178;
double r2047180 = r2047173 + r2047179;
return r2047180;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 1.1

$\left(\left({\left(1 - t\right)}^{3} \cdot a + \left(\left(3 \cdot {\left(1 - t\right)}^{2}\right) \cdot t\right) \cdot b\right) + \left(\left(3 \cdot \left(1 - t\right)\right) \cdot {t}^{2}\right) \cdot c\right) + {t}^{3} \cdot d$
2. Using strategy rm
3. Applied sqr-pow1.1

$\leadsto \left(\left({\left(1 - t\right)}^{3} \cdot a + \left(\left(3 \cdot {\left(1 - t\right)}^{2}\right) \cdot t\right) \cdot b\right) + \left(\left(3 \cdot \left(1 - t\right)\right) \cdot {t}^{2}\right) \cdot c\right) + \color{blue}{\left({t}^{\left(\frac{3}{2}\right)} \cdot {t}^{\left(\frac{3}{2}\right)}\right)} \cdot d$
4. Applied associate-*l*0.9

$\leadsto \left(\left({\left(1 - t\right)}^{3} \cdot a + \left(\left(3 \cdot {\left(1 - t\right)}^{2}\right) \cdot t\right) \cdot b\right) + \left(\left(3 \cdot \left(1 - t\right)\right) \cdot {t}^{2}\right) \cdot c\right) + \color{blue}{{t}^{\left(\frac{3}{2}\right)} \cdot \left({t}^{\left(\frac{3}{2}\right)} \cdot d\right)}$
5. Final simplification0.9

$\leadsto \left(\left({\left(1 - t\right)}^{3} \cdot a + \left(\left(3 \cdot {\left(1 - t\right)}^{2}\right) \cdot t\right) \cdot b\right) + \left(\left(3 \cdot \left(1 - t\right)\right) \cdot {t}^{2}\right) \cdot c\right) + {t}^{\left(\frac{3}{2}\right)} \cdot \left({t}^{\left(\frac{3}{2}\right)} \cdot d\right)$

# Reproduce

herbie shell --seed 1
(FPCore (t a b c d)
:name "pow(1-t,3)*a+3*pow(1-t,2)*t*b+3*(1-t)*pow(t,2)*c+pow(t,3)*d"
:precision binary64
:pre (<= 0.0 t 1)
(+ (+ (+ (* (pow (- 1 t) 3) a) (* (* (* 3 (pow (- 1 t) 2)) t) b)) (* (* (* 3 (- 1 t)) (pow t 2)) c)) (* (pow t 3) d)))