Skip to content

Commit

Permalink
Release 0.3.0
Browse files Browse the repository at this point in the history
f256@0.3.0

Generated by cargo-workspaces
  • Loading branch information
mamrhein committed Aug 8, 2024
1 parent 7c30609 commit e936c99
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGES.TXT
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Version Changes
-------- --------------------------------------------------------------------
0.3.0 Added trigonometric functions sin, cos and tan.

0.2.0 Added some basic mathematical constants.
Implemented fns f256::sqrt, f256::to_degrees and f256::to_radians.
Implemented traits Rem, RemAssign.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "f256"
version = "0.2.0"
version = "0.3.0"
edition = "2021"
rust-version = "1.66"
authors = ["Michael Amrhein <michael@adrhinum.de>"]
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ among the interchange formats (it is not a basic format), as having:
Exponent width: 19 bits
Significand precision: 237 bits (236 explicitly stored)
```

The format is written with an implicit lead bit with value 1 unless the
exponent is all zeros. Thus only 236 bits of the significand appear in the
memory format, but the total precision is 237 bits (approximately 71 decimal
Expand All @@ -29,14 +30,15 @@ exponent bias in the IEEE 754 standard.
Eₘₐₓ = 262143
Exponent bias = 3FFFF₁₆ = 262143
```

Thus, as defined by the offset binary representation, in order to get the true
exponent the offset of 262143 has to be subtracted from the stored exponent.

The stored exponents 00000₁₆ and 7FFFF₁₆ are interpreted specially.

| Exponent | Significand zero | Significand non-zero | Equation |
|-------------------|------------------|-------------------------|--------------------------------------------------------------------------|
| 00000₁₆ | 0, −0 | subnormal numbers | (-1)<sup>signbit</sup> × 2⁻²⁶²¹⁴² × 0.significandbits₂ |
| 00000₁₆ | 0, −0 | subnormal numbers | (-1)<sup>signbit</sup> × 2⁻²⁶²¹⁴² × 0.significandbits₂ |
| 00001₁₆ … 7FFFE₁₆ | normalized value | normalized value | (-1)<sup>signbit</sup> × 2<sup>exponent bits₂</sup> × 1.significandbits₂ |
| 7FFFF₁₆ | ±∞ | NaN (quiet, signalling) |

Expand All @@ -54,7 +56,7 @@ Add `f256` to your `Cargo.toml`:

```toml
[dependencies]
f256 = "0.2"
f256 = "0.3"
```

### Crate features
Expand All @@ -64,7 +66,7 @@ By default, only the feature `std` is enabled.
#### Ecosystem

* **std** - Printing and some tests depend on this feature. Besides that, support
for conversion to string and formatting is provided by using crate `alloc` so
for conversion to string and formatting is provided by using crate `alloc` so
that this functionality is also available in non-standard environments.

#### Optional dependencies
Expand Down
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

* Exponentiation (powf, powi, exp, exp_m1, exp2, exp10)
* Logarithms (ln, log2, log10, ln_1p)
* Trigonometric functions (sin, cos, tan)
* Trigonometric functions (~~sin, cos, tan,~~ asin, acos, ~~atan~~)
* ~~Square root (sqrt)~~
* Cubic root (cbrt)

Expand Down

0 comments on commit e936c99

Please sign in to comment.