Wednesday 5 March 2014

how-do-you-round-a-floating-point-number-in-perl

    use POSIX;
    $ceil   = ceil(3.5);                        # 4
    $floor  = floor(3.5);                     # 3

Reference: http://stackoverflow.com/questions/178539/how-do-you-round-a-  floating-point-number-in-perl 

No comments:

Post a Comment

Tweets by @sriramperumalla