Hello, you're right my example is too long. Here is a better example where you can see that the use of ``1*randint(-20, 20)`` instead of ``randint(-20, 20)`` will produce fractions instead of integer divisisons.
I really think that this is illogical. Don't you ? Christophe. ===== Python-Sage code ===== a_Num = randint(-20, 20) a_Den = randint(1, 20) a = a_Num / a_Den print(a_Num, a_Den, a) print '---' a_Num = 1*randint(-20, 20) a_Den = randint(1, 20) a = a_Num / a_Den print(a_Num, a_Den, a) print '---' a_Num = (-1)^randint(1, 2)*randint(1, 20) a_Den = randint(1, 20) a = a_Num / a_Den print(a_Num, a_Den, a) ===== Sage output ===== (13, 5, 2) --- (-4, 11, -4/11) --- (5, 14, 5/14) -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.