Go Back   Forums > Community Chatterbox > Tech Corner > Programming
Memberlist Forum Rules Search Today's Posts Mark Forums Read
Search Forums:
Click here to use Advanced Search

Reply
 
Thread Tools Display Modes
Old 06-10-2010, 10:45 AM   #1
The Fifth Horseman
FUTURE SCIENCE BASTARD
 
The Fifth Horseman's Avatar


 
Join Date: Oct 2004
Location: Opole, Poland
Posts: 14,276
Default Using the math coprocessor?

Hi,
I've been recently looking into algorithms for identifying nth root of a number.
It appears that in order to achieve maximum efficiency, I should implement the algorithm so that the FPU coprocessor is being used for the floating-point operations rather than the main CPU.

My question is fairly simple: Where can I find some documentation to get started? My usual sources of reference for C++ programming produce nothing at all.
__________________

"God. Can't you people see I'm trying to commit a crime against science and nature here?"
-- Reed Richards
The Fifth Horseman is offline                         Send a private message to The Fifth Horseman
Reply With Quote
Old 06-10-2010, 11:13 AM   #2
Kippesoep
Forum hobbit
 
Kippesoep's Avatar


 
Join Date: Nov 2007
Location: Etten, Netherlands
Posts: 42
Default

That's because it's not needed. Current compilers will automatically use the FPU when you use floating point math. Just use floats or doubles and you will automatically benefit from the FPU, unless you explicitly enable emulation (which was used for pre-Pentium processors).
Kippesoep is offline                         Send a private message to Kippesoep
Reply With Quote
Old 06-10-2010, 11:15 PM   #3
Japo
Autonomous human
 
Japo's Avatar


 
Join Date: Mar 2006
Location: ,
Posts: 4,613
Default

Most modern CPUs don't have a math co-processor "per se" any longer, at least according to the Wikipedia. I would be surprised to hear that you need to tell a compiler how to do each floating point operation. I think you're off track, although I know nothing specific to this.
__________________
Life starts every day anew. Prospects not so good...
Japo is offline                         Send a private message to Japo
Reply With Quote
Old 27-03-2011, 10:48 AM   #4
Kanalia
Newbie

 
Join Date: Mar 2011
Location: ,
Posts: 13
Default

Yep, just like Japo said, FPUs (or "math coprocessors") that are outside of the main CPU's die are a thing of the past. Since the times when Intel Pentium Pro/Pentium II processors reigned over the desktop highlands, FPUs sit inside the main CPU.

If you REALLY need to specifically do something on the FPU, you'd have to resort to some kind of specific math library for C/C++ or resort to x86 assembler code. Other then that, the compiler does the job for ya, just like Kippesoep said.
Kanalia is offline                         Send a private message to Kanalia
Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adventures in Math marko river Games Discussion 10 16-11-2011 03:45 PM
Adventures in Math christhecoolboy On site 1 29-05-2010 12:13 AM
Help me with my Math! Fubb Blah, blah, blah... 7 04-04-2010 10:19 PM
Merlin's Math ianbasore Troubleshooting 1 24-05-2006 01:36 PM
Help Me With Math Tulac Blah, blah, blah... 43 15-06-2005 03:19 AM

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump
 


The current time is 12:18 PM (GMT)

 
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.