- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am running a program under Windows 7 with Compaq Visual Fortran version 6.6B containing a square-root function. The M6201:MATH sqrt:DOMAIN run-time error occurs. I have verified that thevalue of the variable sentto the DSQRT functionis positive and the variable is REAL*8. The QuickWin library is used. Are there other reasons besides a negative argument that can cause the error?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A NaN (or possibly also Inf) would also trigger it, if I recall correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for reply. I am not familiar with NaN. Can it be corrected or how is it treated?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
NaN comes as result of floating-point operation which has undefined result. The most common case is 0./0., and there are other possibilities, such as Inf/Inf, Inf*0., etc.
Why don't you run your program through debugger, and find out for yourself?
Why don't you run your program through debugger, and find out for yourself?

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page