Skip to content

Version 0.8.2 #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "FixedPointNumbers"
uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93"
version = "0.8.1"
version = "0.8.2"

[deps]
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# FixedPointNumbers

[![Build Status](https://travis-ci.org/JuliaMath/FixedPointNumbers.jl.svg?branch=master)](https://travis-ci.org/JuliaMath/FixedPointNumbers.jl)

[![PkgEval](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/F/FixedPointNumbers.svg)](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/report.html)
[![codecov.io](http://codecov.io/github/JuliaMath/FixedPointNumbers.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaMath/FixedPointNumbers.jl?branch=master)

This library implements fixed-point number types. A
Expand Down Expand Up @@ -55,10 +55,9 @@ value `1.0` at 10, 12, 14, and 16 bits, respectively (`0x03ff`,
compact printing and the `fY` component informs about the number of
fractional bits and `X+Y` equals the number of underlying bits used.

To construct such a number, use `convert(N4f12, 1.3)`, `N4f12(1.3)`,
To construct such a number, use `1.3N4f12`, `N4f12(1.3)`, `convert(N4f12, 1.3)`,
`Normed{UInt16,12}(1.3)`, or `reinterpret(N4f12, 0x14cc)`.
The latter syntax means to construct a `N4f12` (it ends in
`uf12`) from the `UInt16` value `0x14cc`.
The last syntax means to construct a `N4f12` from the `UInt16` value `0x14cc`.

More generally, an arbitrary number of bits from any of the standard unsigned
integer widths can be used for the fractional part. For example:
Expand Down
2 changes: 1 addition & 1 deletion src/FixedPointNumbers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module FixedPointNumbers
import Base: ==, <, <=, -, +, *, /, ~, isapprox,
convert, promote_rule, show, isinteger, abs, decompose,
isnan, isinf, isfinite,
zero, oneunit, one, typemin, typemax, floatmin, floatmax, eps, sizeof, reinterpret,
zero, oneunit, one, typemin, typemax, floatmin, floatmax, eps, reinterpret,
float, trunc, round, floor, ceil, bswap,
div, fld, rem, mod, mod1, fld1, min, max, minmax,
rand, length
Expand Down