{"id":15636897,"url":"https://github.com/lucaferranti/forwardmodead","last_synced_at":"2026-02-02T19:34:20.117Z","repository":{"id":39584085,"uuid":"502027617","full_name":"lucaferranti/ForwardModeAD","owner":"lucaferranti","description":"forward mode automatic differentiation using dual numbers","archived":false,"fork":false,"pushed_at":"2024-05-23T08:00:24.000Z","size":87,"stargazers_count":3,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-03T05:37:20.313Z","etag":null,"topics":["automatic-differentiation","chapel","dual-numbers","numerics"],"latest_commit_sha":null,"homepage":"","language":"Chapel","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/lucaferranti.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-10T12:03:32.000Z","updated_at":"2024-09-28T12:25:31.000Z","dependencies_parsed_at":"2024-03-01T23:24:49.190Z","dependency_job_id":"1a498b34-3dca-40e2-926c-1218c3b42005","html_url":"https://github.com/lucaferranti/ForwardModeAD","commit_stats":{"total_commits":26,"total_committers":2,"mean_commits":13.0,"dds":"0.038461538461538436","last_synced_commit":"ed4fee1663046d16c73ee3ca4354c145cfc38fae"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/lucaferranti/ForwardModeAD","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucaferranti%2FForwardModeAD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucaferranti%2FForwardModeAD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucaferranti%2FForwardModeAD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucaferranti%2FForwardModeAD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucaferranti","download_url":"https://codeload.github.com/lucaferranti/ForwardModeAD/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucaferranti%2FForwardModeAD/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260769726,"owners_count":23060161,"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":["automatic-differentiation","chapel","dual-numbers","numerics"],"created_at":"2024-10-03T11:08:51.324Z","updated_at":"2026-02-02T19:34:15.086Z","avatar_url":"https://github.com/lucaferranti.png","language":"Chapel","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ForwardModeAD\n[![license: MIT][mit-img]](LICENSE)[![docs-dev][dev-img]][dev-url]![lifecycle](https://img.shields.io/badge/lifecycle-maturing-orange)\n\nLightweight library for forward-mode automatic differentiation using dual numbers and functions overloading.\nIt can compute the derivative, gradient and jacobian of any function, as long as it is written as a combination of [overloaded functions](https://forwardmodead.readthedocs.io/en/latest/api/overloaded.html).\n\nAs a showcase, in a few lines we can implement the Newton method for root finding.\n\n```chapel\nuse ForwardModeAD;\n\nproc f(x) {\n    return exp(-x) * sin(x) - log(x);\n}\n\nvar tol = 1e-6, // tolerance to find the root\n    cnt = 0, // to count number of iterations\n    x0 = initdual(0.5), // initial guess\n    valder = f(x0); // initial function value and derivative\n\nwhile abs(value(valder)) \u003e tol {\n    x0 -= value(valder) / derivative(valder);\n    valder = f(x0);\n    cnt += 1;\n    writeln(\"Iteration \", cnt, \" x = \", value(x0), \" residual = \", value(valder));\n}\n```\n\n### Installation\n\nIf you are writing you application with Mason, all you have to do is run\n\n```\nmason add ForwardModeAD\n```\n\nto add the library as dependency.\n\nTo use the library you will need to import it with\n\n```chapel\nuse ForwardModeAD;\n```\n\nand you are ready to go.\n\n### Documentation\n\n- [latest][dev-url] : documentation of the latest version on main\n\n### Contributing\n\nIf you encounter bugs or have feature requests, feel free to [open an issue](https://github.com/lucaferranti/ForwardModeAD/issues/new). Pull requests are also welcome. More details in the [contribution guidelines](https://forwardmodead.readthedocs.io/en/latest/contributing.html)\n\n### License\n\nMIT (c) Luca Ferranti\n\n[mit-img]: https://img.shields.io/badge/license-MIT-yellow.svg\n[dev-img]: https://img.shields.io/badge/docs-latest-blue.svg\n[dev-url]: https://forwardmodead.readthedocs.io\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucaferranti%2Fforwardmodead","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucaferranti%2Fforwardmodead","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucaferranti%2Fforwardmodead/lists"}