‘Nan’ Can Cripple You and your Code

NaN- Not a number is one such night mare that can cripple your entire Code , your hours (Or even Minutes😉 ) of punching the keyboard , that almost teases your patience of debugging the program

Only oneTIP for this : How certain you are about your code and how perfect is your code analysis and Data flow is ,

Just Check for Division By Zero Evaluation!

In any Division Arithmeticity Do check this , keep it as a habit and it should just flow when you are busy in such Divisional Logics in your code

The dirty way is to add a very small (negligible) padding to your denominator , Sure you woudnt do that if your coding for a Nuke Reactor or NASA JPL Mars Program😉

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s