mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-10-10 00:25:06 -04:00
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.
24 lines
576 B
C
24 lines
576 B
C
/* float.h header file for the floating-point constant module of
|
|
* the Netwide Assembler
|
|
*
|
|
* The Netwide Assembler is copyright (C) 1996 Simon Tatham and
|
|
* Julian Hall. All rights reserved. The software is
|
|
* redistributable under the licence given in the file "Licence"
|
|
* distributed in the NASM archive.
|
|
*/
|
|
|
|
#ifndef NASM_FLOAT_H
|
|
#define NASM_FLOAT_H
|
|
|
|
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
|