dtoa.h 444 B

1234567891011121314151617
  1. /* Internal exact decimal decomposition for stdio float formatting. */
  2. #ifndef LIBC_DTOA_H
  3. #define LIBC_DTOA_H
  4. #define LIBC_DTOA_MAX 1200
  5. struct libc_dtoa {
  6. char digits[LIBC_DTOA_MAX];
  7. int ndigits;
  8. int point; /* digits to the left of the decimal point */
  9. int neg; /* sign bit, including negative zero */
  10. };
  11. /* Returns 0 for finite, 1 for infinity and 2 for NaN. */
  12. int libc_dtoa(double value, struct libc_dtoa *out);
  13. #endif