#linuxcnc-devel Logs

Oct 13 2022

#linuxcnc-devel Calendar

12:14 AM pere: roguish[m]: NaN and inf is the float representation for not-a-number and infinity, which might be useful some times to use, but can cause caos in calculations unless the program is ready for it.
12:44 AM -!- #linuxcnc-devel mode set to +v by ChanServ
12:50 AM pere: roguish[m]: here is a variant returning NaN:
12:50 AM pere: FUNCTION(_) {
12:50 AM pere: if (0.0 == in1) {
12:50 AM pere: rtapi_print_msg(RTAPI_MSG_ERR,
12:50 AM pere: "\n Hey, no divide by 0 allowed. \n"
12:50 AM pere: " Check your div2 comp inputs. \n");
12:50 AM pere: out = NAN;
12:50 AM pere: return;
12:50 AM pere: }
12:50 AM pere: out = ( in0 / in1 );
12:50 AM pere: }
12:51 AM pere: I have no idea how LinuxCNC would behave if a floating point pin is not-a-number.
05:07 AM JT-Cave_ is now known as JT-Cave
11:12 PM -!- #linuxcnc-devel mode set to +v by ChanServ