Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Cheating Underflow/Overflow Help Needed
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Samantha Skyler  
View profile  
 More options May 25 2002, 11:54 pm
Newsgroups: comp.lang.lisp
From: samanthasky...@hotmail.com (Samantha Skyler)
Date: 25 May 2002 20:54:56 -0700
Local: Sat, May 25 2002 11:54 pm
Subject: Cheating Underflow/Overflow Help Needed
Hello all

I'm writing a subfunction that uses a lot of expt functions, so it
tends to crash my main program a lot with over/underflow errors.

I wanted to know if there is anyway to intercept this error and,
instead of crashing, have my subprogram return some value (-1, NIL,
whatever) whenever an error occurs so my main program can keep going.

Thanks a lot

-Samantha


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Frank A. Adrian  
View profile  
 More options May 26 2002, 12:17 am
Newsgroups: comp.lang.lisp
From: "Frank A. Adrian" <fadr...@ancar.org>
Date: Sat, 25 May 2002 21:17:31 -0700
Local: Sun, May 26 2002 12:17 am
Subject: Re: Cheating Underflow/Overflow Help Needed

Samantha Skyler wrote:
> I wanted to know if there is anyway to intercept this error and,
> instead of crashing, have my subprogram return some value (-1, NIL,
> whatever) whenever an error occurs so my main program can keep going.

There are several.  Look at section 9 of the Hyperspec
(http://www-2.cs.cmu.edu/Groups/AI/html/hyperspec/HyperSpec/Body/chap-...).

In addition, you might want to look at using numeric type other than
floating point.  Rationals or rolling your own scaled integral type will
give you what you need without any possibility of overflow.

faa


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erik Naggum  
View profile  
 More options May 26 2002, 9:39 am
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.net>
Date: Sun, 26 May 2002 13:39:17 GMT
Local: Sun, May 26 2002 9:39 am
Subject: Re: Cheating Underflow/Overflow Help Needed
* Samantha Skyler
| I'm writing a subfunction that uses a lot of expt functions, so it
| tends to crash my main program a lot with over/underflow errors.

  This is so common a request that IEEE 754 has support for not causing an
  overflow or underflow, but instead return 0 and the largest possible
  value (as opposed to an internal "infinity" value).  This is not directly
  supported by the Common Lisp standard, but you should find some support
  for it in your implementation, or, if not, you should request it.
--
  In a fight against something, the fight has value, victory has none.
  In a fight for something, the fight is a loss, victory merely relief.

  70 percent of American adults do not understand the scientific process.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »