0

in c#

angle = 90 x = angle * pi(3.14...) / 180 --- convert to radian "x value is 1.5768..."

and y = math.sin(x) --- "y value is 1"

i know "sin(x) = y/r" and

if r = 1

sin(x) = y

what happening in math.sin argorithm internally

i have to know math.sin(x) for next step

rkdnrrl
  • 1
  • 1
  • 1
    The usual method used to compute sin & cos is the CORDIC method: https://en.wikipedia.org/wiki/CORDIC – Picaud Vincent Mar 01 '21 at 14:44
  • 1
    Hint: read up on [`CORDIC`](https://en.wikipedia.org/wiki/CORDIC) – JAlex Mar 01 '21 at 14:44
  • @PicaudVincent - the same wiki article compares CORDIC to standard C libraries, which leads me to believe that the C libraries (that C# uses) are not CORDIC. Here is the quote "CORDIC is indeed faster than interpolating table based implementations such as the ones provided by the ARM CMSIS and C standard libraries.[54]" – JAlex Mar 01 '21 at 15:35
  • Possible duplicate? https://stackoverflow.com/q/2284860/13813219 – JAlex Mar 01 '21 at 15:38
  • @rkdnrrl It is system-dependent and you will have to go to the detail (see JAlex comment). However, for sure, such robust routines to compute elementary functions are far from trivial to implement. – Picaud Vincent Mar 01 '21 at 15:59

0 Answers0