# add f16 type · gitcafe/zig

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

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

Visibility: public

Requested revision: fd75e73ee9818f12fd81d8fdb3cb949c492d664a

Requested commit: fd75e73ee9818f12fd81d8fdb3cb949c492d664a

Commit: fd75e73ee9818f12fd81d8fdb3cb949c492d664a

Tree: 84ee56a2ef7a65a0bbb3a7dd12f015970b4ed725

Author: Ben Noordhuis

Committer: Ben Noordhuis

## Message

```
add f16 type

Add support for half-precision floating point operations.

Introduce `__extendhfsf2` and `__truncsfhf2` in std/special/compiler_rt.

Add `__gnu_h2f_ieee` and `__gnu_f2h_ieee` as aliases that are used in
Windows builds.

The logic in std/special/compiler_rt/extendXfYf2.zig has been reworked
and can now operate on 16 bits floating point types.

`extendXfYf2()` and `truncXfYf2()` are marked `inline` to work around
a not entirely understood stack alignment issue on Windows when calling
the f16 versions of the builtins.

closes #1122

```

## Parents

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

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