2010年11月25日

simple trunc implement

uClibc的libm沒有trunc function的實作, 如果一定要用到的話, 可以加入簡單的實作:



double
trunc(double x)
{
    if (!finite (x))
        return x;

    if (x < 0.0)
        return - floor (-x);
    else
        return floor (x);
}

沒有留言:

coap-client 4.3.0 Windows build

coap-client  is a  wget -like tool to generate simple requests for retrieval and modification of resources on a remote server.  Got the sour...