Indeed, this works on PPC, too:

sage: set_random_seed(100)
sage: current_randstate().set_seed_gap()
sage: gap.eval('List([1..10],i->Random(1,100000));')
'[ 80761, 80557, 8462, 25730, 32000, 92371, 85402, 52347, 17181,
2889 ]'
sage: gap_console()
GAP4, Version: 4.4.12 of 17-Dec-2008, powerpc-apple-darwin9.8.0-gcc
gap> List([1..10],i->Random(1,100000));
[ 96343, 43659, 75071, 1314, 40740, 69892, 10586, 31272, 96336,
26794 ]

Sorry for being confused.
I wonder how does GAP pick up the seed? (Don't even know where to look
in the code...)
On the other hand, how would one call
current_randstate().set_seed_gap()  from GAP?
(that's the thing that would be needed to fix GAP's misbehaviour...)


Dima

On Sep 7, 7:05 am, Mike Hansen <mhan...@gmail.com> wrote:
> On Mon, Sep 6, 2010 at 3:56 PM, Simon King <simon.k...@nuigalway.ie> wrote:
> > So indeed, it is not "Solaris vs. non-Solaris" but "little vs. big
> > endian", as the GAP people suspected.
>
> This is what I said in my first response and can be taken care of with
> current_randstate().set_seed_gap().
>
> Core2:
>
> sage: set_random_seed(100)
> sage: current_randstate().set_seed_gap()
> sage: gap.eval('List([1..10],i->Random(1,100000));')
> '[ 80761, 80557, 8462, 25730, 32000, 92371, 85402, 52347, 17181, 2889 ]'
>
> t2:
>
> sage: set_random_seed(100)
> sage: current_randstate().set_seed_gap()
> sage: gap.eval('List([1..10],i->Random(1,100000));')
> '[ 80761, 80557, 8462, 25730, 32000, 92371, 85402, 52347, 17181, 2889 ]'
>
> --Mike

-- 
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

Reply via email to