Main > Free Download Search >

Free math software for linux

math

Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 200
Math::CDF 0.1

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
Download (0.064MB)
Added: 2007-08-03 License: Perl Artistic License Price:
815 downloads
Math::Vec 1.01

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.

<<less
Download (0.010MB)
Added: 2007-07-03 License: Perl Artistic License Price:
847 downloads
Math::ODE 0.03

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.

<<less
Download (0.005MB)
Added: 2007-06-13 License: GPL (GNU General Public License) Price:
867 downloads
Math::Expr 0.2

Math::Expr 0.2


Math::Expr is a Perl module that parses mathematical expressions. more>>
Math::Expr is a Perl module that parses mathematical expressions.

SYNOPSIS

require Math::Expr;

$p=new Math::Expr;
$e=$p->Parse("a+4*b-d/log(s)+f(d,e)");

Parses mathematical expressions into a tree structure. The expressions may contain integers, real numbers, alphanumeric variable names, alphanumeric function names and most other characters might be used as operators. The operators can even be longer than one character! The only limitation is that a variable or function name may not start on a digit, and not all chars are accepted as operations. To be exact, here is the grammatic (in perl regexp notation):

< Expr > = -?< Elem >(< OpChr >< Elem >)*
< Elem > = < Number >|< Var >|< Function >|(< Expr >)
< Number > = < Integer >|< Float >
< Integer > = d+
< Float > = d*.d+
< Var > = [a-zA-Z][a-zA-Z0-9]*(:[a-zA-Z][a-zA-Z0-9]*)?
< Function > = [a-zA-Z][a-zA-Z0-9]*(< Expr >(,< Expr >)*)
< OpChr > = [^a-zA-Z0-9(),.:]+

If the - sign is present at the beginning of an < Expr > it is parsed in the exact same structure as 0< Expr >. That is to allow constructions like "-a*b" or "b+3*(-7)".

A variable consists of two parts separated by a :-char. The first part is the variable name, and the second optional part is its type. Default type is Real.

METHODS

$p = new Math::Expr

This is the constructor, it creates an object which later can be used to parse the strings.

$e=$p->Parse($str)

This will parse the string $str and return an expression tree, in the form of a Math::Expr::Opp object (or in simple cases only a Math::Expr::Var or Math::Expr::Num object).

$p->Priority({^=>50, /=>40, *=>30, -=>20, +=>10})

This will set the priority of ALL the operands (there is currently no way to change only one of them). The priority decides what should be constructed if several operands is listed without delimiters. Eg if a+b*c should be treated as (a+b)*c or a+(b*c). (Default is listed in header).

$p->SetOppDB($db)

Sets the OpperationDB to be used to $db. See Math::Expr::OpperationDB for more info. This will be passed down to all objects returned by the parser aswell.

<<less
Download (0.013MB)
Added: 2007-07-25 License: Perl Artistic License Price:
821 downloads
Math::XOR 0.02

Math::XOR 0.02


Math::XOR is a package to handle XOR encryption of string buffers. more>>
Math::XOR is a package to handle XOR encryption of string buffers.

SYNOPSIS

use XOR;
print xor_buf("hello", "world"), "n";

The XOR module allows you to quickly XOR two strings together. This is the only method of encryption that (assuming the randomness of the pattern used as an encryption key) truly cannot be broken. It also has interesting, very direct mathematical properties which can be fun to play with:

XOR string 1 and string 2, you get string 3 XOR string 1 and string 3, you get string 2 XOR string 2 and string 3, you get string 1

FUNCTIONS

xor_buf($string1, $string2)

This function will return a scalar, which is the result of XORing the two strings passed to it together. The strings may contain binary data.

If $string2 is not at least as many characters long as $string1, xor_buf() will print an error and return undef. Only as many characters as there are in $string1 will be returned; excess characters in $string2 will be ignored. For this reason, when encrypting data it is good to think of $string1 as your "data" and $string2 as your "key".

<<less
Download (0.002MB)
Added: 2006-08-04 License: Perl Artistic License Price:
1176 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
Math::GSL 0.001

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?

<<less
Download (0.008MB)
Added: 2007-06-13 License: GPL (GNU General Public License) Price:
863 downloads
Math::GMPz 0.21

Math::GMPz 0.21


Math::GMPz is a Perl interface to the GMP librarys integer (mpz) functions. more>>
Math::GMPz is a Perl interface to the GMP librarys integer (mpz) functions.

A bignum module utilising the Gnu MP (GMP) library. Basically this module simply wraps nearly all of the integer functions provided by that library. The documentation below extensively plagiarises the documentation at http://swox.com/gmp/manual.

See the Math::GMPz test suite for examples of usage.

SYNOPSIS

use Math::GMPz qw(:mpz :primes :supp);

my $string = fa9eeeeeeeeeeeeea1234dcbaef1;
my $base = 16;

# Create the Math::GMPz object
my $bn1 = Rmpz_init_set_str($string, $base);

# Create another Math::GMPz object that holds
# an initial value of zero, but has enough
# memory allocated to store a 131-bit number.
# If 131 bits turns out to be insufficient, it
# doesnt matter - additional memory is allocated
# automatically to Math::GMPz objects as needed
# by the GMP library.
my $bn2 = Rmpz_init2(131);

# Create another Math::GMPz object initialised to 0.
my $bn3 = Rmpz_init();

# or use the new() function:
my $bn4 = Math::GMPz->new(12345);

# Perform some operations ... see FUNCTIONS below.

.
.

# print out the value held by $bn1 (in octal):
print Rmpz_get_str($bn1, 8), "n";

# print out the value held by $bn1 (in decimal):
print Rmpz_get_str($bn1, 10);

# print out the value held by $bn1 (in base 29)
# using the (alternative) Rmpz_out_str()
# function. (This function doesnt print a newline.)
Rmpz_out_str($bn1, 29);

<<less
Download (0.048MB)
Added: 2007-07-18 License: Perl Artistic License Price:
828 downloads
MathWar 0.2.4

MathWar 0.2.4


MathWar project is a flashcard math game for kids. more>>
MathWar project is a flashcard math game for kids.

MathWar is a flashcard math game in which the child plays against the computer to solve simple addition, subtraction, and multiplication problems before the computer player answers.

MathWar is aimed at kids who are just learning their math facts, and can easily be tailored to fit different skill levels.

<<less
Download (0.80MB)
Added: 2006-10-16 License: GPL (GNU General Public License) Price:
1106 downloads
Libapmath 0.3

Libapmath 0.3


Libapmath is a C++ arbitrary precision math library designed to be as convenient as possible, besides performing well. more>>
Libapmath is a C++ arbitrary precision math library designed to be as convenient as possible, besides performing well.
The approach taken is that of choosing names like those in < cmath > and implementing all arithmetic by overloading of operators.
Main features:
- Real and complex arithmetic
- Trigonometric, exponential functions and many more for real and complex domain and range
- Some common constants
<<less
Download (0.050MB)
Added: 2006-11-05 License: BSD License Price:
1083 downloads
Math::Roman 1.07

Math::Roman 1.07


Math::Roman contains arbitrary sized Roman numbers and conversion from and to Arabic. more>>
Math::Roman contains arbitrary sized Roman numbers and conversion from and to Arabic.

SYNOPSIS

use Math::Roman qw(roman);

$a = new Math::Roman MCMLXXIII; # 1973
$b = roman(MCMLXI); # 1961
print $a - $b,"n"; # prints XII

$d = Math::Roman->bzero(); #
$d++; # I
$d += 1998; # MCMXCIX
$d -= MCM; # XCIX

print "$dn"; # string "MCMIC"
print $d->as_number(),"n"; # Math::BigInt "+1999"

<<less
Download (0.010MB)
Added: 2007-08-08 License: Perl Artistic License Price:
808 downloads
Math::BigRat 0.20

Math::BigRat 0.20


Math::BigRat package arbitrary big rational numbers. more>>
Math::BigRat package arbitrary big rational numbers.

SYNOPSIS

use Math::BigRat;

my $x = Math::BigRat->new(3/7); $x += 5/9;

print $x->bstr(),"n";
print $x ** 2,"n";

my $y = Math::BigRat->new(inf);
print "$y ", ($y->is_inf ? is : is not) , " infinityn";

my $z = Math::BigRat->new(144); $z->bsqrt();

Math::BigRat complements Math::BigInt and Math::BigFloat by providing support for arbitrary big rational numbers.

MATH LIBRARY

You can change the underlying module that does the low-level math operations by using:

use Math::BigRat try => GMP;

Note: This needs Math::BigInt::GMP installed.
The following would first try to find Math::BigInt::Foo, then Math::BigInt::Bar, and when this also fails, revert to Math::BigInt::Calc:

use Math::BigRat try => Foo,Math::BigInt::Bar;

If you want to get warned when the fallback occurs, replace "try" with "lib":

use Math::BigRat lib => Foo,Math::BigInt::Bar;

If you want the code to die instead, replace "try" with "only":

use Math::BigRat only => Foo,Math::BigInt::Bar;

<<less
Download (0.050MB)
Added: 2007-08-14 License: Perl Artistic License Price:
801 downloads
Math::Logic 1.19

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.

<<less
Download (0.012MB)
Added: 2007-07-02 License: Perl Artistic License Price:
847 downloads
PMathGen 0.1.0

PMathGen 0.1.0


PMathGen project is a simple math problem generator that outputs LaTeX and optionally PostScript. more>>
PMathGen project is a simple math problem generator that outputs LaTeX and optionally PostScript.
From the operators, format, etc. specified on the command line or in a worksheet description file, it generates LaTeX and optionally PostScript files that can be used as math worksheets.
Enhancements:
- A file format, so lessons can have titles, and sections, and instructions, and can be saved and recreated randomly again.
- More fine grained control over minimum and maximum numbers in problems.
- Cleaner LaTeX code that is easier to modify either within the PMathGen file format or after it is generated.
- Better documentation, including the file format and customization instructions.
<<less
Download (0.078MB)
Added: 2006-10-19 License: GPL (GNU General Public License) Price:
1101 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
Secleted [ 0 ] software to compare
  • Page: 1 of 5
  • 1
  • 2
  • 3
  • 4
  • 5