From:

Date:

July 28, 2000 09:59Subject:

Questions about Math::BigFloatMessage ID:

3981BB73.6EEB124B@UnivPress.comI have recently rewritten a module of mine (Math::FixedPrecision) to use Math::BigFloat and have found some problems with it. There is no e-mail address listed for the author, Mark Biggar, so I am directing the query here. Is anyone working on a replacement to this module (as the POD would imply) or should I submit a patch to fix what I have found. It would appear that the even/odd rounding methods will always round in the opposite direction following IEEE 754 rules. I checked the test file from the Perl distribution and see errors running with my now corrected version (where I think there should be none). For example: use Math::BigFloat; $num = new Math::BigFloat "5.25"; #round up only if preceeding digit is even $Math::BigFloat::rnd_mode = 'even'; print 0+$num->ffround(-1), "\n"; #prints 5.2, s.b. 5.3 #round up only if preceeding digit is odd $Math::BigFloat::rnd_mode = 'odd'; print 0+$num->ffround(-1), "\n"; #prints 5.3, s.b. 5.2 The compare sub fcmp does not work when the two term's exponents are different (although that seems to have been the goal). I have also corrected this as well. I haven't fixed up t/bigfltpm.t, but I can do that before I submit patches. Thanks John Peacock

- Re: Questions about Math::BigFloat by M.J.T. Guy
- Re: Questions about Math::BigFloat by M.J.T. Guy
- Re: Questions about Math::BigFloat by John Peacock
- Re: Questions about Math::BigFloat by John Peacock
- Re: Questions about Math::BigFloat by sthoenna
- [PATCH]Re: Questions about Math::BigFloat by John Peacock
- Re: [PATCH]Re: Questions about Math::BigFloat by Ronald J Kimball
- Re: Questions about Math::BigFloat by M.J.T. Guy
- Re: Questions about Math::BigFloat by John Peacock
- Re: Questions about Math::BigFloat by Ronald J Kimball
- Re: Questions about Math::BigFloat by Graham Barr
- Re: Questions about Math::BigFloat by John Peacock
- an excellent perl i18n/l10n faq by Jarkko Hietaniemi
- Re: an excellent perl i18n/l10n faq by simon
- Re: an excellent perl i18n/l10n faq by Gurusamy Sarathy
**Questions about Math::BigFloat**by John Peacock- Re: Questions about Math::BigFloat by Ronald J Kimball
- Re: Questions about Math::BigFloat by Ronald J Kimball
- Re: Questions about Math::BigFloat by John Peacock
- Re: Questions about Math::BigFloat by Ronald J Kimball
- Re: [PATCH]Re: Questions about Math::BigFloat by Tom Christiansen
- Re: [PATCH]Re: Questions about Math::BigFloat by John Peacock
- Re: [PATCH]Re: Questions about Math::BigFloat by Jarkko Hietaniemi

nntp.perl.org: Perl Programming lists via nntp and http.

Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About