ubuntu14.04 installation of GSL Scientific Computing Library

Source: Internet
Author: User

GSL (GNU Scientific Library) as one of the three major scientific computing libraries, in addition to covering basic linear algebra, differential equations, integrals, random numbers, combinatorial numbers, equation root, polynomial root, sequencing, etc., as well as simulated annealing, fast Fourier transform, wavelet, interpolation, Basic spline, least squares fitting, special functions, etc. The installation and use of GSL are described below.

Method One:

First download from the official website to the source code (I use the version is gsl-1.9) compressed package, extracted into the directory, to perform

./configuremakemake Install

This process takes a few minutes. It is also important to note that, when executed make install , the dynamic library and header files are automatically copied to/usr/local/lib and/usr/local/include respectively, but if the two directories do not have write permissions, the two directories cannot be created, causing the installation to fail, and instead use ' sudo make install ' or manually give permission to resolve this issue.

The installation is complete, here is the example of running the official online

#include <stdio.h> #include <gsl/gsl_sf_bessel.h>int main (void) {  double x = 5.0;  Double y = gsl_sf_bessel_j0 (x);  printf ("J0 (%g) =%.18e\n", x, y);  return 0; }

Compile it (assuming that the file is saved as TEST.C):

GCC test.c-lgsl-lgslcblas   test.c-o test

Output the executable file test.

Method Two:

The GSL Source package provides the following binary packages:

    • GSL-BIN:GNU Scientific Library (GSL)-binary package
    • LIBGSL0-DBG:GNU Scientific Library (GSL)--Debug Symbols Package
    • LIBGSL0-DEV:GNU Scientific Library (GSL)--Development package
    • LIBGSL0LDBL:GNU Scientific Library (GSL)--Library package

The terminal can be installed by typing the following command:

sudo apt-get install Libgsl0ldbl

Description: Depending on the need to choose to install a different version, use gsl-bin will install all content ( gsl - bin dependent libgsl0ldbl )

For more GSL, refer to the official instruction manual for more in-depth understanding of the GSL design documentation

ubuntu14.04 installation of GSL Scientific Computing Library

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.