Keil Logo

C51: Math Functions and Their Execution Time


Information in this knowledgebase article applies to:

  • C51

QUESTION

Can the C51 compiler compute logarithmic functions e.g.:

a * log(x) + b * pow(log(x), 2)

or square root functions e.g.:

pow(ax, 0.5) + pow(bx, 1.5) + pow(cx, 2.5)

How can I determine the execution time for these functions?

ANSWER

Yes. The C51 compiler supports both log() and pow() functions.

You may use the built-in Performance Analyzer in the simulator to display execution times for these functions.

MORE INFORMATION

  • Refer to log in the Cx51 User's Guide.
  • Refer to pow in the Cx51 User's Guide.

Last Reviewed: Thursday, February 25, 2021


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.