Hmmmm... thats interesting moklevat.... When I do what you did I get a non truncated numbers! I did a few tests and take a look at this:
[njs@localhost Shu_Hardness_Ratios]$ perldl perlDL shell v1.33 PDL comes with ABSOLUTELY NO WARRANTY. For details, see the file 'COPYING' in the PDL distribution. This is free software and you are welcome to redistribute it under certain conditions, see the same file for details. ReadLines, NiceSlice, MultiLines enabled Reading PDL/default.perldlrc... Found docs database /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thre +ad-multi/PDL/pdldoc.db Type 'help' for online help Type 'demo' for online demos Loaded PDL v2.4.3 Note: AutoLoader not enabled ('use PDL::AutoLoader' recommended) perldl> $x=50137.685706 perldl> print $x 50137.685706 perldl> $x=pdl(50137.685706) perldl> print $x 50137.685706 perldl> $x=zeroes(1) perldl> use PDL::NiceSlice perldl> $x(0) .= 50137.685706 perldl> print $x [ 50137.686] perldl> $x = rcols "bursts.txt" Reading data into piddles of type: [ Double ] Read in 33 elements. perldl> print $x [ 50093.199 50094.308 50954.953 51767.383 51958.219 52005.696 52 +005.763 52142.188 52422.043 52459.414 52482.509 52693.953 52752 +.918 52836.803 52837.198 53107.974 53125.429 53141.53 53198.49 +5 53243.578 53489.381 53603.709 53661.37 53724.982 53724.983 +53864.724 53882.002 53969.248 54224.674 54225.636 54304.474 543 +04.539 54366.513]
So if you type the number in straight its no problem, but if you read it from a file using rcols, or if you define a piddle and then put the number into the pre-existing piddle, then it truncates the number! I wonder why it does this?
In the PDL manual 'double' is the biggest data type listed so I on;y really understand why creating a piddle with this number in works one way and not another - or how to fix it.
I'd love to give you an example of the previous code it was failing in but I've re-written that with my aforementioned inelegant work around.

In reply to Re^2: PDL datatype by nickschurch
in thread PDL datatype by nickschurch

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.