3 ms·
I checked division by zero initially, but then realised that 1/0 causes double to represent inf. Thought that this could be useful(?) in some situations. For ex
by vivekkannan 11y ago
I checked division by zero initially, but then realised that 1/0 causes double to represent inf. Thought that this could be useful(?) in some situations. For example, atan(1/0) --> 1.57... instead of error.
- jhallenworld 11y agoI was thinking to catch errors which could crash the program. Actually you should install a signal handler for SIGFPE to take care of this.