-
Notifications
You must be signed in to change notification settings - Fork 17
Floating point number type object
A CTF floating point number type.
See also: Type object.
Property | Type | Description | Required? | Default value |
---|---|---|---|---|
class |
String | Set to flt , float , or floating-point
|
Required | N/A |
size |
Floating point number type size object | Size parameters | Required | N/A |
align |
Integer (positive) | Alignment (bits) (power of two) | Optional | 8 |
byte-order |
String | Byte order, amongst:
|
Optional | Native byte order defined in the Trace object |
All the properties which have a default value can also be set to
null
to force this default value. This is especially useful when
also using type inheritance or
when including external YAML files.
class: float
size:
exp: 11
mant: 53
align: 64
byte-order: be
- 8-bit exponent, 24-bit mantissa, 32-bit alignment:
float
- 11-bit exponent, 53-bit mantissa, 64-bit alignment:
double
- Other combination:
uint64_t
The CTF floating point number type is encoded, in a binary stream, following IEEE 754-2008's interchange format. The required parameters are the exponent and significand sizes, in bits. In CTF, the mantissa size includes the sign bit, whereas IEEE 754-2008's significand size does not include it.
Property | Type | Description | Required? | Default value |
---|---|---|---|---|
exp |
Integer (positive) | Exponent size (bits) | Required | N/A |
mant |
Integer (positive) | Mantissa size (significand size + 1) (bits) | Required | N/A |
As per IEEE 754-2008, the sum of the exp
and mant
properties must be a
multiple of 32.
The sum of the exp
and mant
properties must be lesser than or equal to 64.
exp: 8
mant: 24
Copyright © 2014-2016 Philippe Proulx (project license)