Dirk Laurie on Wed, 14 Feb 2018 05:43:05 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: polrecip for a constant polymomial |
Ii is not merely inconvenient, it is inconsistent and may even qualify as being a bug. Surely the definition of polrecip should be equivalent to polrecip(p) = subst(p,x,1/x)*x^poldegree(p) 2018-02-14 0:41 GMT+02:00 Jacques Gélinas <jacquesg00@hotmail.com>: > It is inconvenient to have to add code to handle constant polynomials. > Why not return the constant itself ? > > # polrecip(2+0*x) > %1 = 2 > # polrecip(2) > *** at top-level: polrecip(2) > *** ^----------- > *** polrecip: incorrect type in polrecip (t_INT). > > Jacques Gélinas, Ottawa >