- Where Developers Learn, Share, & Build Careers


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 BigDec possibly would be a safe option here, especially if you would do some arithmetic on your value.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -