{"id":14995757,"url":"https://github.com/helehex/moplex","last_synced_at":"2025-09-25T15:31:27.061Z","repository":{"id":209404587,"uuid":"723972203","full_name":"helehex/moplex","owner":"helehex","description":"Generalized complex numbers","archived":false,"fork":false,"pushed_at":"2024-09-13T01:36:46.000Z","size":7056,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-24T16:22:46.357Z","etag":null,"topics":["complex","dual","hybrid","mojo","numbers","perplex"],"latest_commit_sha":null,"homepage":"","language":"Mojo","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/helehex.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-11-27T06:12:15.000Z","updated_at":"2024-09-13T01:36:50.000Z","dependencies_parsed_at":"2023-11-27T07:28:59.275Z","dependency_job_id":"92750673-aeee-472c-a4a2-39a975117b23","html_url":"https://github.com/helehex/moplex","commit_stats":null,"previous_names":["helehex/moplex"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helehex%2Fmoplex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helehex%2Fmoplex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helehex%2Fmoplex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helehex%2Fmoplex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/helehex","download_url":"https://codeload.github.com/helehex/moplex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234207712,"owners_count":18796300,"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","dual","hybrid","mojo","numbers","perplex"],"created_at":"2024-09-24T16:19:47.747Z","updated_at":"2025-09-25T15:31:21.663Z","avatar_url":"https://github.com/helehex.png","language":"Mojo","funding_links":[],"categories":["Scientific Computation"],"sub_categories":[],"readme":"# Moplex🔥\nGeneralized Complex Numbers for Mojo🔥\n\nMojo version: `24.5.0`\n\nMoplex provides generalized complex numbers for the mojo programming language.\n\nComplex numbers have a real and imaginary part which can be added, multiplied, exponentiated, and more.\n\n`5 + 4i`\n\nThe imaginary part multiplied by itself is -1\n\n`i*i = -1`\n\n# Generalized Complex\n\nMoplex also has **Dualplex** numbers (also called dual numbers), and **Hyperplex** numbers (also called split numbers)\n\nIn Moplex, all three of these type are considered the `unital hybrids`, and the imaginary part is considered the `antiox`\n\nThey are similar to complex, in that the antiox also squares to a real number:\n\nDualplex numbers, written like `3+1o`, has an antiox that squares to zero -\u003e `o*o = 0`\n\nHyperplex numbers, written like `1+2x`, have an antiox that squares to one -\u003e `x*x = 1`\n\n\n\nYou can even make a number with an antiox that squares to any real by parameterizing the `Hybrid` type.\n\nThis looks like: `HybridInt[-2](0,1)`, which squares to `-2`\n\n# Multiplex\n\nWhen adding two HybridSIMD types with differing antiox squares, it will result in a **Multiplex** type\n\nExample: `(1 + 1i) + (2 + 2o) = (3 + 1i + 2o)` \n\n# Using in Mojo\n\nto import and use a type, you can do:\n\n```mojo\nfrom moplex import *\nfrom moplex import i, o, x\n\nprint(Complex64(-1,-2) ** i)\nprint(Dualplex64(1,1) + o)\nprint(Hyperplex64(8,6) * x)\nprint(Complex64(-1,-2) + Dualplex64(1,1) + Hyperplex64(8,6))\n```\n\nYou can also import just the antiox parts, but this is not ideal as some people like using single letter variables for other things.  \nAlso, they dont sum together yet due to them being HybridIntLiteral type. (only MultiplexSIMD for now)  \nThis may change with future updates.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelehex%2Fmoplex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelehex%2Fmoplex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelehex%2Fmoplex/lists"}