Mathematical Programming Languages - math

Given my previous questions about the the usage of AMPL.
Are there any other programming/scripting languages that are strictly meant for mathmatical processing?
For example: Matlab (it does deviate a bit from a mathematical structure, but its close enough), Mathematica, and AMPL

R / S+ for statistical computing
Other stat languages: SAS, SPSS, STATA, GAUSS, etc.
Octave, an open source clone of Matlab
Fortress, "a language for high-performance computation that provides abstraction and type safety on par with modern programming language principles."
Maple
Maxima

There's always APL, with its builtin matrix operators. Modern APL even supports .NET.

R, Numpy/scipy for Python, Maple, Yacas, even Fortran.

This may be only of historical significance, but Fortan (The IBM Mathematical Formula Translating System) is especially suited to numeric computation and scientific computing.

OPL (Optimization Programming Language) is one of the most comprehensive modelling languages for Mathematical Programming. You can do Linear Programming (LP), Mixed Integer Programming (MIP), Quadratic Programming (QP), Constraint Programming (CP), MIQP, etc.
IBM-ILOG CPLEX Optimization Studio uses this language.

Maple for symbolic math (similar to Mathematica).
SAS, SPSS, R for statistics.
The Operation Research / Management Science magazine has a yearly survey of Simulation Software, and while I can't find the link I believe they have one yearly survey on optimization packages, such as AMPL you are quoting.

Sage is basically Python with a load of packages and a few language extensions put into a "notebook" interface like that of Mathematica. It has interfaces to all sorts of computer algebra systems. And with Numpy and Scipy (which are included) it's a fine replacement for Matlab. And it's open source and actively developed.

Given your previous question, I assume you are looking for an alternative to commercial mathematics packages. If so, you should try Sage, it is open source and is a unified front end for almost all of the open source mathematics/sci.calc. packages out there (list).
The way it works, is that it uses your web browser as a graphical front end for displaying, editing and evaluating Mathematica style notebooks (it is also possible to just use the command line). All the dirty work, such as selecting the appropriate package for the situation, is done transparently in the background.
Sage uses Python as it's main language / syntax, so it's fairly easy to learn, and if you have old Python scripts, they should work straight out of the box. If I didn't have access to a Mathematica license, I would definitely use this.

Interactive Data Language (IDL) is a proprietary language used in astronomy, medicine and other sciences at least in part because of its built-in array operations and mathematical library.

As this question is still open and well indexed in Google, I would definitively add to the list the Julia language.
Aside the technical aspects that make shine this high level/high performance new language, an important consideration is that the community of developers/users is clearly biased toward mathematicians.

Related

Julia as a working language for non-CS domain experts?

I build structural design optimization software together with civil engineers in a large renewable energy company. The way we have set it up, the domain experts will do most of their own code (think structural validation of steel part, geophysical response models,...), and my team is responsible for integrating it all and building optimization algorithms on top.
Currently everything is matlab because this is what the engineers are taught at school. We are starting to consider rebuilding the system from scratch, and one question that pops up is what language to use.
My prioritized checklist is:
Easy to learn for a non-CS minded civil engineer
Well suited for linear algebra calculation, large algebraic expressions and numerical work in general
Existing numerical libraries with root finding, basic optimizers, etc. -- or solid support for C/Fortran integration.
So far my favorite is Python, which I have seen several of the engineers get up to speed with in a few weeks, but I was wondering if Julia would also fit the bill.
Do you have experience using Julia as a domain expert language, and would you recommend it for this purpose?
(Keeping this specific to Julia to make it an answerable question -- but feel free to chime in with other language options!)
Like mentioned in the comments this is a question for julia discourse.
However, I cannot resist to comment on your list.
Easy to learn for a non-CS minded civil engineer
Julia is slightly more difficult then Python. I have been teaching Julia to several groups of people and basically if your team has a background such as Python or Matlab transformation to Julia is painless and natural.
Well suited for linear algebra calculation, large algebraic expressions and numerical work in general
This is exactly what is this language designed for. Julia totally overcomes each of Python's shortcomings in that areas.
Existing numerical libraries with root finding, basic optimizers, etc. -- or solid support for C/Fortran integration.
Have a look at https://github.com/JuliaMath and https://github.com/JuliaOpt/
Additionally if you are interested in linear and nonlinear programming have a look at JuMP at https://github.com/JuliaOpt/JuMP.jl - this is ingenious and beautiful package
Additionally, C and Fortran work out-of-the-box: https://docs.julialang.org/en/v1.0/manual/calling-c-and-fortran-code/
Finally, it is worth noting that you can also load and directly use Python libraries in Julia via the PyCall.jl package.

Symbolic Math in Julia?

I use Mathematica for symbolic math calculations. I am planning to switch to another language. Matlab (which I use for standard computation stuff) includes this feature but I am looking at the possibility of using Julia, since it seems to be the future. Yet, there seems to be no symbolic tool available (no mention in official documentation). Apparently the only package available (SymPy) says "Test Failed" in the official website (http://pkg.julialang.org/).
Has anyone been able to do this in Julia?
Now, looking at http://pkg.julialang.org/ one could find more candidates to perform symbolic mathematics in julia:
SymEngine.jl
Julia Wrappers for SymEngine, a fast symbolic manipulation library, written in C++.
Symata.jl
a language for symbolic computations and mathematics, where, for the most part, "mathematics" means what it typically does for a scientist or engineer.
SymPy.jl
Julia interface to SymPy via PyCall
Also:
LinearExpressions.jl
Linear symbolic expressions for the Julia language
SymPy Package works fine, it brings Python's Sympy functionality into Julia via PyCall.
SymPy is a Python library for symbolic mathematics. It aims to
become a full-featured computer algebra system (CAS) while keeping the
code as simple as possible in order to be comprehensible and easily
extensible. SymPy is written entirely in Python and does not require
any external libraries.
Also, consider the Nemo.jl library which they claim is faster than alternatives like SageMath.

programming and numerical analysis

I'm taking a numerical analysis class in the fall with a heavily applied/programming bent. I have a so-so programming background (having taken a few classes and worked on Java programming in an internship) but I want to bone up my skills before I start this class. So my question is, what programming skills are useful for numerical analysis?
Are data structures, OOP, algorithms very important? Are there any resources you would recommend I go over before class starts?
Algorithms and data structures. Not so much OOP. In the numerical analysis course that I took in college, we did a lot of programming of algorithms in python and Matlab.
You would be best to use numpy and/or scipy if you want to do numerical analysis fast prototyping. The python tutorial for python 2.7 or version 3 is about 120 pages long and available from docs.python.org and very easy to pick up in a day. numpy and scipy take some learning.
The gains using OOP can be large but it takes a lot of skilling up. If I was using C++ I'd use Brian H. Flowers book which can give you a quick introduction to applied engineering and the first 5 chapters will give you the ability to write good C++ OOP classes with about 8 hours work including writing test scripts. The problem now is that many OOP packages are in the standard template libraries. Many people end up reinventing the wheel because they don't know what is available. This is why you might be better to just go for Python numpy or scipy or as suggested above, just use Matlab since most things are predefined. Both languages are good for fast prototyping, but if you are wanting to do quite involved things like produce finite element/finite difference meshes, you will need to go to the BLAS libraries of Dongarra.

Quickly cross-check complex math results?

I am doing matrix operations on large matrices in my C++ program. I need to verify the results that I get, I used to use WolframAlpha for the task up until now. But my inputs are very large now, and the web interface does NOT accept such large values (textfield is limited).
I am looking for a better solution to quickly cross-check/do math problems.
I know there is Matlab but I have never used it and I don't know if thats what will suffice my needs and how steep the learning curve would be?
Is this the time to make the jump? or there are other solutions?
If you don't mind using python, numpy might be an option.
Apart from the license costs, MATLAB is the state of the art numerical math tool. There is octave as free open source alternative, with a similar syntax. The learning curve is for both tools absolutely smooth!
WolframAlpha is web interface to Wolfram Mathematica. The command syntax is exactly the same. If you have access to Mathematica at your university, it would be most smooth choice for you since you already have experience with WolframAlpha.
You may also try some packages to convert Mathematica commands to MATLAB:
ToMatlab
Mathematica Symbolic Toolbox for MATLAB 2.0
Let us know in more details what is your validation process. How your data look like and what commands have you used in WolframALpha? Then we can help you with MATLAB alternative.

General sparse iterative solver libraries

What are some of the better libraries for large sparse iterative (conjugate gradient, MINRES, GMRES, etc.) linear algebra system solving? I've often coded my own routines, but I'm interested to know which "off-the-shelf" packages people prefer. I've heard of PETSc, TAUCS, IML++, and a few others. I'm wondering how these stack up, and what else is out there. My preference is for ease of use, and freely available software.
Victor Eijkhout's Overview of Iterative Linear System Solver Packages would probably be a good place to start.
You may also wish to look at Trilinos
http://trilinos.sandia.gov/
It is designed by some great software craftsman, using modern
design techniques.
Moreover, from within Trilinos, you can call PetsC if you desire.
NIST has some sparse Linear Algebra software you can download
here: http://math.nist.gov/sparselib++/ and here: http://math.nist.gov/spblas/
I haven't used those packages myself, but I've heard good things about them.
http://www.cise.ufl.edu/research/sparse/umfpack/
UMFPACK is a set of routines for
solving unsymmetric sparse linear
systems, Ax=b, using the Unsymmetric
MultiFrontal method. Written in
ANSI/ISO C, with a MATLAB (Version 6.0
and later) interface. Appears as a
built-in routine (for lu, backslash,
and forward slash) in MATLAB. Includes
a MATLAB interface, a C-callable
interface, and a Fortran-callable
interface. Note that "UMFPACK" is
pronounced in two syllables, "Umph
Pack". It is not "You Em Ef Pack".
I'm using it for FEM code.
I would check out Microsoft's Solver Foundation. It's free to cheap for even pretty big problems. The unlimited version is industrial strength and is based on Gurobi and of course isn't cheap.
http://code.msdn.microsoft.com/solverfoundation

Resources