develooper Front page | perl.perl5.porters | Postings from October 2018

[perl #133582] POSIX::log2 weird behaviour

Thread Previous | Thread Next
From:
James E Keenan via RT
Date:
October 13, 2018 02:11
Subject:
[perl #133582] POSIX::log2 weird behaviour
Message ID:
rt-4.0.24-13358-1539396652-448.133582-15-0@perl.org
On Fri, 12 Oct 2018 14:37:51 GMT, dpetrov@nes.ru wrote:
> This is a bug report for perl from dpetrov@nes.ru,
> generated with the help of perlbug 1.41 running under perl 5.28.0.
> 
> 
> -----------------------------------------------------------------
> perl -MPOSIX -e "print int POSIX::log2(64);"
> 5
> 
> WTF?
> 
> -----------------------------------------------------------------
> ---
> Flags:
>     category=library
>     severity=high
>     module=POSIX
> ---
> Site configuration information for perl 5.28.0:
> 
> Configured by strawberry-perl at Sat Jun 23 13:56:45 2018.
> 
> Summary of my perl5 (revision 5 version 28 subversion 0)
> configuration:
> 
> Platform:
>   osname=MSWin32
>   osvers=10.0.17134.112
>   archname=MSWin32-x64-multi-thread
>   uname='Win32 strawberry-perl 5.28.0.1 #1 Sat Jun 23 13:55:45 2018
> x64'
>   config_args='undef'

Using perl-5.28.0 on Ubuntu Linux 18.04 LTS, I cannot reproduce your result:

#####
$ perl -MPOSIX -e 'print POSIX::log2(64), "\n";'
6
$ perl -MPOSIX -e 'print int POSIX::log2(64), "\n";'
6
#####

Same results on FreeBSD-11.1.

Thank you very much.

-- 
James E Keenan (jkeenan@cpan.org)

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=133582

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About