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

Re: [perl #133582] POSIX::log2 weird behaviour

Thread Previous | Thread Next
From:
H.Merijn Brand
Date:
October 15, 2018 15:26
Subject:
Re: [perl #133582] POSIX::log2 weird behaviour
Message ID:
20181015172626.5cf5bf33@pc09.procura.nl
On Fri, 12 Oct 2018 07:37:51 -0700, "Dmitry Petrov \(via RT\)" <perlbug-followup@perl.org> wrote:

> # New Ticket Created by  Dmitry Petrov 
> # Please include the string:  [perl #133582]
> # in the subject line of all future correspondence about this issue. 
> # <URL: https://rt.perl.org/Ticket/Display.html?id=133582 >
> -----------------------------------------------------------------
> perl -MPOSIX -e "print int POSIX::log2(64);"
> 5
> 
> WTF?

I can confirm, but it is a Windows-issue, or a Strawberry issue

Windows math library?

This is perl 5, version 28, subversion 0 (v5.28.0) built for x86_64-linux-thread-multi-ld
  Linux 4.18.12-1-default [openSUSE Tumbleweed 20181012] x86_64

$ perl -MPOSIX -wE'say int POSIX::log2 (64);'
6

This is perl 5, version 28, subversion 0 (v5.28.0) built for MSWin32-x64-multi-thread
  Win32 strawberry-perl 5.28.0.1 #1 Sat Jun 23 13:55:45 2018 x64

C:\>perl -MPOSIX -wE"say int POSIX::log2 (64);"
5

I could imagine a new test for POSIX :)

-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.29   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

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