Ignore:
Timestamp:
Feb 4, 2016, 6:25:22 PM (9 years ago)
Author:
meunier
Message:
  • Ajout de quelques fonction dans la lib math
  • Déplacement de certaines fonctions de stdlib vers string
File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_libs/math/s_rint.c

    r581 r777  
    3535{
    3636        int32_t i0, j0, sx;
    37         u_int32_t i,i1;
     37        uint32_t i,i1;
    3838        double t;
    3939        /* We use w = x + 2^52; t = w - 2^52; trick to round x to integer.
     
    4747        EXTRACT_WORDS(i0,i1,x);
    4848        /* Unbiased exponent */
    49         j0 = ((((u_int32_t)i0) >> 20)&0x7ff)-0x3ff;
     49        j0 = ((((uint32_t)i0) >> 20)&0x7ff)-0x3ff;
    5050
    5151        if (j0 > 51) {
     
    5757
    5858        /* Sign */
    59         sx = ((u_int32_t)i0) >> 31;
     59        sx = ((uint32_t)i0) >> 31;
    6060
    6161        if (j0<20) {
     
    8181            }
    8282        } else {
    83             i = ((u_int32_t)(0xffffffff))>>(j0-20);
     83            i = ((uint32_t)(0xffffffff))>>(j0-20);
    8484            if ((i1&i)==0) return x;    /* x is integral */
    8585            i>>=1;
Note: See TracChangeset for help on using the changeset viewer.