{"id":24641059,"url":"https://github.com/mfm-347/mathematiqs","last_synced_at":"2026-02-21T04:32:19.531Z","repository":{"id":274164293,"uuid":"922083692","full_name":"MFM-347/Mathematiqs","owner":"MFM-347","description":"Mathematiqs is a robust TypeScript library offering a comprehensive suite of mathematical functions","archived":false,"fork":false,"pushed_at":"2025-03-11T12:40:16.000Z","size":69,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T11:48:50.371Z","etag":null,"topics":["calculator","cli","logarithms","math-cli","maths","mfm3478","npm-package","trignometry","typescript","typescript-library"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/MFM-347.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-25T09:18:22.000Z","updated_at":"2025-03-11T12:40:19.000Z","dependencies_parsed_at":"2025-01-25T11:24:47.902Z","dependency_job_id":"417d89d1-81c6-46b7-9716-6e5dab090c71","html_url":"https://github.com/MFM-347/Mathematiqs","commit_stats":null,"previous_names":["mfm-347/maths"],"tags_count":0,"template":false,"template_full_name":"MFM-347/RepoLate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MFM-347%2FMathematiqs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MFM-347%2FMathematiqs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MFM-347%2FMathematiqs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MFM-347%2FMathematiqs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MFM-347","download_url":"https://codeload.github.com/MFM-347/Mathematiqs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244609431,"owners_count":20480782,"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":["calculator","cli","logarithms","math-cli","maths","mfm3478","npm-package","trignometry","typescript","typescript-library"],"created_at":"2025-01-25T12:12:06.511Z","updated_at":"2025-03-20T11:48:55.597Z","avatar_url":"https://github.com/MFM-347.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mathematiqs\n\n[![Version](https://img.shields.io/npm/v/mathematiqs.svg?style=for-the-badge)](https://www.npmjs.com/package/mathematiqs)\n[![Downloads](https://img.shields.io/npm/dm/mathematiqs.svg?style=for-the-badge)](https://www.npmjs.com/package/mathematiqs)\n[![Number of GitHub contributors](https://img.shields.io/github/contributors/MFM-347/Mathematiqs?style=for-the-badge)](https://github.com/MFM-347/Mathematiqs/graphs/contributors)\n[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/MFM-347/Mathematiqs?style=for-the-badge)](https://github.com/MFM-347/Mathematiqs/)\n[![Number of GitHub stars](https://img.shields.io/github/stars/MFM-347/Mathematiqs?style=for-the-badge)](https://github.com/MFM-347/Mathematiqs/stargazers)\n[![License MIT](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](https://github.com/MFM-347/Mathematiqs/blob/main/LICENSE)\n\nMathematiqs is a robust TypeScript library offering a comprehensive suite of mathematical functions suitable for both browser and Node.js environments. It encompasses a wide array of operations, including basic arithmetic, trigonometry, logarithms, and more. Additionally, it features a command-line interface (CLI) for the convenient evaluation of expressions.\n\n## What's New\n\n- Added proper error handling and parameter checks\n- Fixed some functions\n- Renamed `crt` to `nthRoot`\n\n## Features\n\n- **Comprehensive Mathematical Functions:**\n\n  - **Basic Operations:** `add`, `subtract`, `multiply`, `divide`, `mod`\n  - **Exponential \u0026 Root Functions:** `pow`, `sqrt`, `cbrt`, `crt`\n  - **Logarithmic Functions:** `log`, `log10`\n  - **Trigonometric Functions:** `sin`, `cos`, `tan`, `cosec`, `sec`, `cot`\n  - **Angle Conversion:** `toRad`, `toDeg`\n  - **Number Theory:** `gcd`, `primeFactors`, `lcm`, `isPrime`, `isEven`, `isOdd`, `factorial`\n  - **Statistical Functions:** `median`, `avg`\n  - **Rounding \u0026 Absolute Values:** `round`, `abs`\n  - **Randomization:** `random`\n\n- **Command-Line Interface (CLI):** Evaluate mathematical expressions directly from the terminal for quick computations.\n- **Full TypeScript Support:** Includes type definitions to ensure seamless integration and development.\n- **Lightweight and Efficient:** Designed to be fast with minimal dependencies, making it suitable for various applications.\n\n## Installation\n\nTo install the package, use npm:\n\n```bash\nnpm install mathematiqs\n```\n\nOr, if you prefer using yarn:\n\n```bash\nyarn add mathematiqs\n```\n\n## Usage\n\n### Importing the Library\n\nImport the desired functions into your TypeScript project as follows:\n\n```typescript\nimport { add, subtract, multiply, divide } from 'mathematiqs'\n```\n\n### Example Usage\n\n```typescript\nconsole.log(add(1, 2)) // Output: 3\nconsole.log(multiply(4, 5)) // Output: 20\nconsole.log(sin(Math.PI / 2)) // Output: 1\n```\n\n### CLI Usage\n\nAfter installation, you can use the Mathematiqs CLI to evaluate mathematical expressions directly from your terminal.\n\n1. **Install Globally (Optional):**\n\n   ```bash\n   npm install -g mathematiqs\n   ```\n\n2. **Evaluate Expressions:**\n\n   ```bash\n   maths add(1, 4);    // Output: Result: 5\n   maths sqrt(16);     // Output: Result: 4\n   ```\n\n### Available Operations\n\n- **Basic Math:** `add(a, b)`, `subtract(a, b)`, `multiply(a, b)`, `divide(a, b)`\n- **Trigonometry:** `sin(x)`, `cos(x)`, `tan(x)`, `cosec(x)`, `sec(x)`, `cot(x)`\n- **Logarithms:** `log(x)`, `log10(x)`\n- **Other Functions:** `sqrt(x)`, `pow(x, y)`, `round(x)`, `random()`, `toRad(x)`, `toDeg(x)`, `fact(x)`\n\n## Frequently Asked Questions\n\n**Q1: Is Mathematiqs suitable for both client-side and server-side applications?**\n\nYes, Mathematiqs is designed to work seamlessly in both browser and Node.js environments, making it versatile for various applications.\n\n**Q2: Does Mathematiqs support TypeScript?**\n\nAbsolutely. Mathematiqs is built with full TypeScript support, including comprehensive type definitions to enhance the development experience.\n\n**Q3: How can I contribute to the Mathematiqs library?**\n\nWe appreciate contributions from the community. Please check our [CONTRIBUTING.md](https://github.com/MFM-347/Mathematiqs/blob/main/CONTRIBUTING.md) file for detailed guidelines on how to contribute.\n\n**Q4: Is there a command-line interface available for Mathematiqs?**\n\nYes, Mathematiqs offers a CLI that allows you to evaluate mathematical expressions directly from your terminal. This can be particularly useful for quick calculations and scripting.\n\n## Contributing\n\nWe welcome contributions! Please refer to the [CONTRIBUTING.md](https://github.com/MFM-347/Mathematiqs/blob/main/CONTRIBUTING.md) for guidelines.\n\n## Credits\n\nThis library is maintained by [@MFM-347](https://github.com/mfm-347).\n\n## License\n\nThe code in this repository is licensed under the **MIT License**. View more information [here](https://github.com/MFM-347/Mathematiqs/blob/main/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfm-347%2Fmathematiqs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmfm-347%2Fmathematiqs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfm-347%2Fmathematiqs/lists"}