sprintf doesnt handle floating-point

I love sprintf (it gets me away from all those Serial.print()'s) but why doesnt it handle floating-point formats?

char tmp[100];
sprintf(tmp,“Value=%f\n”,123.4); Serial.print(tmp);

just prints ‘Value=?’

Do I need a #include?
#include <stdio.h> makes no difference

It's not like this question hasn't come up before.

Sorry AWOL, I did look before posting, but obviously not hard enough.

Thanks Nick. I want my code to be portable, so I dont think I'll build a custom IDE.
Pity the IDE maintainers couldn't offer sprintf with float as an option, either
by way of an #include file or an entry in the Tools drop-down...

You could also start using - Streaming | Arduiniana - class

lcd.print("GPS #");
lcd.print(gpsno);
lcd.print(" date: ");
lcd.print(day);
lcd.print("-");
lcd.print(month);
lcd.print("-");
lcd.println(year); // ugh!!

becomes

2
lcd << "GPS #" << gpsno << " date: " <<
    day << "-" << month << "-" << year << endl;

Check also - http://forum.arduino.cc/index.php/topic,131283.0.html - how to extend this class.

lcd.print("GPS #");
lcd.print(gpsno);
lcd.print(" date: ");
lcd.print(day);
lcd.print("-");
lcd.print(month);
lcd.print("-");
lcd.println(year);

Put this code in a function and hide the awkward way it works, either by calling it with gpsno, day, month and year as parameters or use global variables and just call the function.

tsh:
Thanks Nick. I want my code to be portable, so I dont think I'll build a custom IDE.
Pity the IDE maintainers couldn't offer sprintf with float as an option, either
by way of an #include file or an entry in the Tools drop-down...

There's a "formatDouble" library that lets you turn floats into strings. I suppose it would be nice if it was easier to access.

Floating point example w/ streaming lib:

Serial << _FLOAT(sqrt(a*a + b*b), decimals);