Skip to main content
Gautham Y.T
Associate
October 12, 2018
Question

I would like to use functionalities like sine, cosine etc in my code without using math.h library.

  • October 12, 2018
  • 2 replies
  • 3890 views

Please provide me the solution for this.

This topic has been closed for replies.

2 replies

AvaTar
Senior III
October 12, 2018

Use the math lib, or implement a table-based interpolation yourself.

Consider an integer-based solution.

You did not even mention the MCU you are working with.

Andrew Neil
Super User
October 12, 2018

Why do you want to avoid math.h ?

Have you looked at: https://www.keil.com/pack/doc/CMSIS/DSP/html/group__groupFastMath.html

Did you do any research yourself?

eg, google found this: https://digital.library.unt.edu/ark:/67531/metadc283001/

See also: https://en.wikipedia.org/wiki/CORDIC

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.