XBDEV Forum
Casual Relaxed Discussions. Code will get you talking!

Home » General » Programming » Sanity checks! (Rule of thumb! ...)
Sanity checks! [message #2] Thu, 15 September 2022 04:03
Ben is currently offline  Ben
Messages: 2
Registered: September 2022
Junior Member
A general rule of thumb, especially for complex simulations or systems with lots of calculations - checking for NANs (not a number).

Integrate it into all mathematical operations, such as, sin, cos, abs, addition, sqrt - check the numerical values and assert (not ignore - but halt and fix the bug)

Smile
 
Read Message
Next Topic: Randomise order items in an array?
Goto Forum:
  


Current Time: Sat Dec 06 12:47:52 PST 2025

Total time taken to generate the page: 0.01348 seconds