div
Divides two SD49x28 numbers, returning a new SD49x28 number.
*This is an extension of {Common.mulDiv} for signed numbers, which works by computing the signs and the absolute values separately. Notes:
- Refer to the notes in {Common.mulDiv}.
- The result is rounded toward zero. Requirements:
- Refer to the requirements in {Common.mulDiv}.
- None of the inputs can be
MIN_SD49x28
. - The denominator must not be zero.
- The result must fit in SD49x28.*
function div(SD49x28 x, SD49x28 y) pure returns (SD49x28 result);
Parameters
Name | Type | Description |
---|---|---|
x | SD49x28 | The numerator as an SD49x28 number. |
y | SD49x28 | The denominator as an SD49x28 number. |