aha, you're printing to a file on SD...
Might have helped the initial question.
That can introduce kinks.
his first link was to FilePrint
his subject line did not specify
but, I think we all know that the Arduino references are not a Master Class, but more of a general overview.
the references only show ways that work and do not begin to try to cover the 1,000 ways it will not work or pointers to watch out for, or tips and tricks on how to do things.
Also, when learning, is it proper to read multiple sources.
In the link for file print, there is no mention of float.
Parameters
file: an instance of the File class (returned by SD.open())
data: the data to print (char, byte, int, long, or string)
as a note, at the bottom, there are instructions
Corrections, suggestions, and new documentation should be posted to the Forum.
and that takes you to the development forum, not this Project Guidance Forum
....the OP was unsure where to post.
================================
in my view, I think the question is :
Why, was any note about floats left out in the instructions ?
is there anything special about floats and writing to files ?