npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

multivariate_calculus

v1.4.2

Published

Handles calculus of multiple variables in multidimensional space.

Downloads

24

Readme

multivariate_calculus

CircleCI codecov

npm GitHub release (latest by date)

Typescript License

A zero dependency library that handles calculus of several variables in multidimensional space. It works with both TypeScript and JavaScript projects seamlessly. This library is so designed that you can write your mathematics code as you would do maths in pen and paper.

From version 1.0.0, the library is based completely on BigNum objects.

Installation

Browser

If you wish to work with this library in the browser, you can download it from here.

Once you have downloaded the file in you project folder, open up your index.html file and add the following line:

<script src="mcalc.js"></script>

To create a new constant scalar object you can say

const a = Scalar.constant(5);
print(a);

If you open up the developer console window in the browser you will be able to see what the object a looks like.


Node

JavaScript

For using this package in a nodejs environment, you first need to have Nodejs installed on your computer. Once that is done, open up your project directory and create an index.js file. At the top of the file copy the following line:

const mc = require("multivariate_calculus");

This will import all the modules, classes, functions and constants from the package under the name mc. If we try to recreate the same example from above, you would have to write

const a = mc.Scalar.constant(5);
mc.print(a);

You may also avoid having to write mc over and over again by modifying the import statement slightly

const { Scalar } = require("multivariate_calculus");

This way you need not use the namespace object to access the modules, classes, functions and constants. The code will look exactly like in the case of browser use.

TypeScript

Working in TypeScript is similar to working with plain JavaScript. However, before you can start writing your code using TypeScript you need to first make sure that it is installed. If you are unfamiliar with TypeScript check out their documentation here.

Once that is done you can now import stuff from this package by using just one line at the top of your .ts file. To recreate the above example in TypeScript:

import { Scalar, print } from "multivariate_calculus";

const a = Scalar.constant(5);
print(a);

The library now comes with cleaner global math functions which you can call with any object. You can even perform trigonometry on Scalar objects by calling the global functions

const x = Scalar.variable("x");
const y = sin(x);
print(y.at(new Map([
	[x, pi]
])));

Check out the documentation for further readings. If there are any issues or some changes you would like to see, file an issue. To check out the documentation of some previous version add the generic version number after the URL: https://terrible-coder.github.io/multivariate_calculus/0.2/.

You can now take a sneak peek into the upcoming features in the next release and their documentation by going to https://terrible-coder.github.io/multivariate_calculus/next/.