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

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


On 06/19/2017 12:45 PM, ketmar wrote:
> ag0aep6g wrote:
[...]
>> 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.
> 
> no, there is `rndtol()` and `rndtonl()` in `core.math`,  they are 
> different functions.

The link covers both. See the Prototype and Description sections.

> also, `rndtol()` should return D `long` (i.e. 64 bit value). at least 
> this is what `core.math` says.

Sure, but it doesn't work with D long. It works with D int, which makes 
sense when the function actually returns a C long (assuming that DMC's 
long has 32 bits).


More information about the Digitalmars-d mailing list