I never tried it before but Math::BigInt can be used to see these numbers in full precision.

use strict; use warnings; use Math::BigInt; my $x = Math::BigInt->new('0x1fffffffffffff'); $x->blsft(1023 - 52); print '0x1fffffffffffff: ' . $x->bstr() . "\n\n"; my $y = Math::BigInt->new('0x1ffffffffffffe'); $y->blsft(1023 - 52); print '0x1ffffffffffffe: ' . $y->bstr() . "\n\n"; my $z = $x - $y; print 'difference : ' . $z->bstr() . "\n\n"; my $n = Math::BigInt->new(2); $n->bpow(971); print '2**971 : ' . $n->bstr() . "\n\n"; print "length of largest double precision value in base 10 + : " . length($x->bstr()) . " digits\n"; print "length of 2**971 (least significant bit of mantissa) in base 10 + : " . length($n->bstr()) . " digits\n"; __END__ 0x1fffffffffffff: 1797693134862315708145274237317043567980705675258449 +965989174768031572607800285387605895586327668781715404589535143824642 +343213268894641827684675467035375169860499105765512820762454900903893 +289440758685084551339423045832369032229481658085593321233482747978262 +04144723168738177180919299881250404026184124858368 0x1ffffffffffffe: 1797693134862315508561243283845062402343434371574593 +359244048724485818457545561143884706399431262203219608040271573715708 +098528849645117430440876627676009095943319277282370788761887605795325 +637686986540648252621157710157914639830148577040081234194593862451417 +23703148097529108423358883457665451722744025579520 difference : 1995840309534719811656372713036838566067451260435457 +541502547242437211891868964065784957965492635701089342446844192495243 +972437988393593660739171798284831420320005672951085676517537721444362 +987182653356744543923993330810455120870388888855268448044157507120906 +8757560416423584952303440099278848 2**971 : 1995840309534719811656372713036838566067451260435457 +541502547242437211891868964065784957965492635701089342446844192495243 +972437988393593660739171798284831420320005672951085676517537721444362 +987182653356744543923993330810455120870388888855268448044157507120906 +8757560416423584952303440099278848 length of largest double precision value in base 10 : 309 +digits length of 2**971 (least significant bit of mantissa) in base 10 : 293 +digits

In reply to Re^4: Large floating point literals by ig
in thread Large floating point literals by ig

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.