IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Re: RESOLUTION:
Stupid me - I assumed it was well known that Intel floating point was fairly standardized on 80 bits - long double. The Intel FPU is very standard. The 80 bit BCD format is IEEE. It's commonplace to expect accuracy to 16 digits in basic things such as special functions. The 80 bit format gives added range for error accumulation.

You should not have to worry about something for which there is no compiler warning. This is a real problem if that is the actual resolution.
-drl
New Historically speaking...
...you'd choose the precision of the floating point operations for the compiler, and the compiler would attempt to enforce that precision. In a lot of old embedded apps, you'd choose to run everything as single precision (32 bits) so that everything could fit into a 4 byte space. When the FPU's came out, they leapfrogged the double precision (64 bits) and went for double long precision (80 bits). Now, 80 bits can fit in 10 bytes, but most modern processors like even 4 byte boundaries, so most of the access for 80 bits is usually 12 bytes in length (with 16 spare unused bits).

I know on the MC6888x, one can move things in and out of the FPU in whatever resolution is desired. So you can have extended precision throughout the compiler enforced if the compiler writer so desires. Of course, this does eat processor cycles and memory since you've increased the access by 1/3.

One thing I couldn't find was the correlary in the intel x87 instruction set to allow you to FLD (load) and FST (store) in extended precision (i.e. 12 bytes). The default is 8 bytes, unless otherwise specified. I'd be surprised if the later versions of the FPU didn't provide that facility, I just couldn't find it.

With that said, the extended precision real (12 bytes, 80 bits) format was not a standard in the K&R or ANSI C specifications. The C'99 spec does have the format as a base type, but I'm not sure that the C++ standard has adopted it yet. From a pure C perspective, the standard is very much influenced by C since the C++ compilers are compiling a lot of C code.
New Re: Historically speaking...
The whole point of 80 bits is to have a cushion against error accumulation so that you can have double precision with confidence. The fp stack are all 80 bit.

Here's the reference:

[link|http://212.247.200.167/asm/asm_deformed_us/documentation/masm/mmr61/Chap_05.htm|big link]


FLD/FILD/FBLD Load

Pushes the specified operand onto the stack. All memory operands are automatically converted to temporary-real numbers before being loaded. Memory operands can be 32-, 64-, or 80-bit real numbers or 16-, 32-, or 64-bit integers.
-drl
     C decimal question: - (admin) - (53)
         Equality on Real/Double is always a crapshoot - (tablizer)
         Don't know... - (Simon_Jester)
         Re: C decimal question: - (deSitter) - (1)
             Makes no difference. - (admin)
         The boolean compare operators - (ChrisR) - (36)
             I've done the subtract - (admin) - (35)
                 Assembly dump? - (ChrisR) - (22)
                     I did my dump with GDB - (Arkadiy)
                     What I get: - (admin) - (20)
                         Speculating... - (ChrisR) - (19)
                             gcc 2.95.4 results - (admin) - (18)
                                 Re: gcc 2.95.4 results - (deSitter) - (1)
                                     EBP is base of stack frame - (Arkadiy)
                                 I86 Assembly is not my specialty... - (ChrisR)
                                 ASM Comments - (ChrisR) - (13)
                                     Errrr... - (admin) - (12)
                                         Getting ASM from VC6 - (deSitter) - (11)
                                             Results - (deSitter) - (10)
                                                 Request... - (ChrisR) - (9)
                                                     Re: Request... - (deSitter) - (8)
                                                         Trimming it down... - (ChrisR) - (7)
                                                             Re: Trimming it down... - (deSitter) - (6)
                                                                 Scratches head... - (ChrisR) - (5)
                                                                     Re: Scratches head... - (deSitter) - (4)
                                                                         Thanks... - (ChrisR) - (3)
                                                                             BTW - (deSitter) - (2)
                                                                                 Hmmmm - (ChrisR) - (1)
                                                                                     puts("42"); -NT - (deSitter)
                                 gcc 2.95.26 - (ChrisR)
                 Did you try it with optimizations off? -NT - (deSitter) - (7)
                     A really good optimizing compiler... - (ChrisR) - (6)
                         Yes.. - (deSitter)
                         Compiler has no way to predict how pow() is implemented - (Arkadiy) - (4)
                             IEEE - (deSitter) - (2)
                                 pow() is library, not hardware - (Arkadiy) - (1)
                                     True - (deSitter)
                             Re: Compiler has no way to predict how pow() is implemented - (deSitter)
                 An option of interest? - (ChrisR) - (3)
                     I'll look into that. Datum: gcc 3.2.1 on glibc 2.3.1 -NT - (admin)
                     Doesn't seem to make any difference. - (admin) - (1)
                         Re: Doesn't seem to make any difference. - (deSitter)
         Not a direct answer, but still on-topic. - (static)
         RESOLUTION: - (admin) - (10)
             A caveat from Borland: - (a6l6e6x) - (6)
                 This was slightly different. - (admin) - (5)
                     Re: This was slightly different. - (deSitter)
                     Oh - to discover a real compiler problem - (deSitter) - (1)
                         This is not considered a compiler problem by the GCC folks. - (admin)
                     Scott, that's a bug worthy of catching - (Simon_Jester) - (1)
                         Fun to track down, at least. - (admin)
             Re: RESOLUTION: - (deSitter) - (2)
                 Historically speaking... - (ChrisR) - (1)
                     Re: Historically speaking... - (deSitter)

Maybe you should try to go over those dark green things.
121 ms