Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.320.114 Times

Math::BigInt::Calc 1.87

  Date Added: April 22, 2010  |  Visits: 1.004

Math::BigInt::Calc

Report Broken Link
Printer Friendly Version


Product Homepage
Download (96 downloads)



Math::BigInt::Calc is a pure Perl module to support Math::BigInt. SYNOPSIS Provides support for big integer calculations. Not intended to be used by other modules. Other modules which sport the same functions can also be used to support Math::BigInt, like Math::BigInt::GMP or Math::BigInt::Pari. In order to allow for multiple big integer libraries, Math::BigInt was rewritten to use library modules for core math routines. Any module which follows the same API as this can be used instead by using the following: use Math::BigInt lib => libname; libname is either the long name (Math::BigInt::Pari), or only the short version like Pari. METHODS The following functions MUST be defined in order to support the use by Math::BigInt v1.70 or later: api_version() return API version, 1 for v1.70, 2 for v1.83 _new(string) return ref to new object from ref to decimal string _zero() return a new object with value 0 _one() return a new object with value 1 _two() return a new object with value 2 _ten() return a new object with value 10 _str(obj) return ref to a string representing the object _num(obj) returns a Perl integer/floating point number NOTE: because of Perl numeric notation defaults, the _numified obj may lose accuracy due to machine-dependent floating point size limitations _add(obj,obj) Simple addition of two objects _mul(obj,obj) Multiplication of two objects _div(obj,obj) Division of the 1st object by the 2nd In list context, returns (result,remainder). NOTE: this is integer math, so no fractional part will be returned. The second operand will be not be 0, so no need to check for that. _sub(obj,obj) Simple subtraction of 1 object from another a third, optional parameter indicates that the params are swapped. In this case, the first param needs to be preserved, while you can destroy the second. sub (x,y,1) => return x - y and keep x intact! _dec(obj) decrement object by one (input is guaranteed to be > 0) _inc(obj) increment object by one _acmp(obj,obj) <=> operator for objects (return -1, 0 or 1) _len(obj) returns count of the decimal digits of the object _digit(obj,n) returns the nth decimal digit of object _is_one(obj) return true if argument is 1 _is_two(obj) return true if argument is 2 _is_ten(obj) return true if argument is 10 _is_zero(obj) return true if argument is 0 _is_even(obj) return true if argument is even (0,2,4,6..) _is_odd(obj) return true if argument is odd (1,3,5,7..) _copy return a ref to a true copy of the object _check(obj) check whether internal representation is still intact return 0 for ok, otherwise error message as string _from_hex(str) return new object from a hexadecimal string _from_bin(str) return new object from a binary string _from_oct(str) return new object from an octal string _as_hex(str) return string containing the value as unsigned hex string, with the 0x prepended. Leading zeros must be stripped. _as_bin(str) Like as_hex, only as binary string containing only zeros and ones. Leading zeros must be stripped and a 0b must be prepended. _rsft(obj,N,B) shift object in base B by N digits right _lsft(obj,N,B) shift object in base B by N digits left _xor(obj1,obj2) XOR (bit-wise) object 1 with object 2 Note: XOR, AND and OR pad with zeros if size mismatches _and(obj1,obj2) AND (bit-wise) object 1 with object 2 _or(obj1,obj2) OR (bit-wise) object 1 with object 2 _mod(obj1,obj2) Return remainder of div of the 1st by the 2nd object _sqrt(obj) return the square root of object (truncated to int) _root(obj) return the nth (n >= 3) root of obj (truncated to int) _fac(obj) return factorial of object 1 (1*2*3*4..) _pow(obj1,obj2) return object 1 to the power of object 2 return undef for NaN _zeros(obj) return number of trailing decimal zeros _modinv return inverse modulus _modpow return modulus of power ($x ** $y) % $z _log_int(X,N) calculate integer log() of X in base N X >= 0, N >= 0 (return undef for NaN) returns (RESULT, EXACT) where EXACT is: 1 : result is exactly RESULT 0 : result was truncated to RESULT undef : unknown whether result is exactly RESULT _gcd(obj,obj) return Greatest Common Divisor of two objects The following functions are REQUIRED for an api_version of 2 or greater: _1ex($x) create the number 1Ex where x >= 0 _alen(obj) returns approximate count of the decimal digits of the object. This estimate MUST always be greater or equal to what _len() returns. _nok(n,k) calculate n over k (binomial coefficient) The following functions are optional, and can be defined if the underlying lib has a fast way to do them. If undefined, Math::BigInt will use pure Perl (hence slow) fallback routines to emulate these: _signed_or _signed_and _signed_xor Input strings come in as unsigned but with prefix (i.e. as 123, 0xabc or 0b1101). So the library needs only to deal with unsigned big integers. Testing of input parameter validity is done by the caller, so you need not worry about underflow (f.i. in _sub(), _dec()) nor about division by zero or similar cases. The first parameter can be modified, that includes the possibility that you return a reference to a completely different object instead. Although keeping the reference and just changing its contents is preferred over creating and returning a different reference. Return values are always references to objects, strings, or true/false for comparison routines..

Requirements: No special requirements
Platforms: Linux
Keyword: Bigint Libraries Mathbigintcalc Must Be Obj Object Perl Module Programming Result Return String
Users rating: 0/10

License: Freeware Size: 194.56 KB
USER REVIEWS
More Reviews or Write Review


MATH::BIGINT::CALC RELATED
Libraries  -  Alien Perl module 0.91
Alien Perl module package contains external libraries wrapped up for your viewing pleasure! SYNOPSIS perldoc Alien; Alien is a package that exists just to hold together an idea, the idea of Alien:: packages, so there is no code here, just...
10.24 KB  
Libraries  -  OpenGeoDB Perl module 0.4
OpenGeDB Perl module is a module to access the OpenGeoDB database and calculate all ZIP codes in a certain radius..
3.07 KB  
Network & Internet  -  MyCMS perl module 1.0
MyCMS perl module provides the MN::CMS Perl module used by the MyCMS. MyCMS perl module contains Perl object classes to manage the data of MyCMS (such as articles, links, and images). MN::CMS is a perl module that allows you to manage an...
16.38 KB  
Libraries  -  String::MFN 1.27
String::MFN is a Perl module to Normalize a string in the manner of the mfn utility. SYNOPSIS use String::MFN; my $sane_string = mfn($retarded_string); ... Normalizes a string. Normalization, in brief, means modifying the string to...
8.19 KB  
Libraries  -  Perl::Critic::Config 1.061
Perl::Critic::Config is a Perl module to find and load Perl::Critic user-preferences. Perl::Critic::Config takes care of finding and processing user-preferences for Perl::Critic. The Config object defines which Policy modules will be loaded into...
245.76 KB  
Libraries  -  Data::ICal::Entry::Alarm::Email 0.12
Data::ICal::Entry::Alarm::Email is a Perl module that represents an emailed alarm in an iCalendar file. SYNOPSIS my $valarm = Data::ICal::Entry::Alarm::Audio->new(); $valarm->add_properties( attach => [...
102.4 KB  
Libraries  -  Geo::Lookup::ByTime 0.0.2
Geo::Lookup::ByTime is a Perl module to lookup location by time. SYNOPSIS use Geo::Lookup::ByTime; $lookup = Geo::Lookup::ByTime->new( @points ); my $pt = $lookup->nearest( $tm ); Given a set of timestamped locations guess the location at...
15.36 KB  
Libraries  -  File::Format::RIFF 1.0.1
File::Format::RIFF is a Perl module to Resource Interchange File Format/RIFF files. SYNOPSIS use File::Format::RIFF; open( IN, file ) or die "Could not open file: $!"; my ( $riff1 ) = File::Format::RIFF->read( *IN ); close( IN );...
9.22 KB  
Libraries  -  ClearCase::Wrapper::DSB 1.12
ClearCase::Wrapper::DSB Perl module contains David Boyces contributed cleartool wrapper functions. SYNOPSIS This is an overlay module for ClearCase::Wrapper containing David Boyces non-standard extensions. See perldoc ClearCase::Wrapper for...
18.43 KB  
Libraries  -  XML::XMetaL 0.52
XML::XMetaL is a Perl module with dispatch class for XML::XMetaL development framework. The XML::XMetaL class is a dispatcher for XMetaL customization handlers. XML:XMetaL objects are singletons. There can be only one XML::XMetaL object...
24.58 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB