Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

gauss-quadrature

Package Overview
Dependencies
Maintainers
5
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gauss-quadrature

Gauss-Legendre quadrature rules

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
5
25%
Maintainers
5
Weekly downloads
 
Created
Source

gauss-quadrature

This library computes Gauss-Legendre quadrature points and weights for numerical integration. For more information, see:

Example

var gaussQ = require("gauss-quadrature")

console.log(gaussQ(2))

//Prints:
//
//  [ [ -0.5773502691896257, 0.5773502691896257 ], [ 1, 1 ] ]
//

Install

npm install gauss-quadrature

require("gauss-quadrature")(n[, a, b])

Computes the Gaussian quadrature points and weights for the interval [a, b].

  • n is the number of quartature points
  • a is the start of the interval (default -1)
  • b is the end of the interval (default +1)

If either a or b is unspecified, the interval defaults to [-1, 1]

Returns An array with two elements, [x, w] where:

  • x is the list of quadrature points
  • w is the list of quadrature weights

Note

Quadrature points are only accurate to 1e-6

Credits

(c) 2013 Mikola Lysenko. MIT License

Keywords

quadrature

FAQs

Package last updated on 12 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts