{"id":25083831,"url":"https://github.com/tsmith023/rusty-rootsearch","last_synced_at":"2025-04-01T11:35:24.812Z","repository":{"id":161119691,"uuid":"623574857","full_name":"tsmith023/rusty-rootsearch","owner":"tsmith023","description":"A WIP library for performing multi-root searching of one-dimensional transcendental equations using auto-differentiation in Rust","archived":false,"fork":false,"pushed_at":"2024-04-06T10:59:21.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-08T01:16:26.429Z","etag":null,"topics":["auto-differentiation","newtons-method","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/tsmith023.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":"2023-04-04T16:39:02.000Z","updated_at":"2023-07-30T21:06:44.000Z","dependencies_parsed_at":"2025-02-07T06:29:28.429Z","dependency_job_id":"97e9c7b4-c034-4bfc-9f9f-18385dd14af1","html_url":"https://github.com/tsmith023/rusty-rootsearch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsmith023%2Frusty-rootsearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsmith023%2Frusty-rootsearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsmith023%2Frusty-rootsearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsmith023%2Frusty-rootsearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsmith023","download_url":"https://codeload.github.com/tsmith023/rusty-rootsearch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246634706,"owners_count":20809288,"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":["auto-differentiation","newtons-method","rust"],"created_at":"2025-02-07T06:29:23.327Z","updated_at":"2025-04-01T11:35:24.805Z","avatar_url":"https://github.com/tsmith023.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rusty-rootsearch\n\nThis is a small Rust-package that performs Newton's method for finding the roots of a function using the method of bisections.\n\nIt stands completely on the shoulders of the [num_dual](https://docs.rs/num-dual/latest/num_dual/) crate that implements\nauto-differentation for floating point numbers.\n\nIn an effort to generalise the implementation, the traits `Derivable` and `Coercable` are defined that allow the user to\ndefine their own types that can be used within the `root_search`, `newton`, and `find_bisections` functions. The `Derivable` trait is used to\ndefine the derivative of a number, which in the current implementation works well with the `num_dual` crate. The `Coercable`\ntrait is used to convert a floating point number into the type that is derivable. This is useful for example when using\nthe `f64` type, which is not derivable, but can be converted to a `Dual` type exposed by the `num_dual` crate.\n\n## Example\n\n```rust\nuse rusty_rootsearch::{root_search};\nuse num_dual::*;\n\nfn find_sine_roots() {\n    fn sine\u003cD: DualNum\u003cf32\u003e\u003e(x: D) -\u003e D {\n        x.sin()\n    }\n    let roots = root_search::\u003c_,Dual32,f32\u003e(\u0026sine, -5.0, 5.0, 2000, 1000, 0.0001);\n    for root in \u0026roots.0 {\n        println!(\"root: {}\", root);\n    }\n    assert_eq!(roots.0.len(), 3);\n    assert!(roots.0.contains(\u0026std::f32::consts::PI));\n    assert!(roots.0.contains(\u0026(-std::f32::consts::PI)));\n    assert!(roots.0.contains(\u00260.0));\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsmith023%2Frusty-rootsearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsmith023%2Frusty-rootsearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsmith023%2Frusty-rootsearch/lists"}