New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
integer-valued float not treated as int #8744
Comments
From zefram@fysh.orgCreated by zefram@fysh.orgOn a Perl with 64-bit IV and 64-bit NV (1+52 bit significand): $ perl -lwe '$a = 18446744073709549568; printf "%u\n", $a-1' $a gets the same numerical value in both cases, but the first time # The binary operators ... "-" ... will attempt to convert arguments to So I'd expect that in both cases the subtraction would be done in This only happens at the extreme positive end of the native integer range. Perl Info
|
From @nwc10On Thu, Jan 18, 2007 at 06:57:57AM -0800, Zefram wrote:
You're hitting the limits of the implementation. I forget why this was needed, but the alternative (convert whenever it can Nicholas Clark |
The RT System itself - Status changed from 'new' to 'open' |
From zefram@fysh.orgWolfgang Laun wrote:
This is correct, but that's not the value that I expected to be converted -zefram |
From @doyFor what it's worth, I agree with Nicholas's reasoning here. -doy |
From @nwc10On Fri, Jul 06, 2012 at 07:25:09PM -0700, Jesse Luehrs via RT wrote:
I have no attachment to the approach we currently have - it seemed to be "better" isn't intended to be a weasel word, but I guess that it is. Life is probably sort of easier now because a) I think most platforms that support long doubles (eg FreeBSD) now b) IIRC the platform with the most troublesome sprintf is pretty much $ perl -e 'printf "%20.0f\n", 2**64' Instead it insisted on giving something like 18446744073709550000 I don't think that we actually had any problems from the "interesting" Nicholas Clark |
Migrated from rt.perl.org#41288 (status was 'open')
Searchable as RT41288$
The text was updated successfully, but these errors were encountered: