{"id":26285482,"url":"https://github.com/howion/lambert-w-function","last_synced_at":"2025-05-07T14:27:09.373Z","repository":{"id":35019226,"uuid":"197191016","full_name":"howion/lambert-w-function","owner":"howion","description":"A JavaScript implementation for the Lambert W Function on the principal branch.","archived":false,"fork":false,"pushed_at":"2022-04-10T16:34:55.000Z","size":50,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-20T05:17:56.907Z","etag":null,"topics":["javascript","lambert","library","math","mathematics","typescript"],"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/howion.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":"2019-07-16T12:36:03.000Z","updated_at":"2024-12-25T12:19:24.000Z","dependencies_parsed_at":"2022-08-08T04:00:29.350Z","dependency_job_id":null,"html_url":"https://github.com/howion/lambert-w-function","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howion%2Flambert-w-function","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howion%2Flambert-w-function/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howion%2Flambert-w-function/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howion%2Flambert-w-function/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/howion","download_url":"https://codeload.github.com/howion/lambert-w-function/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252894306,"owners_count":21820955,"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":["javascript","lambert","library","math","mathematics","typescript"],"created_at":"2025-03-14T19:32:34.526Z","updated_at":"2025-05-07T14:27:09.344Z","avatar_url":"https://github.com/howion.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lambert-w-function\n\n[![GitHub last commit](https://img.shields.io/github/last-commit/howion/lambert-w-function)](https://github.com/howion/lambert-w-function/commits/master)\n[![npm](https://img.shields.io/npm/v/lambert-w-function)](https://www.npmjs.com/package/lambert-w-function)\n[![npm](https://img.shields.io/npm/dt/lambert-w-function?label=npm%20downloads)](https://www.npmjs.com/package/lambert-w-function)\n[![npm](https://img.shields.io/npm/dw/lambert-w-function?label=npm%20downloads%20weekly)](https://www.npmjs.com/package/lambert-w-function)\n[![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/npm/lambert-w-function)](https://www.npmjs.com/package/lambert-w-function)\n[![License](https://img.shields.io/npm/l/lambert-w-function)](https://github.com/howion/lambert-w-function/blob/master/LICENSE)\n\nThis is a JavaScript implementation for the [**Lambert W Function**](https://en.wikipedia.org/wiki/Lambert_W_function), which is also known as **Omega Function**, on the principal branch `W_0`.\n\nPlease note that this library **does not** support **complex** numbers and only supports the **principal branch**.\n\n## Installation\n\nFrom [**npm**](https://www.npmjs.com/package/lambert-w-function) via npm\n\n```bash\nnpm install lambert-w-function\n```\n\nor via yarn\n\n```bash\nyarn add lambert-w-function\n```\n\n## Import\n\nFor CommonJS\n\n```js\nconst {\n    lambertW0, // same as lambertW0_IaconoBoyd\n    lambertW0_IaconoBoyd,\n    lambertW0Log, // same as lambertW0Log_xmodar\n    lambertW0Log_xmodar,\n    lambertW0_SimpleIteration_LT_E,\n    lambertW0_SimpleIteration_GT_E,\n    W0_LIMIT_POINT\n} = require('lambert-w-function')\n```\n\notherwise\n\n```js\nimport { ... } from 'lambert-w-function'\n```\n\n## Usage / Documentation\n\n```js\n// A good approximation with a maximum relative error 5E-3\n// Same as lambertW0Log(x) if is_x_log set to true.\n// -\n// See: https://gist.github.com/xmodar/baa392fc2bec447d10c2c20bbdcaf687\n// See: https://link.springer.com/content/pdf/10.1007/s10444-017-9530-3.pdf\nlambertW0(x: number, is_x_log = false): number\n\n// Computes W(y) where y of the form log(x)\n// -\n// See: https://gist.github.com/xmodar/baa392fc2bec447d10c2c20bbdcaf687\nlambertW0Log(logX: number): number\n\n// Approximates W(X) with a straightforward algoritm for x \u003c= E (respectively\n// x \u003e E) but it is highly recommended to use lambertW0 instead.\n// -\n// See: https://doi.org/10.1145%2F258726.258783\nlambertW0_SimpleIteration_LT_E(x: number, iterations = 10): number\nlambertW0_SimpleIteration_GT_E(x: number, iterations = 10): number\n```\n\nYou can check out the [**Desmos Demo**](https://www.desmos.com/calculator/rhbaludwth) to preview simple iteration algorithm up to 20 iterations.\n\n## License\n\nThis project is licensed under the [**MIT**](https://github.com/howion/lambert-w-function/blob/master/LICENSE) license so that you can just do whatever you want with it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhowion%2Flambert-w-function","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhowion%2Flambert-w-function","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhowion%2Flambert-w-function/lists"}