Sqrt()

This is a discussion on Sqrt() within the A Brief History of Cprogramming.com forums, part of the Community Boards category; i know its a bit of a wierd question but you people are very knowledgable, does any1 know how to ...

  1. #1
    Mmm. Purple.
    Join Date
    May 2002
    Posts
    154

    Sqrt()

    i know its a bit of a wierd question but you people are very knowledgable, does any1 know how to figure out the squre root of a number?
    Last edited by krappykoder; 03-08-2003 at 05:14 PM.

  2. #2
    Banned frenchfry164's Avatar
    Join Date
    Oct 2001
    Posts
    1,552
    include cmath
    use sqrt()

  3. #3
    Mmm. Purple.
    Join Date
    May 2002
    Posts
    154
    remind me agen, how can i extract sums from libs?

  4. #4
    Mmm. Purple.
    Join Date
    May 2002
    Posts
    154
    Scratch that: sqrt=pow(number,0.5)
    i need to write a power function now

  5. #5
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >>i need to write a power function now
    Then search the boards, there's sample code out there. Or simply write your own.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  6. #6
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    Does anyone here actually know the precise formula to find the square root of a number? I'm not neccessarily looking to find out how to do it (I could easily find the answer myself), but to see if someone knows the formula for it. My math teahcer said she used to know, but she hasn't used it in so long that she forgot what it is.

  7. #7

  8. #8
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    Davros, I don't particularly care to know the formula myself, yet to see if someone had the formula memorized themself.

  9. #9
    |<o>| <--cyclopse LouDu's Avatar
    Join Date
    Mar 2003
    Posts
    137

    Re: Sqrt()

    Originally posted by krappykoder
    i know its a bit of a wierd question but you people are very knowledgable, does any1 know how to figure out the squre root of a number?
    you find the square root of a number by mulptliging a number by it self, the perfect quares in math are as fallows

    0=0
    1=1
    2=4
    3=9
    4=16
    5=25
    6=36
    7=49
    8=64
    9=81
    10=100
    11=121
    12=144

    i know up to 15 but i jsut forgot them
    Languages <> C++, HTML

    /*The Ledgend of Ludlow Coming to a PC Near
    You intro Cinenmatic Needed email me of
    Reply to one of my threads if you can make
    one, thats decent. */

  10. #10
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718

    Re: Re: Sqrt()

    Originally posted by LouDu
    you find the square root of a number by mulptliging a number by it self
    No, that's the square of the number.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  11. #11
    Registered User abrege's Avatar
    Join Date
    Nov 2002
    Posts
    369

    Re: Re: Sqrt()

    Originally posted by LouDu
    you find the square root of a number by mulptliging a number by it self, the perfect quares in math are as fallows
    Wow, and to think we were baffled all this time!
    I am against the teaching of evolution in schools. I am also against widespread
    literacy and the refrigeration of food.

  12. #12
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718

    Re: Re: Re: Sqrt()

    Originally posted by abrege
    Wow, and to think we were baffled all this time!
    LOL

    Do I detect a bit of sarcasm?
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  13. #13
    Banned frenchfry164's Avatar
    Join Date
    Oct 2001
    Posts
    1,552
    you find the square root of a number by mulptliging a number by it self, the perfect quares in math are as fallows
    Wowzers! I gotta tell my math teachers about this! I gotta find all of them since my 4th grade class! I must tell them that they taught me the square root wrongly! Haha! I can't wait to see the looks on their faces!

  14. #14
    Registered User Bajanine's Avatar
    Join Date
    Dec 2001
    Location
    The most peaks over 10,000 feet!
    Posts
    396

    Talking Here is how we learned it!

    This is taught to first year plumber and pipefitter appretices which is also how I was taught in school. It is rather convoluted though:
    http://mathforum.org/library/drmath/view/52610.html

    [edit]
    typo's again
    [\edit]
    Last edited by Bajanine; 03-09-2003 at 04:15 AM.
    Favorite Quote:

    >For that reason someone invented C++.
    BLASPHEMY! Begone from my C board, you foul lover of objects, before the gods of C cast you into the void as punishment for your weakness! There is no penance for saying such things in my presence. You are henceforth excommunicated. Never return to this house, filthy heretic!



  15. #15
    Mmm. Purple.
    Join Date
    May 2002
    Posts
    154
    I dont know what convoluded means but it sure it complicated
    Last edited by krappykoder; 03-09-2003 at 01:35 AM.

Page 1 of 3 123 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 06-01-2006, 04:37 PM
  2. sqrt() function help
    By willc0de4food in forum C Programming
    Replies: 5
    Last Post: 03-14-2005, 08:07 PM
  3. SQRT Mystery...
    By KneeLess in forum C Programming
    Replies: 7
    Last Post: 03-23-2004, 06:49 AM
  4. sqrt
    By modec in forum C Programming
    Replies: 3
    Last Post: 04-16-2003, 07:19 AM
  5. how sqrt ?
    By sambs1978 in forum C Programming
    Replies: 3
    Last Post: 09-20-2001, 08:14 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21