Skip to content

Commit

Permalink
Mention context package in README
Browse files Browse the repository at this point in the history
  • Loading branch information
db47h committed May 29, 2020
1 parent 127692a commit 9b2db3c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@ to handle NaNs gracefully can use Go's built-in panic/recover machanism to
handle these efficiently: NaNs cause a panic with an ErrNaN which can be tested
to distinguish NaNs from other causes of panic.

On the other hand, Contexts (implemented in the [context](https://pkg.go.dev/github.com/db47h/decimal/context?tab=doc) sub-package) provide a
form of quiet-NaNs whereby any NaN generated by an operation will make the
context enter into an error state. Further operations with the context will be
no-ops until (*Context).Err is called to check for errors.
On the other hand, Contexts (implemented in the
[context](https://pkg.go.dev/github.com/db47h/decimal/context?tab=doc)
sub-package) provide a form of quiet-NaNs whereby any NaN generated by an
operation will make the context enter into an error state. Further operations
with the context will be no-ops until (*Context).Err is called to check for
errors.

Mantissae are always normalized, as a result, Decimals have a single possible
representation:
Expand Down

0 comments on commit 9b2db3c

Please sign in to comment.