numeric function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Davide

    numeric function

    Hi all,

    Please, can somebody help me to understand how calculate this number in
    php?

    I've got 4.7554844644e+0 6 and I need to have 4.7Mbits
    Is there a php function can helps me?

    Really thanx
    Cheers
    DP.

  • Alvaro G Vicario

    #2
    Re: numeric function

    *** Davide wrote/escribió (23 May 2005 02:46:16 -0700):[color=blue]
    > I've got 4.7554844644e+0 6 and I need to have 4.7Mbits
    > Is there a php function can helps me?[/color]

    1 byte = 8 bits
    1024 bytes = 1 kilobyte (or KB)
    1024 kilobytes = 1 megabyte (or MB)

    You need to convert from an unknown unit to megabits. Let's suppose the
    unknown unit is bits:

    $result= 4.7554844644e+0 6 / (1024*1024);

    If they aren't bits, do the math accordingly.


    --
    -- Álvaro G. Vicario - Burgos, Spain
    -- http://bits.demogracia.com - Mi sitio sobre programación web
    -- Don't e-mail me your questions, post them to the group
    --

    Comment

    Working...