{"id":18854402,"url":"https://github.com/urbanjost/m_factor","last_synced_at":"2026-02-04T01:42:06.888Z","repository":{"id":117558003,"uuid":"352488278","full_name":"urbanjost/M_factor","owner":"urbanjost","description":"Factors of whole numbers","archived":false,"fork":false,"pushed_at":"2024-03-29T03:40:57.000Z","size":1762,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-30T18:28:41.124Z","etag":null,"topics":["factor","fortran","fortran-package-manager","fpm","prime-factorisation","prime-factorization"],"latest_commit_sha":null,"homepage":"","language":"Fortran","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/urbanjost.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":"2021-03-29T02:06:24.000Z","updated_at":"2023-03-18T16:49:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"d6effc92-ea1e-4fd4-8ef1-7d1ca8cf549a","html_url":"https://github.com/urbanjost/M_factor","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"c4cdb091a3c9ebe7ff66cc9f55234555fe47a5e6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urbanjost%2FM_factor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urbanjost%2FM_factor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urbanjost%2FM_factor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urbanjost%2FM_factor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/urbanjost","download_url":"https://codeload.github.com/urbanjost/M_factor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239793065,"owners_count":19697893,"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":["factor","fortran","fortran-package-manager","fpm","prime-factorisation","prime-factorization"],"created_at":"2024-11-08T03:48:07.683Z","updated_at":"2026-02-04T01:42:06.824Z","avatar_url":"https://github.com/urbanjost.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ![M_factor](docs/images/factor.gif)\n# M_factor\n\n   This is a growing collection of Fortran procedures related to\n   factorization of integers and polynomials, and prime factorization.\n\n## Introduction\n\n   Division is basically the reverse operation of multiplication. But\n   it gets a little more difficult when your factors can only be whole\n   numbers.\n\n   The factors are any of the numbers (or symbols) that form a product\n   when multiplied together.\n\n   So, for example an **Integer Factor** is one of two or more integers\n   that can be exactly divided into another integer.\n\n   Another equivalent way to define \"factor\" is that it is quantity\n   which is multiplied by another quantity.\n\n   This is in contrast to statistics, where a factor can mean any\n   independent variable.\n\n   There are a few basic example programs included as well ...\n\n   + **lcm**      - display least common multiple of a list of whole numbers\n   + **factors**  - display prime factors of numbers\n   + **gcd**      - display greatest common divisor of a list of whole numbers\n   \n   All the procedures are gathered into the Fortran module M_factor.f90. So\n   far ...\n\n## Name\n  M_factor(3fm) - module for least common multiple, greatest\n  common divisor, and prime factors\n\n## Synopsis\n```text\n       use M_factor, only : least_common_multiple, greatest_common_divisor\n       use M_factor, only : prime_factors, i_is_prime\n```\n+ least_common_multiple\n\n    Least common multiple of two integers or vector m(:), matrix m(:,:)\n    or cuboid m(:, :, :)\n\n+ greatest_common_divisor\n\n    greatest common divisor of two integers or vector m(:), matrix m(:,:)\n    or cuboid m(:, :, :)\n\n+ prime_factors\n\n    decompose a number into its prime factors\n\n+ i_is_prime\n\n    Determine if a number is prime using Sieve of Erasthosthenes\n\n## Description\n  This module is a collection of procedures that perform common functions\n  found in arithmetic and number theory such as Least Common Multiples,\n  Greatest Common Divisors, and Prime Factors of INTEGER variables.\n  The INTEGER values are typically limited to values up to the magnitude\n  (2**31)-1= 2147483647.\n\n## Examples\n  The individual man(1) pages for each procedure contain examples and\n  a full description of the procedure parameters.\n\n---\n![gmake](docs/images/gnu.gif)\n---\n## Building the Module using make(1)\n     git clone https://github.com/urbanjost/M_factor.git\n     cd M_factor/src\n     # change Makefile if not using one of the listed compilers\n     \n     # for gfortran\n     make clean\n     make F90=gfortran gfortran\n     \n     # for ifort\n     make clean\n     make F90=ifort ifort\n\n     # for nvfortran\n     make clean\n     make F90=nvfortran nvfortran\n\nThis will compile the Fortran module and basic example\nprogram that exercise the routine.\n\n---\n![-](docs/images/fpm_logo.gif)\n---\n## Build and Test with FPM\n\n   Alternatively, download the github repository and build it with\n   fpm ( as described at [Fortran Package Manager](https://github.com/fortran-lang/fpm) )\n\n   ```bash\n        git clone https://github.com/urbanjost/M_factor.git\n        cd M_factor\n        fpm run \"*\"\n        fpm run --example \"*\"\n        fpm test\n   ```\n\n   or just list it as a dependency in your fpm.toml project file.\n\n```toml\n        [dependencies]\n        M_factor        = { git = \"https://github.com/urbanjost/M_factor.git\" }\n```\n---\n![docs](docs/images/docs.gif)\n---\n## Documentation\n\n### User\n   - A single page that uses javascript to combine all the HTML\n     descriptions of the man-pages is at \n     [BOOK_M_factor](https://urbanjost.github.io/M_factor/BOOK_M_factor.html).\n\n   - a simple index to the man-pages in HTML form for the\n   [routines](https://urbanjost.github.io/M_factor/man3.html) \n   and [programs](https://urbanjost.github.io/M_factor/man1.html) \n\n   - ![man-pages](docs/images/manpages.gif)\n     There are man-pages in the repository download in the docs/ directory\n     that may be installed on ULS (Unix-Like Systems).\n\n      + [manpages.zip](https://urbanjost.github.io/M_factor/manpages.zip)\n      + [manpages.tgz](https://urbanjost.github.io/M_factor/manpages.tgz)\n\n   - [CHANGELOG](docs/CHANGELOG.md) provides a history of significant changes\n\n### Developer\n   - [ford(1) output](https://urbanjost.github.io/M_factor/fpm-ford/index.html).\n\u003c!--\n   - [doxygen(1) output](https://urbanjost.github.io/M_factor/doxygen_out/html/index.html).\n--\u003e\n   - [github action status](docs/STATUS.md) \n---\n![-](docs/images/ref.gif)\n---\n## Pedigree\n\n## References\n\n   * [Wikipedia - Factorization](https://en.wikipedia.org/wiki/Factorization)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furbanjost%2Fm_factor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Furbanjost%2Fm_factor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furbanjost%2Fm_factor/lists"}