{"id":27636246,"url":"https://github.com/omdxp/complex","last_synced_at":"2025-06-30T21:30:55.439Z","repository":{"id":58735332,"uuid":"533441663","full_name":"omdxp/complex","owner":"omdxp","description":"crate for complex numbers","archived":false,"fork":false,"pushed_at":"2022-09-06T19:26:20.000Z","size":5,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-31T15:30:00.389Z","etag":null,"topics":["complex-numbers"],"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/omdxp.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":"2022-09-06T17:53:54.000Z","updated_at":"2023-05-04T11:53:10.000Z","dependencies_parsed_at":"2022-09-07T14:41:26.830Z","dependency_job_id":null,"html_url":"https://github.com/omdxp/complex","commit_stats":null,"previous_names":["omar-belghaouti/complex"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omdxp%2Fcomplex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omdxp%2Fcomplex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omdxp%2Fcomplex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omdxp%2Fcomplex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omdxp","download_url":"https://codeload.github.com/omdxp/complex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250510410,"owners_count":21442605,"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":["complex-numbers"],"created_at":"2025-04-23T20:33:52.235Z","updated_at":"2025-04-23T20:33:52.765Z","avatar_url":"https://github.com/omdxp.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# complex\n\nA complex number library for Rust.\n\n## Usage\n\nAdd this to your Cargo.toml:\n\n```toml\n[dependencies]\nxcomplex = \"0.1.0\"\n```\n\nOr run:\n\n```sh\ncargo add xcomplex\n```\n\n## Examples\n\n```rs\nuse std::f64::consts::PI;\nuse xcomplex::number::Complex;\nlet c = Complex::new(1.0, 2.0);\nlet d = Complex::new(3.0, 4.0);\nassert_eq!(c + d, Complex::new(4.0, 6.0));\nassert_eq!(c * d, Complex::new(-5.0, 10.0));\nassert_eq!(c - d, Complex::new(-2.0, -2.0));\nassert_eq!(c / d, Complex::new(0.44, 0.08));\nassert_eq!(c.norm(), 2.23606797749979);\nassert_eq!(c.arg(), 1.1071487177940904);\nassert_eq!(c.conj(), Complex::new(1.0, -2.0));\nassert_eq!(c.exp(), Complex::new(-1.1312043837568135, 2.4717266720048188));\nassert_eq!(c.powf(PI), Complex::new(-11.826467250438055, -4.138504280918663));\nassert_eq!(c.powi(2), Complex::new(-3.0, 4.000000000000002));\nassert_eq!(c.powc(Complex::new(2.0, 3.0)), Complex::new(-7.041080062171126, -7.259799175444256));\nassert_eq!(c.ln(), Complex::new(0.8047189562170503, 1.1071487177940904));\nassert_eq!(c.sqrt(), Complex::new(1.272019649514069, 0.7861513777574233));\n```\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomdxp%2Fcomplex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomdxp%2Fcomplex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomdxp%2Fcomplex/lists"}