{"id":22382434,"url":"https://github.com/jcoreio/ulp","last_synced_at":"2025-07-31T03:31:49.415Z","repository":{"id":57385506,"uuid":"80775513","full_name":"jcoreio/ulp","owner":"jcoreio","description":"Math.nextAfter, Math.nextDown, Math.nextUp, Math.ulp in javascript","archived":false,"fork":false,"pushed_at":"2017-10-07T21:41:22.000Z","size":99,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-09T14:50:22.295Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/jcoreio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-02T22:37:37.000Z","updated_at":"2024-08-07T09:04:10.000Z","dependencies_parsed_at":"2022-09-06T08:51:35.261Z","dependency_job_id":null,"html_url":"https://github.com/jcoreio/ulp","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcoreio%2Fulp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcoreio%2Fulp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcoreio%2Fulp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcoreio%2Fulp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcoreio","download_url":"https://codeload.github.com/jcoreio/ulp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228209939,"owners_count":17885595,"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":[],"created_at":"2024-12-05T00:13:00.024Z","updated_at":"2024-12-05T00:13:00.542Z","avatar_url":"https://github.com/jcoreio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ulp\n\n[![Build Status](https://travis-ci.org/jcoreio/ulp.svg?branch=master)](https://travis-ci.org/jcoreio/ulp)\n[![Coverage Status](https://coveralls.io/repos/github/jcoreio/ulp/badge.svg?branch=master)](https://coveralls.io/github/jcoreio/ulp?branch=master)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n\nMath.nextDown, Math.nextUp, Math.ulp in javascript (from https://gist.github.com/Yaffle/4654250)\n\n## `nextUp(x: number): number`\n\nReturns the smallest floating-point number greater than `x`.\n**Denormalized values may not be supported.**\n\n```js\nvar nextUp = require('ulp').nextUp\nnextUp(1) // 1.0000000000000002\n```\n\n## `nextDown(x: number): number`\n\nReturns the largest floating-point number less than `x`.\n**Denormalized values may not be supported.**\n\n```js\nvar nextDown = require('ulp').nextDown\nnextDown(1) // 0.9999999999999999\n```\n\n## `ulp(x: number): number`\n\nReturns the unit in the last place of `x`.\n**Denormalized values may not be supported.**\n\n```js\nvar ulp = require('ulp').ulp\nulp(1) // 1.1102230246251565e-16\n```\n\n## `monkeypatch(): void`\n\nMonkeypatches `nextUp`, `nextDown`, and `ulp` onto `Math`.\n\n```js\nrequire('ulp').monkeypatch()\nMath.nextUp(1) // 1.0000000000000002\nMath.nextDown(1) // 0.9999999999999999\nMath.ulp(1) // 1.1102230246251565e-16\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcoreio%2Fulp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcoreio%2Fulp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcoreio%2Fulp/lists"}