Not that I can think of at the moment. Sometimes these bugs can be terribly subtle. The other day I tracked down a bug in FLINT's F_mpz_div_2exp on 32 bit machines. In the end I found the following code gave the wrong answer:
ulong a = 573498595893479UL; ulong b = 42; printf("%lu\n", a>>b); The problem is, on a 32 bit machine 42 >= 32 and the shift operator does not work on some architectures when that is the case. For the longest time I thought this was a compiler bug!! Bill. On Jan 29, 11:48 am, Sebastian Pancratz <s...@pancratz.org> wrote: > On Jan 29, 10:13 am, Bill Hart <goodwillh...@googlemail.com> wrote: > > > I wonder if it is possible to recreate the problem just using FLINT, > > without any Sage, i.e. just write a short FLINT program which > > replicates the problem. > > > I don't understand how the multiplication could take any serious > > quantity of time unless the pow was screwed up somehow. But perhaps it > > is. > > > Could you insert some traces to print the values of m, the number of > > limbs of lead and (when it is computed) the number of limbs of t. > > > Bill. > > Dear Bill, > > At least using a naive approach of simply writing a short C program to > go through the same FLINT calls with the same mathematical objects > did, unsurprisingly, not reproduce the problem. However, I did not > ensure that all objects had the same state (length of the coefficient > array of polynomials, limbs for the coefficients, limbs of all other > fmpz_t's involved). Other than the above three pieces of data, which > I can print out between the FLINT calls in the code for every > fmpz_poly_t and fmpz_t involved --- I'll do this right after a seminar > which begins in a few minutes ---, is there any other piece of > information that is relevant to representing the state? > > Thanks, > > Sebastian -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org