NigelInWindsor Posted June 1, 2017 Share Posted June 1, 2017 What is the correct way to check for nan in a real time c routine. Is there a list of math functions for real time c routines. Link to comment Share on other sites More sharing options...
Unit101 Posted June 7, 2017 Share Posted June 7, 2017 isnan() should work Link to comment Share on other sites More sharing options...
steve.milici Posted June 7, 2017 Share Posted June 7, 2017 In the Power PMAC API there is a function "myisnan()". Link to comment Share on other sites More sharing options...
NigelInWindsor Posted June 10, 2017 Author Share Posted June 10, 2017 Unit101; I agree, isnan() should work but it doesn't compile / link. I get Error : implicit declaration of function 'isnan' The other one that doesn't compile / link is remainder(). I assume I'm meant to use frem() but who knows. Thanks Steve, myisnan() does compile / link, I'll find out next week on the machine if it actually does what it says on the tin. I ask again, is there a manual listing the math functions and the headers that need to be included and indeed any pragma or #defines necessary to compile /link these functions. Link to comment Share on other sites More sharing options...
Unit101 Posted June 11, 2017 Share Posted June 11, 2017 I just tried this in my "C" program working on today... see below, it compiled, build, downloads to pmac fine. if (main_interface->input.command.program_running == true) { //bcat-progRun_1 Note: // - now this state is skipped because .program_running bit is DISABLED xdcf_cntrl->xdcf_state_step = xdcf_floating_check_state; isnan(1); remainder(2,5); isnan(remainder(2,'a')); } Link to comment Share on other sites More sharing options...
Recommended Posts