3
wowotek
1y

Ok so the real question is, if the Floating Points have some limitation in accuracy, how do Supercomputers Handle that?

Comments
  • 7
    By not using floats when high precision matters.
  • 0
    @Root how ? I mean you can interpret floating points number with real/integers number?
  • 4
    @wowotek
    There are quite a lot arbitary-precision-integer library's out there, for almost all languages.
  • 0
    one workaround could be to use floating point numbers with the base 10, sacrificing performance for accuracy
  • 0
    There are so many different approaches I don't even want to list them, but here are a couple:

    1) long long plus a decimal place tracker. Add a power tracker for insanely large numbers.

    2) string math (perfect accuracy, range limited only by memory, slow as beans)

    As @metamourge said, there are libraries out there for every language. Read them!
  • 1
    @metamourge @Root i just read those description. And as mindblown as i am, my brain is just happy. Thabks !
  • 0
    Well, supercomputers are not special. They treat floating numbers in the same way common computers do. When more precision than what is available in a float or a double is required other more complex types are used. I'm sure that there are some specific libraries for some particular systems but I expect it to be just a matter of getting better performance and the actual representation of the number not to be very different.
  • 2
    You use numerical stable algorithms or an iterative approach to get a solution that is accurate (e.g. when adding up numbers starting with the smallest number).
    Also some PowerPC CPUs supports quad precision natively
  • 0
    @StopMotionCuber how can a computer support a quad precision floating point with a 64-bit processor?
  • 1
    @StopMotionCuber interesting. Could you point us to an example?
  • 0
    @wowotek
    I'm not a CPU engineer but there is also AVX which supports 256/512 bit operations on a 64 bit processor.
  • 0
    @StopMotionCuber oh shit this thing will make me can't sleep
Add Comment