Main > Free Download Search >

Free multiply software for linux

multiply

Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 54
TRIPP 0.2 Alpha

TRIPP 0.2 Alpha


TRIPP is a utility to rewrite incoming and outgoing IP packets. more>>
TRIPP is a utility to rewrite incoming and outgoing IP packets. Since it can rewrite both headers and payload, it can be used to configure the tcp/ip stack behavior in order to perform various tasks mainly intended for network tests, simulations and development.

It is configured via a small rule-based language, which allows the user to intercept packets, set arbitrary header values, increment or decrement numeric header fields, set an arbitrary payload, rewrite parts of the payload, or fragment, multiply, or drop packets.

TRIPP project is totally user-level and doesnt require any kernel module.

<<less
Download (0.20MB)
Added: 2006-06-15 License: GPL (GNU General Public License) Price:
1226 downloads
Mandriva Multi Network Firewall

Mandriva Multi Network Firewall


Mandriva Multi Network Firewall 2 is the up-to-date Mandriva Linux security solution dedicated to the business world. more>>
Multi Network Firewall is the up-to-date Mandriva Linux security solution dedicated to the business world. Maximum innovation, performance and scalability is only a click away thanks to an easy-to-use web interface.
Combining firewall, Intrusion Detection System and VPN functionality, MNF 2 is the ultimate full-featured security solution meeting all your demands. Furthermore, to make your network even more secure, benefit from a year of free updates through Mandriva Online Pro!
Main features:
- a firewall, to protect your computer network from unauthorized access (filtering).
- Intrusion Detection System, to alert you to abnormal network activity.
- Virtual Private Network, to enable a secure private tunnel over public networks.
- Proxy server, to intercept all web traffic entering the network.
- DHCP server, to enable the automatic configuration of new machines connected to the LAN.
- Caching DNS, to provide a local DNS service for computers connected to the LAN.
New Featurs:
As well as the existing IPSec, MNF2 provides 2 other types of VPN:
PPTP: a desktop under Windows(R) can be automatically connected without installing any special software
OpenVPN: a lighter open source VPN; Compattible with Linux, Mac OS and Windows
Bonding: Channel combines several network interfaces into a single connection. Effectively, it means that data transfer speeds can be multiplied.
Bridging: this new function enables the administrator to build bridges between network interfaces.
Traffic shaping: You can regulate the flow of traffic on your network just by clicking on a wizard.
Network mapping: Makes it possible to connect networks which use the same private network addresses
Peer-to-Peer Filtering: MNF2 automatically blocks network traffic from "Fast Track" peer-to-peer clients.
Better software support
2.6 Linux Kernel
Better hardware support
Improved support for multiple network cards (up to 10)
Wi-Fi Support
Better ADSL support
Services included in the product
Mandriva Online Pro: benefit from updates for one year through Mandriva Online Pro
Support included/
<<less
Download (250.5MB)
Added: 2005-10-10 License: GPL (GNU General Public License) Price:
858 downloads
libDSP 5.0.2

libDSP 5.0.2


libDSP is C++ class library of common digital signal processing functions. more>>
libDSP project is C++ class library of common digital signal processing functions. There is also a wrapper for the C language.
Current (vector) functions:
- Float to integer conversion with rounding
- Addition (real, complex)
- Subtraction (real, complex)
- Multiply (real, complex)
- Division (real, complex)
- 1/x (real)
- Absolute value (real)
- Square root (real)
- Zero (real, complex)
- Set (real, complex)
- Clip (real)
- Copy (real, complex)
- Convolution (real)
- Correlation (real)
- Autocorrelation (real)
- Dot product (real)
- Min and Max (real)
- Mean (real)
- Median (real)
- Negate (real)
- Normalization (real)
- Product (real)
- Reverse
- Scale to -1..1 and 0..1 (real)
- Sort (real)
- Standard deviation (real)
- Sum (real)
- Square (real)
- Integer-Float and Float-Integer conversion: 8, 12, 16, 24, 32 bits (real)
- Cartesian-Polar and Polar-Cartesian conversion
- Cross correlation (real)
- Energy (real)
- Magnitude
- Power
- Phase
- Decimation
- Interpolation
- RMS (real)
- Variance (real)
- Peak level in dB (real)
- Window functions: Bartlett, Blackman, Blackman-Harris, Cosine tapered, Exponential, Flat-top, Generic cosine, Hamming, Hanning, Kaiser, Kaiser-Bessel, Tukey, Dolph-Chebyshev
- Mix (real)
- Spatialize (real)
- Interleave/Deinterleave (real)
- Rebuffer
- Deg-Rad and Rad-Deg conversion
- FIR filter
- IIR filter
- DFT, DCT, DST
- FFT filter
- Multirate decimation/interpolation with FFT, FIR and IIR filters
- Frequency band flipping
- Hankel
<<less
Download (0.21MB)
Added: 2006-11-08 License: GPL (GNU General Public License) Price:
1091 downloads
liboil 0.3.12

liboil 0.3.12


liboil is a library of simple functions that are optimized for various CPUs. more>>
Liboil is a library of simple functions that are optimized for various CPUs. These functions are generally loops implementing simple algorithms, such as converting an array of N integers to floating-point numbers or multiplying and summing an array of N numbers.
Such functions are candidates for significant optimization using various techniques, especially by using extended instructions provided by modern CPUs (Altivec, MMX, SSE, etc.).
Many multimedia applications and libraries already do similar things internally. The goal of this project is to consolidate some of the code used by various multimedia projects, and also make optimizations easier to use by a broader range of applications.
As of the liboil-0.3.0 release, Im actively encouraging other open-source projects to begin using liboil. Im happy to do much of work converting projects to use liboil, and especially, adding function classes and implementations to liboil that may be needed.
Liboil does not require GCC to build, but since it uses GCC-style inline assembly heavily, using GCC is strongly recommended. Versions of GCC prior to 3.2 are known to have problems compiling liboil correctly. GLib-2.0 is recommended to build a few of the examples, but is not required for anything that is installed.
Liboil may be modified and distributed in accordance with a very liberal license commonly referred to as "Two-Clause BSD". This license was chosen to make liboil useful to as many open-source projects as possible, and has the side effect of also allowing liboil to be used by proprietary applications.
Liboil has a number of function classes, which are primarily seen by a developer using the library as actual functions. One such function is:
void oil_tablelookup_u8 (uint8_t *dest, int dstr, uint8_t *src,
int sstr, uint8_t *table, int tablestride, int n);
This function performs a table lookup for each element in the src array, and puts the results in the dest array. In actuality, oil_tablelookup_u8 is a preprocessor macro that generates the correct code to call an indirect function.
Each function class has one or more function implementations, which are real functions that perform the exact same action as defined by the documentation for the function. Each class has one implementation that is the reference implementation. This reference implmentation is used to test the accuracy of other implementations.
Presumably, the non-reference implementations can perform the action faster than the reference implementation. Thus, the liboil initialization code (at runtime) checks each implementation in a class to determine the fastest implementation. Once this is done, the classs indirect function pointer points to the optimal implementation. After this, any calls to the function class (such as oil_tablelookup_u8() described above) will automatically be routed to the fastest implementation.
Implementations can be disabled either at compile time (e.g., assembly code for the wrong architecture) or at run time (e.g., implementation uses unsupported opcodes). This is done automatically. In addition, implementations may be disabled because they do not produce the same results as the reference implementation.
All of the function classes will be API and ABI stable through the lifetime of the 0.3 series. In addition, the 0.4 series will include a compatibility library that will provide the 0.3 ABI. This allows multiple liboil-using libraries to be linked into the same application without regard to using the same liboil ABI. New ABI versions (0.4, 0.5, etc.) are expected no less than 6 months apart. It is planned that all future versions of liboil will support at least two liboil ABI versions.
Enhancements:
- Support for the jpeg decoder was improved.
- C++ support was improved.
- Various speedups and smaller improvements were done.
<<less
Download (0.69MB)
Added: 2007-05-29 License: LGPL (GNU Lesser General Public License) Price:
882 downloads
Math::MatrixReal 2.02

Math::MatrixReal 2.02


Math::MatrixReal is a nifty perl module for doing just about anything you could want with an NxN matrix. more>>
Math::MatrixReal is a nifty perl module for doing just about anything you could want with an NxN matrix, or vector of real numbers.
Main features:
- operator overloading, $a * $b multiplies 2 matrices, $a / $b is shorthand for $a * $b ** -1
- create matrices from strings or array references
- inverse
- determinant
- transpose (overloaded to ~)
- normalization
- diagonalization ( symmetric only )
- eigenvalues, eigenvectors ( symmetric only )
- boolean checks for: symmetric,orthogonal,diagonal,tridiagonal,triangular,
- gramian,binary,idempotent,periodic
- norms: p-norms, frobenius norm, 1-norm, 2-norm
- cofactor matrix
- minor matrix
- rank (order)
- Analytic solution of Ax=b with LR decomposition
- 3d vector product
- 3 iterative algorithms to solve Ax=b
- Single Step Method
- Global Step Method
- Relaxation Method
- export matrix to Matlab, Scilab, Yacas or LaTeX
<<less
Download (0.053MB)
Added: 2007-06-13 License: GPL (GNU General Public License) Price:
863 downloads
Math::RPN 1.08

Math::RPN 1.08


RPN is a Perl extension for Reverse Polish Math Expression Evaluation. more>>
RPN is a Perl extension for Reverse Polish Math Expression Evaluation.

SYNOPSIS

use Math::RPN;
$value=rpn(expr...);
@array=rpn(expr...);

expr... is one or more scalars or lists of scalars which contain
RPN expressions. An RPN expression is a series of numbers and/or
operators separated by commas. (commas are only required within
scalars).

The rpn function will take a scalar or list of sclars which contain an RPN expression as a set of comma delimited values and operators, and return the result or stack, depending on context. If the function is called in an array context, it will return the entire remaining stack. If it is called in a scalar context, it will return the top item of the stack. In a scalar context, if more than one value remains on the stack, a warning will be sent to STDERR.

In the event of an error, an error message will be sent to STDERR, and rpn will return undef.

The expression can contain any combination of values and operators. Any token which is not an operator is assumed to be a value to be pushed onto the stack.

An explanation of Reverse Polish Notation is beyond the scope of this document, but it I will describe it briefly as a stack-based way of writing mathematical expressions. This has the advantage of eliminating the need for parenthesis and simplifying parsing for computers vs. normal algebraic notation at a slight cost in the ability of humans to easily comprehend the expressions.
This evaluator works by cycling through the expression from left to right. As each token is encountered, it is checked against the list of operators. If it matches, then a check is performed for stack underflow.

If the stack has not underflowed, the operation is performed by removing the required number of operands from the top of the stack. The result is then pushed on to the stack. Operations for which order is significant (-,/,%,etc.) are processed such that the top item on the stack is treated as the right operand, and the next item down is treated as the left operand. Thus, "5,3,-" would yield 2, not -2. If the token does not match any of the known operators, the token is blindly pushed onto the stack. As a result, one can produce unexpected results. For example, the expression "5,3,grandma,+,*" would produce 15 because 5*(3+0) is how it would end up evaluated. That is, 5 would be pushed onto the stack, then 3, then "grandma". Next, + is evaluated, so 3+"grandma" is evaluated. PERL evaluates "grandma" to be numerically 0, so 3 is pushed back onto the stack. Next, the * multiplies the top two items of the stack [5][3], producing 15, which is pushed back onto the stack.

<<less
Download (0.008MB)
Added: 2007-06-28 License: Perl Artistic License Price:
848 downloads
Ethloop

Ethloop


Ethloop is very simple and versatile packet generator and measurer which I use to test HTB qdisc. more>>
Ethloop is very simple and versatile packet generator and measurer which I use to test HTB qdisc. It is developement tool and you take it as such. It accepts controling program at stdin, executing it and producing flow rate table at stdout.

The generated rate is output on interface(s) selected in program and data are recieved on all interfaces in a system. You sometimes need to set promisc flag on recieving interfaces.
Generated packets are ethernet frames with protocol set to ETH_P_CUST so that you can safely inject them into existing LANs. MAC addresses are set to MACs of sending/recieving interface (may be the same).

The controling program is line based text file. Each line has fixed format and comment lines behins with #. The format of a line is:
5000 R 2 4500000

Number of spaces is optional and tabs can be used. Input is parsed by sscanf "%u %c %u %n". The first number is time in miliseconds from program start. The second character determines operation to do. Third number is flow id (see below) and remainder of line is operation dependent. However the remainder can be text or number and numbers are allowed in decimal or hex (if starting with 0x). Number can end with k to multiply it by 1024.

The line above means: at time 5sec set rate of flow 2 to 4.5 MBps. Lines are first read into struct progdata in memory (performance reasons) and should be in increasing time order. Ethloop performs no sorting by time so be carefull about it. Each line is executed at its time and can change ongoing traffic generators.
<<less
Download (0.004MB)
Added: 2006-08-02 License: GPL (GNU General Public License) Price:
1179 downloads
Gimp::PDL 1.211

Gimp::PDL 1.211


Gimp::PDL is a Perl module to overwrite Tile/Region functions to work with piddles. more>>
Gimp::PDL is a Perl module to overwrite Tile/Region functions to work with piddles. This module is obsolete, please remove any references to it.

SYNOPSIS
use Gimp;
use Gimp::PDL;
use PDL;

This module overwrites some methods of Gimp::Tile and Gimp::PixelRgn. The new functions return and accept piddles. The last argument (height) of gimp_pixel_rgn_set_rect is calculated from the piddle. There is no other way to access the raw pixeldata in Gimp.

Some exmaples:

$region = $drawable->get->pixel_rgn (0,0, 100,100, 1,0);
$pixel = $region->get_pixel (5,7); # fetches the pixel from (5|7)
print $pixel; # outputs something like
# [255, 127, 0], i.e. in
# RGB format ;)
$region->set_pixel ($pixel * 0.5, 5, 7);# darken the pixel
$rect = $region->get_rect (3,3,70,20); # get a horizontal stripe
$rect = $rect->hclip(255/5)*5; # clip and multiply by 5
$region->set_rect($rect); # and draw it!
undef $region; # and update it!

<<less
Download (0.26MB)
Added: 2006-10-26 License: Perl Artistic License Price:
1093 downloads
Math::Matrix 0.5

Math::Matrix 0.5


Math::Matrix can multiply and invert Matrices. more>>
Math::Matrix can multiply and invert Matrices.

The following methods are available:

new

Constructor arguments are a list of references to arrays of the same length. The arrays are copied. The method returns undef in case of error.

$a = new Math::Matrix ([rand,rand,rand],
[rand,rand,rand],
[rand,rand,rand]);

If you call new as method, a zero filled matrix with identical deminsions is returned.

clone

You can clone a matrix by calling:

$b = $a->clone;

size

You can determine the dimensions of a matrix by calling:

($m, $n) = $a->size;

concat

Concatenates two matrices of same row count. The result is a new matrix or undef in case of error.

$b = new Math::Matrix ([rand],[rand],[rand]);
$c = $a->concat($b);

transpose

Returns the transposed matrix. This is the matrix where colums and rows of the argument matrix are swaped.

multiply

Multiplies two matrices where the length of the rows in the first matrix is the same as the length of the columns in the second matrix. Returns the product or undef in case of error.

solve

Solves a equation system given by the matrix. The number of colums must be greater than the number of rows. If variables are dependent from each other, the second and all further of the dependent coefficients are 0. This means the method can handle such systems. The method returns a matrix containing the solutions in its columns or undef in case of error.

invert

Invert a Matrix using solve.

multiply_scalar

Multiplies a matrix and a scalar resulting in a matrix of the same dimensions with each element scaled with the scalar.

$a->multiply_scalar(2); scale matrix by factor 2

add

Add two matrices of the same dimensions.

substract

Shorthand for add($other->negative)

equal

Decide if two matrices are equal. The criterion is, that each pair of elements differs less than $Math::Matrix::eps.

slice

Extract columns:

a->slice(1,3,5);

determinant

Compute the determinant of a matrix.

dot_product

Compute the dot product of two vectors.

absolute

Compute the absolute value of a vector.

normalizing

Normalize a vector.

cross_product

Compute the cross-product of vectors.

print

Prints the matrix on STDOUT. If the method has additional parameters, these are printed before the matrix is printed.

pinvert

Compute the pseudo-inverse of the matrix: ((AA)^-1)A

EXAMPLE

use Math::Matrix;

srand(time);
$a = new Math::Matrix ([rand,rand,rand],
[rand,rand,rand],
[rand,rand,rand]);
$x = new Math::Matrix ([rand,rand,rand]);
$a->print("An");
$E = $a->concat($x->transpose);
$E->print("Equation systemn");
$s = $E->solve;
$s->print("Solutions sn");
$a->multiply($s)->print("A*sn");

<<less
Download (0.006MB)
Added: 2007-08-08 License: Perl Artistic License Price:
810 downloads
Math::Cephes 0.44

Math::Cephes 0.44


Math::Cephes is a Perl interface to the cephes math library. more>>
Math::Cephes is a Perl interface to the cephes math library.

SYNOPSIS

use Math::Cephes qw(:all);

This module provides an interface to over 150 functions of the
cephes math library of Stephen Moshier. No functions are exported
by default, but rather must be imported explicitly, as in

use Math::Cephes qw(sin cos);

There are a number of export tags defined which allow
importing groups of functions:
use Math::Cephes qw(:constants);
imports the variables

$PI : 3.14159265358979323846 # pi
$PIO2 : 1.57079632679489661923 # pi/2
$PIO4 : 0.785398163397448309616 # pi/4
$SQRT2 : 1.41421356237309504880 # sqrt(2)
$SQRTH : 0.707106781186547524401 # sqrt(2)/2
$LOG2E : 1.4426950408889634073599 # 1/log(2)
$SQ2OPI : 0.79788456080286535587989 # sqrt( 2/pi )
$LOGE2 : 0.693147180559945309417 # log(2)
$LOGSQ2 : 0.346573590279972654709 # log(2)/2
$THPIO4 : 2.35619449019234492885 # 3*pi/4
$TWOOPI : 0.636619772367581343075535 # 2/pi

As well, there are 4 machine-specific numbers available:

$MACHEP : machine roundoff error
$MAXLOG : maximum log on the machine
$MINLOG : minimum log on the machine
$MAXNUM : largest number represented
use Math::Cephes qw(:trigs);
imports

acos: Inverse circular cosine
asin: Inverse circular sine
atan: Inverse circular tangent (arctangent)
atan2: Quadrant correct inverse circular tangent
cos: Circular cosine
cosdg: Circular cosine of angle in degrees
cot: Circular cotangent
cotdg: Circular cotangent of argument in degrees
hypot: hypotenuse associated with the sides of a right triangle
radian: Degrees, minutes, seconds to radians
sin: Circular sine
sindg: Circular sine of angle in degrees
tan: Circular tangent
tandg: Circular tangent of argument in degrees
cosm1: Relative error approximations for function arguments near unity
use Math::Cephes qw(:hypers);
imports

acosh: Inverse hyperbolic cosine
asinh: Inverse hyperbolic sine
atanh: Inverse hyperbolic tangent
cosh: Hyperbolic cosine
sinh: Hyperbolic sine
tanh: Hyperbolic tangent
use Math::Cephes qw(:explog);
imports

exp: Exponential function
expxx: exp(x*x)
exp10: Base 10 exponential function (Common antilogarithm)
exp2: Base 2 exponential function
log: Natural logarithm
log10: Common logarithm
log2: Base 2 logarithm
log1p,expm1: Relative error approximations for function arguments near unity.
use Math::Cephes qw(:cmplx);
imports

new_cmplx: create a new complex number object
cabs: Complex absolute value
cacos: Complex circular arc cosine
cacosh: Complex inverse hyperbolic cosine
casin: Complex circular arc sine
casinh: Complex inverse hyperbolic sine
catan: Complex circular arc tangent
catanh: Complex inverse hyperbolic tangent
ccos: Complex circular cosine
ccosh: Complex hyperbolic cosine
ccot: Complex circular cotangent
cexp: Complex exponential function
clog: Complex natural logarithm
cadd: add two complex numbers
csub: subtract two complex numbers
cmul: multiply two complex numbers
cdiv: divide two complex numbers
cmov: copy one complex number to another
cneg: negate a complex number
cpow: Complex power function
csin: Complex circular sine
csinh: Complex hyperbolic sine
csqrt: Complex square root
ctan: Complex circular tangent
ctanh: Complex hyperbolic tangent
use Math::Cephes qw(:utils);
imports

cbrt: Cube root
ceil: ceil
drand: Pseudorandom number generator
fabs: Absolute value
fac: Factorial function
floor: floor
frexp: frexp
ldexp: multiplies x by 2**n.
lrand: Pseudorandom number generator
lsqrt: Integer square root
pow: Power function
powi: Real raised to integer power
round: Round double to nearest or even integer valued double
sqrt: Square root
use Math::Cephes qw(:bessels);
imports

i0: Modified Bessel function of order zero
i0e: Modified Bessel function of order zero, exponentially scaled
i1: Modified Bessel function of order one
i1e: Modified Bessel function of order one, exponentially scaled
iv: Modified Bessel function of noninteger order
j0: Bessel function of order zero
j1: Bessel function of order one
jn: Bessel function of integer order
jv: Bessel function of noninteger order
k0: Modified Bessel function, third kind, order zero
k0e: Modified Bessel function, third kind, order zero, exponentially scaled
k1: Modified Bessel function, third kind, order one
k1e: Modified Bessel function, third kind, order one, exponentially scaled
kn: Modified Bessel function, third kind, integer order
y0: Bessel function of the second kind, order zero
y1: Bessel function of second kind of order one
yn: Bessel function of second kind of integer order
yv: Bessel function Yv with noninteger v
use Math::Cephes qw(:dists);
imports

bdtr: Binomial distribution
bdtrc: Complemented binomial distribution
bdtri: Inverse binomial distribution
btdtr: Beta distribution
chdtr: Chi-square distribution
chdtrc: Complemented Chi-square distribution
chdtri: Inverse of complemented Chi-square distribution
fdtr: F distribution
fdtrc: Complemented F distribution
fdtri: Inverse of complemented F distribution
gdtr: Gamma distribution function
gdtrc: Complemented gamma distribution function
nbdtr: Negative binomial distribution
nbdtrc: Complemented negative binomial distribution
nbdtri: Functional inverse of negative binomial distribution
ndtr: Normal distribution function
ndtri: Inverse of Normal distribution function
pdtr: Poisson distribution
pdtrc: Complemented poisson distribution
pdtri: Inverse Poisson distribution
stdtr: Students t distribution
stdtri: Functional inverse of Students t distribution
use Math::Cephes qw(:gammas);
imports

fac: Factorial function
gamma: Gamma function
igam: Incomplete gamma integral
igamc: Complemented incomplete gamma integral
igami: Inverse of complemented imcomplete gamma integral
psi: Psi (digamma) function
rgamma: Reciprocal gamma function
use Math::Cephes qw(:betas);
imports

beta: Beta function
incbet: Incomplete beta integral
incbi: Inverse of imcomplete beta integral
lbeta: Natural logarithm of |beta|
use Math::Cephes qw(:elliptics);
imports

ellie: Incomplete elliptic integral of the second kind
ellik: Incomplete elliptic integral of the first kind
ellpe: Complete elliptic integral of the second kind
ellpj: Jacobian Elliptic Functions
ellpk: Complete elliptic integral of the first kind
use Math::Cephes qw(:hypergeometrics);
imports

hyp2f0: Gauss hypergeometric function F
hyp2f1: Gauss hypergeometric function F
hyperg: Confluent hypergeometric function
onef2: Hypergeometric function 1F2
threef0: Hypergeometric function 3F0
use Math::Cephes qw(:misc);
imports

airy: Airy function
bernum: Bernoulli numbers
dawsn: Dawsons Integral
ei: Exponential integral
erf: Error function
erfc: Complementary error function
expn: Exponential integral En
fresnl: Fresnel integral
plancki: Integral of Plancks black body radiation formula
polylog: Polylogarithm function
shichi: Hyperbolic sine and cosine integrals
sici: Sine and cosine integrals
simpson: Simpsons rule to find an integral
spence: Dilogarithm
struve: Struve function
vecang: angle between two vectors
zeta: Riemann zeta function of two arguments
zetac: Riemann zeta function
use Math::Cephes qw(:fract);
imports

new_fract: create a new fraction object
radd: add two fractions
rmul: multiply two fractions
rsub: subtracttwo fractions
rdiv: divide two fractions
euclid: finds the greatest common divisor

<<less
Download (0.29MB)
Added: 2007-06-27 License: Perl Artistic License Price:
850 downloads
Math::BigInt 1.87

Math::BigInt 1.87


Math::BigInt is an arbitrary size integer/float math package. more>>
Math::BigInt is an arbitrary size integer/float math package.

SYNOPSIS

use Math::BigInt;

# or make it faster: install (optional) Math::BigInt::GMP
# and always use (it will fall back to pure Perl if the
# GMP library is not installed):

# will warn if Math::BigInt::GMP cannot be found
use Math::BigInt lib => GMP;

# to supress the warning use this:
# use Math::BigInt try => GMP;

my $str = 1234567890;
my @values = (64,74,18);
my $n = 1; my $sign = -;

# Number creation
my $x = Math::BigInt->new($str); # defaults to 0
my $y = $x->copy(); # make a true copy
my $nan = Math::BigInt->bnan(); # create a NotANumber
my $zero = Math::BigInt->bzero(); # create a +0
my $inf = Math::BigInt->binf(); # create a +inf
my $inf = Math::BigInt->binf(-); # create a -inf
my $one = Math::BigInt->bone(); # create a +1
my $mone = Math::BigInt->bone(-); # create a -1

my $pi = Math::BigInt->bpi(); # returns 3
# see Math::BigFloat::bpi()

$h = Math::BigInt->new(0x123); # from hexadecimal
$b = Math::BigInt->new(0b101); # from binary
$o = Math::BigInt->from_oct(0101); # from octal

# Testing (dont modify their arguments)
# (return true if the condition is met, otherwise false)

$x->is_zero(); # if $x is +0
$x->is_nan(); # if $x is NaN
$x->is_one(); # if $x is +1
$x->is_one(-); # if $x is -1
$x->is_odd(); # if $x is odd
$x->is_even(); # if $x is even
$x->is_pos(); # if $x >= 0
$x->is_neg(); # if $x < 0
$x->is_inf($sign); # if $x is +inf, or -inf (sign is default +)
$x->is_int(); # if $x is an integer (not a float)

# comparing and digit/sign extraction
$x->bcmp($y); # compare numbers (undef,0)
$x->bacmp($y); # compare absolutely (undef,0)
$x->sign(); # return the sign, either +,- or NaN
$x->digit($n); # return the nth digit, counting from right
$x->digit(-$n); # return the nth digit, counting from left

# The following all modify their first argument. If you want to preserve
# $x, use $z = $x->copy()->bXXX($y); See under L for why this is
# necessary when mixing $a = $b assignments with non-overloaded math.

$x->bzero(); # set $x to 0
$x->bnan(); # set $x to NaN
$x->bone(); # set $x to +1
$x->bone(-); # set $x to -1
$x->binf(); # set $x to inf
$x->binf(-); # set $x to -inf

$x->bneg(); # negation
$x->babs(); # absolute value
$x->bnorm(); # normalize (no-op in BigInt)
$x->bnot(); # twos complement (bit wise not)
$x->binc(); # increment $x by 1
$x->bdec(); # decrement $x by 1

$x->badd($y); # addition (add $y to $x)
$x->bsub($y); # subtraction (subtract $y from $x)
$x->bmul($y); # multiplication (multiply $x by $y)
$x->bdiv($y); # divide, set $x to quotient
# return (quo,rem) or quo if scalar

$x->bmuladd($y,$z); # $x = $x * $y + $z

$x->bmod($y); # modulus (x % y)
$x->bmodpow($exp,$mod); # modular exponentation (($num**$exp) % $mod))
$x->bmodinv($mod); # the inverse of $x in the given modulus $mod

$x->bpow($y); # power of arguments (x ** y)
$x->blsft($y); # left shift in base 2
$x->brsft($y); # right shift in base 2
# returns (quo,rem) or quo if in scalar context
$x->blsft($y,$n); # left shift by $y places in base $n
$x->brsft($y,$n); # right shift by $y places in base $n
# returns (quo,rem) or quo if in scalar context

$x->band($y); # bitwise and
$x->bior($y); # bitwise inclusive or
$x->bxor($y); # bitwise exclusive or
$x->bnot(); # bitwise not (twos complement)

$x->bsqrt(); # calculate square-root
$x->broot($y); # $yth root of $x (e.g. $y == 3 => cubic root)
$x->bfac(); # factorial of $x (1*2*3*4*..$x)

$x->bnok($y); # x over y (binomial coefficient n over k)

$x->blog(); # logarithm of $x to base e (Eulers number)
$x->blog($base); # logarithm of $x to base $base (f.i. 2)
$x->bexp(); # calculate e ** $x where e is Eulers number

$x->round($A,$P,$mode); # round to accuracy or precision using mode $mode
$x->bround($n); # accuracy: preserve $n digits
$x->bfround($n); # round to $nth digit, no-op for BigInts

# The following do not modify their arguments in BigInt (are no-ops),
# but do so in BigFloat:

$x->bfloor(); # return integer less or equal than $x
$x->bceil(); # return integer greater or equal than $x

# The following do not modify their arguments:

# greatest common divisor (no OO style)
my $gcd = Math::BigInt::bgcd(@values);
# lowest common multiplicator (no OO style)
my $lcm = Math::BigInt::blcm(@values);

$x->length(); # return number of digits in number
($xl,$f) = $x->length(); # length of number and length of fraction part,
# latter is always 0 digits long for BigInts

$x->exponent(); # return exponent as BigInt
$x->mantissa(); # return (signed) mantissa as BigInt
$x->parts(); # return (mantissa,exponent) as BigInt
$x->copy(); # make a true copy of $x (unlike $y = $x;)
$x->as_int(); # return as BigInt (in BigInt: same as copy())
$x->numify(); # return as scalar (might overflow!)

# conversation to string (do not modify their argument)
$x->bstr(); # normalized string (e.g. 3)
$x->bsstr(); # norm. string in scientific notation (e.g. 3E0)
$x->as_hex(); # as signed hexadecimal string with prefixed 0x
$x->as_bin(); # as signed binary string with prefixed 0b
$x->as_oct(); # as signed octal string with prefixed 0


# precision and accuracy (see section about rounding for more)
$x->precision(); # return P of $x (or global, if P of $x undef)
$x->precision($n); # set P of $x to $n
$x->accuracy(); # return A of $x (or global, if A of $x undef)
$x->accuracy($n); # set A $x to $n

# Global methods
Math::BigInt->precision(); # get/set global P for all BigInt objects
Math::BigInt->accuracy(); # get/set global A for all BigInt objects
Math::BigInt->round_mode(); # get/set global round mode, one of
# even, odd, +inf, -inf, zero, trunc or common
Math::BigInt->config(); # return hash containing configuration

<<less
Download (0.19MB)
Added: 2007-07-11 License: Perl Artistic License Price:
840 downloads
Math::MatrixReal::Aug 0.02

Math::MatrixReal::Aug 0.02


Math::MatrixReal::Aug Perl module contains additional methods for Math::MatrixReal. more>>


SYNOPSIS

use Math::MatrixReal;
use Math::MatrixReal::Aug;

These are certain extra methods for Math::MatrixReal, in the tradition of Math::MatrixReal::Ext1;

$matrix1->augmentright($matrix2);

Creates a new matrix of the form [$matrix1 $matrix2]. $matrix1 and $matrix2 must have the same number of rows.

Example:

$A = Math::MatrixReal->new_from_cols([[1,0]]);
$B = Math::MatrixReal->new_from_cols([[1,2],[2,1]]);

$C = $A / $B
print $C;

[ 1.000000000000E+00 1.000000000000E+00 2.000000000000E+00 ]
[ 0.000000000000E+00 2.000000000000E+00 1.000000000000E+00 ]

$matrix1->augmentbelow($matrix2);

Creates a new matrix of the form [ $matrix1 ] [ $matrix2 ]. $matrix1 and $matrix2 must have the same number of columns.

Example:

$A = Math::MatrixReal->new_from_cols([[1,0],[0,1]]);
$B = Math::MatrixReal->new_from_cols([[1,2],[2,1]]);

$C = $A / $B
print $C;

[ 1.000000000000E+00 0.000000000000E+00 ]
[ 0.000000000000E+00 1.000000000000E+00 ]
[ 1.000000000000E+00 2.000000000000E+00 ]
[ 2.000000000000E+00 1.000000000000E+00 ]

$matrix->applyfunction($coderef)

Applies &$coderef to each element of $matrix, and returns the result. $coderef should be a reference to a subroutine that takes four parameters: ($matrix, $matrix->element($i,$j), $i, $j) where $i and $j are the row and column indices of the current element.

Example:

sub increment {
my ($matrix,$element, $i,$j)=@_;
return $element+1;
}

$A = Math::MatrixReal->new_from_cols([[1,0],[0,1]]);

$E=$A->applyfunction(&increment);
print $E;
[ 2.000000000000E+00 1.000000000000E+00 ]
[ 1.000000000000E+00 2.000000000000E+00 ]
$matrix->largeexponential($exponent)

Finds $matrix^$exponent using the square-and-multiply method. $matrix must be square and $exponent must be a positive integer. Much more efficient for large $exponent than $matrix->$exponential($exponent) in that approximately log2($exponent) multiplications are required instead of approximately $exponent.

$matrix->fill($const);

Sets all elements of $matrix equal to $const.

Example:

$A = new Math::MatrixReal(3,3);
$A->fill(4);
print $A;
[ 4.000000000000E+00 4.000000000000E+00 4.000000000000E+00 ]
[ 4.000000000000E+00 4.000000000000E+00 4.000000000000E+00 ]
[ 4.000000000000E+00 4.000000000000E+00 4.000000000000E+00 ]
$new_matrix = $some_matrix->newfill($rows,$columns,$const); $new_matrix = Math::MatrixReal->newfill($rows,$columns,$const);

Creates a new matrix of the specified size, all the elements of which are $const.

Example:

$A = Math::MatrixReal->newfill(3,3,4);
print $A;
[ 4.000000000000E+00 4.000000000000E+00 4.000000000000E+00 ]
[ 4.000000000000E+00 4.000000000000E+00 4.000000000000E+00 ]
[ 4.000000000000E+00 4.000000000000E+00 4.000000000000E+00 ]

<<less
Download (0.004MB)
Added: 2007-07-05 License: Perl Artistic License Price:
841 downloads
Math::NoCarry 1.10

Math::NoCarry 1.10


Math::NoCarry is a Perl extension for no carry arithmetic. more>>
Math::NoCarry is a Perl extension for no carry arithmetic.

SYNOPSIS

use Math::NoCarry;

my $sum = Math::NoCarry::add( 123, 456 );

my $difference = Math::NoCarry::subtract( 123, 456 );

my $product = Math::NoCarry::multiply( 123, 456 );

No carry arithmetic doesnt allow you to carry digits to the next column. For example, if you add 8 and 4, you normally expect the answer to be 12, but that 1 digit is a carry. In no carry arithmetic you cant do that, so the sum of 8 and 4 is just 2. In effect, this is addition modulo 10 in each column. I discard all of the carry digits in this example:

1234
+ 5678
------
6802

For multiplication, the result of pair-wise multiplication of digits is the modulo 10 value of their normal, everyday multiplication.

123
x 456
-----
8 6 x 3
2 6 x 2
6 6 x 1

5 5 x 3
0 5 x 2
5 5 x 1

2 4 x 3
8 4 x 2
+ 4 4 x 1
-------
43878
Since multiplication and subtraction are actually types of additions, you can multiply and subtract like this as well.

No carry arithmetic is both associative and commutative.

<<less
Download (0.005MB)
Added: 2007-08-08 License: Perl Artistic License Price:
807 downloads
OriginalSynth 2.0.2

OriginalSynth 2.0.2


OriginalSynth allows users to manipulate a small portion of a sound wave (one 44th approximately or 1000/44100 of a second). more>>
OriginalSynth project allows users to manipulate a small portion of a sound wave (one 44th approximately or 1000/44100 of a second).

This is commonly referred to as a "wave table". Users can manipulate the wave table itself by drawing a line with two end points, drawing a point, drawing a curve, moving a point, or deleting a point. What the user makes is then repeated (oscillated) and sounds pitched.

Additonal features include the ability to combine multiple wave tabs (add/multiply), insert typical waves (sine, square, etc.), make pitch variations, and make duration variations.

<<less
Download (0.13MB)
Added: 2006-09-08 License: GPL (GNU General Public License) Price:
1141 downloads
Math::Fraction 0.53b

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)
<<less
Download (0.016MB)
Added: 2007-07-20 License: Perl Artistic License Price:
828 downloads
Secleted [ 0 ] software to compare
  • Page: 1 of 4
  • 1
  • 2
  • 3
  • 4