Lines Matching defs:order
34 //TODO: define a truncated compose(sb,sb, order) and extend it to pw<sb>.
35 //TODO: in all these functions, compute 'order' according to 'tol'.
140 int order){
142 if(f.isZero() || order == 0){
146 return sqrt_internal(-f,tol,order);
148 sqrtf.resize(order+1, Linear(0,0));
151 for(unsigned i = 1; int(i) <= order && i<r.size(); i++) {
155 r.truncate(order+1);
170 sqrtf0 = sqrt_internal(compose(f,Linear(0.,.5)),tol,order);
171 sqrtf1 = sqrt_internal(compose(f,Linear(.5,1.)),tol,order);
181 Piecewise<SBasis> sqrt(SBasis const &f, double tol, int order){
182 return sqrt(max(f,Linear(tol*tol)),tol,order);
188 Piecewise<SBasis> sqrt(Piecewise<SBasis> const &f, double tol, int order){
195 Piecewise<SBasis> sqrtfi = sqrt_internal(ff.segs[i],tol,order);
207 \param order maximum degree polynomial to use
209 Piecewise<SBasis> sin( SBasis const &f, double tol, int order){return(cos(-f+M_PI/2,tol,order));}
213 \param order maximum degree polynomial to use
215 Piecewise<SBasis> sin(Piecewise<SBasis> const &f, double tol, int order){return(cos(-f+M_PI/2,tol,order));}
220 \param order maximum degree polynomial to use
222 Piecewise<SBasis> cos(Piecewise<SBasis> const &f, double tol, int order){
225 Piecewise<SBasis> cosfi = cos(f.segs[i],tol,order);
235 \param order maximum degree polynomial to use
237 Piecewise<SBasis> cos( SBasis const &f, double tol, int order){
241 //estimate cos(x)-sum_0^order (-1)^k x^2k/2k! by the first neglicted term
242 for (int i=1; i<=2*order; i++) err*=d/i;
246 for (int k=1; k<=2*order; k+=2){
249 err+=xk.tailError(order);
250 xk.truncate(order);
254 err+=xk.tailError(order);
255 xk.truncate(order);
263 c0 = cos(compose(f,Linear(0.,.5)),tol,order);
264 c1 = cos(compose(f,Linear(.5,1.)),tol,order);
274 void truncateResult(Piecewise<SBasis> &f, int order){
275 if (order>=0){
277 f.segs[k].truncate(order);
329 Piecewise<SBasis> reciprocal(SBasis const &f, double tol, int order){
332 truncateResult(result,order);
335 Piecewise<SBasis> reciprocal(Piecewise<SBasis> const &f, double tol, int order){
338 truncateResult(result,order);
345 * \param times: vector of times at which the values are given. Should be sorted in increasing order.