Re: [sage-devel] Re: real literals and IEEE-754

2014-01-11 Thread Robert Bradshaw
On Sat, Jan 11, 2014 at 9:11 AM, Nils Bruin wrote: > On Saturday, January 11, 2014 6:26:59 AM UTC-8, Volker Braun wrote: >> >> Would it be possible to move real literals to their own parent? Arithmetic >> operations with other parents should always cast the literal to the other >> parent first, an

Re: [sage-devel] Re: real literals and IEEE-754

2014-01-11 Thread Nils Bruin
On Saturday, January 11, 2014 6:26:59 AM UTC-8, Volker Braun wrote: > Would it be possible to move real literals to their own parent? Arithmetic > operations with other parents should always cast the literal to the other > parent first, and arithmetic operations within the real literals would en

Re: [sage-devel] Re: real literals and IEEE-754

2014-01-11 Thread Volker Braun
On Monday, January 6, 2014 6:50:05 PM UTC-10, Robert Bradshaw wrote: > > By that logic, rather than preparsing 1/2 we should force the user to > write ZZ(1) / ZZ(2). +1 It is important that the Sage REPL be easy to use with "mathematical" notation as far as possible. You should be able to inpu

Re: [sage-devel] Re: real literals and IEEE-754

2014-01-10 Thread Jeroen Demeyer
On 2014-01-06 22:46, Zimmermann Paul wrote: Nils, Date: Mon, 6 Jan 2014 13:18:07 -0800 (PST) From: Nils Bruin On Monday, January 6, 2014 12:46:19 PM UTC-8, Zimmermann Paul wrote: What about getting rid of real literals? I think they exist mainly to let RealField(200)(1e-20) wor

[sage-devel] Re: real literals and IEEE-754

2014-01-07 Thread Marc Mezzarobba
Nils Bruin wrote: > Here is something I think is really a bug: > > sage: parent(RealField(200)(1) + 1e-20) > Real Field with 53 bits of precision Yes. And I'd say the behavior of RealField(200)(RR(1e-20))) is a bug as well (the same bug in fact). So I think there are two different issues here:

Re: [sage-devel] Re: real literals and IEEE-754

2014-01-06 Thread Robert Bradshaw
On Mon, Jan 6, 2014 at 1:46 PM, Zimmermann Paul wrote: >Nils, > >> Date: Mon, 6 Jan 2014 13:18:07 -0800 (PST) >> From: Nils Bruin >> >> On Monday, January 6, 2014 12:46:19 PM UTC-8, Zimmermann Paul wrote: >> >> > What about getting rid of real literals? >> > >> >> I think they exist mainl

Re: [sage-devel] Re: real literals and IEEE-754

2014-01-06 Thread Thierry
Hi, On Mon, Jan 06, 2014 at 01:18:07PM -0800, Nils Bruin wrote: > Here is something I think is really a bug: > > sage: parent(RealField(200)(1) + 1e-20) > Real Field with 53 bits of precision On Mon, Jan 06, 2014 at 10:46:44PM +0100, Zimmermann Paul wrote: > this demonstrates another inconsistenc

[sage-devel] Re: real literals and IEEE-754

2014-01-06 Thread Zimmermann Paul
Nils, > Date: Mon, 6 Jan 2014 13:18:07 -0800 (PST) > From: Nils Bruin > > On Monday, January 6, 2014 12:46:19 PM UTC-8, Zimmermann Paul wrote: > > > What about getting rid of real literals? > > > > I think they exist mainly to let > > RealField(200)(1e-20) > > work in the first place

[sage-devel] Re: real literals and IEEE-754

2014-01-06 Thread Nils Bruin
On Monday, January 6, 2014 12:46:19 PM UTC-8, Zimmermann Paul wrote: > What about getting rid of real literals? > I think they exist mainly to let RealField(200)(1e-20) work in the first place: The parser needs to generate code to instantiate the constant 1e-20 somewhere and that constant sho