https://www.mathworks.com/help/ecoder/ug/selectively-disabling-nonfinite-checks-or-inlining-for-generated-math-functions.html
Disable Nonfinite Checks or Inlining for Math Functions - MATLAB & Simulink
Use code replacement library (CRL) customization entries to selectively disable nonfinite checks for math functions and inlining of math functions.
math functionsdisablenonfinitechecksmatlab