Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
vivekkannan
· 11y ago · 0 comments
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.
Comments
[–]
jhallenworld
11y ago
I was thinking to catch errors which could crash the program. Actually you should install a signal handler for SIGFPE to take care of this.