On Sat, Nov 10, 2018 at 10:59 AM Michael Beeson <profbee...@gmail.com> wrote:
> def test(): > for b in range(5,6): > for c in range(b+1,b+2): > print(b,c,n(c/b)) > print(5,6,n(6/5)) > > And the output > > sage: test() > > (5, 6, 1.00000000000000) > > (5, 6, 1.20000000000000) > > sage: version() > > 'SageMath version 8.0, Release Date: 2017-07-21' > > > And the question: why are the two lines not identical? > My guess is that python 2.7 interprets c/b to be 1, by the sage preparser interprets 6/5 to be an element of QQ. Just a guess. With Python 3, they should be the same. > > -- > 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+unsubscr...@googlegroups.com. > To post to this group, send email to sage-support@googlegroups.com. > Visit this group at https://groups.google.com/group/sage-support. > For more options, visit https://groups.google.com/d/optout. > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.