Perl

Perl (プログラミング言語)

[5] Perl は、プログラミング言語です。

実装

[7]

概念

[9]

[16] Perlモジュール

企業

[12] Perl を主要な開発言語 (の1つ) としている企業

関連

[6] Perl6 は関係ありません。

メモ

[1] CPAN/src ( 版) http://www.cpan.org/src/README.html

[2] 64ビット環境で実験してみた。

$ perl -e '$a = shift; printf "x = %s; x+1 = %s; x == x+1 = %s\n", 2**$a, 2**$a+1, (2**$a==2**$a+1)?1:0' 51
x = 2.25179981368525e+15; x+1 = 2251799813685249; x == x+1 = 0
$ perl -e '$a = shift; printf "x = %s; x+1 = %s; x == x+1 = %s\n", 2**$a, 2**$a+1, (2**$a==2**$a+1)?1:0' 52
x = 4.5035996273705e+15; x+1 = 4503599627370497; x == x+1 = 0
$ perl -e '$a = shift; printf "x = %s; x+1 = %s; x == x+1 = %s\n", 2**$a, 2**$a+1, (2**$a==2**$a+1)?1:0' 53
x = 9.00719925474099e+15; x+1 = 9.00719925474099e+15; x == x+1 = 1
$ perl -e '$a = shift; printf "x = %s; x+1 = %s; x == x+1 = %s\n", 2**$a, 2**$a+1, (2**$a==2**$a+1)?1:0' 54
x = 1.8014398509482e+16; x+1 = 1.8014398509482e+16; x == x+1 = 1

64ビット浮動小数点数仮数二進数で53桁らしく、それが整数を正しく表現できる限界らしい。

$ perl -Minteger -e '$a = shift; printf "x = %s; x+1 = %s; x == x+1 = %s\n", 2**$a, 2**$a+1, (2**$a==2**$a+1)?1:0' 51
x = 2.25179981368525e+15; x+1 = 2251799813685249; x == x+1 = 0
$ perl -Minteger -e '$a = shift; printf "x = %s; x+1 = %s; x == x+1 = %s\n", 2**$a, 2**$a+1, (2**$a==2**$a+1)?1:0' 52
x = 4.5035996273705e+15; x+1 = 4503599627370497; x == x+1 = 0
$ perl -Minteger -e '$a = shift; printf "x = %s; x+1 = %s; x == x+1 = %s\n", 2**$a, 2**$a+1, (2**$a==2**$a+1)?1:0' 53
x = 9.00719925474099e+15; x+1 = 9007199254740993; x == x+1 = 0
$ perl -Minteger -e '$a = shift; printf "x = %s; x+1 = %s; x == x+1 = %s\n", 2**$a, 2**$a+1, (2**$a==2**$a+1)?1:0' 54
x = 1.8014398509482e+16; x+1 = 18014398509481985; x == x+1 = 0
$ perl -Minteger -e '$a = shift; printf "x = %s; x+1 = %s; x == x+1 = %s\n", 2**$a, 2**$a+1, (2**$a==2**$a+1)?1:0' 62
x = 4.61168601842739e+18; x+1 = 4611686018427387905; x == x+1 = 0
$ perl -Minteger -e '$a = shift; printf "x = %s; x+1 = %s; x == x+1 = %s\n", 2**$a, 2**$a+1, (2**$a==2**$a+1)?1:0' 63
x = 9.22337203685478e+18; x+1 = -9223372036854775807; x == x+1 = 0
$ perl -Minteger -e '$a = shift; printf "x = %s; x+1 = %s; x == x+1 = %s\n", 2**$a, 2**$a+1, (2**$a==2**$a+1)?1:0' 64
x = 1.84467440737096e+19; x+1 = 0; x == x+1 = 0

use integer すると2の63乗の1つ手前まで整数として扱えるようになる。

[3] 404 Blog Not Found:Perlの登録商標について - Perl belongs to us ( ( 版)) http://blog.livedoor.jp/dankogai/archives/51733482.html

[4] リロケータブル Perl - skaji's blog ( ( 版)) http://ks0608.hatenablog.com/entry/2014/07/06/170328

[8] perldelta - search.cpan.org ( ()) http://search.cpan.org/~rjbs/perl-5.24.0/pod/perldelta.pod

[10] perldelta - search.cpan.org () http://search.cpan.org/~shay/perl-5.24.1/pod/perldelta.pod

[11] 5分でわかる Perl and web security · GitHub ( ()) https://gist.github.com/mala/9bf56420da8841945ba69361dd086878

[13] オンプレDB、PerlのAIフレームワーク――ウェザーニューズが追求する「開発者とユーザー双方が幸せになれる技術」 | HRナビ by リクルート () http://hrnabi.com/2018/03/23/16807/

[14] Announcing Perl 7 () https://www.perl.com/article/announcing-perl-7/

[15] #59207 (perl5.28 build fails on Catalina with MacPorts 2.6.1 and Xcode 11.1) – MacPorts () https://trac.macports.org/ticket/59207

[17] perlrun - how to execute the Perl interpreter - metacpan.org () https://metacpan.org/dist/perl/view/pod/perlrun.pod