Main Content

Floating-Point Specification in Simulink

Create and use floating-point data types such as single and half

Because single precision numbers use only 32 bits, they require less memory than double-precision numbers while still offering many of the benefits of floating point arithmetic. The half-precision data type occupies only 16 bits of memory, but its floating-point representation enables it to handle wider dynamic ranges than integer or fixed-point data types of the same size.

Classes

Simulink.NumericTypeSpecify floating-point, integer, or fixed-point data type
target.FloatingPointDataTypeDescribe floating point data type implemented by compiler for target hardware (Since R2021b)

Functions

ssGetDataTypeIsDoubleSingleorHalfDetermine whether registered data type is double, single, or half-precision data type (Since R2020b)
ssGetDataTypeIsHalfPrecisionDetermine whether registered data type is half-precision data type (Since R2020b)
ssRegisterDataTypeHalfPrecisionRegister half-precision data type and return its data type ID (Since R2020b)
target.addAdd target object to internal database
target.createCreate target object
target.getRetrieve target objects from internal database
target.removeRemove target object from internal database

Namespaces

targetManage target hardware and build tool information

Topics

Featured Examples