the FLT128_XXX definitons don't belong into the POSIX module
Yeah ... I had a vague notion that those definitions might be outside of POSIX's "terms of reference".
That being so, what is the best way to assign the FLT128_MAX value to a scalar on a -Dusequadmath perl (and without calling on a non-CORE module) ?
I really can't think of any better way than doing
$nv_max = 1.18973149535723176508575932662800702e4932;
But that string of numbers is not quite as easy to remember as "POSIX::FLT128_MAX".
A little easier to remember is
$nv_max = 0x1.ffffffffffffffffffffffffffffp+16383 except that it provides the wrong result on perl-5.22.0 (the first stable release of perl to support -Dusequadmath):
$ perl -le '$x = 0x1.ffffffffffffffffffffffffffffp+16383; print $x;'
Inf
Just lately I seem to often want to assign NV_MAX to a perl scalar (for various exercises regarding some testing of code).
For nvtype='double' I can use POSIX::DBL_MAX and for nvtype='long double' I can use POSIX::LDBL_MAX. It would therefore be nice to be able to use POSIX::FLT128_MAX when nvtype='__float128'.
But if that can't be then it's really not such a big deal to use other means, though it
is a bit of a nuisance having to continually look up the value.
Cheers,
Rob
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.