zlacker

[parent] [thread] 1 comments
1. dpryde+(OP)[view] [source] 2021-10-27 21:54:51
If you are using floating point numbers implemented in hardware, then infinity is absolutely a valid value and one that your code will encounter. This is true regardless of language, as long as the language requires or allows IEEE-754 semantics.

I am not aware of any language (outside of intentionally-minimalist esolangs) that doesn't support floating point numbers. In some languages (like JavaScript) that's the only kind of number you get.

replies(1): >>jmnico+M51
2. jmnico+M51[view] [source] 2021-10-28 08:41:37
>>dpryde+(OP)
You're right, there's double.PositiveInfinity and double.NegativeInfinity in C#.

Never encountered it before (and I'm ashamed to say C# is my main language since 2009).

[go to top]