1. double precision reals??
- Posted by Eddy Van Esch <raimundo4u at YAHOO.COM> Jan 23, 2001
- 416 views
Hi all, How can I make sure that a variable is always of type "double precision" ? If I make it an atom, it 'could' be a double precision real, but if the range of the number is small enough, Euphoria turns it into a single precision real, is it not? For instance, the double precision number 5.123456789012345678e4 can be represented by a single precision real but with less accuracy namely something like this: 5.123456789e4. I believe that Euphoria automatically turns my double precision atom into a single precision atom when it has the chance. Is this correct and how can I 'force' Euphoria to always regard my variable as a double precision value??? Is this asking too much of Euphoria? Eddy
2. Re: double precision reals??
- Posted by "Thomas Parslow (PatRat)" <patrat at rat-software.com> Jan 23, 2001
- 415 views
> Hi all, > How can I make sure that a variable is always of type "double precision" ? > If I make it an atom, it 'could' be a double precision real, but if the > range of the number is small enough, Euphoria turns it into a single > precision real, is it not? > For instance, the double precision number 5.123456789012345678e4 can be > represented by a single precision real but with less accuracy namely > something like this: 5.123456789e4. I believe that Euphoria automatically > turns my double precision atom into a single precision atom when it has the > chance. Is this correct and how can I 'force' Euphoria to always regard my > variable as a double precision value??? > Is this asking too much of Euphoria? > > Eddy Hi, That shouldn't be possible, euphoria hides its internal implementation from the programer. Thomas Parslow (PatRat) ICQ #:26359483 Rat Software http://www.rat-software.com/ Please leave quoted text in place when replying
3. Re: double precision reals??
- Posted by Rolf Schroeder <rolf.schroeder at DESY.DE> Jan 23, 2001
- 416 views
Eddy Van Esch wrote: > > Hi all, > How can I make sure that a variable is always of type "double precision" ? > If I make it an atom, it 'could' be a double precision real, but if the > range of the number is small enough, Euphoria turns it into a single > precision real, is it not? > For instance, the double precision number 5.123456789012345678e4 can be > represented by a single precision real but with less accuracy namely > something like this: 5.123456789e4. I believe that Euphoria automatically > turns my double precision atom into a single precision atom when it has the > chance. Is this correct and how can I 'force' Euphoria to always regard my > variable as a double precision value??? > Is this asking too much of Euphoria? > > Eddy Hi, there are NO single precisions in EU. There are only integers (32 bit) or double precisions. Never will be a loss of accuracy within 15 digits. Read 2.1.1 of the reference manual. Rolf
4. Re: double precision reals??
- Posted by Rolf Schroeder <rolf.schroeder at DESY.DE> Jan 23, 2001
- 397 views
Rolf Schroeder wrote: > ...... There are only integers (32 bit) ... Of course integers in Eu have 31 bit. Rolf