Re: atom = problem?
- Posted by Jason Gade <jaygade at yahoo?co?> Apr 28, 2008
- 802 views
CChris wrote: > > Jason Gade wrote: > > CChris wrote: > > > Not only Eu doesn't extend reals or integers, but it doesn't guarantee > > > that > > > the sum of two integers is an integer - a joke, really! > > > The extension is to be made through an external library, since there is no > > > hardware support to count on anyway. > > > > Unless you are running Euphoria on a very, very old machine (386 class) then > > you certainly do have hardware FP support. Unless you've built your > > executable > > without it. > > > > What does "doesn't extend reals or integers" mean? > > > > There is no builtin provision for integers or reals with more precision bits > than what the hardware supports. No 64-bit integers (you could have them on > a Pentium SSE2), no 128 bit reals, and so on. No multiprecision (real) > arithmetic > or calculus, in a nutshell. Ah, gotcha. > > > Also, if the sum of two integers exceeds the 31-bit resolution of Euphoria > > integers > > then the sum is automatically promoted to a real atom. I don't know why > > that's > > a joke. > > > > Because integers are stable by addition, regardless of the magnitude of > operands. > > CChris So the only thing that I really see with your comments is that Euphoria behaves like most other computer languages out there with regards to numerical limitations. This is not a surprise, and for most applications it's not much of a limitation. And there are libraries in the archive for arbitrary precision arithmetic if that is what your application requires. -- A complex system that works is invariably found to have evolved from a simple system that works. --John Gall's 15th law of Systemantics. "Premature optimization is the root of all evil in programming." --C.A.R. Hoare j.