How to implement infinity in Java?

后端 未结 10 1302
别跟我提以往
别跟我提以往 2020-11-28 03:02

Does Java have anything to represent infinity for every numerical data type? How is it implemented such that I can do mathematical operations with it?

E.g.



        
10条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-28 03:37

    For the numeric wrapper types.

    e.g Double.POSITVE_INFINITY

    Hope this might help you.

提交回复
热议问题