{"id":19560639,"url":"https://github.com/zoubin/math-hacker","last_synced_at":"2026-06-15T15:31:54.413Z","repository":{"id":57292343,"uuid":"43963282","full_name":"zoubin/math-hacker","owner":"zoubin","description":"Library to hack native Math","archived":false,"fork":false,"pushed_at":"2015-10-09T16:32:49.000Z","size":140,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-25T03:55:40.722Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/zoubin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-09T15:13:05.000Z","updated_at":"2016-02-22T02:40:59.000Z","dependencies_parsed_at":"2022-08-27T12:20:52.536Z","dependency_job_id":null,"html_url":"https://github.com/zoubin/math-hacker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zoubin/math-hacker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fmath-hacker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fmath-hacker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fmath-hacker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fmath-hacker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoubin","download_url":"https://codeload.github.com/zoubin/math-hacker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fmath-hacker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34369840,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-11T05:08:21.298Z","updated_at":"2026-06-15T15:31:54.367Z","avatar_url":"https://github.com/zoubin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# math-hacker\nLibrary to hack native Math\n\n[![npm](https://nodei.co/npm/math-hacker.png?downloads=true)](https://www.npmjs.org/package/math-hacker)\n\n[![version](https://img.shields.io/npm/v/math-hacker.svg)](https://www.npmjs.org/package/math-hacker)\n[![status](https://travis-ci.org/zoubin/math-hacker.svg?branch=master)](https://travis-ci.org/zoubin/math-hacker)\n[![devDependencies](https://david-dm.org/zoubin/math-hacker/dev-status.svg)](https://david-dm.org/zoubin/math-hacker#info=devDependencies)\n\n# API\n\n```javascript\nvar math = require('math-hacker')\n\n```\n\n## math.precision(num)\n\n```javascript\nmath.precision(0) // 0\nmath.precision(0.1) // 1\n\n```\n\n## math.add(a, b)\n\n```javascript\nmath.add(1, 2)\n// 3\n\nmath.add(0.34, 0.01)\n// 0.35\n// In chrome 45.0.2454.99, 0.34 + 0.01 will output 0.35000000000000003\n\nmath.add(1.1111, -1.11)\n// 0.0011\n// In chrome 45.0.2454.99, 1.1111 - 1.11 will output 0.0010999999999998789\n\n```\n\n## math.toFixed(num, precision)\n\n```javascript\nmath.toFixed(2.385, 2)\n// \"2.39\"\n// In chrome 45.0.2454.99, (2.385).toFixed(2) will output \"2.38\"\n\nmath.toFixed(2.384, 2)\n// \"2.38\"\n\nmath.toFixed(2, 2)\n// \"2.00\"\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoubin%2Fmath-hacker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoubin%2Fmath-hacker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoubin%2Fmath-hacker/lists"}