# US 2025/0165219 A1 · Method and system for rounding a subnormal number

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0165219 A1
- Document ID: US20250165219A1
- Status: Published application
- Kind: A1
- Application number: 18/933,060
- Filed: 2024-10-31
- Published: 2025-05-22
- Earliest claimed: 2023-11-01
- Applicants: Imagination Technologies Limited
- Inventors: Kenneth Rovers; Max Freiburghaus; Thomas Ferrere
- Web page: https://patentgrep.com/patent/US20250165219A1

## CPC

- G06F 7/49947: {Rounding}
- G06F 7/483: Computations with numbers represented by a non-linear combination of denominational numbers, e.g. rational numbers, logarithmic number system or floating-point numbers {(G06F7/4806, G06F7/4824, G06F7/49, G06F7/491, G06F7/544 take precedence)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method of rounding a floating-point number in an Extended Exponent Range (EER), that would be a denormal floating-point number represented in an Unextended Exponent Range (UER) includes the steps of receiving, at an arithmetic unit, a plurality of input numbers in the EER representation, each input number comprising a sign bit (si), exponent bits (ei) and mantissa bits (mi); performing an arithmetic operation to produce an output number in the EER representation comprising a sign bit (sa), an exponent bits (ea) and mantissa bits (ma); constructing a rounding mask based on the exponent bits (ea) computed by the arithmetic operation; and applying the rounding mask to the output number in the EER representation to round the output number to correct position as if rounding in the UER representation.

## Claims

### Claim 1

A method of rounding a floating-point number in an Extended Exponent Range (EER), that would be a denormal floating-point number represented in an Unextended Exponent Range, (UER), the method comprising:
receiving, at an arithmetic unit, a plurality of input numbers in the EER representation, each input number comprising a sign bit (si), exponent bits (ei) and mantissa bits (mi);
performing an arithmetic operation to produce an output number in the EER representation comprising a sign bit (sa), an exponent bits (ea) and mantissa bits (ma);
constructing a rounding mask based on the exponent bits (ea) computed by the arithmetic operation; and
applying the rounding mask to the output number in the EER representation to round the output number to correct position as if rounding in the UER representation.

### Claim 2 (depends on 1)

The method as claimed in claim 1, wherein each number among the plurality of input numbers is one of a normal number or a denormal number in EER representation.

### Claim 3 (depends on 1)

The method as claimed in claim 1, wherein the output number is one of a normal number or a denormal number in EER representation.

### Claim 4 (depends on 1)

The method as claimed in claim 1, wherein the rounding mask is a string of zeros and ones.

### Claim 5 (depends on 1)

The method as claimed in claim 1, wherein constructing the rounding mask comprises pre-aligning the rounding mask with a leading 1 at the position of the weight 2(1-bias-mw), where mw is the number of mantissa bits and bias is the exponent bias in the UER representation.

### Claim 6 (depends on 1)

The method as claimed in claim 1, wherein constructing the rounding mask comprises pre-aligning the rounding mask based on the exponent computed by the arithmetic operation (ea).

### Claim 7 (depends on 5)

The method as claimed in claim 5, wherein constructing the predetermined rounding mask further comprises a step of normalizing the rounding mask by shifting the rounding mask to the left by the same number of bits required to normalize the output number.

### Claim 8 (depends on 7)

The method as claimed in claim 7, wherein the method further comprises generating normalized mantissa bits (mr) of the output number.

### Claim 9 (depends on 8)

The method as claimed in claim 8, wherein applying the rounding mask comprises performing a bitwise OR operation between the normalized rounding mask and normalized mantissa bits (mr) of the output number.

### Claim 10 (depends on 8)

The method as claimed in claim 8, wherein the method further comprises deriving guard round and sticky bits based on the normalized mantissa bits (mr) of the output number and the rounding mask.

### Claim 11 (depends on 9)

The method as claimed in claim 9, wherein the method further comprises determining and selecting a truncated output number by truncating the normalized mantissa bits (mr) of the output number or a truncated incremented output number by incrementing the normalized mantissa bits (mr) of the output number and truncating the normalized mantissa bits (mr) of the output number.

### Claim 12 (depends on 11)

The method as claimed in claim 11, wherein the selection is based on the derived guard, round and sticky bits.

### Claim 13 (depends on 11)

The method as claimed in claim 11, wherein determining the truncated output number comprises setting the non-representable trailing bits of the normalized mantissa bits (mr) of the output number to zero.

### Claim 14 (depends on 11)

The method as claimed in claim 11, wherein determining the truncated incremented output number comprises incrementing the normalized mantissa bits (mr) at the first representable position and setting all the below trailing bits to zero.

### Claim 15

A hardware implementation for rounding a floating-point number in an Extended Exponent Range (EER), that would be a denormal floating-point number represented in an Unextended Exponent Range (UER), the hardware implementation comprising:
an arithmetic unit configured to:
receive a plurality of input numbers in the EER representation, each input number comprising a sign bit (si), exponent bits (ei) and mantissa bits (mi), and
perform an arithmetic operation to produce an output number in the EER representation comprising a sign bit (sa), an exponent bits (ea) and mantissa bits (ma);
a mask constructing unit configured to construct a rounding mask based on the exponent bits (ea) computed by the arithmetic operation; and
a rounding unit configured to apply the rounding mask to the output number in the EER representation to round the output number to correct position as if rounding in the UER representation.

### Claim 16 (depends on 15)

The hardware implementation as claimed in claim 15, wherein the mask constructing unit is configured to construct the rounding mask by pre-aligning the rounding mask based on the exponent bits (ea) computed by the arithmetic operation.

### Claim 17 (depends on 15)

The hardware implementation as claimed in claim 15, wherein the mask constructing unit is further configured to construct the rounding mask by performing a step of normalizing the rounding mask by shifting the rounding mask to the left by the same number of bits required to normalize the output number.

### Claim 18 (depends on 17)

The hardware implementation as claimed in claim 17, wherein the hardware implementation further comprises a renormalizing unit configured to generate normalized mantissa bits (mr) of the output number, and optionally, wherein the rounding unit is configured apply the rounding mask by performing a bitwise OR operation between the normalized rounding mask and normalized mantissa bits (mr) of the output number.

### Claim 19 (depends on 1)

A non-transitory computer readable storage medium having stored thereon computer executable code which causes the method as set forth in claim 1 to be performed when the code is run.

### Claim 20 (depends on 15)

A non-transitory computer readable storage medium having stored thereon a machine readable dataset description of a hardware implementation as set forth in claim 15, which when inputted to an integrated circuit manufacturing system causes the integrated circuit manufacturing system to manufacture said hardware implementation.
