From:             [EMAIL PROTECTED]
Operating system: N/A
PHP version:      4.0 Latest CVS (27/01/2001)
PHP Bug Type:     Math related
Bug description:  Omited Math Function

There are a set of four math function that convert real numbers to integers, trunc is 
missing.  Other functions of use are Frac, Mod, Div.

Round: return closest integer to argument, if fractional is .5 then return closest 
even integer.

Ceiling: return smallest integer greater than or equal to argument

Floor: return largest integer less than or equal to argument

Trunc: if argument is positive, return floor of argument, otherwise return ceiling of 

Frac: return abs(argument - trunc(argument))

Mod: returns remainder of the division of two arguments

Div: returns quotiant of the division of two arguments

(I ran into this problem when converting a decimal number to an IP number.)

Edit Bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to