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.
This commit is contained in:
parent
32f21f16fc
commit
214f549c5c
2 changed files with 566 additions and 333 deletions
9
float.h
9
float.h
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue