Fix compare of reals.

Comparing 2 reals for equality is done with memcmp(). The length was hardcoded to 10
which is wrong on all platforms with 64bit reals.