Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding the square root of a number?

Status
Not open for further replies.

Netherbeast

Programmer
Jun 4, 2002
89
US
How can this be done in assembly? Because there is no way to raise a number by .5 is there?
 
consult any book/tutorial on FPU commands (the easiest way to do the thing), they all start with "f"
you will need basically fld (fild), fsqrt, fst (fist)
 
Are you gonna use the FPU or not?

If you're limited to integers, it *might* be practical to use a table instead... "Information has a tendency to be free. Which means someone will always tell you something you don't want to know."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top