i'm using math::bigfloat (subclass of math::bigint?) which is part of the standard module distro for perl 5.8.0 on Solaris8. I'm not using anything like the GMP library (since I couldn't get this sucker to compile). I've run into an interesting quirk. I have a bunch of data files in the same dir, all of which are in the same format (i will triple-check again). My script is setup to process every single file in that dir., but it doesn't. It stops at like the 9th file. Now, if my script stopped processing at that particular file everytime, I could understand that something could be wrong with that particular data file. But that's not what happens. My script can process that 9th file, if I put that file in it's own directory and run the script on that dir. Now, when I say the script doesn't process the 9th file, that means the script still is running (in ptable and I see a CPU pegged at 99+%), but no output. I let it run for a day and still no output. The 9th file is no bigger or smaller than the rest of them, and besides my script can process the first 8 in about 15 sec. And even more interesting is that, when I change the accuracy setting, sometimes my script processes more than 8 files or less depending on that accuracy setting! That is what makes me believe it is a problem with the math::bigfloat. Any ideas?
"In God we trust, all others bring data."
#!/usr/bin/perl use strict; use File::Copy; #use Shell qw(cat); use IO::Handle; use Data::Dumper; #use Math::BigInt; use Math::BigFloat; use Statistics::Lite qw(:all); ...calc... #Math::BigFloat->precision(5); Math::BigFloat->accuracy(4); ## set global accuracy to 4, and get ready to populate %dat my %dat; $dat{"ip"}=$ip; ... ## output %dat to filehandle write my $pathfn=qq($tmpdir/$fn.daily.csv); dat2fhw($pathfn,\%dat); ## set global accuracy back to 6+ Math::BigFloat->accuracy(6); ## loop again on next element

In reply to math::bigfloat - accuracy quirk by qpqv

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.