I have meanwhile thought of another way to get what you want: sprintf

I don't quite follow. At its simplest, what I want is to have a string like '1.44115188075868217e17' converted to the numeric value 144115188075868217 on a use64bitint build of perl that doesn't have long doubles. I can't see a way of doing that using (s)printf. I find that printf "%d", '1.44115188075868217e17' produces 144115188075868224. Sorry if I've missed the point. (I do that sometimes :-)

By looking at the sign, mantissa, and exponent it's not all that difficult to get the required result - and that's pretty much how I'll be doing it. Thanks Moron.

Cheers,
Rob

In reply to Re^4: Exasperated with 64-bit integer builds of perl by syphilis
in thread Exasperated with 64-bit integer builds of perl by syphilis

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.