You can try to run Single Precision Converter, https://www.mathworks.com/help/fixedpoint/ug/getting-started-with-the-double-to-single-converter.html
One likely cause to trigger such "mis-match" is the C language standard: For C89/90, there was no single precision version of sin/cos. See this setting (screenshot attached) can be updated for your model. Single Precision Converter updates this setting in your model:
- Check that the system uses a library standard that supports single-precision designs.To convert a system to single precision, the language standard must be set to C99 (ISO). If the specified language standard is not set to C99, the Single Precision Converter changes the math library.

You would see the desirable match.

Thanks!