0

I want to convert IEEE-754 floating point number to Dec, but the problem is that I did not find any algorithms , only some realizations or by-hand. I know how to do it by hand on the paper, but I wonder if there may be some tricky algorithms (there are quite a lot of them for multiplications or division, but I found no float-to-dec).

I want to implement this on masm assembly, not on high-level programming languages, so their realizations with a lot of standard libraries are not clear for me.

Thank you!

Bathsheba
  • 231,907
  • 34
  • 361
  • 483
NLis
  • 53
  • 2
  • 8
  • 1
    Do you care much about performance? That's why the stdlib implementations are hard to understand. – David Eisenstat May 25 '17 at 15:42
  • @david-eisenstat Don't think performance is really important for me, I'm just looking for some algorithms which I can implement by myself using masm x87FPU. – NLis May 25 '17 at 15:46
  • Made a trivial edit to undo my downvote: a symptom of my not understanding the complexity of this question on first inspection. Apologies. – Bathsheba May 25 '17 at 15:49
  • 1
    [Exact textual representation of an IEEE “double”](https://stackoverflow.com/q/2480790/995714) – phuclv May 25 '17 at 15:49
  • Do you care much for accuracy? Accurate transformation is hard. Your question is a possible partial duplicate of [this question](https://stackoverflow.com/questions/7153979/algorithm-to-convert-an-ieee-754-double-to-a-string) and [this question](https://stackoverflow.com/questions/33111671/ieee-754-to-decimal-in-c-language) – njuffa May 25 '17 at 15:49
  • @lưu-vĩnh-phúc thanks for that link, I missed it somehow. That publications will definitely help me! – NLis May 25 '17 at 15:57

0 Answers0