On 2/28/07, Carl Witty <[EMAIL PROTECTED]> wrote: > I have several patches I would like to submit for real_mpfr. However, > each of these patches breaks doctests all over the tree. To avoid a lot > of extra work, I would like to submit these patches in a two-phase > process. First, submit just the patches, leaving the doctests broken; > then, when (if) I convince the referee that the patches are good things > and are probably correct, submit one final patch that fixes all the > doctests for the combination of all the previous patches. > > Does that sound reasonable?
Yes. And I'm for you doing the changes you suggest below if you are very very careful about it. Thanks!! > > You mentioned earlier that you had scripts that made it easier to > semi-automatically fix lots of doctests; where are these scripts? It's just this script, i.e., there is a secrete command "sage -fixdoctests" that does what you want: rank4:~/s/spkg/standard was$ more ~/bin/fixdocs rm $1.out sage -fixdoctests $1 mv $1.out $1 sage -t $1 > Briefly, my proposed changes are: > 1) Fix the truncate=True case of the RealNumber str() method to round > instead of truncate (this makes the results of 1.4, 1.9, or sqrt(3.0)^2 > print with lots of 0's instead of lots of 9's). Good idea. > 2) Automatically switch into scientific notation if str() would > otherwise have to add many many zeroes (my proposal would be to switch > if the number of added zeroes exceeds the number of original digits). > This also changes the result of hash(), but makes it constant time. > (Try hash(0.5^1000000000) -- but be sure you do it on a machine with > lots of memory.) Good idea. > 3) Make MPFR<->Pari conversion exact, instead of depending on (for > instance) the rounding mode of the RealField. Then Pari->MPFR->Pari > would result in the exact same floating-point number, and > MPFR->Pari->MPFR would be the same floating-point number, with precision > rounded up to the nearest multiple of 32 (on 32-bit machines) or 64 (on > 64-bit machines). That would be nice. > 4) Make the default 'exponent marker' for scientific notation be '@' if > base>10. That's a very good idea. Williakm --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---
