Windows XP SP2, PBCC 4.04
If I assign a numeric literal that is cast as extended to an extended precision variable (as shown below), the value stored in the EXT variable does not have a precision of 64 bits (as it is supposed to), but instead has 54 bits of precision.
CODE:
dim number as EXT
number = 0.1##
I have learned -- through one or more posts in this forum -- that this is due to Windows initializing the FPU to a 54-bit mantissa instead of the normal 64 bits. Back in Jan. of 2000, Lance Edmonds provided the following technique to correct this, but it does not work for me:
CODE:
#REGISTER NONE
xyz% = 0
ASM fstcw xyz%
ASM or xyz%, &B0000001100000000%
ASM fldcw xyz%
Somewhere in this forum, I came across another post that -- through assembler instructions -- claims guaranteed extended precision. Despite searching this forum up and down, I cannot locate that post again. Would some kindhearted soul please show -- or provide a link to -- the official PB method of obtaining 64-bit precision from extended precision variables to once and for all put this issue to bed? I have deliberately created a new thread to, hopefully, make it easier for other people to locate a solution for this problem.
If I assign a numeric literal that is cast as extended to an extended precision variable (as shown below), the value stored in the EXT variable does not have a precision of 64 bits (as it is supposed to), but instead has 54 bits of precision.
CODE:
dim number as EXT
number = 0.1##
I have learned -- through one or more posts in this forum -- that this is due to Windows initializing the FPU to a 54-bit mantissa instead of the normal 64 bits. Back in Jan. of 2000, Lance Edmonds provided the following technique to correct this, but it does not work for me:
CODE:
#REGISTER NONE
xyz% = 0
ASM fstcw xyz%
ASM or xyz%, &B0000001100000000%
ASM fldcw xyz%
Somewhere in this forum, I came across another post that -- through assembler instructions -- claims guaranteed extended precision. Despite searching this forum up and down, I cannot locate that post again. Would some kindhearted soul please show -- or provide a link to -- the official PB method of obtaining 64-bit precision from extended precision variables to once and for all put this issue to bed? I have deliberately created a new thread to, hopefully, make it easier for other people to locate a solution for this problem.
Comment