blob: 73909b3008a147bb0d5b04b430efe3d60ee23ea2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
* software is freely granted, provided that this notice
float floorf(<[x]>)
double ceil(<[x]>)
float ceilf(<[x]>)
<<floor>> and <<floorf>> find
$\lfloor x \rfloor$,
<<ceil>> and <<ceilf>> find
int32_t i0,i1,j0;
uint32_t i,j;
if(i0>=0) {i0=i1=0;}
i = ((uint32_t)(0xffffffff))>>(j0-20);
if(j0==20) i0+=1;
if(j<(uint32_t)i1) i0 +=1 ; /* got a carry */
|