flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
AlexP 08 Apr 2008, 21:12
Use a rounding function, I've recently used one in a high-level language course in school but I'm afraid I cannot provide it to you.
|
|||
![]() |
|
sakeniwefu 09 Apr 2008, 00:37
Wait I realized I was stupid. Learn to do it in float.
OK. adding +-(5/10^precision+1) and reading it up to precision should round it arithmetically, but it doesn't look optimal. I just cannot find any web or source that will explain how to round floats without libraries or by hand. Or just round down. Last edited by sakeniwefu on 09 Apr 2008, 01:11; edited 3 times in total |
|||
![]() |
|
edfed 09 Apr 2008, 00:42
you can also try to convert from the binary image of the floating point value with the needed decimals.
decode it and dispaly it without any FP instructions. it will free the FPU that is supposed to calculate other things at the same time. and better, it will be able to convert any FP in any format with only the general regisers. |
|||
![]() |
|
AlexP 09 Apr 2008, 12:55
Sakeniwefu found my idea
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.