Re: Absolute

new topic     » goto parent     » topic index » view thread      » older message » newer message

Aidan Bindoff wrote:

> If x is the largest possible atom,  what happens when your program calls
> x+1?

I'll chip in here, this is covered in the Euphoria Referance Manual.  I quote:

 Computing a result that is too big (i.e. outside of -1e300 to +1e300) will
result in one of the special atoms
 +infinity or -infinity. These appear as inf or -inf when you print them out.
It is also possible to generate nan or -nan. "nan" means "not a number", i.e.
an undefined value (such as inf divided by inf). These values are defined in
the IEEE floating-point standard. If you see one of these special values in
your output, it usually indicates an error in your program logic, although
generating inf as an intermediate result may be acceptable in some cases. For
instance, 1/inf is 0, which may be the "right" answer for your algorithm.

-Version 2.1 Windows Ref. Manual. file:///C|/EUPHORIA/HTML/refman_2.htm#1 for
default installation.

Personally, I would agree with Robert if he were to say this is good enough
for most non-critical purposes.

--
Nic (RedWord)Smith

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu