Skip to content

Commit

Permalink
Clarify meaning of p in hexadecimal floating-point literals (#24376)
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano authored and fredrikekre committed Nov 2, 2017
1 parent f16a119 commit 098176c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doc/src/manual/integers-and-floating-point-numbers.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ second argument is zero.

## Floating-Point Numbers

Literal floating-point numbers are represented in the standard formats:
Literal floating-point numbers are represented in the standard formats, using
[E-notation](https://en.wikipedia.org/wiki/Scientific_notation#E-notation) when necessary:

```jldoctest
julia> 1.0
Expand Down Expand Up @@ -267,7 +268,8 @@ julia> typeof(ans)
Float32
```

Hexadecimal floating-point literals are also valid, but only as [`Float64`](@ref) values:
Hexadecimal floating-point literals are also valid, but only as [`Float64`](@ref) values,
with `p` preceding the base-2 exponent:

```jldoctest
julia> 0x1p0
Expand Down

0 comments on commit 098176c

Please sign in to comment.