# compiler_rt: Re-implement \`ldexp\`/\`ilogb\` using bit-ops · gitcafe/zig

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

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

Visibility: public

Requested revision: eac1e613be56875a08102bd06e333a0621600ee6

Requested commit: eac1e613be56875a08102bd06e333a0621600ee6

Commit: eac1e613be56875a08102bd06e333a0621600ee6

Tree: 7c65fbc28f805bcb3d0e1fe4522a738cb36df97d

Author: Cody Tapscott

Committer: Cody Tapscott

## Message

```
compiler_rt: Re-implement `ldexp`/`ilogb` using bit-ops

This re-write was needed to fix deficiencies in the existing ldexp,
which was failing to compute correct results for both f16 and f80.

It would be nice to add a fast multiplication-based fallback in the
future for targets that have a hardware FPU, but this implementation
should be much faster than the existing for targets without one.

```

## Parents

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

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