Fellow monks,
I'm working at some Perl/XS code that needs knowledge of the minimum and maximum values for floating point numbers (that is, floats). I know this is system-dependent, but I would like to know how to get at this information from Perl.
I've been searching the docs and the only thing I can find is this entry in the Config manpage:
"i_float"
From i_float.U:
This variable conditionally defines the "I_FLOAT" symbol,
and indicates whether a C program may include <float.h>
to get symbols like "DBL_MAX" or "DBL_MIN", i.e. machine
dependent floating point values.
The same thing seems to be the case for integers and Perl's integer and float types too, by the way.
It seems strange to me that this information is not available. Does anyone know of a way to get at this info from Perl? I might be tempted to create a seperate XS module for it otherwise.
Yours,
Joost.
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.