clojure/math.numeric-tower

Autodoc commit for master/8905024b

1 parent 9328fb8 commit 7f9b6703344d82395dba9a61ec1a47c3967aa179 Tom Faulhaber committed Jun 6, 2016
Showing with 31 additions and 19 deletions.
1. +6 −6 api-index.html
2. +12 −13 index-0.0.5.clj
3. +13 −0 index.html
12 api-index.html
 @@ -43,19 +43,19 @@

Index of Public Functions and Variables - Math functions 0.0.5 (in development)

This page has an alphabetical index of all the documented functions and variables -in Math functions. +in Math functions. - -
+

+

Shortcuts:
A B C D E F G H - I J K L + I J K L M
N O P Q
25 index-0.0.5.clj
 @@ -3,8 +3,7 @@ "Math functions that deal intelligently with the various\ntypes in Clojure's numeric tower, as well as math functions\ncommonly found in Scheme implementations.\n\nexpt - (expt x y) is x to the yth power, returns an exact number\n if the base is an exact number, and the power is an integer,\n otherwise returns a double.\nabs - (abs n) is the absolute value of n\ngcd - (gcd m n) returns the greatest common divisor of m and n\nlcm - (lcm m n) returns the least common multiple of m and n\n\nWhen floor, ceil, and round are passed doubles, we just defer to\nthe corresponding functions in Java's Math library. Java's\nbehavior is somewhat strange (floor and ceil return doubles rather\nthan integers, and round on large doubles yields spurious results)\nbut it seems best to match Java's semantics. On exact numbers\n(ratios and decimals), we can have cleaner semantics.\n\nfloor - (floor n) returns the greatest integer less than or equal to n.\n If n is an exact number, floor returns an integer,\n otherwise a double.\nceil - (ceil n) returns the least integer greater than or equal to n.\n If n is an exact number, ceil returns an integer,\n otherwise a double.\nround - (round n) rounds to the nearest integer.\n round always returns an integer. round rounds up for values\n exactly in between two integers.\n\n\nsqrt - Implements the sqrt behavior I'm accustomed to from PLT Scheme,\n specifically, if the input is an exact number, and is a square\n of an exact number, the output will be exact. The downside\n is that for the common case (inexact square root), some extra\n computation is done to look for an exact square root first.\n So if you need blazingly fast square root performance, and you\n know you're just going to need a double result, you're better\n off calling java's Math/sqrt, or alternatively, you could just\n convert your input to a double before calling this sqrt function.\n If Clojure ever gets complex numbers, then this function will\n need to be updated (so negative inputs yield complex outputs).\nexact-integer-sqrt - Implements a math function from the R6RS Scheme\n standard. (exact-integer-sqrt k) where k is a non-negative integer,\n returns [s r] where k = s^2+r and k < (s+1)^2. In other words, it\n returns the floor of the square root and the \"remainder\".", :author "Mark Engelberg", :name "clojure.math.numeric-tower", - :wiki-url - "http://clojure.github.com/math.numeric-tower/clojure.math.numeric-tower-api.html", + :wiki-url "http://clojure.github.io/math.numeric-tower/index.html", :source-url "https://github.com/clojure/math.numeric-tower/blob/46a91e50a1b8992300106f925d7474b9366e77f5/src/main/clojure/clojure/math/numeric_tower.clj"}), :vars @@ -20,7 +19,7 @@ :doc "(abs n) is the absolute value of n", :namespace "clojure.math.numeric-tower", :wiki-url - "http://clojure.github.com/math.numeric-tower//clojure.math.numeric-tower-api.html#clojure.math.numeric-tower/abs"} + "http://clojure.github.io/math.numeric-tower//index.html#clojure.math.numeric-tower/abs"} {:raw-source-url "https://github.com/clojure/math.numeric-tower/raw/46a91e50a1b8992300106f925d7474b9366e77f5/src/main/clojure/clojure/math/numeric_tower.clj", :name "exact-integer-sqrt", @@ -34,7 +33,7 @@ "(exact-integer-sqrt n) expects a non-negative integer n, and returns [s r] where n = s^2+r and n < (s+1)^2. In other words, it returns the floor of the square root and the 'remainder'.\nFor example, (exact-integer-sqrt 15) is [3 6] because 15 = 3^2+6.", :namespace "clojure.math.numeric-tower", :wiki-url - "http://clojure.github.com/math.numeric-tower//clojure.math.numeric-tower-api.html#clojure.math.numeric-tower/exact-integer-sqrt"} + "http://clojure.github.io/math.numeric-tower//index.html#clojure.math.numeric-tower/exact-integer-sqrt"} {:raw-source-url "https://github.com/clojure/math.numeric-tower/raw/46a91e50a1b8992300106f925d7474b9366e77f5/src/main/clojure/clojure/math/numeric_tower.clj", :name "expt", @@ -48,7 +47,7 @@ "(expt base pow) is base to the pow power.\nReturns an exact number if the base is an exact number and the power is an integer, otherwise returns a double.", :namespace "clojure.math.numeric-tower", :wiki-url - "http://clojure.github.com/math.numeric-tower//clojure.math.numeric-tower-api.html#clojure.math.numeric-tower/expt"} + "http://clojure.github.io/math.numeric-tower//index.html#clojure.math.numeric-tower/expt"} {:raw-source-url "https://github.com/clojure/math.numeric-tower/raw/46a91e50a1b8992300106f925d7474b9366e77f5/src/main/clojure/clojure/math/numeric_tower.clj", :name "gcd", @@ -61,7 +60,7 @@ :doc "(gcd a b) returns the greatest common divisor of a and b", :namespace "clojure.math.numeric-tower", :wiki-url - "http://clojure.github.com/math.numeric-tower//clojure.math.numeric-tower-api.html#clojure.math.numeric-tower/gcd"} + "http://clojure.github.io/math.numeric-tower//index.html#clojure.math.numeric-tower/gcd"} {:raw-source-url "https://github.com/clojure/math.numeric-tower/raw/46a91e50a1b8992300106f925d7474b9366e77f5/src/main/clojure/clojure/math/numeric_tower.clj", :name "lcm", @@ -74,7 +73,7 @@ :doc "(lcm a b) returns the least common multiple of a and b", :namespace "clojure.math.numeric-tower", :wiki-url - "http://clojure.github.com/math.numeric-tower//clojure.math.numeric-tower-api.html#clojure.math.numeric-tower/lcm"} + "http://clojure.github.io/math.numeric-tower//index.html#clojure.math.numeric-tower/lcm"} {:raw-source-url "https://github.com/clojure/math.numeric-tower/raw/46a91e50a1b8992300106f925d7474b9366e77f5/src/main/clojure/clojure/math/numeric_tower.clj", :name "MathFunctions", @@ -87,15 +86,15 @@ :doc nil, :namespace "clojure.math.numeric-tower", :wiki-url - "http://clojure.github.com/math.numeric-tower//clojure.math.numeric-tower-api.html#clojure.math.numeric-tower/MathFunctions"} + "http://clojure.github.io/math.numeric-tower//index.html#clojure.math.numeric-tower/MathFunctions"} {:name "ceil", :doc "(ceil n) returns the least integer greater than or equal to n.\nIf n is an exact number, ceil returns an integer, otherwise a double.", :var-type "function", :namespace "clojure.math.numeric-tower", :arglists ([n]), :wiki-url - "http://clojure.github.com/math.numeric-tower//clojure.math.numeric-tower-api.html#clojure.math.numeric-tower/ceil", + "http://clojure.github.io/math.numeric-tower//index.html#clojure.math.numeric-tower/ceil", :source-url nil, :raw-source-url nil, :file nil} @@ -106,7 +105,7 @@ :namespace "clojure.math.numeric-tower", :arglists ([n]), :wiki-url - "http://clojure.github.com/math.numeric-tower//clojure.math.numeric-tower-api.html#clojure.math.numeric-tower/floor", + "http://clojure.github.io/math.numeric-tower//index.html#clojure.math.numeric-tower/floor", :source-url nil, :raw-source-url nil, :file nil} @@ -116,7 +115,7 @@ :namespace "clojure.math.numeric-tower", :arglists ([n]), :wiki-url - "http://clojure.github.com/math.numeric-tower//clojure.math.numeric-tower-api.html#clojure.math.numeric-tower/integer-length", + "http://clojure.github.io/math.numeric-tower//index.html#clojure.math.numeric-tower/integer-length", :source-url nil, :raw-source-url nil, :file nil} @@ -127,7 +126,7 @@ :namespace "clojure.math.numeric-tower", :arglists ([n]), :wiki-url - "http://clojure.github.com/math.numeric-tower//clojure.math.numeric-tower-api.html#clojure.math.numeric-tower/round", + "http://clojure.github.io/math.numeric-tower//index.html#clojure.math.numeric-tower/round", :source-url nil, :raw-source-url nil, :file nil} @@ -137,7 +136,7 @@ :namespace "clojure.math.numeric-tower", :arglists ([n]), :wiki-url - "http://clojure.github.com/math.numeric-tower//clojure.math.numeric-tower-api.html#clojure.math.numeric-tower/sqrt", + "http://clojure.github.io/math.numeric-tower//index.html#clojure.math.numeric-tower/sqrt", :source-url nil, :raw-source-url nil, :file nil})}
13 index.html
 @@ -82,6 +82,9 @@

lcm +
+ +
@@ -159,6 +162,7 @@

ceil

(ceil n) returns the least integer greater than or equal to n.
If n is an exact number, ceil returns an integer, otherwise a double.
+

@@ -170,6 +174,7 @@

floor

(floor n) returns the greatest integer less than or equal to n.
If n is an exact number, floor returns an integer, otherwise a double.
+

@@ -180,6 +185,7 @@

integer-length

Usage: (integer-length n)
Length of integer in binary
+

@@ -191,6 +197,7 @@

round

(round n) rounds to the nearest integer.
round always returns an integer.  Rounds up for values exactly in between two integers.
+

@@ -201,6 +208,7 @@

sqrt

Usage: (sqrt n)
Square root, but returns exact number if possible.
+

@@ -222,6 +230,7 @@

abs

Usage: (abs n)
(abs n) is the absolute value of n
+

Source
@@ -234,6 +243,7 @@

exact-integer-sqrt

(exact-integer-sqrt n) expects a non-negative integer n, and returns [s r] where n = s^2+r and n < (s+1)^2.  In other words, it returns the floor of the square root and the 'remainder'.
For example, (exact-integer-sqrt 15) is [3 6] because 15 = 3^2+6.
+

Source
@@ -246,6 +256,7 @@

expt

(expt base pow) is base to the pow power.
Returns an exact number if the base is an exact number and the power is an integer, otherwise returns a double.
+

Source
@@ -257,6 +268,7 @@

gcd

Usage: (gcd a b)
(gcd a b) returns the greatest common divisor of a and b
+

Source
@@ -268,6 +280,7 @@

lcm

Usage: (lcm a b)
(lcm a b) returns the least common multiple of a and b
+

Source