core.math.rndtonl: invalid return type or description?
ketmar via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jun 19 03:58:08 PDT 2017
ag0aep6g wrote:
> 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.
ah, sorry, i should really read linked text instead of guessing from the
name only. ;-)
>> 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).
then it is yet another bug in `core.math`...
More information about the Digitalmars-d
mailing list