lcd.print and sprintf compatiblity??

I am using the windows ide 1.0.5 version of the compiler

#include <EEPROM.h>
#include <Wire.h>
#include <Adafruit_BMP085_U.h>
#include <Adafruit_Sensor.h>

#include <LiquidCrystal_I2C.h>
#include <hc05.h>
#include <MsTimer2.h>

sprintf is printing int values, That is why I am manually putting the decimal in the code

//code before I started chasing the bug.
String float_to_string(double val)
{
double val2 = val-(int)val;
val2=val2*10000;
sprintf(buffer,"%d.%04d",(int)val,(int)val2);
return buffer;
}