# shz_remainderf

Source: https://sh4zam.com/api/scalar/shz_remainderf/

> Replacement for the <math.h> routine, remainderf()

```c
SHZ_INLINE float shz_remainderf(float num, float denom) SHZ_NOEXCEPT;
```

Replacement for the \<math.h> routine, remainderf().

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `num` | `float` |  |
| `denom` | `float` |  |

## Returns

`float`

## Details

Returns the floating-point remainder of `num` divided by `denom`, rounded to the nearest integer (as a float).

## Warnings

- This routine does not gracefully handle dividing by zero, and it is only valid for the input range INT32_MIN \<= `num` / `denom` \<= INT32_MAX.

## Availability

- **C++ equivalent:** [`shz::remainderf`](https://sh4zam.com/api/cpp/#shzremainderf)
- **Type-generic form:** none
- **Back-ends:** SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- **Defined in:** [`sh4zam/shz_scalar.h:125`](https://github.com/gyrovorbis/sh4zam/blob/ba1e30c88d49df0311870b229e1dd860ef26c477/include/sh4zam/shz_scalar.h#L125)
- **Module:** [Scalar](https://sh4zam.com/api/scalar/), section "Rounding"

## See also

[`shz_fmodf`](https://sh4zam.com/api/scalar/shz_fmodf/), [`shz_remquof`](https://sh4zam.com/api/scalar/shz_remquof/), [`shz_truncf`](https://sh4zam.com/api/scalar/shz_truncf/)
