pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:2151:    *!    *! This function returns a random number in the range    *! @expr{0 .. @[max]-ɛ@}.    *!    *! @seealso    *! @[Random]    */    PIKEFUN float random(float f)    {    if(f<=0.0) RETURN 0.0; -  unsigned INT64 value; +  UINT64 value;    if (THIS->buffer_bits < 64)    fill_int_buffer();    value = THIS->int_buffer;    THIS->buffer_bits = 0;       RETURN (FLOAT_TYPE)ldexp((double)f * value, -64);    }       /*! @decl mixed random(array|multiset x)    *! Returns a random element from @[x].