java - How do I handle floating point value inputs for values greater than Float.MAX_VALUE -
I have an API that takes a number as string input and I need to get float value of numbers I currently float to get the float value of my string number Using the flowflot method. According to
, this is nothing about input which is more than float. MAX_VALUE
I was thinking about doing this by checking the length of the input in a manner that is more than the length of the string float. MAX_VALUE
Pls suggest how I can go about dealing with this.
Although javadoc does not clarify it, when I tested it, the parstrot of the string is very large, just produced a float of 'infinity' You can use theInInFin () method after the creation to check the value .
Some things like BigDekel probably will be a safe option here, especially if you make an arithmetic on your value.
Comments
Post a Comment