|
Message-ID: <CA+fZqCXm-nAzf+j88EqTx_G6jCR-VMN5TyDmgvL-o9yNW+6BUw@mail.gmail.com> Date: Thu, 18 Aug 2022 17:51:26 +0200 From: ardi <ardillasdelmonte@...il.com> To: musl@...ts.openwall.com Subject: Do you recommend using fmt_fp() and Hi, I'm looking for a small and robust dtoa-like implementation for quad floats (IEEE binary128). The need is because I'm using John Hauser's SoftFloat for IEEE binary128 computing, but I have no easy means for converting such floats from/to strings (I can use the host printf/strtold for 80bit extended long doubles, but I'm missing some significant digits by doing that, and besides, if I ever build in a host that considers long doubles as regular doubles, I'd lose even more digits). I've been considering gdtoa for some days, taking into account its pros and cons, but I don't like its code size, its dependency on the FPU flavour behaviour, and that it requires mutexes if it's used in parallel. So, I was looking at how musl does this. It appears to be in the fmt_fp() function in vfprintf.c and in floatscan.c It looks like I can modify these functions and force them to use the binary128 type as provided by SoftFloat, instead of using long double. But it can require quite a bit of surgery, so, before I get my hands busy in it, I have to ask the question: Would you use this implementation for my needs if you were me? Did you adapt fmt_fp() and floatscan from older code? Was that code ready for 128bit floats? Or maybe you can recommend another dtoa-like code for 128bit floats? Thanks a lot, César
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.