Jump to content

Pug

Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by Pug

  1. OK. I wasn't thinking (sheepish grin). Here's a quote from an Intel manual that might actually contribute to the discussion: "The rounding control (RC) field of the FPU control register (bits 10 and 11) controls how the results of floating-point instructions are rounded. Four rounding modes are supported: round to nearest, round up, round down, and round toward zero. Round to nearest is the default rounding mode and is suitable for most applications. It provides the most accurate and statistically unbiased estimate of the true result." I can only assume the the other CPU manufacturers provide similar configurable options for thier FPUs. (It strikes me that maybe one of the ways AMD gets more speed out of their FPU is to use a quicker rounding mode as default ???)
  2. Yet another closet programmer's 2 cents: Given that you probably don't really need the full precision you are getting from a 32 bit value why not simply wrap your FP functions with something like: return (real_value & 0xfffffffc); Masking the last two bits should ensure that the results are the same regardless of the inherent unpredictability of a given calculation. The drawback is that you loose 2 bits of precision and add about 4-6 cycles to the operation. BTW guys, it is never 'impossible to fix', but it is often too costly.
×
×
  • Create New...