*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> perl5/Math::BigFloat (3)              
Title
Content
Arch
Section
 

Contents


Math::BigFloat(3)					     Math::BigFloat(3)


NAME    [Toc]    [Back]

     Math::BigFloat - Arbitrary	length float math package

SYNOPSIS    [Toc]    [Back]

       use Math::BogFloat;
       $f = Math::BigFloat->new($string);

       $f->fadd(NSTR) return NSTR	     addition
       $f->fsub(NSTR) return NSTR	     subtraction
       $f->fmul(NSTR) return NSTR	     multiplication
       $f->fdiv(NSTR[,SCALE]) returns NSTR   division to SCALE places
       $f->fneg() return NSTR		     negation
       $f->fabs() return NSTR		     absolute value
       $f->fcmp(NSTR) return CODE	     compare undef,<0,=0,>0
       $f->fround(SCALE) return	NSTR	     round to SCALE digits
       $f->ffround(SCALE) return NSTR	     round at SCALEth place
       $f->fnorm() return (NSTR)	     normalize
       $f->fsqrt([SCALE]) return NSTR	     sqrt to SCALE places

DESCRIPTION    [Toc]    [Back]

     All basic math operations are overloaded if you declare your big floats
     as

	 $float	= new Math::BigFloat "2.123123123123123123123123123123123";


     number format
       canonical strings have the form /[+-]\d+E[+-]\d+/ .  Input values can
       have inbedded whitespace.

     Error returns 'NaN'
       An input	parameter was "Not a Number" or	divide by zero or sqrt of
       negative	number.

     Division is computed to
       max($div_scale,length(dividend)+length(divisor))	digits by default.
       Also used for default sqrt scale.

BUGS    [Toc]    [Back]

     The current version of this module	is a preliminary version of the	real
     thing that	is currently (as of perl5.002) under development.

AUTHOR    [Toc]    [Back]

     Mark Biggar










									Page 1






Math::BigFloat(3)					     Math::BigFloat(3)


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
Math::BigInt IRIX Arbitrary size integer math package
intro_libm IRIX Introduction to math library routines
cplxops IRIX operators for the C++ complex math library
cartpol IRIX functions for the C++ Complex Math Library
crtmathfnc IRIX Define a new math function for expressions
math HP-UX math functions, constants, and types
cplxerr IRIX error-handling function for the C++ Complex Math Library
wcstold FreeBSD convert string to float, double or long double
wcstod FreeBSD convert string to float, double or long double
wcstof FreeBSD convert string to float, double or long double
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service