View previous topic :: View next topic |
Author |
Message |
DanRRight
Joined: 10 Mar 2008 Posts: 2864 Location: South Pole, Antarctica
|
Posted: Tue Apr 16, 2024 11:54 am Post subject: Invalid FP number |
|
|
Good we have the debugger, otherwise the code without /debug just simply crash.
How to treat such presents from the hell? I do not know how it even appeared because i pre-screen every number before saving it on the subject of being denormal and out of scale.
What facilities for dealing with such numbers exist in Fortran and FTN95? Can I for example somehow filter them out before this assignment? |
|
Back to top |
|
|
Robert
Joined: 29 Nov 2006 Posts: 450 Location: Manchester
|
Posted: Tue Apr 16, 2024 12:09 pm Post subject: |
|
|
Is that value read from a file? |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2864 Location: South Pole, Antarctica
|
Posted: Wed Apr 17, 2024 11:57 am Post subject: |
|
|
The source of error was found. Yes, data was loaded from file and there was an error during read.
The question remains though: do Fortran/FTN have the ability to isolate such bad numbers ? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8011 Location: Salford, UK
|
Posted: Wed Apr 17, 2024 1:06 pm Post subject: |
|
|
Dan
The short answer is no. It's down to the programmer to allocate memory and say what data is stored.
You could write test code that accessed every floating point array element then the program will fault when reading an invalid value from memory.
Last edited by PaulLaidler on Fri Apr 19, 2024 5:50 pm; edited 1 time in total |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2864 Location: South Pole, Antarctica
|
Posted: Fri Apr 19, 2024 1:12 pm Post subject: |
|
|
Thanks for the info |
|
Back to top |
|
|
|