Jump to content

Scientific programming language

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 2a02:21b0:644d:d06a:5043:9b0b:ed21:3c7e (talk) at 08:26, 13 May 2021 (Add example with links to linear algebra and mathematical optimization). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computer programming, a scientific programming language is a programming language optimized for the use of mathematical formulas and matrices. Although these functions can be performed using any language, scientific programming languages provide both a syntax and a standard library that facilitates their use. Such languages include ALGOL, APL,[1] Fortran, J, Julia, Maple, MATLAB, Python and R.

Scientific programming languages should not be confused with scientific language in general, which refers loosely to the higher standards in precision, correctness and concision expected from practitioners of the scientific method.

Examples

Scientific programming languages provide facilities to work with linear algebra. For example, the following Python program solves a system of linear equations:

import numpy

A = numpy.random.random((20, 20))  # A is a 20x20 matrix
b = numpy.random.random((20,))     # b is a 20x1 column vector
x = numpy.linalg.solve(A, b)       # x is the solution to A * x = b

Working with large vectors and matrices is a key feature of these languages, as linear algebra lays the foundation to mathematical optimization, which in turn enables major applications such as deep learning. In Python alone, specialized libraries with the same API as the standard NumPy can be found in CuPy, JAX, PyTorch and TensorFlow.

See also

References

  1. ^ "scientific language - Definition of scientific language". YourDictionary. The Computer Language Company Inc. Retrieved 27 March 2014.