Gerhard Niklasch on Thu, 20 Nov 1997 11:52:59 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
From the 2.0.alpha Tutorial (1) |
Just running the Tutorial through its paces with 2.0.alpha. Or vice versa. [1]--- Section 1, `Warning 6)': The syntax for changing the real output format is default(format, "e0.50") (it doesn't work without the quotes). [2]--- Section 3, Hilbert matrix example, page 6: instead of dr = det(hr) type dr = matdet(hr) [3]--- Still Section 3, quadratic numbers, page 8: after ---8<--- (11:14) gp > w=quadgen(-163) %85 = w (11:16) gp > wr=sqrt(w^2) %95 = 0.4969786043308247562463005275 + 6.422381780396009318758412013*I --->8--- the suggested algdep(wr,2) is fooled thoroughly by the default precision: ---8<--- (11:16) gp > algdep(wr,2) %96 = 543976648475*x^2 - 591333214939*x + 24685937884731 --->8--- However, algdep(wr,2,2) works. (Setting the optional 3rd arg to 3,4,5, or 6, however, already gives the wrong polynomial 2*x^2-2*x+83.) _However_... ---8<--- (11:19) gp > algdep(1.*w,2,5) %100 = 4*x^2 + 163 (11:19) gp > algdep(1.*w,2) *** forbidden addition Scalar + vector/matrix. --->8--- Say what? Waitaminute... where was that line above... ---8<--- (11:15) gp > 1.*w %87 = 0.0000000000000000000000000000 + 6.383572667401852330855476004*I --->8--- Ooops. Off by one half... ---8<--- (11:40) gp > w^2 %117 = -41 + w (11:40) gp > 1.0*w^2 %118 = -41.00000000000000000000000000 + 6.383572667401852330855476004*I --->8--- (This is with the polfactorization patch already applied. 1.39.13 has no probs with all this.) [4]--- Something else I noticed whilst playing: default(compatible,0) resets the real output format (partially: it was "e0.50" before I switched from compatible=1 to 0, afterwards it was "e0.28"), which I think it shouldn't do, and \k resets several defaults and doesn't reinitialize them from ~/.gprc (or GPRC). In particular, all colors get set to -1, the prompt is set to "? ", and all aliases are lost. The latter is arguably correct insofar as we don't remember any additional aliases generated during the preceding part of the session, but it's a shame that the aliases read at startup are also gone. Perhaps \k now needs an optional numeric argument so that users can decide how much of their default customizations it should restore? (0 -- effectively reread ~/.gprc which, if there is an aliases file, would read that back in, and I think this should be the default. 1 -- erase everything to `factory settings'...) Enjoy, Gerhard PS -- as to http://hasse.mathematik.tu-muenchen.de/ntsw/pari/ , I'm working on the mailing list archive (I want it working as automagically as possible right from the start), and Karim, in between dealing with PARI itself, is looking into French versions of my web pages (of higher quality than I could achieve). German versions are also slated to appear soon. Please feel welcome to pop by from time to time and glance around. I'm not putting up tons of little yellow `Hey this is new!' tags since everything is still growing fast.