Shop OBEX P1 Docs P2 Docs Learn Events
trigonometric functions — Parallax Forums

trigonometric functions

brsbrs Posts: 33
edited 2006-05-18 04:34 in Propeller 1
i noticed the propeller's reserved word list does not include trigonometric functions, i.e. sine, cosine, etc. are these built-in functions in the propeller?

has an object been created for this?

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-05-18 04:31
    There is a table in ROM, and there is an object which performs trig functions.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1+1=10
  • Phillip Y.Phillip Y. Posts: 62
    edited 2006-05-18 04:34
    see page 17 0f CoreDocs.pdf

    Sine Table ($E000-$F001)
    The sine table provides 2,049 unsigned 16-bit sine samples spanning from 0° to 90°, inclusively (0.0439° resolution).
    A small amount of assembly code can mirror and flip the sine table samples to create a full-cycle sine/cosine lookup routine which has
    13-bit angle resolution and 17-bit sample resolution:
Sign In or Register to comment.