math objects 0.1.3
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 3369
Math Objects 0.1.3
Math Objects is a math template library for C++ using generic programming techniques. more>>
Math Objects is a math template library written in C++ using generic programming techniques. In order to use the "Math Objects" library, the user only has to include the header files he needs (e.g. Matrix.h, Polynomial.h etc.).
In order to compile the library the user needs an ISO/IEC 14882:1998 standard compliant C++ compiler (e.g. one that supports partial template specializations).
The math library has math objects like matrices, polynomials, rational functions, extended precision numbers, complex numbers etc. that can be handled in a similar way like basic numerical types (e.g. integers or floating point numbers).
One can access properties of a mathematical type through a (partial) specialization of a traits class for that type (AlgebraicTraits). Having the traits classes to expose properties of mathematical objects, one can define for example matrices of polynomials having extended precision complex coefficients and apply to them basic linear algebra algorithms using normal C++ syntax.
This library also implements two functions using two deterministic algorithms that compute the Smith form for polynomial matrices, and the Smith-McMillan form of a transfer functions matrix also keeping track of the transformation matrices.
These algorithms can be used to describe a MIMO (multi input-multi output) system by means of its zeros and poles and also give the MFD (matrix fraction description) of the system.
Enhancements:
- Recoded the LongInt class aiming for better runtime efficiency.
<<lessIn order to compile the library the user needs an ISO/IEC 14882:1998 standard compliant C++ compiler (e.g. one that supports partial template specializations).
The math library has math objects like matrices, polynomials, rational functions, extended precision numbers, complex numbers etc. that can be handled in a similar way like basic numerical types (e.g. integers or floating point numbers).
One can access properties of a mathematical type through a (partial) specialization of a traits class for that type (AlgebraicTraits). Having the traits classes to expose properties of mathematical objects, one can define for example matrices of polynomials having extended precision complex coefficients and apply to them basic linear algebra algorithms using normal C++ syntax.
This library also implements two functions using two deterministic algorithms that compute the Smith form for polynomial matrices, and the Smith-McMillan form of a transfer functions matrix also keeping track of the transformation matrices.
These algorithms can be used to describe a MIMO (multi input-multi output) system by means of its zeros and poles and also give the MFD (matrix fraction description) of the system.
Enhancements:
- Recoded the LongInt class aiming for better runtime efficiency.
Download (0.28MB)
Added: 2006-02-21 License: GPL (GNU General Public License) Price:
1343 downloads
HTML Objects 1.2.4
HTML Objects is a Perl module library for turning HTML tags into Perl objects. more>>
HTML Objects is a Perl module library for turning HTML tags into Perl objects. HTML Objects allows Web pages to be manipulated as a data structure rather than text.
Once manipulation is done, the entire page is generated via depth-first recursion.
<<lessOnce manipulation is done, the entire page is generated via depth-first recursion.
Download (0.025MB)
Added: 2006-05-09 License: GPL (GNU General Public License) Price:
1263 downloads
Math::ODE 0.03
Math::ODE Perl module allows you to solve N-th Order Ordinary Differential Equations with as little pain as possible. more>>
Math::ODE Perl module allows you to solve N-th Order Ordinary Differential Equations with as little pain as possible.
Currently, only IVPs (initial value problems) are supported, but native support for BVPs (boundary value problems) may be added in the future. To solve N-th order equations, you must first turn it into a system of N first order equations, as in MATLAB.
<<lessCurrently, only IVPs (initial value problems) are supported, but native support for BVPs (boundary value problems) may be added in the future. To solve N-th order equations, you must first turn it into a system of N first order equations, as in MATLAB.
Download (0.005MB)
Added: 2007-06-13 License: GPL (GNU General Public License) Price:
867 downloads
Active Objects 2007-03-04
Active Objects is an implementation of the Active Object concept based on the boost::thread, boost::bind, boost::function libs. more>>
Active Objects is an implementation of the Active Object concept based on the boost::thread, boost::bind, and boost::function libraries.
The point of the library is to make taking advantage of multiprocessor machines as easy as possible. The library provides two types of functionality. The first is the ability to execute a function in a separate thread and automatically synchronize with the thread when the return value is needed.
The second is the ability to easily create a message cue for any existing class, and have that class process its messages asynchronously.
Enhancements:
- Minor code cleanup and code documentation updates.
<<lessThe point of the library is to make taking advantage of multiprocessor machines as easy as possible. The library provides two types of functionality. The first is the ability to execute a function in a separate thread and automatically synchronize with the thread when the return value is needed.
The second is the ability to easily create a message cue for any existing class, and have that class process its messages asynchronously.
Enhancements:
- Minor code cleanup and code documentation updates.
Download (0.32MB)
Added: 2007-03-07 License: Other/Proprietary License with Source Price:
961 downloads
LiteCD 0.1.3
LiteCD is useful utility for managing personal CDs, DVDs, video cassettes, etc. more>>
LiteCD project is useful utility for managing personal CDs, DVDs, video cassettes, etc.
You can define your own categories, add your personal media, and then set which items have been lent and which are at home.
<<lessYou can define your own categories, add your personal media, and then set which items have been lent and which are at home.
Download (0.024MB)
Added: 2006-11-06 License: GPL (GNU General Public License) Price:
1083 downloads
Math::CDF 0.1
Math::CDF is a Perl module to generate probabilities and quantiles from several statistical probability functions. more>>
Math::CDF is a Perl module to generate probabilities and quantiles from several statistical probability functions.
SYNOPSIS
use Math::CDF;
$prob = &Math::CDF::pnorm(1.96);
if( not defined($z = &Math::CDF::qnorm(0.975)) ) { die "qnorm() failed"; }
or
use Math::CDF qw(:all);
$prob = pnorm(1.96);
This module provides a perl interface to the DCDFLIB. See the section on DCDFLIB for more information.
Functions are available for 7 continuous distributions (Beta, Chi-square, F, Gamma, Normal, Poisson and T-distribution) and for two discrete distributions (Binomial and Negative Binomial). Optional non-centrality parameters are available for the Chi-square, F and T-distributions. Cumulative probabilities are available for all 9 distributions and quantile functions are available for the 7 continuous distributions.
All cumulative probability function names begin with the character "p". They give the probability of being less than or equal to the given value [ P(X<<less
SYNOPSIS
use Math::CDF;
$prob = &Math::CDF::pnorm(1.96);
if( not defined($z = &Math::CDF::qnorm(0.975)) ) { die "qnorm() failed"; }
or
use Math::CDF qw(:all);
$prob = pnorm(1.96);
This module provides a perl interface to the DCDFLIB. See the section on DCDFLIB for more information.
Functions are available for 7 continuous distributions (Beta, Chi-square, F, Gamma, Normal, Poisson and T-distribution) and for two discrete distributions (Binomial and Negative Binomial). Optional non-centrality parameters are available for the Chi-square, F and T-distributions. Cumulative probabilities are available for all 9 distributions and quantile functions are available for the 7 continuous distributions.
All cumulative probability function names begin with the character "p". They give the probability of being less than or equal to the given value [ P(X<<less
Download (0.064MB)
Added: 2007-08-03 License: Perl Artistic License Price:
815 downloads
Math::Vec 1.01
Math::Vec is a Object-Oriented Vector Math Methods in Perl. more>>
Math::Vec is a Object-Oriented Vector Math Methods in Perl.
SYNOPSIS
use Math::Vec;
$v = Math::Vec->new(0,1,2);
or
use Math::Vec qw(NewVec);
$v = NewVec(0,1,2);
@res = $v->Cross([1,2.5,0]);
$p = NewVec(@res);
$q = $p->Dot([0,1,0]);
or
use Math::Vec qw(:terse);
$v = V(0,1,2);
$q = ($v x [1,2.5,0]) * [0,1,0];
NOTICE
This module is still somewhat incomplete. If a function does nothing, there is likely a really good reason. Please have a look at the code if you are trying to use this in a production environment.
<<lessSYNOPSIS
use Math::Vec;
$v = Math::Vec->new(0,1,2);
or
use Math::Vec qw(NewVec);
$v = NewVec(0,1,2);
@res = $v->Cross([1,2.5,0]);
$p = NewVec(@res);
$q = $p->Dot([0,1,0]);
or
use Math::Vec qw(:terse);
$v = V(0,1,2);
$q = ($v x [1,2.5,0]) * [0,1,0];
NOTICE
This module is still somewhat incomplete. If a function does nothing, there is likely a really good reason. Please have a look at the code if you are trying to use this in a production environment.
Download (0.010MB)
Added: 2007-07-03 License: Perl Artistic License Price:
847 downloads
Momomoto 0.1.3
Momomoto is a database abstraction layer / object relational mapper for PostgreSQL. more>>
Momomoto software is a database abstraction layer / object relational mapper for PostgreSQL.
Main features:
- SQL abstraction
- reads as many meta-information from the database as possible ( columns, primary keys )
- reads information about primary keys, columns and stored procedures from the database and generates setter and getter methods in the class
- support for combined primary keys
- support for stored procedures
- support for schemas
Version restrictions:
- The introspection for stored procedures currently only works with PostgreSQL 8.1.
Enhancements:
- Users can now select from tables without fetching all columns.
- There have been minor documentation fixes.
<<lessMain features:
- SQL abstraction
- reads as many meta-information from the database as possible ( columns, primary keys )
- reads information about primary keys, columns and stored procedures from the database and generates setter and getter methods in the class
- support for combined primary keys
- support for stored procedures
- support for schemas
Version restrictions:
- The introspection for stored procedures currently only works with PostgreSQL 8.1.
Enhancements:
- Users can now select from tables without fetching all columns.
- There have been minor documentation fixes.
Download (MB)
Added: 2007-08-18 License: GPL (GNU General Public License) Price:
798 downloads
Math::GSL 0.001
Math::GSL is a Perl module for the GNU Scientific Library. more>>
The GNU Scientific Library (GSL) is a C library that has hundreds of functions that are useful to scientists and mathematicians, such as special functions, linear algebra, statistics, etc... Wouldnt it be nice if you could access them all with Perl? Now you can with Math::GSL!
Warning: You are on the bleeding edge, this is alpha code, so if you want to test it out on your platform and report bugs or send patches, then please do! Yes, there is just about no documentation right now. Anyone care to write some?
<<lessWarning: You are on the bleeding edge, this is alpha code, so if you want to test it out on your platform and report bugs or send patches, then please do! Yes, there is just about no documentation right now. Anyone care to write some?
Download (0.008MB)
Added: 2007-06-13 License: GPL (GNU General Public License) Price:
863 downloads
PloneAtom 0.1.3
PloneAtom provides Atom support for Plone. more>>
PloneAtom provides Atom support for Plone.
This is a Plone product (that could probably be trivially modified for the CMF itself) which provides Atom support for Plone. Currently it provides the Atom syndication format for folderish objects, in the same way as RSS syndication is implemented.
Enabling Atom syndication
Atom syndication is enabled in exactly the same way as RSS syndication. To enable syndication on the site in general:
.Login as an admin user.
.Go to Plone Setup and choose Zope Management Interface
.Select the Properties tab in the portal_syndication tool.
.Click enable syndication. Then, to enable syndication support for a particular folderish object:
.Login as a user who has Owner/Manager permission for the folder.
.Surf to that folder and select the syndication tab.
.Click Enable syndication. Dont worry about the syndication options it gives you -- they are not used by atom (and ignored in most RSS clients, from what Ive seen).
<<lessThis is a Plone product (that could probably be trivially modified for the CMF itself) which provides Atom support for Plone. Currently it provides the Atom syndication format for folderish objects, in the same way as RSS syndication is implemented.
Enabling Atom syndication
Atom syndication is enabled in exactly the same way as RSS syndication. To enable syndication on the site in general:
.Login as an admin user.
.Go to Plone Setup and choose Zope Management Interface
.Select the Properties tab in the portal_syndication tool.
.Click enable syndication. Then, to enable syndication support for a particular folderish object:
.Login as a user who has Owner/Manager permission for the folder.
.Surf to that folder and select the syndication tab.
.Click Enable syndication. Dont worry about the syndication options it gives you -- they are not used by atom (and ignored in most RSS clients, from what Ive seen).
Download (0.004MB)
Added: 2007-02-16 License: MIT/X Consortium License Price:
982 downloads
WFMath 0.3.4
WFMath is a math library that focus on geometric objects. more>>
WFMath is a math library that focus on geometric objects.
Thus, it includes several shapes (boxes, balls, lines), in addition to the basic math objects that are used to build these shapes (points, vectors, and matrices).
Most of the library classes can be divided into two sorts. The first kind are basic mathematical objects, whose members are all fundamental types.
The second kind are shapes, which implement the shape class interface described in doc/shape.h.
There are four classes of the first kind:
Vector
A basic mathematical vector
RotMatrix
An orthogonal matrix of determinant 1, useful for describing rotations.
Point
A point in space. This basic class also implements the shape interface in doc/shape.h.
Quaternion
A quaternion
The shape classes are:
AxisBox
A box oriented parallel to the coordinate axes
Ball
Ball< 2 > is a circle, Ball< 3 > is a sphere, etc.
Segment
A line segment, defined by its endpoints
RotBox
Like AxisBox, but it can be rotated to arbitrary angles
Polygon
A 2 dimensional polygon contained in a (possibly) larger dimensional space
The library also contains some probability-related functions, as well as wrappers for system time and random number functions.
<<lessThus, it includes several shapes (boxes, balls, lines), in addition to the basic math objects that are used to build these shapes (points, vectors, and matrices).
Most of the library classes can be divided into two sorts. The first kind are basic mathematical objects, whose members are all fundamental types.
The second kind are shapes, which implement the shape class interface described in doc/shape.h.
There are four classes of the first kind:
Vector
A basic mathematical vector
RotMatrix
An orthogonal matrix of determinant 1, useful for describing rotations.
Point
A point in space. This basic class also implements the shape interface in doc/shape.h.
Quaternion
A quaternion
The shape classes are:
AxisBox
A box oriented parallel to the coordinate axes
Ball
Ball< 2 > is a circle, Ball< 3 > is a sphere, etc.
Segment
A line segment, defined by its endpoints
RotBox
Like AxisBox, but it can be rotated to arbitrary angles
Polygon
A 2 dimensional polygon contained in a (possibly) larger dimensional space
The library also contains some probability-related functions, as well as wrappers for system time and random number functions.
Download (0.40MB)
Added: 2005-09-27 License: GPL (GNU General Public License) Price:
1490 downloads
Cheese 0.1.3
Cheese is a cheesy program to take pictures and videos from your web cam. more>>
Cheese is a cheesy program to take pictures and videos from your web cam. The project also provides some graphical effects in order to please the users play instinct. Furthermore some integration work will be done to include it in some other programs and services.
<<less Download (0.71MB)
Added: 2007-07-10 License: GPL (GNU General Public License) Price:
844 downloads
Math::Logic 1.19
Math::Logic is a Perl module that provides pure 2, 3 or multi-value logic. more>>
Math::Logic is a Perl module that provides pure 2, 3 or multi-value logic.
SYNOPSIS
use Math::Logic qw( $TRUE $FALSE $UNDEF $STR_TRUE $STR_FALSE $STR_UNDEF ) ;
# 1 0 -1 TRUE FALSE UNDEF
use Math::Logic :NUM ; # $TRUE $FALSE $UNDEF -- what you normally want
use Math::Logic :ALL ; # All the constants
use Math::Logic :STR ; # $STR_TRUE $STR_FALSE $STR_UNDEF
# 2-degree logic
my $true = Math::Logic->new( -value => $TRUE, -degree => 2 ) ;
my $false = Math::Logic->new( -value => $FALSE, -degree => 2 ) ;
my $x = Math::Logic->new_from_string( TRUE,2 ) ;
print "true" if $true ;
# 3-degree logic (non-propagating)
my $true = Math::Logic->new( -value => $TRUE, -degree => 3 ) ;
my $false = Math::Logic->new( -value => $FALSE, -degree => 3 ) ;
my $undef = Math::Logic->new( -value => $UNDEF, -degree => 3 ) ;
my $x = Math::Logic->new_from_string( FALSE,3 ) ;
print "true" if ( $true | $undef ) == $TRUE ;
# 3-degree logic (propagating)
my $true = Math::Logic->new( -value => $TRUE, -degree => 3, -propagate => 1 ) ;
my $false = Math::Logic->new( -value => $FALSE, -degree => 3, -propagate => 1 ) ;
my $undef = Math::Logic->new( -value => $UNDEF, -degree => 3, -propagate => 1 ) ;
my $x = Math::Logic->new_from_string( ( UNDEF, 3, -propagate ) ) ;
print "undef" if ( $true | $undef ) == $UNDEF ;
# multi-degree logic
my $True = 100 ; # Define our own true
my $False = $FALSE ;
my $true = Math::Logic->new( -value => $True, -degree => $True ) ;
my $very = Math::Logic->new( -value => 67, -degree => $True ) ;
my $fairly = Math::Logic->new( -value => 33, -degree => $True ) ;
my $false = Math::Logic->new( -value => $False, -degree => $True ) ;
my $x = Math::Logic->new_from_string( "25,$True" ) ;
print "maybe" if ( $very | $fairly ) > 50 ;
# We can have arbitrarily complex expressions; the result is a Math::Logic
# object; all arguments must be Math::Logic objects or things which can be
# promoted into such and must all be compatible. The outcome depends on
# which kind of logic is being used.
my $xor = ( $x | $y ) & ( ! ( $x & $y ) ) ;
# This is identical to:
my $xor = $x ^ $y ;
Perls built-in logical operators, and, or, xor and not support 2-value logic. This means that they always produce a result which is either true or false. In fact perl sometimes returns 0 and sometimes returns undef for false depending on the operator and the order of the arguments. For "true" Perl generally returns the first value that evaluated to true which turns out to be extremely useful in practice. Given the choice Perls built-in logical operators are to be preferred -- but when you really want pure 2-degree logic or 3-degree logic or multi-degree logic they are available through this module.
The only 2-degree logic values are 1 (TRUE) and 0 (FALSE).
The only 3-degree logic values are 1 (TRUE), 0 (FALSE) and -1 (UNDEF). Note that UNDEF is -1 not undef!
The only multi-degree logic values are 0 (FALSE)..-degree -- the value of TRUE is equal to the degree, usually 100.
The -degree is the maximum value (except for 2 and 3-degree logic); i.e. logic of n-degree is n+1-value logic, e.g. 100-degree logic has 101 values, 0..100.
Although some useful constants may be exported, this is an object module and the results of logical comparisons are Math::Logic objects.
<<lessSYNOPSIS
use Math::Logic qw( $TRUE $FALSE $UNDEF $STR_TRUE $STR_FALSE $STR_UNDEF ) ;
# 1 0 -1 TRUE FALSE UNDEF
use Math::Logic :NUM ; # $TRUE $FALSE $UNDEF -- what you normally want
use Math::Logic :ALL ; # All the constants
use Math::Logic :STR ; # $STR_TRUE $STR_FALSE $STR_UNDEF
# 2-degree logic
my $true = Math::Logic->new( -value => $TRUE, -degree => 2 ) ;
my $false = Math::Logic->new( -value => $FALSE, -degree => 2 ) ;
my $x = Math::Logic->new_from_string( TRUE,2 ) ;
print "true" if $true ;
# 3-degree logic (non-propagating)
my $true = Math::Logic->new( -value => $TRUE, -degree => 3 ) ;
my $false = Math::Logic->new( -value => $FALSE, -degree => 3 ) ;
my $undef = Math::Logic->new( -value => $UNDEF, -degree => 3 ) ;
my $x = Math::Logic->new_from_string( FALSE,3 ) ;
print "true" if ( $true | $undef ) == $TRUE ;
# 3-degree logic (propagating)
my $true = Math::Logic->new( -value => $TRUE, -degree => 3, -propagate => 1 ) ;
my $false = Math::Logic->new( -value => $FALSE, -degree => 3, -propagate => 1 ) ;
my $undef = Math::Logic->new( -value => $UNDEF, -degree => 3, -propagate => 1 ) ;
my $x = Math::Logic->new_from_string( ( UNDEF, 3, -propagate ) ) ;
print "undef" if ( $true | $undef ) == $UNDEF ;
# multi-degree logic
my $True = 100 ; # Define our own true
my $False = $FALSE ;
my $true = Math::Logic->new( -value => $True, -degree => $True ) ;
my $very = Math::Logic->new( -value => 67, -degree => $True ) ;
my $fairly = Math::Logic->new( -value => 33, -degree => $True ) ;
my $false = Math::Logic->new( -value => $False, -degree => $True ) ;
my $x = Math::Logic->new_from_string( "25,$True" ) ;
print "maybe" if ( $very | $fairly ) > 50 ;
# We can have arbitrarily complex expressions; the result is a Math::Logic
# object; all arguments must be Math::Logic objects or things which can be
# promoted into such and must all be compatible. The outcome depends on
# which kind of logic is being used.
my $xor = ( $x | $y ) & ( ! ( $x & $y ) ) ;
# This is identical to:
my $xor = $x ^ $y ;
Perls built-in logical operators, and, or, xor and not support 2-value logic. This means that they always produce a result which is either true or false. In fact perl sometimes returns 0 and sometimes returns undef for false depending on the operator and the order of the arguments. For "true" Perl generally returns the first value that evaluated to true which turns out to be extremely useful in practice. Given the choice Perls built-in logical operators are to be preferred -- but when you really want pure 2-degree logic or 3-degree logic or multi-degree logic they are available through this module.
The only 2-degree logic values are 1 (TRUE) and 0 (FALSE).
The only 3-degree logic values are 1 (TRUE), 0 (FALSE) and -1 (UNDEF). Note that UNDEF is -1 not undef!
The only multi-degree logic values are 0 (FALSE)..-degree -- the value of TRUE is equal to the degree, usually 100.
The -degree is the maximum value (except for 2 and 3-degree logic); i.e. logic of n-degree is n+1-value logic, e.g. 100-degree logic has 101 values, 0..100.
Although some useful constants may be exported, this is an object module and the results of logical comparisons are Math::Logic objects.
Download (0.012MB)
Added: 2007-07-02 License: Perl Artistic License Price:
847 downloads
Math::Fraction 0.53b
Math::Fraction is a Perl module to manipulate exact fractions. more>>
Math::Fraction is a Perl module to manipulate exact fractions.
SYNOPSIS
use Math::Fraction;
$a = frac(1,2); $b = frac(6,7);
print "$a + $b = ", $a + $b, "$a * $b = ", $a * $b;
print $a->num;
Main features:
- Being able to add, subtract, multiply, and divide, among other things just like you would normal numbers thats to the overload module.
- Being able to convert a decimal, including repeating ones, into a fraction. For example, 1.142857142857 would become 8/7.
- Being able to control how the fraction is displayed. For example 8/7 verses 1 1/7
- Being able to use arbitrary size numbers in the numerator and the denominator.
- Being able to covert between SMALL (using normal floats/integers) and BIG (using arbitrary size floats/integers) as needed so you do not have to worry about it. (New as of ver .4a)
- Being able to have multiple default sets so that a function can modify the defaults with out effecting other functions (New as of ver .4a)
<<lessSYNOPSIS
use Math::Fraction;
$a = frac(1,2); $b = frac(6,7);
print "$a + $b = ", $a + $b, "$a * $b = ", $a * $b;
print $a->num;
Main features:
- Being able to add, subtract, multiply, and divide, among other things just like you would normal numbers thats to the overload module.
- Being able to convert a decimal, including repeating ones, into a fraction. For example, 1.142857142857 would become 8/7.
- Being able to control how the fraction is displayed. For example 8/7 verses 1 1/7
- Being able to use arbitrary size numbers in the numerator and the denominator.
- Being able to covert between SMALL (using normal floats/integers) and BIG (using arbitrary size floats/integers) as needed so you do not have to worry about it. (New as of ver .4a)
- Being able to have multiple default sets so that a function can modify the defaults with out effecting other functions (New as of ver .4a)
Download (0.016MB)
Added: 2007-07-20 License: Perl Artistic License Price:
828 downloads
Math::BaseCalc 1.011
Math::BaseCalc is a Perl module that can convert numbers between various bases. more>>
Math::BaseCalc is a Perl module that can convert numbers between various bases.
SYNOPSIS
use Math::BaseCalc;
my $calc = new Math::BaseCalc(digits => [0,1]); #Binary
my $bin_string = $calc->to_base(465); # Convert 465 to binary
$calc->digits(oct); # Octal
my $number = $calc->from_base(1574); # Convert octal 1574 to decimal
This module facilitates the conversion of numbers between various number bases. You may define your own digit sets, or use any of several predefined digit sets.
The to_base() and from_base() methods convert between Perl numbers and strings which represent these numbers in other bases. For instance, if youre using the binary digit set [0,1], $calc->to_base(5) will return the string "101". $calc->from_base("101") will return the number 5.
To convert between, say, base 7 and base 36, use the 2-step process of first converting to a Perl number, then to the desired base for the result:
$calc7 = new Math::BaseCalc(digits=>[0..6]);
$calc36 = new Math::BaseCalc(digits=>[0..9,a..z];
$in_base_36 = $calc36->to_base( $calc7->from_base(3506) );
If you just need to handle regular octal & hexdecimal strings, you probably dont need this module. See the sprintf(), oct(), and hex() Perl functions.
<<lessSYNOPSIS
use Math::BaseCalc;
my $calc = new Math::BaseCalc(digits => [0,1]); #Binary
my $bin_string = $calc->to_base(465); # Convert 465 to binary
$calc->digits(oct); # Octal
my $number = $calc->from_base(1574); # Convert octal 1574 to decimal
This module facilitates the conversion of numbers between various number bases. You may define your own digit sets, or use any of several predefined digit sets.
The to_base() and from_base() methods convert between Perl numbers and strings which represent these numbers in other bases. For instance, if youre using the binary digit set [0,1], $calc->to_base(5) will return the string "101". $calc->from_base("101") will return the number 5.
To convert between, say, base 7 and base 36, use the 2-step process of first converting to a Perl number, then to the desired base for the result:
$calc7 = new Math::BaseCalc(digits=>[0..6]);
$calc36 = new Math::BaseCalc(digits=>[0..9,a..z];
$in_base_36 = $calc36->to_base( $calc7->from_base(3506) );
If you just need to handle regular octal & hexdecimal strings, you probably dont need this module. See the sprintf(), oct(), and hex() Perl functions.
Download (0.004MB)
Added: 2006-08-08 License: Perl Artistic License Price:
1175 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above math objects 0.1.3 search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed