Floating-Point Numbers: Pentium 3 vs 4
Floating-Point Numbers: Pentium 3 vs 4
Author
Discussion

fido

Original Poster:

18,938 posts

286 months

Wednesday 29th August 2007
quotequote all

possibly the geekiest question i'm ever going to post - but i bet someone here knows the answer. if i'm doing the same calculations (with the same precision) on two different processors (as mentioned above) will i get exactly the same answer (to the zth digit) on both? hope this makes sense wink

TheLearner

6,962 posts

266 months

Wednesday 29th August 2007
quotequote all
To the Nth degree? Probably wouldn't get the same result twice TBH, electron drift, random quark passing through the CPU, solar rays.... that is to the Nth degree though smile But if you were really looking to do hardcore math, then the x86 wouldn't be the best place... something like the Cell processor in the PS3... would be better. x86 is optimised for out-of-order execution (whatever it's called, basically code that jumps all over the shop) and Cell is in-order (good for physics processing aka math).

2something

2,145 posts

239 months

Wednesday 29th August 2007
quotequote all
I wouldn't be surprised if they were different, but have no facts/data to back it up.

buggalugs

9,297 posts

268 months

Wednesday 29th August 2007
quotequote all
I don't know for sure but am tempted to say that it would be the same, with the possible exception of the last digit if rounding's done differently. I mean, we're talking about simple mathematical operations, the result is either right or it isn't and if it isn't then it's a problem! Just my 2p.

That said there *was* a problem with floating point numbers in the early P6 (pentium 1) cores, if you google 'fdiv bug' all will be revealed.

fido

Original Poster:

18,938 posts

286 months

Wednesday 29th August 2007
quotequote all
buggalugs said:
I don't know for sure but am tempted to say that it would be the same, with the possible exception of the last digit if rounding's done differently. I mean, we're talking about simple mathematical operations, the result is either right or it isn't and if it isn't then it's a problem! Just my 2p.
yep, this is what i was thinking, at the very least for the same series of processors - though i'm optimistic that even the rounding should be the same - there must be IEEE or some standard for all processing hardware.

buggalugs said:
That said there *was* a problem with floating point numbers in the early P6 (pentium 1) cores, if you google 'fdiv bug' all will be revealed.
yep, i am aware of the error in the division lookup table.

2something

2,145 posts

239 months

Wednesday 29th August 2007
quotequote all
2something said:
I wouldn't be surprised if they were different, but have no facts/data to back it up.
O.k the fdiv problem was the one I could remember vaguely in the back of my head and was what my statement above was based on.

buggalugs

9,297 posts

268 months

Wednesday 29th August 2007
quotequote all
fido said:
buggalugs said:
I don't know for sure but am tempted to say that it would be the same, with the possible exception of the last digit if rounding's done differently. I mean, we're talking about simple mathematical operations, the result is either right or it isn't and if it isn't then it's a problem! Just my 2p.
yep, this is what i was thinking, at the very least for the same series of processors - though i'm optimistic that even the rounding should be the same - there must be IEEE or some standard for all processing hardware.

buggalugs said:
That said there *was* a problem with floating point numbers in the early P6 (pentium 1) cores, if you google 'fdiv bug' all will be revealed.
yep, i am aware of the error in the division lookup table.
You set me off reading up on that again in wikipedia! the original blokes FAQ was very interesting, about how he pinned down the problem. Perhaps I 'dont know what I dont know' here but AFAIK the results of mathematical operations are either correct or they're not. But workarounds and routines to handle very long numbers on fundamentaly 32 bit processors can make things interesting, I guess if differences in results do occour then that is the area that's most likely to cause them. As I said though I really don't know what I'm talking about here, just passing time till someone comes along who does biggrin

TheLearner

6,962 posts

266 months

Wednesday 29th August 2007
quotequote all
Indeed, although the OP was looking at to the Nth digit computations, so really "If I set a P3 and a P4 off and have infinite time, would they always be showing the same digit at the same point in the calculation?"

I don't think they would as external forces would cause oddities. Plus different sets of cheat sheets. I'm also factoring in errors in manufacturing, the silicon wafer and potentially the machines that made everything else due to being designed by fleshy muppets smile

I don't however thing you'd notice it within your lifespan though hehe

Morningside

24,147 posts

260 months

Wednesday 29th August 2007
quotequote all
In the old days some compilers you could specify hardware or software (emulated) maths co-processor for some maths routines therefore the hardware it ran on would be irrelevant, albeit a bit slower. I presume you still can today?