A simple fix by moving out the code that does the literals (the part that changes 1/2 to Integer(1)/Integer(2)) into a separate function and made sure its called at each load.
I used my shiny new trac account to add the patch to the Trac. Rado On Jun 15, 6:53 pm, William Stein <wst...@gmail.com> wrote: > On Tue, Jun 16, 2009 at 12:24 AM, Pogon<vic...@saase.net> wrote: > > > yes, you're right, just tested it, works when replacing 1/2 by .5 > > > so, will this get fixed? > > This is now > > http://trac.sagemath.org/sage_trac/ticket/6305 > > William > > > > > > > maybe someone with more dev-knowledge could trac a bug ... > > > On Jun 15, 11:18 pm, Marshall Hampton <hampto...@gmail.com> wrote: > >> I'm not sure what is happening but I would guess that at some point > >> the ^(1/2) gets turned into ^(0), and then your standard deviation > >> goes from .06... to 1. I.e., it seems like maybe the preparser > >> doesn't catch these nested loadings. > > >> -M. Hampton > > >> On Jun 15, 1:54 pm, Pogon <vic...@saase.net> wrote: > > >> > Hi, > >> > I'm not sure if it's a bug or it's me doing something wrong. > > >> > I have two files: > > >> > test1.sage containing nothing but > >> > print numpy.random.normal(0,(2*0.0061*0.33)^(1/2),1) > > >> > and > > >> > test2.sage containing > >> > load "test1.sage" > > >> > I import numpy > >> > sage: import numpy > > >> > Now > >> > sage: load "test1.sage" > >> > returns values always smaller than 1 > >> > thats the right distribution, the same i get when using the notebook- > >> > interface > > >> > but > >> > sage: load "test2.sage" > >> > very often returns values bigger than 1, > >> > thats a whole different distribution > > >> > My system is ubuntu-9.04-amd64 on Pentium Dual Core > >> > sage-4.0.1 from 2009-06-06 > > -- > William Stein > Associate Professor of Mathematics > University of Washingtonhttp://wstein.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---