Skip to content

Commit

Permalink
Misc doc improvements (#28719)
Browse files Browse the repository at this point in the history
* doc: remove unused file.

* doc: improve docstring of at-big_str

* doc: fix some broken links

(cherry picked from commit dbcc152)
  • Loading branch information
fredrikekre authored and KristofferC committed Feb 11, 2019
1 parent d7153f9 commit 1241889
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 49 deletions.
15 changes: 12 additions & 3 deletions base/int.jl
Original file line number Diff line number Diff line change
Expand Up @@ -579,9 +579,18 @@ end
@big_str str
@big_str(str)
`@big_str` parses a string into a BigInt
Throws an `ArgumentError` if the string is not a valid integer
Removes all underscores `_` from the string
Parse a string into a [`BigInt`](@ref) or [`BigFloat`](@ref),
and throw an `ArgumentError` if the string is not a valid number.
For integers `_` is allowed in the string as a separator.
# Examples
```jldoctest
julia> big"123_456"
123456
julia> big"7891.5"
7.8915e+03
```
"""
macro big_str(s)
if '_' in s
Expand Down
16 changes: 9 additions & 7 deletions doc/src/base/numbers.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ Base.isinteger
Base.isreal
Core.Float32(::Any)
Core.Float64(::Any)
Base.GMP.BigInt(::Any)
Base.MPFR.BigFloat(::Any)
Base.Rounding.rounding
Base.Rounding.setrounding(::Type, ::Any)
Base.Rounding.setrounding(::Function, ::Type, ::RoundingMode)
Expand All @@ -113,18 +111,22 @@ Base.@int128_str
Base.@uint128_str
```

## BigFloats
## BigFloats and BigInts

The [`BigFloat`](@ref) type implements arbitrary-precision floating-point arithmetic using
the [GNU MPFR library](http://www.mpfr.org/).
The [`BigFloat`](@ref) and [`BigInt`](@ref) types implements
arbitrary-precision floating point and integer arithmetic, respectively. For
[`BigFloat`](@ref) the [GNU MPFR library](http://www.mpfr.org/) is used,
and for [`BigInt`](@ref) the [GNU Multiple Precision Arithmetic Library (GMP)]
(https://gmplib.org) is used.

```@docs
Base.MPFR.BigFloat(::Any)
Base.precision
Base.MPFR.precision(::Type{BigFloat})
Base.MPFR.setprecision
Base.MPFR.BigFloat(x, prec::Int)
BigFloat(x::Union{Integer, AbstractFloat, String}, rounding::RoundingMode)
Base.MPFR.BigFloat(x::Union{Integer, AbstractFloat, String}, rounding::RoundingMode)
Base.MPFR.BigFloat(x, prec::Int, rounding::RoundingMode)
Base.MPFR.BigFloat(x::String)
Base.GMP.BigInt(::Any)
Base.@big_str
```
39 changes: 0 additions & 39 deletions doc/src/manual/index.md

This file was deleted.

0 comments on commit 1241889

Please sign in to comment.