{"id":13936876,"url":"https://github.com/thoppe/python-hyperoperators","last_synced_at":"2026-02-02T01:37:23.574Z","repository":{"id":62569983,"uuid":"51085353","full_name":"thoppe/python-hyperoperators","owner":"thoppe","description":"Python library for representing really, really, ridiculously large numbers.","archived":false,"fork":false,"pushed_at":"2023-12-04T03:35:38.000Z","size":3744,"stargazers_count":68,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-25T04:54:25.237Z","etag":null,"topics":["hyperoperation","python","tetration"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thoppe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-02-04T15:37:03.000Z","updated_at":"2025-08-11T13:06:49.000Z","dependencies_parsed_at":"2024-05-02T23:03:07.616Z","dependency_job_id":"01186e2a-ef11-4601-b7e5-04edd400c4e6","html_url":"https://github.com/thoppe/python-hyperoperators","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/thoppe/python-hyperoperators","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoppe%2Fpython-hyperoperators","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoppe%2Fpython-hyperoperators/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoppe%2Fpython-hyperoperators/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoppe%2Fpython-hyperoperators/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thoppe","download_url":"https://codeload.github.com/thoppe/python-hyperoperators/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoppe%2Fpython-hyperoperators/sbom","scorecard":{"id":882860,"data":{"date":"2025-08-11","repo":{"name":"github.com/thoppe/python-hyperoperators","commit":"58595be87039e5df55110e265f8f9d2dbf31b686"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":1,"reason":"Found 2/19 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T08:53:13.341Z","repository_id":62569983,"created_at":"2025-08-24T08:53:13.341Z","updated_at":"2025-08-24T08:53:13.341Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28999917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T01:32:03.847Z","status":"ssl_error","status_checked_at":"2026-02-02T01:32:03.458Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["hyperoperation","python","tetration"],"created_at":"2024-08-07T23:03:04.777Z","updated_at":"2026-02-02T01:37:23.559Z","avatar_url":"https://github.com/thoppe.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Hyperoperators\n\n[![Build Status](https://travis-ci.org/thoppe/python-hyperoperators.svg?branch=master)](https://travis-ci.org/thoppe/python-hyperoperators)\n[![Coverage Status](https://coveralls.io/repos/github/thoppe/python-hyperoperators/badge.svg?branch=master)](https://coveralls.io/github/thoppe/python-hyperoperators?branch=master)\n[![PyPI version](https://badge.fury.io/py/hyperop.svg)](https://badge.fury.io/py/hyperop)\n  \n`hyperop` is a small library for representing really, really, ridiculously large numbers in pure python. It does so using [hyperoperations](https://en.wikipedia.org/wiki/Hyperoperation).\n\n+ Hyperoperation 0, `H0` is the [successor function](https://en.wikipedia.org/wiki/Successor_function), `H0(None, 4) = 5`\n+ `H1` is [addition](https://en.wikipedia.org/wiki/Addition), `H1(2,4) = 2 + (1+1+1+1) = 6`\n+ `H2` is [multiplication](https://en.wikipedia.org/wiki/Multiplication) (repeated addition), `H2(2,4) = 2+2+2+2 = 8`\n+ `H3` is [exponentiation](https://en.wikipedia.org/wiki/Exponentiation) (repeated multiplication), `H3(2,4) = 2*2*2*2 = 16`\n+ `H4` is [tetration](https://en.wikipedia.org/wiki/Tetration) (repeated exponentiation) `H4(2,4) = 2^(2^(2^(2))) = 65536`\n+ ...\n+ Hyperoperation n is repeated Hyperoperation (n-1)\n\n\nFundamentally, hyperop works recursively by applying a [fold-right](https://en.wikipedia.org/wiki/Fold_(higher-order_function)) operation:\n  \n    H[n](x,y) = reduce(lambda x,y: H[n-1](y,x), [a,]*b)\n\n\n### Installation\n\n    pip install hyperop\n\nTo install the latest version use:\n\n    pip install git+https://github.com/thoppe/python-hyperoperators\n\n### Examples\n\n``` python\nfrom hyperop import hyperop\n\nH1 = hyperop(1)\nprint(H1(2,3), H1(3,2), H1(5,4))\n# \u003e\u003e 5, 5, 9\n\nH3 = hyperop(3)\nprint(H3(2,3), H3(3,2), H3(5,4))\n# \u003e\u003e 8, 9, 625\n\nfrom math import log\nH = hyperop(4)\nprint(H(2,5))\n\u003e\u003e\u003e 200352993040684646497....45587895905719156736\n\nprint(log(log(log(log(H(2,5),2.0),2.0),2.0),2.0) == 2)\n\u003e\u003e\u003e True  \n```\n  \nApproximate infinite tetration. Show that sqrt(2)^sqrt(2)^... where the tower continues an infinite amount of times is 2.\n\n``` python\nH4 = hyperop(4)\nprint(H4(2**0.5, 200))\n# \u003e\u003e 2.0\n```\n  \n\nCalculate the incomprehensibly large, but finite [Graham's number](https://en.wikipedia.org/wiki/Graham%27s_number):\n\n``` python\ndef GrahamsNumber():\n    # This may take awhile...\n    g = 4\n    for n in range(1,64+1):\n        g = hyperop(g+2)(3,3)\n    return g\n```\n  \nPlot the phase angle on the complex plane over tetrating four times `H4(z,4)`\n\n``` python\nfrom hyperop import hyperop\nimport mpmath\n\nH = hyperop(4)\nf = lambda z: H(z,4)\nmpmath.cplot(f, verbose=True, points=100000)\n```\n\n![Complex tetration plot](figures/tetration_example.png)\n\n### Bounded hyperoperators\n\nSometimes, especially in the case of small complex numbers, you only care about numbers that stay bounded during the calculation.\nThat is, you'd only like to keep the result for some bound z such that `H[n](a,b) \u003c= z`.\nThe class `bounded_hyperop` does just that:\n\n``` python\nfrom hyperop import bounded_hyperop\nHb = bounded_hyperop(4, bound=1000)\nprint(Hb(2,3), Hb(2,4))\n# \u003e\u003e 16 inf\n``` \n \n### Caveats\n  \nHigher order hyperoperations (from tetration and above) are _not_ associative, thus tetration `H4(2,4) = 2^(2^(2^(2))) = 65536` is not `H4(2,4) != 2^(2*2*2) = 256`.\n\nSince tetration is not defined for non-integral heights, the second argument of tetration and both arguments of pentation and above are restricted to non-negative integer values.\n\n### Talks \u0026 Press\n\n![python weekly](figures/python_weekly.png)\n    \nHyperop was featured in issue #231 of [Python Weekly](http://us2.campaign-archive2.com/?u=e2e180baf855ac797ef407fc7\u0026id=39cb63fa64)!\n    \nThis library was first presented at DC's Hack \u0026\u0026 Tell (Feb. 2016). [Talk link.](http://thoppe.github.io/python-hyperoperators/HnT_pres.html#/)\n\n# License\n\nThis work is licensed under a \u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by-sa/4.0/\"\u003eCreative Commons Attribution-ShareAlike 4.0 International License\u003c/a\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoppe%2Fpython-hyperoperators","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthoppe%2Fpython-hyperoperators","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoppe%2Fpython-hyperoperators/lists"}