{"id":15060976,"url":"https://github.com/ocaml/num","last_synced_at":"2026-03-05T04:34:19.636Z","repository":{"id":14383732,"uuid":"75940838","full_name":"ocaml/num","owner":"ocaml","description":"The legacy Num library for arbitrary-precision integer and rational arithmetic that used to be part of the OCaml core distribution","archived":false,"fork":false,"pushed_at":"2025-06-16T13:17:50.000Z","size":445,"stargazers_count":38,"open_issues_count":5,"forks_count":29,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-12-10T07:59:47.642Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ocaml.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-12-08T13:37:06.000Z","updated_at":"2025-06-16T13:16:41.000Z","dependencies_parsed_at":"2023-12-16T15:39:47.424Z","dependency_job_id":"fa467c3e-0c47-4f42-8bfc-1b6122eab683","html_url":"https://github.com/ocaml/num","commit_stats":{"total_commits":288,"total_committers":28,"mean_commits":"10.285714285714286","dds":0.6215277777777778,"last_synced_commit":"f06af1fda2e722542cc5f2d2d4d1f4441055a92f"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ocaml/num","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml%2Fnum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml%2Fnum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml%2Fnum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml%2Fnum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ocaml","download_url":"https://codeload.github.com/ocaml/num/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml%2Fnum/sbom","scorecard":{"id":701309,"data":{"date":"2025-08-11","repo":{"name":"github.com/ocaml/num","commit":"ad6a38b613d996262e6311d503dd8c53cc1a5075"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.3,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Code-Review","score":2,"reason":"Found 5/20 approved changesets -- score normalized to 2","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"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":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/ocaml/num/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/ocaml/num/ci.yml/master?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"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":"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":3,"reason":"3 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 3","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":"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":"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":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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 18 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-22T05:16:23.875Z","repository_id":14383732,"created_at":"2025-08-22T05:16:23.875Z","updated_at":"2025-08-22T05:16:23.875Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30110441,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T03:40:26.266Z","status":"ssl_error","status_checked_at":"2026-03-05T03:39:15.902Z","response_time":93,"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":[],"created_at":"2024-09-24T23:07:34.755Z","updated_at":"2026-03-05T04:34:19.598Z","avatar_url":"https://github.com/ocaml.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Num library for arithmetic on big integers and rationals\n\n## Overview\n\nThis library implements arbitrary-precision arithmetic on big integers and on rationals.  \n\nThis is a  legacy library.  It used to be part of the core OCaml distribution (in \u003ccode\u003eotherlibs/num\u003c/code\u003e) but is now distributed separately.  New applications that need arbitrary-precision arithmetic should use the Zarith library (https://github.com/ocaml/Zarith) instead of the Num library, and older applications that already use Num are encouraged to switch to Zarith.  Zarith delivers much better performance than Num and has a nicer API.\n\n## Usage\n\nTo use the bignum library from your programs, it is recommended to use ocamlfind:\n```\n    ocamlfind ocamlc -package num ...\n    ocamlfind ocamlopt -package num ...\n```\nAlternatively, you can do\n```\n    ocamlc \u003coptions\u003e nums.cma \u003c.cmo and .ml files\u003e\n    ocamlopt \u003coptions\u003e nums.cmxa \u003c.cmx and .ml files\u003e\n```\nFor toplevel use, just issue the commands\n```\n    #use \"topfind\";;\n    #package \"num\";;\n```\nor\n```\n    #load \"nums.cma\";;\n```\n\n## Documentation\n\nThe following modules are documented in their interfaces:\n\n* `Big_int`: operations on arbitrary-precision integers\n* `Num`: operations on arbitrary-precision numbers (integers and rationals)\n* `Arith_status`: flags that control rational arithmetic\n\nMore documentation on the functions provided in this library can be found in _The CAML Numbers Reference Manual_ by Valérie Ménissier-Morain, INRIA technical report 141, july 1992, http://hal.inria.fr/docs/00/07/00/27/PDF/RT-0141.pdf\n\n## Compilation and installation\n\nPrerequisites: OCaml version 4.04 or newer.\n```\n        make all PROFILE=release\n        make test\n        make install\n        make clean\n```\n\n## History\n\nThis library is derived from Valérie Ménissier-Morain's implementation of rational arithmetic for Caml V3.1.  Xavier Leroy did the Caml Light port.  Victor Manuel Gulias Fernandez did the initial Caml Special Light / OCaml port.  Pierre Weis did most of the maintenance and bug fixing.\n\nInitially, the low-level big integer operations were provided by the BigNum package developed by Bernard Serpette, Jean Vuillemin and Jean-Claude Hervé (INRIA and Digital PRL).  License issues forced us to replace the BigNum package.  The current implementation of low-level big integer operations is due to Xavier Leroy.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focaml%2Fnum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Focaml%2Fnum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focaml%2Fnum/lists"}