Y
Hacker News
new
|
ask
|
show
|
jobs
by
stephencanon
5216 days ago
Actually, (0-0) evaluates to +0 in the default rounding mode, so both of those expressions will typically return +∞.
1/-0 will give you -∞, of course.
1 comments
lelf
5216 days ago
Well, I meant it as in math notation, not in C.
(Strictly speaking, 1/0 in C is kaboom! (undefined behaviour))
link
(Strictly speaking, 1/0 in C is kaboom! (undefined behaviour))