Skip to content

Commit

Permalink
chore: Releasing 0.13.4 (#4787)
Browse files Browse the repository at this point in the history
* regenerate doc

* update Changelog
  • Loading branch information
crusso authored Nov 29, 2024
1 parent bdb1d24 commit 7a72632
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
12 changes: 11 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@

* refactoring: Updating and simplifying the runtime system dependencies (#4677).

* motoko-base

* Breaking change (minor): `Float.format(#hex)` is no longer supported.
This is because newer versions of Motoko (such as with enhanced orthogonal persistence)
rely on the Rust-native formatter that does not offer this functionality.
It is expected that this formatter is very rarely used in practice (dfinity/motoko-base⁠#589).

* Formatter change (minor): The text formatting of `NaN`, positive or negative,
will be `NaN` in newer Motoko versions, while it was `nan` or `-nan` in older versions (dfinity/motoko-base⁠#589).

## 0.13.3 (2024-11-13)

* motoko (`moc`)
Expand All @@ -16,7 +26,7 @@
* motoko-base

* Add modules `OrderedMap` and `OrderedSet` to replace `RBTree` with improved functionality, performance
and ergonomics avoiding the need for preupgrade hooks (thanks to Serokell) (#662).
and ergonomics avoiding the need for preupgrade hooks (thanks to Serokell) (dfinity/motoko-base⁠#662).

## 0.13.2 (2024-10-18)

Expand Down
12 changes: 7 additions & 5 deletions doc/md/base/Float.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ Float.log(Float.e) // => 1.0

## Function `format`
``` motoko no-repl
func format(fmt : {#fix : Nat8; #exp : Nat8; #gen : Nat8; #hex : Nat8; #exact}, x : Float) : Text
func format(fmt : {#fix : Nat8; #exp : Nat8; #gen : Nat8; #exact}, x : Float) : Text
```

Formatting. `format(fmt, x)` formats `x` to `Text` according to the
Expand All @@ -489,13 +489,15 @@ formatting directive `fmt`, which can take one of the following forms:
* `#fix prec` as fixed-point format with `prec` digits
* `#exp prec` as exponential format with `prec` digits
* `#gen prec` as generic format with `prec` digits
* `#hex prec` as hexadecimal format with `prec` digits
* `#exact` as exact format that can be decoded without loss.

`-0.0` is formatted with negative sign bit.
Positive infinity is formatted as `inf`.
Negative infinity is formatted as `-inf`.
`NaN` is formatted as `NaN` or `-NaN` depending on its sign bit.
Positive infinity is formatted as "inf".
Negative infinity is formatted as "-inf".

Note: The numerical precision and the text format can vary between
Motoko versions and runtime configuration. Moreover, `NaN` can be printed
differently, i.e. "NaN" or "nan", potentially omitting the `NaN` sign.

Example:
```motoko
Expand Down

0 comments on commit 7a72632

Please sign in to comment.