Skip to content

Commit

Permalink
Hopefully imporved the documentation on mod2pi
Browse files Browse the repository at this point in the history
  • Loading branch information
ivarne committed Jan 26, 2014
1 parent 9bd4618 commit d7c11da
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions doc/stdlib/base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2071,10 +2071,12 @@ Mathematical Operators

Modulus after division by 2pi, returning in the range [0,2pi).

This function computes a floating point representation of the modulus after
division by numerically exact 2pi, and is therefore not exactly the same as
mod(x,2pi), which would compute the modulus of x relative to division by the
floating-point number 2pi.
This function is more accurate than mod(x,2pi) for large x, because it uses
a more accurate value for ``2pi`` than the ``Float64`` approximation.
Real numbers in a computer is usually an approximation, and the inaccuracy
in the argument will propagate to the answer. There are no ``Float64`` values
that return exactly ``0.0``, because of the funny relation where
``2pi < 2*BigFloat(pi)``.

.. function:: rem(x, m)

Expand Down

0 comments on commit d7c11da

Please sign in to comment.