Fixed double encoding problems for negative double and float types