flat assembler
Message board for the users of flat assembler.
Index
> Windows > Is wsprintfA redundant? Goto page Previous 1, 2 |
Author |
|
revolution 07 Apr 2021, 14:53
Float-to-decimal-ASCII conversion is more complicated than just converting the integer part.
Don't forget about the fraction parts, and the QNANs, SNAN, denormals, infinities, single precision, double precision, extended precision, zeros (both of them), rounding modes, ... And then add the output formats: scientific/standard notation, required number of decimal places, required precision, rounding (this is a different rounding than above), truncate or display trailing zeros, how to deal with NANs/infinities, etc., leading +/- signs, ... So a good converter would need to support all of that, otherwise it will have limited utility. |
|||
07 Apr 2021, 14:53 |
|
Overclick 07 Apr 2021, 15:24
You're right, I just show what FPU does by fistp
I think that conversion is good enough to work with COM or other programming usual float data. Also it can be modified for more keys of course. When number between -1 to 1 or 0 to 1 I use fimul to move it above zero point. |
|||
07 Apr 2021, 15:24 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.