Karim BELABAS on Fri, 19 May 2000 09:27:16 +0200 (MET DST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: problem with polredabs and temporary variables |
[Carl Witty:] > I ran across a problem using polredabs and temporary variables. The > polredabs0 function (actually the nilord function, which is called > indirectly by polredabs0) creates a new temporary variable and assumes > that it is lower priority than the variable of the input polynomial. > Ordinarily this works fine, but it fails if you're using the library > interface and call the function with your own temporary-variable > polynomial. > It's probably not worth fixing this problem...it looks like that would > be a major rewrite. Is it worth adding a warning about this type of > problem to the "temporary variables" section of the manual? There should be a common interface to access (or create) a variable with the requested relative priorities, e.g fetch a variable with lower priority than vx, and higher than vy. Since variable numbers are restricted (from 0 to MAXVARN) a general solution appears out of reach. OTH, any particular instance should be easy to fix in the library: 1) check variables at the start of the relevant function (the one which is going to introduce a new variable number and requires that it be of lower priority than anything in sight) [here it would be nilord or factmod9, a priori the former] 2) if trouble is foreseen, change main variable in relevant objects. 3) change it back in final result, if needed. It's already done in a few functions; a few more are left... I'll try to automate the previous solution once a stable release is out (it's an annoying design flaw but it only concerns library programming). Cheers, Karim. __ Karim Belabas email: Karim.Belabas@math.u-psud.fr Dep. de Mathematiques, Bat. 425 Universite Paris-Sud Tel: (00 33) 1 69 15 57 48 F-91405 Orsay (France) Fax: (00 33) 1 69 15 60 19 -- PARI/GP Home Page: http://www.parigp-home.de/