rfc-6340

Textual Conventions for the Representation of Floating-Point Numbers

R. Presuhn
date2011-08 streamIETF areaops wgopsawg statusPROPOSED STANDARD pages7 canonicalhttps://www.rfc-editor.org/rfc/rfc6340 doi10.17487/RFC6340
This memo defines a Management Information Base (MIB) module containing textual conventions (TCs) to represent floating-point numbers. [STANDARDS-TRACK]

Extracted elements (13)

design-rationale §3

Floating-point numbers are inappropriate for data that is truly decimal or can be handled by re-thinking units and representing as scaled integers; fixed-point numbers can be more efficient and more precise for number spaces with limited range.

snmp

design-rationale §3

MIB designers should choose the smallest floating-point type adequate for the needed range and precision; using Float128TC when Float64TC suffices is explicitly noted as inefficient.

snmp

design-rationale §1

The three floating-point sizes (32-, 64-, and 128-bit) were chosen because their need in network management was specifically recognized in the SMIng Objectives (RFC 3216), which elaborates the requirement for these three types in network management protocols.

snmp

interoperability-note §3

Embedded systems sometimes lack floating-point hardware support, which can complicate implementation of MIB objects that use these floating-point textual conventions.

snmp

interoperability-note §3

SNMP lexicographical ordering for INDEX objects using these floating-point TCs will be that of the corresponding octet strings, which will not always reflect the numerical ordering of the floating-point values. MIB designers should warn users in the DESCRIPTION clause.

snmp

normative-requirement §3 MUST

Since these TCs are defined as OCTET STRING, SMI range constraints are not available; MIB designers MUST use DESCRIPTION clauses to spell out applicable range constraints beyond those implied by the underlying IEEE types.

snmp

normative-requirement §3 MUST

Whenever these textual conventions are used in a MIB module, the associated DESCRIPTION clause MUST clearly specify whether denormalized numbers, NaNs, or infinities are permitted, along with any special semantics for those cases.

snmp

protocol-element §5

Float128TC is a textual convention representing a 128-bit (16-octet) IEEE floating-point number in binary interchange format, defined as OCTET STRING (SIZE(16)).

snmp, yang

protocol-element §5

Float32TC is a textual convention representing a 32-bit (4-octet) IEEE floating-point number in binary interchange format, defined as OCTET STRING (SIZE(4)).

snmp, yang

protocol-element §5

Float64TC is a textual convention representing a 64-bit (8-octet) IEEE floating-point number in binary interchange format, defined as OCTET STRING (SIZE(8)).

snmp, yang

registry §7

The MIB module floatTcMIB is assigned OBJECT IDENTIFIER { mib-2 201 } in the IANA SMI Numbers registry.

registry, snmp

security-consideration §6

This MIB module defines only textual conventions, not management objects, and therefore has no direct security impact on the Internet. Meaningful security considerations must be written in the MIB modules that use these TCs to define actual management objects.

security, snmp

wire-format §1

All three floating-point TCs employ the IEEE 754-2008 binary interchange format. The highest-order bit of the first byte is the sign bit, with remaining bits corresponding to exponent and fraction parts in network byte order.

snmp