When must arbitrary precision arithmetic functions be used in PHP?
Posted
by
Tjorriemorrie
on Programmers
See other posts from Programmers
or by Tjorriemorrie
Published on 2011-12-29T08:36:42Z
Indexed on
2012/10/29
11:17 UTC
Read the original article
Hit count: 157
php
My colleague uses the Binary Calculator functions in bandwidth calculations; as much as terrabytes, and with percentage splitting on allocation. His usage of these functions appears correct in order not to lose a byte; although he seems to be using them now for everything.
The manual only says:
For arbitrary precision mathematics PHP offers the Binary Calculator which supports numbers of any size and precision, represented as strings.
How much is any size? Is it really necessary? How big is the default float in PHP? Are there any good advice regarding this or things to keep in mind?
© Programmers or respective owner