Smalltalk/X WebserverDocumentation of class 'HalfFloatArray': | ||
Class: HalfFloatArrayInheritance:Object | +--Collection | +--SequenceableCollection | +--ArrayedCollection | +--UninterpretedBytes | +--AbstractNumberVector | +--UnboxedFloatArray | +--HalfFloatArray
Description:HalfFloatArrays store half precision (16bit) floats (and nothing else). These have been added to IEEE754 in 2008 as minifloat (s10e5 binary16 format). These have a 5bit exponent and a very limited 10 bit mantissa. Thus, they have a much smaller number range than single precision floats or bfloat16's, and a bit more precision than bfloat16s and less precision than single precision floats. HalfFloats were traditionally seldom used, but seem to become more popular these days, as machine learning algorithms, 3D graphics accelerators and game engines use them for dense and compact storage of neuron data, texture and vertex data. HalfFloats are used by nVidia graphics cards, the OpenEXR standard, and Pixar. Notice, that HalfFloats are not supported as first class objects by the ST/X system; i.e. outside of a HalfFloatArray, these values are represented as floats or doubles. When accessing a HalfFloatArray's element via getters/setters, shortFloat (i.e. single precision 32bit floats) are exchanged. Be aware that the numeric range of a half-float is very very limited. HalfFloatArrays can be used as literals i.e. you can enter HalfFloatArray-constants as: #f16( element1 element2 .... elementN ) for example: #f16(1 2.0 3 4.0) Aliased as Float16Array. [memory requirements:] OBJ-HEADER + (size * 2) Class protocol:queries
Instance protocol:accessing
|
||
ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sun, 22 Dec 2024 08:00:07 GMT |