Shop OBEX P1 Docs P2 Docs Learn Events
Question about PBASIC to pow(x) — Parallax Forums

Question about PBASIC to pow(x)

weichengtopweichengtop Posts: 1
edited 2006-10-24 20:39 in BASIC Stamp
Hello,every one,
I have a question about PBASIC,
I hope to go to operation pow with PBASIC today (x, y)function,
Because I can not find BS2 supports the mathematics functional operation,
As if I use Visual C ++, after include<cmath>,
I can spend pow (3 , - 1.66 ) is it calculate 3 to go- 1.66,
But I do not know in PBASIC how to go for operation ,
Do not know who can teach me ?
Thanks

Comments

  • manxstampmanxstamp Posts: 57
    edited 2006-10-24 18:54
    I am not sure of exactly what you want to do but there is an excellent website on Basic Stamp mathematics and how to do complex number manipulations in PBasic on Tracy Allen's website:

    http://www.emesystems.com/BS2index.htm

    Look down the page at the list of maths functions and see if there is the information you need.

    John

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔



    Manxstamp,
    Isle of Man, British Isles
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2006-10-24 20:39
    What the poster wants to do is replicate the pow() function found in C. pow() takes 2 arguments - pow(x, y), and returns the result of x raised to the y power. It uses double for the datatypes.

    I don't know offhand how the code would look in PBasic, so I can't help with that.
Sign In or Register to comment.