FlexPDE and undetermined ratio Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » FlexPDE and undetermined ratio « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Mohammad Rahmani (mrahmani)
Member
Username: mrahmani

Post Number: 16
Registered: 10-2004
Posted on Saturday, December 04, 2004 - 11:24 pm:   

I report a table in FlexPDE which has an expression
containing 1/tanh(x). I realized FlexPDE substitutes
1.00e+37 for 1/0 ratios. Could anybody explain why? and another question what is the min/max overflows
in FlexPDE?

Thanks
/Mohammad
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 272
Registered: 06-2003
Posted on Monday, December 06, 2004 - 03:28 pm:   

This happens because FlexPDE tests for divides that potentially cause overflow and replaces the result with a maximum of 1e37. This is actually a vestige of earlier days. 1e37 is the largest number that can be represented in single-precision floating point format. Since FlexPDE actually performs arithmetic in double precision format, we should replace this test by 1e306, the largest number representable in double precision. Nevertheless, 1e37 is a large number, approximately equal to the number of molecules in a cubic mile of seawater. In any reasonably scaled system, this limit should not be confining.

The IEEE double-precision standard provides for a precision of approximately 16 decimal digits, with minimum and maximum representable values of approximately 1e-306 to 1e306. Maximum exponential argument is about 700.

From the above you can see that even at 1e37 you are running risks of loss of precision due to cancellation errors. For example, 1e37+1e20-1e37=0, not 1e20.

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:

Topics | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration