Giter Site home page Giter Site logo

stdlib-js / stdlib Goto Github PK

View Code? Open in Web Editor NEW
4.0K 55.0 400.0 1.87 GB

✨ Standard library for JavaScript and Node.js. ✨

Home Page: https://stdlib.io

License: Apache License 2.0

JavaScript 63.41% Julia 0.01% C++ 0.61% C 17.75% Awk 0.01% HTML 0.03% Shell 0.13% CSS 0.03% Python 2.59% R 0.01% Fortran 0.15% WebAssembly 0.01% TypeScript 15.29%
javascript stdlib nodejs numeric library standard math js mathematics science

stdlib's Issues

Implement `asind`

Compute the arcsine of x, where the output is in degrees. @stdlib/math/base/special/asind.

RFC: add `j1`, the Bessel function of order 1

Checklist

Please ensure the following tasks are completed before filing an issue.

  • Read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • If this is a general question, searched the FAQ for an existing answer.
  • If this is a feature request, the issue name begins with RFC: .

Description

Description of the issue (or feature request).

Bessel functions find frequent application in areas of scientific computing. This RFC proposes to add the Bessel function of order 1. Package name: @stdlib/math/base/special/j1.

Related Issues

Does this issue (or feature request) have any related issues?

No.

Questions

Any questions for reviewers?

No.

Other

Any other information relevant to this issue (or feature request)? This may include screenshots, references, stack traces, sample output, and/or implementation notes.

Reference implementations:

Implement `parse-csv`

Comma-separated values. @stdlib/utils/parse-csv.

This is a special case of @stdlib/utils/parse-dsv and should just be a wrapper.

RFC: add `j0`, the Bessel function of order 0

Checklist

Please ensure the following tasks are completed before filing an issue.

  • Read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • If this is a general question, searched the FAQ for an existing answer.
  • If this is a feature request, the issue name begins with RFC: .

Description

Description of the issue (or feature request).

Bessel functions find frequent application in areas of scientific computing. This RFC proposes to add the Bessel function of order 0. Package name: @stdlib/math/base/special/j0.

Related Issues

Does this issue (or feature request) have any related issues?

No.

Questions

Any questions for reviewers?

No.

Other

Any other information relevant to this issue (or feature request)? This may include screenshots, references, stack traces, sample output, and/or implementation notes.

Reference implementations:

Floating point precision - does/ will this library support this?

@kgryte Thanks for the quick merge earlier!

I have a question - is it the intent of this library's math section to provide a means to solve the floating point precision problems in JS?

A concise demonstration of what I'm referring to:

$ node 
> 0.3
0.3
> 0.1 + 0.2
0.30000000000000004

I came across this lib linked from this article and while reading it, this came to mind immediately.

For many common application tasks, minor deviations in precision are unlikely to have a significant effect. However, for numeric computing and applications requiring high precision, poor precision does have a significant effect due to accumulated error. Especially since the built-in Math functions are frequently used by higher-order functions, small deviations compounded many times can lead to significant drift from the "true" value.

... and that paragraph implied that you have solved (or are aiming to solve) this very problem, which I believe is an baseline factor that tends to affect precision in any non-integer math in JS. I've tried looking for references to this specific issue in this lib (and its FAQ), but have not been able to find reference to it yet.

Checklist

Please ensure the following tasks are completed before filing an issue.

  • Read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • If this is a general question, searched the FAQ for an existing answer.
  • If this is a feature request, the issue name begins with RFC: .

Description

Description of the issue (or feature request).

Does this lib provide a means to solve this?

$ node 
> 0.3
0.3
> 0.1 + 0.2
0.30000000000000004

Related Issues

Does this issue (or feature request) have any related issues?

None.

Questions

Any questions for reviewers?

Yes, see above.

Other

Any other information relevant to this issue (or feature request)? This may include screenshots, references, stack traces, sample output, and/or implementation notes.

Demo

If relevant, provide a link to a live demo.

Not applicable.

Reproduction

If this issue is a bug report, what steps are required to reproduce the unexpected output? (If this is a feature request, remove this section.)

Not applicable.

Expected Results

What are the expected results? (If this is a feature request, remove this section.)

The following results are expected:

(insert expected results here)

Actual Results

What are the actual results? (If this is a feature request, remove this section.)

The following are the actual results:

$ node 
> 0.3
0.3
> 0.1 + 0.2
0.30000000000000004
> stdlib.math.add([0.1, 0.2])
0.3

Environments

If this issue is a bug report, what environments are affected; e.g., Node v0.4.x, Chrome, IE 11? (If this is a feature request, remove this section.)

v8, likely all JS engine implementations

Implement `acosd`

Compute the arccosine of x where the output is in degrees. @stdlib/math/base/special/acosd.

Implement `incrmwstdev`

Incremental moving weighted standard deviation. @stdlib/math/statistics/incr/mwstdev.

Two use cases:

  1. Fixed window weights. In which case, should provide a factory method to set the weights beforehand.
  2. Weights which accompany each value: accumulator( x, weight ).

Implement `parse-tsv`

Tab-separated values. @stdlib/utils/parse-tsv.

This is a special case of @stdlib/utils/parse-dsv and should just be a wrapper.

Implement `incrmwvariance`

Incremental moving weighted variance. @stdlib/math/statistics/incr/mwvariance.

Two use cases:

  1. Fixed window weights. In which case, should provide a factory method to set the weights beforehand.
  2. Weights which accompany each value: accumulator( x, weight ).

Implement `tand`

Compute the tangent of x where x is in degrees. @stdlib/math/base/special/tand.

Implement `parse-dsv`

Delimiter-separated values. @stdlib/utils/parse-dsv.

Note that this package is not simple. The implementation should adhere as best as possible to the various CSV RFCs and pass standard CSV parsing tests.

Ideally, this implementation should be portable and/or share a code base with a streaming variant.

Implement `read-xlsx`

Read XLSX files. @stdlib/fs/read-xlsx.

This package should only focus on xlsx files. Other file formats should be addressed in separate packages.

Implement `asecd`

Compute the inverse secant of x where the output is in degrees. @stdlib/math/base/special/asecd.

RFC: add `y0`, the Bessel function of the second kind of order 0

Checklist

Please ensure the following tasks are completed before filing an issue.

  • Read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • If this is a general question, searched the FAQ for an existing answer.
  • If this is a feature request, the issue name begins with RFC: .

Description

Description of the issue (or feature request).

Bessel functions find frequent application in areas of scientific computing. This RFC proposes to add the Bessel function of the second kind of order 0. Package name: @stdlib/math/base/special/y0.

Related Issues

Does this issue (or feature request) have any related issues?

No.

Questions

Any questions for reviewers?

No.

Other

Any other information relevant to this issue (or feature request)? This may include screenshots, references, stack traces, sample output, and/or implementation notes.

Reference implementations:

RFC: add the inverse logit function

Checklist

Please ensure the following tasks are completed before filing an issue.

  • Read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • If this is a general question, searched the FAQ for an existing answer.
  • If this is a feature request, the issue name begins with RFC: .

Description

Description of the issue (or feature request).

This RFC proposes adding support for computing the inverse logit function. The implementation is straightforward:

/**
* @param {number} x - input value
* @returns {number} function result
*/
function expit( x ) {
    return 1.0 / ( 1.0 + exp( -x ) );
}

Package: @stdlib/math/base/special/expit
Alias: base.expit

Related Issues

Does this issue (or feature request) have any related issues?

No.

Questions

Any questions for reviewers?

No.

Other

Any other information relevant to this issue (or feature request)? This may include screenshots, references, stack traces, sample output, and/or implementation notes.

Reference implementations:

  • SciPy [1][2]

See also @stdlib/math/base/special/logit.

Implement `cosd`

Compute the cosine of x where x is in degrees. @stdlib/math/base/special/cosd.

Implement `read-tsv`

Read a file containing tab-separated values. @stdlib/fs/read-tsv.

This package should leverage parse-tsv. Additionally, a readStream variant is desirable.

Implement `read-dsv`

Read a file containing delimiter-separated values. @stdlib/fs/read-dsv.

This package should leverage parse-dsv. Additionally, a readStream variant is desirable.

Implement `acscd`

Compute the inverse cosecant of x where the output is in degrees. @stdlib/math/base/special/acscd.

Implement `cotd`

Compute the cotangent of x where x is in degrees. @stdlib/math/base/special/cotd.

Implement `read-csv`

Read a file containing comma-separated values. @stdlib/fs/read-csv.

This package should leverage parse-csv. Additionally, a readStream variant is desirable.

Implement `cscd`

Compute the cosecant of x where x is in degrees. @stdlib/math/base/special/cscd.

Implement `incrmwmean`

Incremental moving weighted mean. @stdlib/math/statistics/incr/mwmean.

Two use cases:

  1. Fixed window weights. In which case, should provide a factory method to set the weights beforehand.
  2. Weights which accompany each value: accumulator( x, weight ).

Implement `secd`

Compute the secant of x where x is in degrees. @stdlib/math/base/special/asecd.

RFC: add `sind`

Checklist

Please ensure the following tasks are completed before filing an issue.

  • Read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • If this is a general question, searched the FAQ for an existing answer.
  • If this is a feature request, the issue name begins with RFC: .

Description

Description of the issue (or feature request).

Compute the sine of x where x is in degrees.

Package: @stdlib/math/base/special/sind
Alias: base.sind

For a reference implementation, see Julia.

Related Issues

Does this issue (or feature request) have any related issues?

No.

Questions

Any questions for reviewers?

No.

Other

Any other information relevant to this issue (or feature request)? This may include screenshots, references, stack traces, sample output, and/or implementation notes.

No.

Implement `atand`

Compute the arctangent of x where the output is in degrees. @stdlib/math/base/special/atand.

RFC: add `y1`, the Bessel function of the second kind of order 1

Checklist

Please ensure the following tasks are completed before filing an issue.

  • Read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • If this is a general question, searched the FAQ for an existing answer.
  • If this is a feature request, the issue name begins with RFC: .

Description

Description of the issue (or feature request).

Bessel functions find frequent application in areas of scientific computing. This RFC proposes to add the Bessel function of the second kind of order 1. Package name: @stdlib/math/base/special/y1.

Related Issues

Does this issue (or feature request) have any related issues?

No.

Questions

Any questions for reviewers?

No.

Other

Any other information relevant to this issue (or feature request)? This may include screenshots, references, stack traces, sample output, and/or implementation notes.

Reference implementations:

Implement `incrwmean`

Incremental weighted mean. @stdlib/math/statistics/incr/wmean. See @stdlib/math/statistics/incr/mean.

See also an algorithm for computing a weighted incremental variance.

Implement `acotd`

Compute the inverse cotangent of x where the output is in degrees. @stdlib/math/base/special/acotd.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.