Thread: math programming

  1. #1
    Unregistered
    Guest

    Question math programming

    I am trying to make a program that will
    find the sqaure root of any number. I have
    ing a lot of trouble. Maybe it would help if
    someone could show me the derivation
    of the sqarue root mathematicaly.

    please help,
    Alizeirn

  2. #2

  3. #3
    Unregistered
    Guest
    still, im trying to find a way to extract an exact square root.
    unless the only way is to use limits and see what number the
    answer is closing in on, but then I would really be lost as far
    as programming calculus theories.

  4. #4
    Barjor
    Guest
    There is solutions that will never be exact>>>sqrt(3,2);<<<<will never be exact. So as fare as I know there is no way you can write a program that can extract an exact square root of any number. You can use the theory from prev post and run it until it is good enough
    ~Barjor

  5. #5
    Unregistered
    Guest

    Question microsoft calculator

    i thought the same thing but then i remembered that
    the default calculator that comes with windows can
    calculate exact square roots.

    I have to either right a program that can calculate square roots or absolute value, though if I can get the square root part down, i can use that for absolute value. Hopefully some can either assure there is no way or point me in the right direction of the right way.

  6. #6
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    The windows calc probably just uses QWORDS and uses the FSQRT instruction to get the square root.

    With the FPU, no need to code an integer sqrt function or a floating point sqrt function. The days of floating point emulation ended with the FPU.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Math
    By knightjp in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 04-01-2009, 05:36 PM
  2. Help with C++ Math
    By aonic in forum C++ Programming
    Replies: 4
    Last Post: 01-29-2005, 04:40 AM
  3. Basic Math Problem. Undefined Math Functions
    By gsoft in forum C Programming
    Replies: 1
    Last Post: 12-28-2004, 03:14 AM
  4. Math Header?
    By Rune Hunter in forum C++ Programming
    Replies: 26
    Last Post: 09-17-2004, 06:39 AM
  5. toughest math course
    By axon in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 10-28-2003, 10:06 PM