Skip to content

Commit

Permalink
[docs/base] add a type tree for Number (JuliaLang#45975)
Browse files Browse the repository at this point in the history
* [docs/base] add a type tree

JuliaLang#24741

Generated using the following code with manual modifications
```jl
using AbstractTrees
AbstractTrees.children(x::Type) = subtypes(x)
print_tree(Number)
```

* [docs/base] mark "Abstract Type"

* [docs/base] add a blurb for the tree

* Update numbers.md

Co-authored-by: Kristoffer Carlsson <[email protected]>
  • Loading branch information
inkydragon and KristofferC committed Nov 3, 2022
1 parent 33731d9 commit bfb0098
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions doc/src/base/numbers.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,37 @@

## Standard Numeric Types

A type tree for all subtypes of `Number` in `Base` is shown below.
Abstract types have been marked, the rest are concrete types.
```
Number (Abstract Type)
├─ Complex
└─ Real (Abstract Type)
├─ AbstractFloat (Abstract Type)
│ ├─ Float16
│ ├─ Float32
│ ├─ Float64
│ └─ BigFloat
├─ Integer (Abstract Type)
│ ├─ Bool
│ ├─ Signed (Abstract Type)
│ │ ├─ Int8
│ │ ├─ Int16
│ │ ├─ Int32
│ │ ├─ Int64
│ │ ├─ Int128
│ │ └─ BigInt
│ └─ Unsigned (Abstract Type)
│ ├─ UInt8
│ ├─ UInt16
│ ├─ UInt32
│ ├─ UInt64
│ └─ UInt128
├─ Rational
└─ AbstractIrrational (Abstract Type)
└─ Irrational
```

### Abstract number types

```@docs
Expand Down

0 comments on commit bfb0098

Please sign in to comment.