Average Error: 0.1 → 0.1
Time: 22.6s
Precision: 64
$\left(\left(\left(0.0 \le t \le 1 \land 0.0 \le a \le 1\right) \land 0.0 \le b \le 1\right) \land 0.0 \le c \le 1\right) \land 0.0 \le d \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 c\right) \cdot {t}^{2}\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}^{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 c\right) \cdot {t}^{2}\right) + {t}^{3} \cdot d
double f(double t, double a, double b, double c, double d) {
double r2077953 = 1.0;
double r2077954 = t;
double r2077955 = r2077953 - r2077954;
double r2077956 = 3.0;
double r2077957 = pow(r2077955, r2077956);
double r2077958 = a;
double r2077959 = r2077957 * r2077958;
double r2077960 = 2.0;
double r2077961 = pow(r2077955, r2077960);
double r2077962 = r2077956 * r2077961;
double r2077963 = r2077962 * r2077954;
double r2077964 = b;
double r2077965 = r2077963 * r2077964;
double r2077966 = r2077959 + r2077965;
double r2077967 = r2077956 * r2077955;
double r2077968 = pow(r2077954, r2077960);
double r2077969 = r2077967 * r2077968;
double r2077970 = c;
double r2077971 = r2077969 * r2077970;
double r2077972 = r2077966 + r2077971;
double r2077973 = pow(r2077954, r2077956);
double r2077974 = d;
double r2077975 = r2077973 * r2077974;
double r2077976 = r2077972 + r2077975;
return r2077976;
}


double f(double t, double a, double b, double c, double d) {
double r2077977 = 1.0;
double r2077978 = t;
double r2077979 = r2077977 - r2077978;
double r2077980 = 3.0;
double r2077981 = pow(r2077979, r2077980);
double r2077982 = a;
double r2077983 = r2077981 * r2077982;
double r2077984 = 2.0;
double r2077985 = pow(r2077979, r2077984);
double r2077986 = r2077980 * r2077985;
double r2077987 = r2077986 * r2077978;
double r2077988 = b;
double r2077989 = r2077987 * r2077988;
double r2077990 = r2077983 + r2077989;
double r2077991 = r2077980 * r2077979;
double r2077992 = c;
double r2077993 = r2077991 * r2077992;
double r2077994 = pow(r2077978, r2077984);
double r2077995 = r2077993 * r2077994;
double r2077996 = r2077990 + r2077995;
double r2077997 = pow(r2077978, r2077980);
double r2077998 = d;
double r2077999 = r2077997 * r2077998;
double r2078000 = r2077996 + r2077999;
return r2078000;
}



Try it out

Results

 In Out
Enter valid numbers for all inputs

Derivation

1. Initial program 0.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 associate-*l*0.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) + \color{blue}{\left(3 \cdot \left(1 - t\right)\right) \cdot \left({t}^{2} \cdot c\right)}\right) + {t}^{3} \cdot d$
4. Simplified0.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(3 \cdot \left(1 - t\right)\right) \cdot \color{blue}{\left(c \cdot {t}^{2}\right)}\right) + {t}^{3} \cdot d$
5. Using strategy rm
6. Applied associate-*r*0.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) + \color{blue}{\left(\left(3 \cdot \left(1 - t\right)\right) \cdot c\right) \cdot {t}^{2}}\right) + {t}^{3} \cdot d$
7. Final simplification0.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 c\right) \cdot {t}^{2}\right) + {t}^{3} \cdot d$

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 (and (and (and (and (<= 0.0 t 1) (<= 0.0 a 1)) (<= 0.0 b 1)) (<= 0.0 c 1)) (<= 0.0 d 1))
(+ (+ (+ (* (pow (- 1 t) 3) a) (* (* (* 3 (pow (- 1 t) 2)) t) b)) (* (* (* 3 (- 1 t)) (pow t 2)) c)) (* (pow t 3) d)))