core.math.rndtonl: invalid return type or description?

ag0aep6g via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 19 03:36:24 PDT 2017


On 06/19/2017 10:04 AM, ketmar wrote:
> core.math.rndtonl is declared as this:
> 
>      extern (C) real rndtonl(real x);

Is rndtonl a Digital Mars C thing? It has no implementation in druntime, 
and I get an undefined reference  when I try to call it on Linux.

It compiles on Windows (wine, -m32), but only ever returns -nan.

If this is the same function: 
<http://www.digitalmars.com/rtl/fltpnt.html#rndtol>, then it should 
return a C long, which I guess is a D int on 32 bits. And surprise: that 
works.


More information about the Digitalmars-d mailing list