# Add add compiler_rt routines for float to signed integer conversion · gitcafe/zig

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

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

Visibility: public

Requested revision: 634d11ab28839ebc3caae2bf18cbc028a7a1c3e9

Requested commit: 634d11ab28839ebc3caae2bf18cbc028a7a1c3e9

Commit: 634d11ab28839ebc3caae2bf18cbc028a7a1c3e9

Tree: 7bc045c19029230e9a0b4a3545cf8ce76ba823af

Author: Wink Saville

Committer: Andrew Kelley

## Message

```
Add add compiler_rt routines for float to signed integer conversion

And add std.math.f128_* constants.

The routines are:

  __fixdfdi, __fixdfsi, __fixdfti,
  __fixsfdi, __fixsfsi, __fixsfti,
  __fixtfdi, __fixtfsi, __fixtfti.

These all call fixint which is a generic zig function that does the
conversion:

  pub fn fixint(comptime fp_t: type, comptime fixint_t: type, a: fp_t) fixint_t

There are also a set tests:

  __fixdfdi_test, __fixdfsi_test, __fixdfti_test,
  __fixsfdi_test, __fixsfsi_test, __fixsfti_test,
  __fixtfdi_test, __fixtfsi_test, __fixtfti_test.

```

## Parents

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

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