offtopic? Math::BigFloat

CA cabney at cyberpass.net
Fri Dec 13 12:51:29 CST 2002


~sdpm~
I'm probably using the module incorrectly, but it seems no matter what I
do with ->accuracy() and ->precision() I get this whack response from
the module:

====<tbf.pl>====
#! /usr/bin/perl -w
# 20021023CAbney
# $Id$

use strict;
use Carp;
use Math::BigFloat;

my ( $N, $B );

$N = Math::BigFloat->new( 1.0E-155 );
$B = Math::BigFloat->new( "0.004" );

print "ln(N) = ", $N->blog(), "\n";
print "ln(B) = ", $B->blog(), "\n";
====<tbf.pl>====

The above prints out:

====
ln(N) = -2
ln(B) = -1.984063745019920318725099601593625498008
====

Which is just wrong.  I'm dredging through the module code for clues,
but so far have had no luck.  It professes to use Taylor Series but lots
o code has been commented out and stuff, and someone was struggling with
oo concepts when it was written :)

Can anyone show me what I'm doing wrong if it's not a bug?

Yours,

CA

~sdpm~

The posting address is: san-diego-pm-list at hfb.pm.org

List requests should be sent to: majordomo at hfb.pm.org

If you ever want to remove yourself from this mailing list,
you can send mail to <majordomo at happyfunball.pm.org> with the following
command in the body of your email message:

    unsubscribe san-diego-pm-list

If you ever need to get in contact with the owner of the list,
(if you have trouble unsubscribing, or have questions about the
list itself) send email to <owner-san-diego-pm-list at happyfunball.pm.org> .
This is the general rule for most mailing lists when you need
to contact a human.




More information about the San-Diego-pm mailing list