[Perl] bignum

Pau Amma pauamma at gundo.com
Mar 4 Oct 23:01:57 CEST 2022


On 2022-10-04 13:50, Sylvain Lhullier wrote:
> Bonjour,
> 
> Ce problème ne semble pas se produire partout :
> 
> $ perl -e 'use Math::Trig;use bignum; printf "%g\n",2.0*pi;'
> 6.28319
> $ perl -MMath::Trig -Mbignum -e 'printf "%g\n",2.0*pi'
> 6.28319
> $ perl -v
> This is perl 5, version 34, subversion 0 (v5.34.0)
> $ uname -a
> Linux kiwi 5.15.0-48-generic #54-Ubuntu SMP Fri Aug 26 13:26:29 UTC
> 2022 x86_64 x86_64 x86_64 GNU/Linux

Pas reproductible pour moi non plus:

[pauamma at gadfly] ~% perl -e 'use Math::Trig;use bignum; printf 
"%g\n",2.0*pi;'
6.28319
[pauamma at gadfly] ~% perl -MMath::Trig -Mbignum -e 'printf "%g\n",2.0*pi'
6.28319
[pauamma at gadfly] ~% perl -v

This is perl 5, version 32, subversion 1 (v5.32.1) built for 
amd64-freebsd-thread-multi
[...]
[pauamma at gadfly] ~% uname -a
FreeBSD gadfly 12.3-RELEASE-p6 FreeBSD 12.3-RELEASE-p6 GENERIC  amd64

> Patrick Dupre a écrit :
>> Bonjour,
>> 
>> Pourquoi est-ce j'obtiens 0 avec bignum ?
>> 
>> perl -e 'use Math::Trig;use bignum; printf "%g\n",2.0*pi;'

-- 
#BlackLivesMatter #TransWomenAreWomen #AccessibilityMatters 
#StandWithUkrainians
English: he/him/his (singular they/them/their/theirs OK)
French: il/le/lui (iel/iel and ielle/ielle OK)
Tagalog: siya/niya/kaniya (please avoid sila/nila/kanila)



Plus d'informations sur la liste de diffusion Perl