Run Time Error 65: Floating Invalid

Run Time Error 65: Floating Invalid


Our code compiled with CVF 6.6A runs correctly on Windows NT/2000 system but the same code with the same input data issues a Run Time Error 65: Floating invalid when run under Windows 98. The code is statically linked and (as I understand it) independent of any VF DLLs that may be present on the system?

I would be most grateful for any suggestions as to why this might be the case.

Thank you,
David Vowles

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

It would help to post a code example if you can narrow it down to where the error occurs.


My guess is that you have an uninitialized variable whose unpredictable content is being interpreted as a floating invalid. Another possibility is an array bounds error if you have bounds checking disabled, or mismatched argument types.


Retired 12/31/2016

I have seen a problem like this on applications compiled /fpe:0. On such applications, floating underflow traps are enabled and reported to the Fortran runtime library default exception handler (if you have not implemented a custom exception handler). This is so the handler can fixup the result of an underflow with a floating point zero. The problem is Windows 98 does not always correctly report floating underflows to exception handlers. It sometimes reports a floating point invalid operation instead. If your application is built with /fpe:0, this might explain the behavior you are seeing. You could test this by adding some initialization code in your application to use GETCONTROLFPQQ and SETCONTROLFPQQ to mask underflow traps, leaving all other traps unmasked (they are unmasked as a result of compiling /fpe:0). If this resolves the WIN98 issue, then the question would be can your application tolerate calculations resulting in denorms rather than zeros. If the denorms are not a problem for you, then this might be a plausible long term workaround.

Hope that helps,


Leave a Comment

Please sign in to add a comment. Not a member? Join today