Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Extra libraries, Code snippets, applications etc. » C++ language problems and code snippets » FP exception vs NaN
Re: Capture division by zero [message #55296 is a reply to message #55292] Tue, 27 October 2020 19:19 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
koldo wrote on Tue, 27 October 2020 17:18
Quote:
Yeah, so your program now does not work in debug for particular input data. What is the next step?


The next step when TheIDE debugger breaks is to solve the problem Smile


Or if you want more practical example, take

examples/FnGraph

then activate fp exceptions, start the debugger and enter ln(x). Then tell me how you fixed the code....

Then try to imagine all the fixes you will need to make to avoid all FP exceptions and I can guarantee you two things:

a) you have probably missed something
b) the code will be about 2 times longer and much harder to maintain

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Dumb bug. Improper use of Null
Next Topic: strange MinGw return
Goto Forum:
  


Current Time: Tue May 07 20:30:07 CEST 2024

Total time taken to generate the page: 0.02861 seconds