Jump to content

Tuna-Fish

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Tuna-Fish

  1. In my experience, a ghetto double double (11 bit exponent, 106 bit mantissa, implemented as a sum of two doubles, the smaller of which always has an exponent 53 less than the bigger) is nowhere near order of magnitude slower than x87 80bit, and can in some situations be faster, depending on the compiler, as the x87 stack is not always handled gracefully. Something like representing location as a double double and velocity as a double would give you much greater precision than plain doubles while still not being that much slower. X = Xa + Xb X' = X + Vx X'a = Xa + Vx X'b = Xb + (Vx - (X'a -Xa)) (Ordering of operations is significant) This has only 4 times the math of the x87 version, and consumes and reads/writes as much memory (as 80-bit numbers need to be 128-bit aligned). If you can do SIMD, putting Xa and Ya in the same tuple (and Xb and Yb in the next) halves the arithmetic operations needed.
×
×
  • Create New...