in reply to xs outputs faster than perl can keep up

Rmpfr_out_str($barray[$i],10,0,GMP_RNDD);

Does Rmpfr_get_str() work any better ? Or perhaps you can simply print $barray[$i], "\n"; ('print' uses 'Rmpfr_get_str'). The overloaded functions use defaults, so you would want to first set the default rounding mode to GMP_RNDD if you use print().

I'll try to fix this over the next couple of days - I haven't yet managed to reproduce the problem on Win32 (and haven't yet tried on linux).

Thanks for the report.

Cheers,
Rob
Update: Included some code tags, missed earlier

Replies are listed 'Best First'.
Re^2: xs outputs faster than perl can keep up
by zentara (Cardinal) on Feb 06, 2007 at 13:11 UTC
    Doh !! Yes,
    print $barray[$i] ;
    does it properly. I don't know why I didn't try that, I guess I was thinking that it was an object, or I fell into the trap of trying to keep c syntax. Thanks.

    I'm not really a human, but I play one on earth. Cogito ergo sum a bum
      However, I subsequently discovered that with the sample code you provided, 'Rmpfr_get_str' (and hence also 'print') output one less decimal place than 'Rmpfr_out_str'. Looks like there's a little bug there that needs fixing.

      Cheers,
      Rob