Skip Menu |
Report information
Id: 130154
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: zefram [at] fysh.org
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [BUG] Int/Int gives bogus underflow
From: Zefram <zefram [...] fysh.org>
To: rakudobug [...] perl.org
Date: Wed, 23 Nov 2016 07:35:26 +0000
Download (untitled) / with headers
text/plain 314b
Show quoted text
> 2e0**-1019
1.78005908680576e-307 Show quoted text
> 2e0**-1020
8.90029543402881e-308 Show quoted text
> 1 / (2**1019)
1.78005908680576e-307 Show quoted text
> 1 / (2**1020)
0 For 1/(2**1020) to underflow to zero is bogus. As you can see, the exact value of the operation is available in the Num type. Both of the Int/Int divisions produce Num values. -zefram
MoarVM PR fixing this sent: https://github.com/MoarVM/MoarVM/pull/442


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org