- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
My Program continues to run and generates (writes) NaN to the output file. I am running in debug mode with flag /fpe:0. Any ideas?
Abhi
링크가 복사됨
3 응답
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
There are many sources of NaN that may not come frome exceptions in your code. A popular way is to read a NaN from an input file. Some math routines may return NaN without an exception.
You should run your code in the debugger and find out where this NaN is being introduced.
You should run your code in the debugger and find out where this NaN is being introduced.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hi Steve
I use the debugger extensively and was able to "see" where this particular NaN was originating. I posted it on this forum as I had seens it happening quite a few times before and have always wondered why it won't get trapped by the compiler flag.
To be precise, in this case it was the Log10 function creating problem. Is there any easy way to find out which math functions will throw an exception?
Abhi
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
If IVF wasn't such a laggard wrt f03's ieee support TRitcouldthis. The alternative is to use Windows SEH and it will trap and traceNaN's whatever their origins even if /fpe:3 isset.
Gerry
