# big.int: implement float conversions · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/6b41beb370ce62b4381396e0543e6eb7f70b18cf)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 6b41beb370ce62b4381396e0543e6eb7f70b18cf

Requested commit: 6b41beb370ce62b4381396e0543e6eb7f70b18cf

Commit: 6b41beb370ce62b4381396e0543e6eb7f70b18cf

Tree: 62ab8274799668635dc2f2fe236f081aea731eef

Author: Jacob Young

Committer: Jacob Young

## Message

```
big.int: implement float conversions

These conversion routines accept a `round` argument to control how the
result is rounded and return whether the result is exact. Most callers
wanted this functionality and had hacks around it being missing.

Also delete `std.math.big.rational` because it was only being used for
float conversion, and using rationals for that is a lot more complex
than necessary. It also required an allocator, whereas the new integer
routines only need to be passed enough memory to store the result.

```

## Parents

- [13392ad33f25649159048757d54fd6d8cf6d1887](https://git.cafe/gitcafe/zig/commit/13392ad33f25649159048757d54fd6d8cf6d1887?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/6b41beb370ce62b4381396e0543e6eb7f70b18cf?format=markdown)
