Inter-versions reproducibility problem of random elements.

31 views
Skip to first unread message

Emmanuel Charpentier

unread,
Feb 6, 2022, 2:23:39 PM2/6/22
to sage-support

Seen in this thread :

On Sagecell :

print(sage.version.version)
with seed(0): M = matrix(AA, 3, 3, lambda u,v: AA.random_element())
M.apply_map(lambda u:u.radical_expression())

prints

9.4
[-2  2 -2]
[-2  0  2]
[-1  2  2]

On Sage 9.5 compiled from source on Debian testing running on core i7 :

sage: with seed(0): M = matrix(AA, 3, 3, lambda u,v: AA.random_element())
sage: M.apply_map(lambda u:u.radical_expression())
[       -sqrt(2) - 1                -1/4          -2*sqrt(3)]
[                1/2  1/8*sqrt(33) + 1/8 -1/5*sqrt(29) + 3/5]
[                  0                 1/4                 1/2]

Advice required on how to file an efficient ticket.

Emmanuel Charpentier

unread,
Feb 6, 2022, 2:36:50 PM2/6/22
to sage-support
Also : coud you report the results on as many platforms and/or versions as possible ?

Fernando Gouvea

unread,
Feb 6, 2022, 2:55:39 PM2/6/22
to sage-s...@googlegroups.com

9.2 on Windows:

sage: print(sage.version.version)
....: with seed(0): M = matrix(AA, 3, 3, lambda u,v: AA.random_element())
....: M.apply_map(lambda u:u.radical_expression())
9.2
[-2  2 -2]
[-2  0  2]
[-1  2  2]

sagecell.sagemath.org:

9.4
[-2  2 -2]
[-2  0  2]
[-1  2  2]

I'll try 9.3 on Windows tomorrow.

Fernando

--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/617f077f-17d0-439f-a1e2-40c6ca1ff361n%40googlegroups.com.
-- 
=============================================================
Fernando Q. Gouvea         http://www.colby.edu/~fqgouvea
Carter Professor of Mathematics
Dept. of Mathematics
Colby College              
5836 Mayflower Hill        
Waterville, ME 04901       

Blessed are they who Go Around in Circles, for they Shall be Known as Wheels.

slelievre

unread,
Feb 7, 2022, 12:14:40 AM2/7/22
to sage-support
The `random_element` method of `AA` was changed in

https://trac.sagemath.org/ticket/30875

merged in Sage 9.5.rc0.
Reply all
Reply to author
Forward
0 new messages