Trig functions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jon Rea

    #1

    Trig functions

    Im looking to do some heavy geomentry based number crunching involving a lot
    of sin and cos calculations.

    Performing these operations takes up a lot of computer time, we have
    calculated ~100 clock cycles per calculation.

    I have come accross approximations such as the "Taylor Series" for working
    out the values of these functions. What precision are sin and cos calculated
    by the computer? does anyone know how the computer calculates sin and cos ?
    (i read a while back there is an efficient binary method, but i lost the
    site and the reference to the name of the method). I assume that the
    processors tend to have special high speen pipelines for this sort of thing
    too ?

    If i only want sin and cos calculated to float precision, are there actually
    better ways of calculating sin and cos for number crunching applications.

    Many thanks for your time
    Jon Rea


  • Ignacio Machin

    #2
    Re: Trig functions

    Hi Jon,

    Have you think in using a C dll for this? I don't know if you will find a
    good and proven math component written in C#, if you application is very
    trig. intensive I would strongly advise that you use one library done in C
    this this task.
    Do a google search and you probably will find several libs like that.

    Hope this help,

    --
    Ignacio Machin,
    ignacio.machin AT dot.state.fl.us
    Florida Department Of Transportation

    "Jon Rea" <jr0407@bris.ac .uk> wrote in message
    news:XPE7b.1205 5$sY3.10381@new s-binary.blueyond er.co.uk...[color=blue]
    > Im looking to do some heavy geomentry based number crunching involving a[/color]
    lot[color=blue]
    > of sin and cos calculations.
    >
    > Performing these operations takes up a lot of computer time, we have
    > calculated ~100 clock cycles per calculation.
    >
    > I have come accross approximations such as the "Taylor Series" for working
    > out the values of these functions. What precision are sin and cos[/color]
    calculated[color=blue]
    > by the computer? does anyone know how the computer calculates sin and cos[/color]
    ?[color=blue]
    > (i read a while back there is an efficient binary method, but i lost the
    > site and the reference to the name of the method). I assume that the
    > processors tend to have special high speen pipelines for this sort of[/color]
    thing[color=blue]
    > too ?
    >
    > If i only want sin and cos calculated to float precision, are there[/color]
    actually[color=blue]
    > better ways of calculating sin and cos for number crunching applications.
    >
    > Many thanks for your time
    > Jon Rea
    >
    >[/color]


    Comment

    • Joubert

      #3
      Re: Trig functions

      Hi Jon,

      try out http://www.lundin.info/mathparser.asp

      Regards

      Joubert


      "Jon Rea" <jr0407@bris.ac .uk> wrote in message
      news:XPE7b.1205 5$sY3.10381@new s-binary.blueyond er.co.uk...[color=blue]
      > Im looking to do some heavy geomentry based number crunching involving a[/color]
      lot[color=blue]
      > of sin and cos calculations.
      >
      > Performing these operations takes up a lot of computer time, we have
      > calculated ~100 clock cycles per calculation.
      >
      > I have come accross approximations such as the "Taylor Series" for working
      > out the values of these functions. What precision are sin and cos[/color]
      calculated[color=blue]
      > by the computer? does anyone know how the computer calculates sin and cos[/color]
      ?[color=blue]
      > (i read a while back there is an efficient binary method, but i lost the
      > site and the reference to the name of the method). I assume that the
      > processors tend to have special high speen pipelines for this sort of[/color]
      thing[color=blue]
      > too ?
      >
      > If i only want sin and cos calculated to float precision, are there[/color]
      actually[color=blue]
      > better ways of calculating sin and cos for number crunching applications.
      >
      > Many thanks for your time
      > Jon Rea
      >
      >[/color]


      Comment

      Working...