Skip to content

clojure.core/rationalize

View this page on ClojureDocs

Type: function Added: Clojure 1.0 Examples: 4 Runnable: 3
([num])

returns the rational value of num

Examples

by Miles on . May have evaluation errors.
by devn on
by Dimagog on
by mhmdsalem1993 on

Note by wikopl

Remember that for irrational numbers, like sqrt 2, this is only an estimate (pretty good one).


Content from the matching ClojureDocs page, with authors credited on each contribution.