{"id":15010249,"url":"https://github.com/clojure/math.numeric-tower","last_synced_at":"2025-05-16T02:09:52.679Z","repository":{"id":57739107,"uuid":"2124501","full_name":"clojure/math.numeric-tower","owner":"clojure","description":"Math functions that deal intelligently with the various types in Clojure's numeric tower","archived":false,"fork":false,"pushed_at":"2024-07-15T17:57:24.000Z","size":69,"stargazers_count":175,"open_issues_count":0,"forks_count":14,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-04-01T10:15:28.742Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clojure.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2011-07-29T15:26:24.000Z","updated_at":"2024-05-21T08:06:39.000Z","dependencies_parsed_at":"2024-02-19T21:25:25.829Z","dependency_job_id":"037e614f-a409-4130-848f-9bfa153bebe7","html_url":"https://github.com/clojure/math.numeric-tower","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojure%2Fmath.numeric-tower","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojure%2Fmath.numeric-tower/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojure%2Fmath.numeric-tower/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojure%2Fmath.numeric-tower/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clojure","download_url":"https://codeload.github.com/clojure/math.numeric-tower/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247838444,"owners_count":21004580,"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":[],"created_at":"2024-09-24T19:33:04.623Z","updated_at":"2025-04-08T12:07:46.481Z","avatar_url":"https://github.com/clojure.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"clojure.math.numeric-tower\n========================================\n\nFormerly clojure.contrib.math\n\nMath functions that deal intelligently with the various\ntypes in Clojure's numeric tower, as well as math functions\ncommonly found in Scheme implementations.\n\nFunctions included:\n\n* (expt x y) - x to the yth power\n\n* (abs n) - absolute value of n\n\n* (gcd m n) - greatest common divisor of m and n\n\n* (lcm m n) - least common multiple of m and n\n\n* (floor x) - round down\n\n* (ceil x) - round up\n\n* (round x) - round to nearest\n\n* (sqrt x) - square root, exact if possible\n\n* (exact-integer-sqrt k) returns floor of square root and the \"remainder\"\n\nMore documentation in docstrings.\n\nReleases and Dependency Information\n========================================\n\nLatest stable release: 0.0.5\n\n* [All Released Versions](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.clojure%22%20AND%20a%3A%22math.numeric-tower%22)\n\n* [Development Snapshot Versions](https://oss.sonatype.org/index.html#nexus-search;gav~org.clojure~math.numeric-tower~~~)\n\n[CLI/`deps.edn`](https://clojure.org/reference/deps_and_cli) dependency information:\n```clojure\norg.clojure/math.numeric-tower {:mvn/version \"0.0.5\"}\n```\n\n[Leiningen](https://github.com/technomancy/leiningen) dependency information:\n\n```clojure\n[org.clojure/math.numeric-tower \"0.0.5\"]\n```\n\n[Maven](https://maven.apache.org/) dependency information:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.clojure\u003c/groupId\u003e\n  \u003cartifactId\u003emath.numeric-tower\u003c/artifactId\u003e\n  \u003cversion\u003e0.0.5\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nExample Usage\n========================================\n\n```clojure\n(ns example.core\n  (:require [clojure.math.numeric-tower :as math]))\n\n(defn- sqr\n  \"Uses the numeric tower expt to square a number\"\n  [x]\n  (math/expt x 2))\n\n(defn euclidean-squared-distance\n  \"Computes the Euclidean squared distance between two sequences\"\n  [a b]\n  (reduce + (map (comp sqr -) a b)))\n\n(defn euclidean-distance\n  \"Computes the Euclidean distance between two sequences\"\n  [a b]\n  (math/sqrt (euclidean-squared-distance a b)))\n\n(let [a [1 2 3 5 8 13 21]\n      b [0 2 4 6 8 10 12]]\n  (euclidean-distance a b))\n\n;;=\u003e 9.643650760992955\n```\n\nRefer to docstrings in the `clojure.math.numeric-tower` namespace for\nadditional documentation.\n\n[API Documentation](https://clojure.github.io/math.numeric-tower/)\n\nDeveloper Information\n========================================\n\n* [GitHub project](https://github.com/clojure/math.numeric-tower)\n* [Bug Tracker](https://clojure.atlassian.net/browse/MTOWER)\n* [Continuous Integration](https://github.com/clojure/math.numeric-tower/actions/workflows/test.yml)\n\n\nChangelog\n========================================\n\n* Release 0.0.5 on 2021-12-01\n  * Exclude abs to avoid future warning in 1.11\n\n* Release 0.0.4 on 2014-01-16\n  * Adjust return type of expt to match base when power is 0.\n\t  * (expt 3M 0) -\u003e 1M\n\t  * (expt 3N 0) -\u003e 1N\n\n* Release 0.0.3 on 2013-12-29\n  * Minor improvement to sqrt of ratio.\n\n* Release 0.0.2 on 2012-11-23\n  * Added type hints to remove some reflective calls.\n\n* Release 0.0.1 on 2011-10-15\n  * Initial release.\n  * Source-compatible with clojure.contrib.math, except for the name change.\n\nLicense\n========================================\n\nDistributed under the Eclipse Public License, the same as Clojure.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclojure%2Fmath.numeric-tower","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclojure%2Fmath.numeric-tower","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclojure%2Fmath.numeric-tower/lists"}