<jupyter_start><jupyter_text>Float field<jupyter_code>from konfoo import Index, Byteorder, Float<jupyter_output><empty_output><jupyter_text>Item Item type of the `field` class.<jupyter_code>Float.item_type<jupyter_output><empty_output><jupyter_text>Checks if the `field` class is a `bit` field.<jupyter_code>Float.is_bit()<jupyter_output><empty_output><jupyter_text>Checks if the `field` class is a `boolean` field.<jupyter_code>Float.is_bool()<jupyter_output><empty_output><jupyter_text>Checks if the `field` class is a `decimal` number field.<jupyter_code>Float.is_decimal()<jupyter_output><empty_output><jupyter_text>Checks if the `field` class is a `floating point` number field.<jupyter_code>Float.is_float()<jupyter_output><empty_output><jupyter_text>Checks if the `field` class is a `pointer` field.<jupyter_code>Float.is_pointer()<jupyter_output><empty_output><jupyter_text>Checks if the `field` class is a `stream` field.<jupyter_code>Float.is_stream()<jupyter_output><empty_output><jupyter_text>Checks if the `field` class is a `string` field.<jupyter_code>Float.is_string()<jupyter_output><empty_output><jupyter_text>Field<jupyter_code>real = Float(byte_order='auto')
real = Float()<jupyter_output><empty_output><jupyter_text>Field view<jupyter_code>real
str(real)
repr(real)<jupyter_output><empty_output><jupyter_text>Field name<jupyter_code>real.name<jupyter_output><empty_output><jupyter_text>Field index<jupyter_code>real.index<jupyter_output><empty_output><jupyter_text>Byte `index` of the `field` within the `byte stream`.<jupyter_code>real.index.byte<jupyter_output><empty_output><jupyter_text>Bit offset relative to the byte `index` of the `field` within the `byte stream`.<jupyter_code>real.index.bit<jupyter_output><empty_output><jupyter_text>Absolute address of the `field` within the `data source`.<jupyter_code>real.index.address<jupyter_output><empty_output><jupyter_text>Base address of the `byte stream` within the `data source`.<jupyter_code>real.index.base_address<jupyter_output><empty_output><jupyter_text>Indexes the `field` and returns the `index` after the `field`.<jupyter_code>real.index_field(index=Index())<jupyter_output><empty_output><jupyter_text>Field alignment<jupyter_code>real.alignment<jupyter_output><empty_output><jupyter_text>Byte size of the `field group` which the `field` is *aligned* to.<jupyter_code>real.alignment.byte_size<jupyter_output><empty_output><jupyter_text>Bit offset of the `field` within its *aligned* `field group`.<jupyter_code>real.alignment.bit_offset<jupyter_output><empty_output><jupyter_text>Field size<jupyter_code>real.bit_size<jupyter_output><empty_output><jupyter_text>Field byte order<jupyter_code>real.byte_order
real.byte_order.value
real.byte_order.name
real.byte_order = 'auto'
real.byte_order = Byteorder.auto<jupyter_output><empty_output><jupyter_text>Field value Maximal float `field` value.<jupyter_code>real.max()<jupyter_output><empty_output><jupyter_text>Minimal float `field` value.<jupyter_code>real.min()<jupyter_output><empty_output><jupyter_text>Smallest float `field` value.<jupyter_code>real.smallest()<jupyter_output><empty_output><jupyter_text>Epsilon float `field` value.<jupyter_code>real.epsilon()<jupyter_output><empty_output><jupyter_text>Returns the float `field` value as a single precision floating point number.<jupyter_code>real.value<jupyter_output><empty_output><jupyter_text>Returns the float `field` value *aligned* to its `field group` as a number of bytes.<jupyter_code>bytes(real)
bytes(real).hex()<jupyter_output><empty_output><jupyter_text>Returns the float `field` value as an integer number.<jupyter_code>int(real)<jupyter_output><empty_output><jupyter_text>Returns the float `field` value as a single precision floating point number.<jupyter_code>float(real)<jupyter_output><empty_output><jupyter_text>Returns the float `field` value as a boolean value.<jupyter_code>bool(real)<jupyter_output><empty_output><jupyter_text>Field metadata Returns the ``meatadata`` of the ``field`` as an ordered dictionary.<jupyter_code>real.describe()<jupyter_output><empty_output><jupyter_text>Deserialize<jupyter_code>real.deserialize(bytes.fromhex('0000803f'), byte_order='little')
real.value
bytes(real)
bytes(real).hex()
int(real)
float(real)
bool(real)<jupyter_output><empty_output><jupyter_text>Serialize<jupyter_code>buffer = bytearray()
real.value = 1
real.value = 1.0
real.value = 0x1
real.value = 0b1
real.value = 0o1
real.value = True
real.value = 1.0
real.serialize(buffer, byte_order='little')
buffer.hex()
bytes(real).hex()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12360533800043755, 'fraction_numerical': 0.003937869175235178, 'mean_word_length': 11.915254237288135, 'pattern_counts': {'":': 0, '<': 141, '<?xml version=': 0, '>': 141, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '35', 'dir': 'jupyter-structured-clean-dedup', 'id': '176430', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 1701, 'n_tokens_neox': 1679, 'n_words': 261, 'path': 'notebooks/fields/Float field.ipynb', 'repo_name': 'JoeVirtual/KonFoo', 'size': '4571'}