MarufHasan24 / mathlib

A dynamic library of math
https://marufhasan24.github.io/mathlib_wiki/
MIT License
4 stars 4 forks source link
hacktoberfest hacktoberfest2023 hacktoberfest23 javascript math mathematics mathlib mathlib-n nodejs open-source open-source-contributions

MathLib-n: A Powerful Node.js Math Library

MathLib-n is a versatile Node.js library that empowers your applications with a rich set of mathematical functions and utilities. It simplifies common mathematical operations, making it an indispensable addition to your Node.js projects for everyday problem-solving.

Version

MathLib-n is your trusted math companion, ready to tackle a wide range of everyday challenges, including:

These are just a glimpse of the library's capabilities, as it offers over 100 features and constants, including built-in Math object functions.

Installation

You can effortlessly install MathLib-n using npm, yarn, or bower:

npm install mathlib-n

or

yarn add mathlib-n

or

bower install mathlib-n

Getting Started

Once MathLib-n is in your project, you can dive into its capabilities like this:

// Import the MathLib-n module
const mathlib = require("mathlib-n");

// Example usage of MathLib-n functions
const sum = mathlib.add(5, 3); // Returns 8
const product = mathlib.mul(4, 2); // Returns 8
const difference = mathlib.sub(5, 3); // Returns 2
const quotient = mathlib.div(4, 2); // Returns 2

// Explore other powerful functions offered by MathLib-n

Key Functions

Here's a taste of the functions provided by MathLib-n:

In total, MathLib-n boasts over 130 functions and constants to elevate your mathematical endeavors.

Explore the API

For an in-depth look at the available functions and comprehensive usage guidelines, refer to the API Documentation.

Examples

We've included a set of usage examples in the test folder. To run these examples, simply execute the following command:

npm run examples --prefix node_modules/mathlib-n

License

MathLib-n is released under the MIT License. For full details, check out the LICENSE file.

Get in Touch

If you have questions, bug reports, feature requests, or need general assistance, don't hesitate to reach out at gamerid703@gmail.com, or create an issue on the GitHub repository.

Troubleshooting

Fixing Memory Issues

Ensure you avoid using synchronous loops like for or while loops with asynchronous memo(). Doing so can lead to memory issues. If you encounter memory problems, you can resolve them using the following command:

npm run fix-memo --prefix node_modules/mathlib-n

This command includes a helpful animation that provides insights into your current mode, status, and the number of records and trashes. You can skip the animation by pressing ctrl + c (Windows) or cmd + c (Mac).

Switching Modes

MathLib-n offers two modes: "science" and "fix" (abbreviated as sci and fix). You can also specify the number of decimal places with the "status" parameter.

To switch modes, use this command:

npm run modechanger --prefix node_modules/mathlib-n

Alternatively, you can change the mode programmatically:

const mathlib = require("mathlib-n");
mathlib.getmode(); // Get the current mode
mathlib.setmode("fix", 2); // Set the mode to "fix" with 2 decimal places

Again, the command includes an informative animation that you can skip if needed.

Stay Informed

For a detailed version history and updates, refer to the npm History section.

Keywords

Documentation

For extensive documentation, visit the MathLib-n Documentation.

Additional Notes:

Version History

Current Version: 4.0.31-beta

For a complete version history, refer to the History page.

This revised documentation aims to provide clarity and enhance the overall presentation of your MathLib-n library. Feel free to customize it further to match your preferences.