by ifdefdebug · 8y ago · 0 comments
if (foo == 0):
return MAX_FLOAT
else:
return bar / foo
is more sound for the given algorithm than "return 0" (still crappy, but more sound).Then use MAX_FLOAT as an error flag instead of 0, which could have been the result of a legal operation (with bar==0).
No comments yet.