{"id":20629774,"url":"https://github.com/pb2204/advanced-math","last_synced_at":"2025-10-16T00:31:54.782Z","repository":{"id":198339355,"uuid":"700701580","full_name":"PB2204/Advanced-Math","owner":"PB2204","description":"Advanced Mathematical Operations Library for JavaScript","archived":false,"fork":false,"pushed_at":"2023-10-23T20:33:59.000Z","size":5141,"stargazers_count":24,"open_issues_count":3,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T18:18:08.312Z","etag":null,"topics":["collaborate","communityexchange","ghdesktop","github","github-campus-experts","github-codespaces","github-pages","gitkraken","gitlens","hacktoberfest","hacktoberfest-accepted","jetbrains","learn","microsoft","microsoftvisualstudio","student-vscode"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/adv-math","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PB2204.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-05T06:01:16.000Z","updated_at":"2024-09-13T18:43:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"214336ef-dc13-4959-beb8-f0562da031bf","html_url":"https://github.com/PB2204/Advanced-Math","commit_stats":null,"previous_names":["pb2204/advanced-math"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PB2204%2FAdvanced-Math","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PB2204%2FAdvanced-Math/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PB2204%2FAdvanced-Math/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PB2204%2FAdvanced-Math/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PB2204","download_url":"https://codeload.github.com/PB2204/Advanced-Math/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249125998,"owners_count":21216705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["collaborate","communityexchange","ghdesktop","github","github-campus-experts","github-codespaces","github-pages","gitkraken","gitlens","hacktoberfest","hacktoberfest-accepted","jetbrains","learn","microsoft","microsoftvisualstudio","student-vscode"],"created_at":"2024-11-16T14:06:00.748Z","updated_at":"2025-10-16T00:31:49.725Z","avatar_url":"https://github.com/PB2204.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advanced Math (adv-math)\n\nAdvanced Mathematical Operations Library for JavaScript\n\n- [Description](#description)\n- [Installation](#installation)\n  - [NPM](#npm-installation)\n  - [Yarn](#yarn-installation)\n- [Motive](#motive)\n- [Practical Usage](#practical-usage)\n- [Example Usage](#example-usage)\n  - [BasicMath](#basicmath)\n  - [ComplexNumber](#complexnumber)\n  - [Matrix](#matrix)\n  - [Vector](#vector)\n  - [Statistics](#statistics)\n  - [Geometry](#geometry)\n  - [Trigonometry](#trigonometry)\n  - [Calculus](#calculus)\n  - [Financial](#financial)\n  - [Units](#units)\n  - [Equations](#equations)\n  - [Parser](#parser)\n  - [Random](#random)\n  - [Expression Evaluator](#expression-evaluator)\n- [License](#license)\n- [Code of Conduct](#code-of-conduct)\n- [Contributing](#contributing)\n- [Learn More](#learn-more)\n- [Developer Details](#developer-details)\n- [Happy Coding](#happy-coding)\n\n\n## Description\n\n`adv-math` is a comprehensive JavaScript library that simplifies advanced mathematical calculations, covering a wide range of mathematical topics such as basic arithmetic, complex numbers, linear algebra, statistics, geometry, trigonometry, calculus, financial calculations, units and conversions, equation solvers, and math expression parsing. This library is designed to provide developers with powerful mathematical tools for various applications.\n\n**New Feature:**\n- Added `Expression Evaluator` for evaluating complex mathematical expressions. See [Expression Evaluator](#expression-evaluator) below for details.\n\n\n## Installation\n\n### NPM Installation\n\nYou can install `adv-math` using NPM:\n\n```bash\nnpm install adv-math\n```\n\n### Yarn Installation\n\nAlternatively, you can install it using Yarn:\n\n```bash\nyarn add adv-math\n```\n\n\n## Motive\n\nThe primary motive of this project is to simplify complex mathematical operations for developers, researchers, and students. It aims to provide a user-friendly, efficient, and well-documented library for performing advanced mathematical calculations in JavaScript.\n\n\n## Practical Usage\n\n`adv-math` can be used in a wide range of practical scenarios, including but not limited to:\n\n- Scientific research and analysis\n- Engineering and physics simulations\n- Financial modeling and analysis\n- Game development for physics and mathematics-based simulations\n- Educational applications for teaching and learning mathematics\n- Data analysis and statistics\n- Geometric calculations for graphics and CAD applications\n- Solving equations and parsing mathematical expressions\n\n\n## Example Usage\n\nHere's an overview of how to use some of the key modules in Advanced Math:\n### BasicMath\n\n```javascript\nconst { BasicMath } = require('adv-math');\n\nconst sum = BasicMath.add(5, 3); // 8\nconst product = BasicMath.multiply(4, 6); // 24\n```\n\n### ComplexNumber\n\n```javascript\nconst { ComplexNumber } = require('adv-math');\n\nconst num1 = new ComplexNumber(2, 3);\nconst num2 = new ComplexNumber(1, -1);\n\nconst result = ComplexNumber.add(num1, num2); // (3, 2)\n```\n\n### Matrix\n\n```javascript\nconst { Matrix } = require('adv-math');\n\nconst matrix1 = new Matrix([[1, 2], [3, 4]]);\nconst matrix2 = new Matrix([[5, 6], [7, 8]]);\n\nconst product = matrix1.multiply(matrix2); // [[19, 22], [43, 50]]\n```\n\n### Vector\n\n```javascript\nconst { Vector } = require('adv-math');\n\nconst vector1 = new Vector([1, 2, 3]);\nconst vector2 = new Vector([4, 5, 6]);\n\nconst dotProduct = Vector.dot(vector1, vector2); // 32\n```\n\n### Statistics\n\n```javascript\nconst { Statistics } = require('adv-math');\n\nconst data = [2, 4, 6, 8, 10];\nconst mean = Statistics.mean(data); // 6\nconst variance = Statistics.variance(data); // 8\n```\n\n### Geometry\n\n```javascript\nconst { Geometry } = require('adv-math');\n\nconst area = Geometry.calculateArea(5); // Calculate the area of a circle with radius 5\nconst perimeter = Geometry.calculatePerimeter(7); // Calculate the perimeter of a rectangle with width 7\n```\n\n### Trigonometry\n\n```javascript\nconst { Trigonometry } = require('adv-math');\n\nconst sine = Trigonometry.sin(30); // Calculate the sine of 30 degrees\nconst cosine = Trigonometry.cos(45); // Calculate the cosine of 45 degrees\n```\n\n### Calculus\n\n```javascript\nconst { Calculus } = require('adv-math');\n\nconst derivative = Calculus.derivative('2 * x^2 + 3 * x', 'x'); // Calculate the derivative of the function\nconst integral = Calculus.integral('4 * x^3 + 2 * x', 'x'); // Calculate the integral of the function\n```\n\n### Financial\n\n```javascript\nconst { Financial } = require('adv-math');\n\nconst futureValue = Financial.futureValue(1000, 0.05, 5); // Calculate the future value of an investment\nconst presentValue = Financial.presentValue(1500, 0.08, 3); // Calculate the present value of a sum of money\n```\n\n### Units\n\n```javascript\nconst { Units } = require('adv-math');\n\nconst metersToFeet = Units.convert(5, 'meters', 'feet'); // Convert 5 meters to feet\nconst poundsToKilograms = Units.convert(150, 'pounds', 'kilograms'); // Convert 150 pounds to kilograms\n```\n\n### Equations\n\n```javascript\nconst { Equations } = require('adv-math');\n\nconst root = Equations.solveQuadratic(1, -3, 2); // Solve the quadratic equation x^2 - 3x + 2 = 0\n```\n\n### Parser\n\n```javascript\nconst { Parser } = require('adv-math');\n\nconst expression = '2 + 3 * (4 - 1)';\nconst result = Parser.parseExpression(expression); // Parse and evaluate the expression\n```\n\n### Random\n\n```javascript\nconst { Random } = require('adv-math');\n\nconst randomInteger = Random.randomInt(1, 10); // Generate a random integer between 1 and 10\nconst randomFloat = Random.randomFloat(0, 1); // Generate a random floating-point number between 0 and 1\n```\n\n### Expression Evaluator\n\n```javascript\nconst { ExpressionEvaluator } = require('adv-math');\n\nconst expression = '2 + 3 * (4 - 1)';\nconst result = ExpressionEvaluator.evaluateExpression(expression); // Evaluate the mathematical expression\nconsole.log('Result:', result); // Output: 11\n```\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n\n## Code of Conduct\n\nPlease read our [Code of Conduct](CODE_OF_CONDUCT.md) to understand the standards and expectations for participating in this community.\n\n\n## Contributing\n\nWe welcome contributions! Please check our [Contributing Guidelines](CONTRIBUTING.md) for details on how to contribute to this project.\n\n\n## Learn More\n\nFor detailed documentation and usage examples, visit our [documentation](docs/).\n\n\n## Developer Details\n\n- **Author:** [Pabitra Banerjee](https://pabitrabanerjee.me)\n- **Email:** [Pabitra Banerjee](mailto:rockstarpabitra2204@gmail.com)\n- **GitHub:** [PB2204](https://github.com/PB2204)\n\n\n## Happy Coding 🚀\n\nWe hope you find `adv-math` useful for your mathematical projects and applications. Happy coding!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpb2204%2Fadvanced-math","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpb2204%2Fadvanced-math","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpb2204%2Fadvanced-math/lists"}