floating point - Working with decimal numbers in PHP -


In some way I want to score numbers for a rating system in PHP:

  4.6667 = 4.6 5.0001 = 5.0  

Is there any way to do this? (BTW, I read the data from the database.)

You are not consistent with any one rule. For example:

  4.6667 = 4.6 5.0001 = 5.1  

See these tasks anyway:

<

and .


Comments