To improve MISRA C:2012 compliance of generated code,
insert a data type conversion block when using signals of type single (real32_T) as
inputs to the following blocks:

Math

Trigonometry

Sqrt

The data type conversion block to changes the
data type to double (real_T)

Rationale

Improve MISRA C:2012 compliance of the generated
code.

Notes

The function prototypes for many math functions require
an input of type double. To accommodate the function prototype, you
can add a data type conversion block. As an alternative to the data
type conversion block, you could define a new function interface
using the Target Function Library (TFL).

References

N/A

Last Changed

R2015b

Example

Recommended

Add a data type conversion block to the input signal
of the block. Convert the output signal back to single.

Was this topic helpful?

Select Your Country

Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .