Changeset 8565a42 in mainline for uspace/lib/math/generic/log.c


Ignore:
Timestamp:
2018-03-02T20:34:50Z (7 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1a81f69, d5e5fd1
Parents:
3061bc1 (diff), 34e1206 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
git-committer:
GitHub <noreply@…> (2018-03-02 20:34:50)
Message:

Remove all trailing whitespace, everywhere.

See individual commit messages for details.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/math/generic/log.c

    r3061bc1 r8565a42  
    5555        float32_t ret = 0;
    5656        float32_t num = 1;
    57        
     57
    5858        for (unsigned int i = 1; i <= TAYLOR_DEGREE_32; i++) {
    5959                num *= arg;
    60                
     60
    6161                if ((i % 2) == 0)
    6262                        ret += num / i;
     
    6464                        ret -= num / i;
    6565        }
    66        
     66
    6767        return ret;
    6868}
     
    8383        float64_t ret = 0;
    8484        float64_t num = 1;
    85        
     85
    8686        for (unsigned int i = 1; i <= TAYLOR_DEGREE_64; i++) {
    8787                num *= arg;
    88                
     88
    8989                if ((i % 2) == 0)
    9090                        ret += num / i;
     
    9292                        ret -= num / i;
    9393        }
    94        
     94
    9595        return ret;
    9696}
     
    107107        float32_u m;
    108108        int e;
    109        
     109
    110110        m.val = arg;
    111111        /*
     
    118118        e = m.data.parts.exp - (FLOAT32_BIAS - 1);
    119119        m.data.parts.exp = FLOAT32_BIAS - 1;
    120        
     120
    121121        /*
    122122         * arg = m * 2^e ; log(arg) = log(m) + log(2^e) =
     
    137137        float64_u m;
    138138        int e;
    139        
     139
    140140        m.val = arg;
    141        
     141
    142142        /*
    143143         * Factor arg into m * 2^e where m has exponent -1,
     
    149149        e = m.data.parts.exp - (FLOAT64_BIAS - 1);
    150150        m.data.parts.exp = FLOAT64_BIAS - 1;
    151        
     151
    152152        /*
    153153         * arg = m * 2^e ; log(arg) = log(m) + log(2^e) =
Note: See TracChangeset for help on using the changeset viewer.