We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d26f14 commit 81fb410Copy full SHA for 81fb410
base/math.jl
@@ -1057,6 +1057,12 @@ This function computes a floating point representation of the modulus after divi
1057
numerically exact `2π`, and is therefore not exactly the same as `mod(x,2π)`, which would
1058
compute the modulus of `x` relative to division by the floating-point number `2π`.
1059
1060
+!!! note
1061
+ Depending on the format of the input value, the closest representable value to 2π may
1062
+ be less than 2π. For example, the expression `mod2pi(2π)` will not return `0`, because
1063
+ the intermediate value of `2*π` is a `Float64` and `2*Float64(π) < 2*big(π)`. See
1064
+ [`rem2pi`](@ref) for more refined control of this behavior.
1065
+
1066
# Examples
1067
```jldoctest
1068
julia> mod2pi(9*pi/4)
0 commit comments