Results 1 to 4 of 4

Thread: I r stupid. Re: Javascript

  1. #1
    Char, The Red Comet bennator's Avatar
    Join Date
    Jul 2001
    Location
    A Baoa Qu
    Posts
    1,004
    Contributions
    • Former Site Staff

    Default I r stupid. Re: Javascript

    Most of my Javascript knowledge has faded away. Anyways, a need a square-root function for what I'm doing, and I have no clue if the language supports it. I've tried things like <i>Sqrt(a), root(a), </i>and <i>squareroot(a)</i> which haven't worked. For some reason I think Javascript doesn't have one. So, if anybody could:

    A) Tell me the Javascript square-root algorithm if avalible

    B) Point me to a place where I can download a written square-root function

    C) Empower me with the math need to do square-roots only using *, /, +, - (and maybe %, does JS use that too?), so that I can write my own Square-Root function.

    D) Tell me it's impossible, tell me to try it with a Java applet (requiring me to *get* the JDK which I have insufficent time to download, and I'm not willing to pay for it), a CGI script (God forbid, I'm not learning CGI), or some other program (although I'd like it to be able to be put on the web, I can survive if it's not possible).

    any help would be appreciated.
    Grab the opportunities life hands you, that's my motto!

  2. #2
    ORANGE Dr Unne's Avatar
    Join Date
    Dec 1999
    Posts
    7,394
    Articles
    1
    Contributions
    • Former Administrator
    • Former Developer
    • Former Tech Admin

  3. #3
    Char, The Red Comet bennator's Avatar
    Join Date
    Jul 2001
    Location
    A Baoa Qu
    Posts
    1,004
    Contributions
    • Former Site Staff

    Default

    Thanks Unne, I feel really stupid, I shoud have tried math.sqrt()

    *hangs head in shame*
    Grab the opportunities life hands you, that's my motto!

  4. #4
    ORANGE Dr Unne's Avatar
    Join Date
    Dec 1999
    Posts
    7,394
    Articles
    1
    Contributions
    • Former Administrator
    • Former Developer
    • Former Tech Admin

    Default

    Spending 12 hours trying to fix a bug when the only thing wrong is one letter is one of the joys of programming.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •