Description
Report the integer neighbors and exact half-integer tie status of one safely bounded number without imposing a rounding policy.
A rational number is represented by an integer numerator and a nonzero integer denominator. Sign placement, reduction by a greatest common divisor, and the chosen division or rounding convention affect intermediate representations. Exact integer text preserves arithmetic that could be lost in a floating-point conversion.
Report the integer neighbors and exact half-integer tie status of one safely bounded number without imposing a rounding policy.
When to use this tool
Use Number: Half Integer Tie Neighbor Pair when you need this particular exact fraction comparison, reduction, sign, denominator, or rounding component.
How to use the tool and how it works
- Enter value. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
For value within -1e12 through 1e12 return lowerInteger=floor(value), upperInteger=ceil(value), and halfIntegerTie when value-lowerInteger is exactly 0.5 inside result.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| value | Supplied scalar or returned value under the stated operation. | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Object containing the calculated result members described below. | Required. Object. |
| result.halfIntegerTie | Half Integer Tie | Calculated result member: boolean. |
| result.lowerInteger | Lower Integer | Calculated result member: number. |
| result.upperInteger | Upper Integer | Calculated result member: number. |
{
"input": {
"value": -1.5
},
"output": {
"result": {
"halfIntegerTie": true,
"lowerInteger": -2,
"upperInteger": -1
}
}
} Limitations and assumptions
- An integral value returns equal neighbors. Tie detection uses the supplied binary floating-point value without a tolerance; it does not identify an uncertain decimal tie or apply a rounding mode.
- Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Reduce fractions where the interpretation requires it and choose a consistent denominator-sign and division convention. Use a complete rational operation when one denominator or determinant term is insufficient.
References
Similar or alternative tools
- Decimal Tie To Even Parity Flag
Identify an exact discarded-decimal half tie and the retained-digit parity adjustment for ties-to-even.
- Integer Nearest Multiple Tie Policy
For positive integer step compute q=floor(integer/step) and r=integer-q*step.