Math Functions

  • Thread starter Thread starter Laserson
  • Start date Start date
L

Laserson

Hi ! Can anybody give a code that performs calculating of sine function... I
need it for report
 
Laserson said:
Can anybody give a code that performs calculating of sine function... I
need it for report

'System.Math.Sin'.
 
Laserson said:
Hi ! Can anybody give a code that performs calculating of sine function... I
need it for report

Dim y as Double
For t As Double = 0.0 To 1.0 Step 0.1
y = System.Math.Sin(2.0 * System.Math.PI * t)
Next

Kind regards
Serge
http://www.sergejusz.com
 
Public Function Sin(radians As Double) As Double

Return Math.Sin(radians)

End Function
 
For performance reasons, trig functions are usually done via table lookup
followed by interpolation. If you really need the algorithm, google for it.

Mike Ober.
 
Laserson said:
Thank you but i need a source code of sine calculating function...

There are several algorithms for doing it. My guess is that most
implementations use the CORDIC algorithm. That's probably what Michael
was referring to.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top