[LPC2148][C] sprintf() doesn't work with double/float

inventore123:
if you specify %0.21f you need at least a 22 character string (one for the \0), but your string is char buf[16];

It is not 21f, but 2lf (it's "L" there), for "long float". I've also tried %lf, %f and it does't work too.

Why title is incorrect?