Opened 12 years ago

Closed 12 years ago

#280 closed bug (fixed)

BUG in realrad.lib

Reported by: gorzel Owned by: gorzel
Priority: minor Milestone: 3-1-2 and higher
Component: singular-libs Version: 3-1-1
Keywords: Cc:


1.) In 2008, a bug was found in realrad.lib

See: Real solutions

Some month ago, I described the problem and how to solve it, put it has not be fixed yet.


2.) the static proc exp is buggy

proc exp(int a, int b)     // <-- a should be bigint
   number res = 1;            // <--this should be bigint
   while (b > 0) {
   if (b mod 2 == 1) {
       res = res * a;
       b = b-1;
   a = a * a;
   b = b div 2;

is buggy

> exp(2,34);
// ** int overflow(*), result may be wrong

but obsolete.

It is only used in the static proc subsets to compute 2n,

int grenze=int(exp(2,n))-1;

However this can be done just by

 int grenze = int(bigint(2)^n-1);

Though, a list with MAXINT =231-1 entries can not be handled I guess

Remarl: The static proc binlog is never used.

3.) fix the typo in the help string

proc decision(poly f)
" USAGE: decission(f);     <-- decision

4.) shouldn't Silke Spang's email adress be given at AUTHOR field ?

Change History (3)

comment:1 Changed 12 years ago by hannes

Owner: changed from anne to someone

comment:2 Changed 12 years ago by seelisch

Owner: changed from someone to gorzel

Thanks for letting us know. Could you please check out, modify the lib and check in again? Best regards from the SINGULAR team

comment:3 Changed 12 years ago by hannes

Resolution: fixed
Status: newclosed

The real solution would be the use of ringlist, but for the moment the proposed changes (from the forum) are used.

Note: See TracTickets for help on using tickets.