diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-10-15 19:46:32 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-10-15 19:46:32 -0700 |
commit | 214f549c5cd755661cd8a5d3b7c0ce4872d4afb6 (patch) | |
tree | 21d955c50c9b9594a4bb04e7bf485a09ed6c2baa /float.h | |
parent | 32f21f16fc7cb0bd5cf8dc3d54417295ecd3d57d (diff) | |
download | nasm-214f549c5cd755661cd8a5d3b7c0ce4872d4afb6.tar.gz nasm-214f549c5cd755661cd8a5d3b7c0ce4872d4afb6.tar.bz2 nasm-214f549c5cd755661cd8a5d3b7c0ce4872d4afb6.zip |
New floating-point conversion routines
Substitute in nasm64developer's "acfloat4" routine. This
floating-point conversion routine is not perfect (it gets a fair
number of LSB errors), but the old NASM code was just plain broken.
nasm64developer's code at least gets within ±1 LSB.
Diffstat (limited to 'float.h')
-rw-r--r-- | float.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -10,7 +10,14 @@ #ifndef NASM_FLOAT_H #define NASM_FLOAT_H -int float_const(char *number, int32_t sign, uint8_t *result, int bytes, +enum float_round { + FLOAT_RC_NEAR, + FLOAT_RC_ZERO, + FLOAT_RC_DOWN, + FLOAT_RC_UP, +}; + +int float_const(const char *string, int sign, uint8_t *result, int bytes, efunc error); #endif |