sin function

make a sine function without using math.h library

Page 1 of 1

2 Replies - 2740 Views - Last Post: 17 November 2009 - 04:22 AM Rate Topic: -----

#1 Toba  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 17-November 09

sin function

Posted 17 November 2009 - 01:12 AM

I am having no idea how to make sine function without using math.h library...can anyone please give me a guideline
Is This A Good Question/Topic? 0
  • +

Replies To: sin function

#2 gronk  Icon User is offline

  • D.I.C Head

Reputation: 13
  • View blog
  • Posts: 168
  • Joined: 28-October 09

Re: sin function

Posted 17 November 2009 - 04:13 AM

Use a lookup table of precalculated values, and use linear interpolation to find values that don't exist.
Was This Post Helpful? 0
  • +
  • -

#3 olibenu  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 45
  • View blog
  • Posts: 538
  • Joined: 31-December 08

Re: sin function

Posted 17 November 2009 - 04:22 AM

ever heard of special angles? 30, 45, 60....
their sine values (also cos & tan) are already known e.g 0.5 etc
u can then use the trig formulae sin(x+y), sin 2x, sin(x-y) etc to find sine of angles such as 15, 75 etc
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1