There are standard functions such as atof and atoi in C\'s stdlib.h for converting strings to floats / integers (and to do the reverse
atof
atoi
stdlib.h
I should note as well that equivatents to atof and atoi can be viewed as conversion of internal Tcl data structures to external binary representations. This is done by the [binary format] command.
[binary format]