It's quite strange that %f doesn't seem to be working for you. Out of curiousity, do you get the same output that I do here?
Code:
$ cat scanff.c
#include <stdio.h>
int main() {
float f;
double d;
int n;
n = sscanf("3.14", "%f", &f);
printf("n=%d, float f=%f\n", n, f);
n = sscanf("3.14", "%lf", &d);
printf("n=%d, double d=%f\n", n, d);
return 0;
}
$ ./scanff
n=1, float f=3.140000
n=1, double d=3.140000
$
Because if you don't, I'd say it's a bug with your runtime environment. What about ordinary scanf()? Does it read floats with %f properly?