This namespace provides a number of functions and constructors for working with ratios in Clojure and ClojureScript.
[[clojure.lang.Ratio]] is native in Clojure. The ClojureScript implementation uses Fraction.js.
For other numeric extensions, see [[emmy.numbers]]
and emmy.complex
.
This namespace provides a number of functions and constructors for working with ratios in Clojure and ClojureScript. [[clojure.lang.Ratio]] is native in Clojure. The ClojureScript implementation uses [Fraction.js](https://github.com/infusion/Fraction.js/). For other numeric extensions, see [[emmy.numbers]] and [[emmy.complex]].
(parse-ratio x)
Parser for the #emmy/ratio
literal.
Parser for the `#emmy/ratio` literal.
(rationalize x)
(rationalize n d)
Construct a ratio.
Construct a ratio.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close