round () function not work ?

More
24 Mar 2016 17:51 #72104 by gaston48
Hello,
The mathematical round () function is present in "rtapi_math.h" but
I can not get it to work ?
ceil () and floor () work well.
Someone could try
thank you vey much !

Please Log in or Create an account to join the conversation.

More
24 Mar 2016 20:14 #72110 by jepler
Replied by jepler on topic round () function not work ?
We have a test of the availability of math functions. In our 2.7 branch, it includes the following note:
// rtapi_math.h includes a declaration for round(), but the LinuxCNC RTAI
// packages up through RTAI 3.8.1 (which we packaged for Ubuntu Lucid)
// did not include round(), so we skip that test here.  RTAI 3.9 and
// 5.0-test1 (packaged for Debian Wheezy and Jessie, and Ubuntu Precise)
// do include round().
So, as far as versions built by linuxcnc.org are concerned, if you are using Ubuntu Lucid with RTAI 3.8.1, round() is not available. This may also apply to older releases from linuxcnc.org. Otherwise, I expect that it is available.

Please Log in or Create an account to join the conversation.

More
24 Mar 2016 21:09 - 24 Mar 2016 22:08 #72112 by gaston48
Thank you for your search.
I am currently in version 2.7.4 with Debian Wheezy
then I think round () is still not available
It is accepted by the compiler, but it does
not the calculation rounding.

Why it's just round () is not available and many
other complex functions are available?

if this is not possible with round(), I'll do it with " floor (in + 0.5) "
Last edit: 24 Mar 2016 22:08 by gaston48.

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum