adime_double2string(3)

πŸ“¦ version 2.2.1, in fedora 43, fedora 44

✨ adime_double2string ✨

okay so bestie, welcome to adime_double2string from the Adime API Reference β€” it's a little function that makes your floats look cute when you print them πŸ’–


πŸŽ€ NAME πŸŽ€

adime_double2string β€” the glow-up artist for your floating point numbers πŸ’…


🌸 SYNOPSIS 🌸

#include <adime.h>

void adime_double2string(double x, char *buf);

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically? this is the function for pretty-printing floating point numbers ✨ here's the whole vibe, no cap:

  • the number gets at most 10 digits to the left of the decimal point πŸ‘ˆ
  • at most 9 digits to the right of it πŸ‘‰
  • and at most 10 digits totally, periodt πŸ’―

but hold on, there's a plot twist 🫒 if the absolute value of the number is >= 10000000000 or < 0.000001, then it gets written in exponential form instead πŸ”₯ like, it switches outfits, yk?

and exponential form keeps it lowkey compact: at most 6 digits in the mantissa, so the total number of digits never exceeds 9 πŸ‘‘ it's giving efficient, honestly.

ngl bestie, this one does not support Unicode πŸ’€ keep that in mind before you try anything fancy with it.

πŸ’œ SEE ALSO πŸ’œ


that's the whole thing, mwah πŸ’‹ this was Adime, version 2.2.1, and yes the manpage header and footer said adime_double2string(3) twice bc the page said so β€” iconic of it honestly 🌈 bye bestie, go print some pretty numbers πŸ¦‹βœ¨

πŸ“¦ where this page comes from