Two things. First, order of operations is not what I would expect: your first code is equivalent to sage: 1 << (3 + 1.2). Note that sage: (1 << 3) + 1.2 9.20000000000000 works.
Secondly, the reason the second example works is that you can shift by an integer n, and it just multiplies by 2^n (before 2.4 I think it had to be a positive integer). If you want to be able to shift by arbitrary real values then change the code for __lshift__ and __rshift__ for the reals. David On Mar 25, 11:24 pm, "didier deshommes" <[EMAIL PROTECTED]> wrote: > This is strange: SAGE crashes on input that mixes shifting and mpfr > reals > {{{ > sage: # mpz, mpfr > sage: 1<<3 +1.2 > Segmentation fault > > }}} > > But note that this is fine: > {{{ > # mpfr, mpz > sage: 2.0 + 1<<3 > 24.0000000000000 > > }}} > > Anyone knows what's happening? --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---