1. Largest/smallest atom
- Posted by jemima Sep 17, 2008
- 1120 views
While I know they are about +/- 1e308, is there some way to specify the largest/smallest atom such as float64_to_atom(#FF,#FF,...})??
jemima
2. Re: Largest/smallest atom
- Posted by bernie Sep 17, 2008
- 1099 views
While I know they are about +/- 1e308, is there some way to specify the largest/smallest atom such as float64_to_atom(#FF,#FF,...})??
jemima:
Your question is not too clear but I think I understand what your asking.
You can use a user define type to test for a upper and lower limit.
See user define type in the reference document.
Bernie
3. Re: Largest/smallest atom
- Posted by mattlewis (admin) Sep 17, 2008
- 1134 views
While I know they are about +/- 1e308, is there some way to specify the largest/smallest atom such as float64_to_atom(#FF,#FF,...})??
These are the largest and smallest magnitude atoms (and their float64 representations):
1.7976931348623157e+308 {255,255,255,255,255,255,239,127} 4.9406564584124654e-324 {1,0,0,0,0,0,0,0}
In eu 3.1, there is no way to get these short of something like a float64 conversion. In 4.0 you can to enter them in scientific notation and get full accuracy. The standard floating point scanner loses accuracy after a few digits (I don't recall exactly where).
You can look at scientific.e, which is part of euphoria for 4.0, for more info.
Matt
4. Re: Largest/smallest atom
- Posted by jemima Oct 02, 2008
- 1053 views
While I know they are about +/- 1e308, is there some way to specify the largest/smallest atom such as float64_to_atom(#FF,#FF,...})??
These are the largest and smallest magnitude atoms (and their float64 representations):
1.7976931348623157e+308 {255,255,255,255,255,255,239,127}
In eu 3.1, there is no way to get these short of something like a float64 conversion.
Thanks, I would have replied sooner but it would not let me log on. Above is the +ve one I was after, anyone know the -ve one? I have no problem using a conversion from a sequence of 8 bytes.
5. Re: Largest/smallest atom
- Posted by mattlewis (admin) Oct 02, 2008
- 1038 views
These are the largest and smallest magnitude atoms (and their float64 representations):
1.7976931348623157e+308 {255,255,255,255,255,255,239,127}
In eu 3.1, there is no way to get these short of something like a float64 conversion.
Thanks, I would have replied sooner but it would not let me log on. Above is the +ve one I was after, anyone know the -ve one? I have no problem using a conversion from a sequence of 8 bytes.
It's the same number, just negative (just the sign bit is different in the floating point representation):
-1.7976931348623157e+308 {255,255,255,255,255,255,239,255}
Matt
6. Re: Largest/smallest atom
- Posted by jemima Oct 03, 2008
- 1009 views
These are the largest and smallest magnitude atoms (and their float64 representations):
1.7976931348623157e+308 {255,255,255,255,255,255,239,127}
In eu 3.1, there is no way to get these short of something like a float64 conversion.
Thanks, I would have replied sooner but it would not let me log on. Above is the +ve one I was after, anyone know the -ve one? I have no problem using a conversion from a sequence of 8 bytes.
It's the same number, just negative (just the sign bit is different in the floating point representation):
-1.7976931348623157e+308 {255,255,255,255,255,255,239,255}
Matt
Thanks Matt