Skip to content

Commit

Permalink
changed infix to prefix documentation to comply with reST
Browse files Browse the repository at this point in the history
  • Loading branch information
bjarthur authored and jiahao committed Aug 19, 2014
1 parent 63023f6 commit dde1253
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 31 deletions.
55 changes: 26 additions & 29 deletions doc/stdlib/base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,10 @@ All Objects
-----------

.. function:: is(x, y) -> Bool
.. function:: x ≡ y -> Bool
===(x,y) -> Bool
≡(x,y) -> Bool

Determine whether ``x`` and ``y`` are identical, in the sense that no program could distinguish them. Compares mutable objects by address in memory, and compares immutable objects (such as numbers) by contents at the bit level. This function is sometimes called ``egal``. The ``===`` operator is an alias for this function.
Determine whether ``x`` and ``y`` are identical, in the sense that no program could distinguish them. Compares mutable objects by address in memory, and compares immutable objects (such as numbers) by contents at the bit level. This function is sometimes called ``egal``.

.. function:: isa(x, type) -> Bool

Expand Down Expand Up @@ -589,11 +590,10 @@ Iterable Collections
--------------------

.. function:: in(item, collection) -> Bool
.. function:: item in collection -> Bool
.. function:: item ∈ collection -> Bool
.. function:: collection ∋ item -> Bool
.. function:: item ∉ collection -> Bool
.. function:: collection ∌ item -> Bool
∈(item,collection) -> Bool
∋(collection,item) -> Bool
∉(item,collection) -> Bool
∌(collection,item) -> Bool

Determine whether an item is in the given collection, in the sense that it is
``==`` to one of the values generated by iterating over the collection.
Expand Down Expand Up @@ -912,9 +912,9 @@ Iterable Collections
Return an array of type ``Array{element_type,1}`` of all items in a collection.

.. function:: issubset(a, b)
.. function:: A ⊆ S -> Bool
.. function:: A ⊈ S -> Bool
.. function:: A ⊊ S -> Bool
⊆(A,S) -> Bool
⊈(A,S) -> Bool
⊊(A,S) -> Bool

Determine whether every element of ``a`` is also in ``b``, using the
``in`` function.
Expand Down Expand Up @@ -1056,7 +1056,7 @@ Set-Like Collections
Construct a sorted set of the integers generated by the given iterable object, or an empty set. Implemented as a bit string, and therefore designed for dense integer sets. Only non-negative integers can be stored. If the set will be sparse (for example holding a single very large integer), use ``Set`` instead.

.. function:: union(s1,s2...)
.. function:: s1 ∪ s2
∪(s1,s2)

Construct the union of two or more sets. Maintains order with arrays.

Expand All @@ -1065,7 +1065,7 @@ Set-Like Collections
Union each element of ``iterable`` into set ``s`` in-place.

.. function:: intersect(s1,s2...)
.. function:: s1 ∩ s2
∩(s1,s2)

Construct the intersection of two or more sets. Maintains order and multiplicity of the first argument for arrays and ranges.

Expand Down Expand Up @@ -1109,9 +1109,9 @@ Set-Like Collections
Intersects IntSets ``s1`` and ``s2`` and overwrites the set ``s1`` with the result. If needed, s1 will be expanded to the size of ``s2``.

.. function:: issubset(A, S) -> Bool
.. function:: A ⊆ S -> Bool
⊆(A,S) -> Bool

True if ``A ⊆ S`` (A is a subset of or equal to S)
True if A is a subset of or equal to S.

Fully implemented by: ``IntSet``, ``Set``.

Expand Down Expand Up @@ -2503,7 +2503,7 @@ Mathematical Operators
Element-wise exponentiation operator.

.. function:: div(a,b)
.. function:: a ÷ b
÷(a,b)

Compute a/b, truncating to an integer.

Expand Down Expand Up @@ -2616,21 +2616,21 @@ Mathematical Operators

.. _!=:
.. function:: !=(x, y)
.. function:: x ≠ y
≠(x,y)

Not-equals comparison operator. Always gives the opposite answer as ``==``.
New types should generally not implement this, and rely on the fallback
definition ``!=(x,y) = !(x==y)`` instead.

.. _===:
.. function:: ===(x, y)
.. function:: x ≡ y
≡(x,y)

See the :func:`is` operator

.. _!==:
.. function:: !==(x, y)
.. function:: x ≢ y
≢(x,y)

Equivalent to ``!is(x, y)``

Expand All @@ -2645,7 +2645,7 @@ Mathematical Operators

.. _<=:
.. function:: <=(x, y)
.. function:: x ≤ y
≤(x,y)

Less-than-or-equals comparison operator.

Expand All @@ -2657,7 +2657,7 @@ Mathematical Operators

.. _>=:
.. function:: >=(x, y)
.. function:: x ≥ y
≥(x,y)

Greater-than-or-equals comparison operator.

Expand All @@ -2668,7 +2668,7 @@ Mathematical Operators

.. _.!=:
.. function:: .!=(x, y)
.. function:: x .≠ y
.≠(x,y)

Element-wise not-equals comparison operator.

Expand All @@ -2679,7 +2679,7 @@ Mathematical Operators

.. _.<=:
.. function:: .<=(x, y)
.. function:: x .≤ y
.≤(x,y)

Element-wise less-than-or-equals comparison operator.

Expand All @@ -2690,7 +2690,7 @@ Mathematical Operators

.. _.>=:
.. function:: .>=(x, y)
.. function:: x .≥ y
.≥(x,y)

Element-wise greater-than-or-equals comparison operator.

Expand Down Expand Up @@ -3132,19 +3132,16 @@ Mathematical Functions
Return ``x`` with its sign flipped if ``y`` is negative. For example ``abs(x) = flipsign(x,x)``.

.. function:: sqrt(x)
.. function:: √x

Return :math:`\sqrt{x}`. Throws ``DomainError`` for negative ``Real`` arguments. Use complex negative arguments instead.
The prefix operator ```` is equivalent to ``sqrt``.
Return :math:`\sqrt{x}`. Throws ``DomainError`` for negative ``Real`` arguments. Use complex negative arguments instead. The prefix operator ```` is equivalent to ``sqrt``.

.. function:: isqrt(n)

Integer square root: the largest integer ``m`` such that ``m*m <= n``.

.. function:: cbrt(x)
.. function:: ∛x

Return :math:`x^{1/3}`. The prefix operator ```` is equivalent to ``cbrt``.
Return :math:`x^{1/3}`. The prefix operator ```` is equivalent to ``cbrt``.

.. function:: erf(x)

Expand Down Expand Up @@ -3665,7 +3662,7 @@ Numbers
Get the additive identity element for the type of x (x can also specify the type itself).

.. data:: pi
.. data:: π
π

The constant pi

Expand Down
4 changes: 2 additions & 2 deletions doc/stdlib/linalg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ Linear algebra functions in Julia are largely implemented by calling functions f
Matrix division using a polyalgorithm. For input matrices ``A`` and ``B``, the result ``X`` is such that ``A*X == B`` when ``A`` is square. The solver that is used depends upon the structure of ``A``. A direct solver is used for upper- or lower triangular ``A``. For Hermitian ``A`` (equivalent to symmetric ``A`` for non-complex ``A``) the ``BunchKaufman`` factorization is used. Otherwise an LU factorization is used. For rectangular ``A`` the result is the minimum-norm least squares solution computed by reducing ``A`` to bidiagonal form and solving the bidiagonal least squares problem. For sparse, square ``A`` the LU factorization (from UMFPACK) is used.

.. function:: dot(x, y)
.. function:: x ⋅ y
⋅(x,y)

Compute the dot product. For complex vectors, the first vector is conjugated.

.. function:: cross(x, y)
.. function:: x × y
×(x,y)

Compute the cross product of two 3-vectors.

Expand Down

0 comments on commit dde1253

Please sign in to comment.