Timeline for How to split a floating point number into individual digits?
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 7, 2015 at 19:08 | comment | added | Austin | I don't mean literally #include'ing it, but linking against it, and by "printf library" I mean the one that has vsprintf, but printf is the most common use of it. I've never seen a vsprintf that can't also do floating point numbers. | |
Mar 7, 2015 at 16:03 | comment | added | Majenko | @Austin It's not a case of "including" the "printf library", but a question of if the built-in C library has floating point support in the vsprintf function. There's nothing you can "include" to change that, other than using a different C library. | |
Mar 7, 2015 at 2:07 | vote | accept | Zee | ||
Mar 7, 2015 at 2:07 | |||||
Mar 7, 2015 at 0:25 | comment | added | Austin | If he's using the floating point libraries, he probably has plenty of code space and can also include the printf library. | |
Mar 7, 2015 at 0:22 | comment | added | Majenko | The floating point mathematics libraries are completely separate from the printf floating point handling. For example, take a look at the Arduino's avr-libc. Has full floating point support, but can't printf floats because that code has been specifically excluded as it's incredibly huge. | |
Mar 7, 2015 at 0:17 | comment | added | Peter Bennett | @Majenko: That may be true, but if he's handling floating point numbers, there's a good chance that he's already using some floating point libraries. | |
Mar 7, 2015 at 0:14 | comment | added | Majenko | Not all libraries have the floating point portion of vsprintf compiled in to save space. Especially on 8-bit compilers. | |
Mar 7, 2015 at 0:10 | history | answered | Peter Bennett | CC BY-SA 3.0 |