We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Just to confirm, does anyone know if the Keil tool supports standard C mathematical functions? I am trying to use the floor( ) function.
I don't know anything about uVision2 for C166, but this is the link to the current manual for the C166 compiler.
http://www.keil.com/support/man/docs/c166/c166_library.htm
floor() is represented, as you can see.
But you should always think twice before using floating point numbers in microcontrollers. Few microcontrollers have hardware support for floating point, so the processor has to work hard to perform the calculations.
A lot of problems can be handled with fixed-point integer arithmetic.