- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на 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

Ответить
Параметры темы
- Подписка на RSS-канал
- Отметить тему как новую
- Отметить тему как прочитанную
- Выполнить отслеживание данной Тема для текущего пользователя
- Закладка
- Подписаться
- Страница в формате печати