Skip Menu |
Report information
Id: 126067
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: gfldex <wenzel.peppmeyer [at] gmx.de>
Cc:
AdminCc:

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



From: "Wenzel P. P. Peppmeyer" <wenzel.peppmeyer [...] gmx.de>
To: rakudobug [...] perl.org
Date: Wed, 16 Sep 2015 13:45:37 +0200 (CEST)
Subject: sprintf and NaN, Mu, Any and Nil
Download (untitled) / with headers
text/plain 288b
say sprintf('%f %f %f %f', Mu, Any, Nil, NaN); # output: rakudo-moar ed47bb: OUTPUT«0.000000 0.000000 0.000000 0.000000␤» # rakudo-jvm ed47bb: OUTPUT«java.lang.NumberFormatException: For input string: "nan"␤» # NaN should numify to NaN for sure and so may Mu, Any and Nil
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 491b
On Wed Sep 16 04:45:58 2015, gfldex wrote: Show quoted text
> say sprintf('%f %f %f %f', Mu, Any, Nil, NaN); > # output: rakudo-moar ed47bb: OUTPUT«0.000000 0.000000 0.000000 > 0.000000␤» > # rakudo-jvm ed47bb: OUTPUT«java.lang.NumberFormatException: > For input string: "nan"␤» > # NaN should numify to NaN for sure and so may Mu, Any and Nil
The output for NaN is NaN now, the rest is unchanged: $ perl6-m -e 'say sprintf("%f %f %f %f", Mu, Any, Nil, NaN);' 0.000000 0.000000 0.000000 NaN


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