Re: [sage-devel] How much code to convert to IEEE 754 format ?

2010-01-04 Thread Gonzalo Tornaria
On Sun, Jan 3, 2010 at 3:49 AM, Alex Ghitza wrote: > On Sun, 3 Jan 2010 05:35:37 +, David Kirkby > wrote: >> >> Was there a good reason for choosing the name 'sgn'? It sems a bit >> strange to me. >> > > That's the standard mathematical notation for this function, see > > http://en.wikipedia

Re: [sage-devel] How much code to convert to IEEE 754 format ?

2010-01-03 Thread David Kirkby
2010/1/3 Alex Ghitza : > On Sun, 3 Jan 2010 05:35:37 +, David Kirkby > wrote: >> >> Was there a good reason for choosing the name 'sgn'? It sems a bit >> strange to me. >> > > That's the standard mathematical notation for this function, see > > http://en.wikipedia.org/wiki/Sign_function > > >

Re: [sage-devel] How much code to convert to IEEE 754 format ?

2010-01-02 Thread Alex Ghitza
On Sun, 3 Jan 2010 05:35:37 +, David Kirkby wrote: > > Was there a good reason for choosing the name 'sgn'? It sems a bit > strange to me. > That's the standard mathematical notation for this function, see http://en.wikipedia.org/wiki/Sign_function Best, Alex -- Alex Ghitza -- Lecture

Re: [sage-devel] How much code to convert to IEEE 754 format ?

2010-01-02 Thread David Kirkby
2010/1/3 Mike Hansen : > On Sat, Jan 2, 2010 at 11:22 PM, Robert Bradshaw > wrote: >> It is sad we don't have a top-level sign function. > > We do, but it's called sgn. > > sage: sgn(3.0) > 1 > > --Mike Was there a good reason for choosing the name 'sgn'? It sems a bit strange to me. Dave -- T

Re: [sage-devel] How much code to convert to IEEE 754 format ?

2010-01-02 Thread Mike Hansen
On Sat, Jan 2, 2010 at 11:22 PM, Robert Bradshaw wrote: > It is sad we don't have a top-level sign function. We do, but it's called sgn. sage: sgn(3.0) 1 --Mike -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+

Re: [sage-devel] How much code to convert to IEEE 754 format ?

2010-01-02 Thread Robert Bradshaw
On Jan 2, 2010, at 9:00 PM, Dr. David Kirkby wrote: > The IEEE 754 representation of a floating point number is basically > > (-1)^2 x c x 2^q > s=sign bit > c=significand (or 'coefficient') > q=exponent > > http://en.wikipedia.org/wiki/IEEE_754-2008 > > E is most accurately represented by: > > 61

[sage-devel] How much code to convert to IEEE 754 format ?

2010-01-02 Thread Dr. David Kirkby
The IEEE 754 representation of a floating point number is basically (-1)^2 x c x 2^q s=sign bit c=significand (or 'coefficient') q=exponent http://en.wikipedia.org/wiki/IEEE_754-2008 E is most accurately represented by: 6121026514868073 x 2^-51 though on my SPARC the best one gets is 61210265