# wasm: Implement basic f16 support · gitcafe/zig

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

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

Visibility: public

Requested revision: 5ebaf49ebb65f3b201e56ec7d89b7d91f189409e

Requested commit: 5ebaf49ebb65f3b201e56ec7d89b7d91f189409e

Commit: 5ebaf49ebb65f3b201e56ec7d89b7d91f189409e

Tree: 7dff0022ba12267782afe07a9236ef1e9b2f2756

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm: Implement basic f16 support

This implements binary operations and comparisons
for floats with bitsize 16. It does this by calling into
compiler-rt to first extend the float to 32 bits, perform the operation,
and then finally truncate back to 16 bits. When loading and storing the f16,
we do this as an unsigned 16bit integer.

```

## Parents

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

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