EEPROM.get() and EEPROM.put() does'nt wok properly

I am working on a project, in which i want to retrieve my sensed value even after power is cutoff and restart. Firstly i use EEPROM.write() and EEPROM.read() method for this purpose. but there is a problem, that the address can store maximum of 255(whatever the datatype of variable).
So i go for PUT and GET method, i can now store the number upto 12 - 14 places acurately.

I download a code from Arduino forum, it work fine. but that code consist the writing(PUT) and reading(GET) method in same sketch.

when i create a different sketch of writing(PUT) the value to eeprom and different sketch for reading(GET) that value from the same address, it gives me the wrong value.how’s that possible?

// this code is downloaded from forum, that works fine
#include <EEPROM.h>
#include <LiquidCrystal_I2C.h>
#include <Wire.h>

LiquidCrystal_I2C lcdDisplay(0x3F, 16, 2);

  double data = 999999999.0980;
  double address = 0; //data will be stored in cells 0 & 1
  double result; //So we can test the read.

  
void setup(){
  Wire.begin(D2,D1);
  EEPROM.begin(1024);
  lcdDisplay.init();
  lcdDisplay.backlight();
  lcdDisplay.home();
  lcdDisplay.print(double (data),4);
  
  Serial.begin(115200);
  Serial.print( "data: " );
  Serial.println( double(data),4 );
  
  // Write data to EEPROM
  EEPROM.put( address, data );

  
  // Read the data.
  
  lcdDisplay.setCursor(0,1);
  lcdDisplay.print(result,5);
  Serial.print( "result: " );
  Serial.println( result,5 );
}

void loop(){
  EEPROM.get( address, result );
  }
//this code is for writing the value to eeprom
#include <EEPROM.h>
#include <LiquidCrystal_I2C.h>
#include <Wire.h>

LiquidCrystal_I2C lcdDisplay(0x3F, 16, 2);


  int data = 15;
  int address = 0; //data will be stored in cells 0 & 1
  
void setup(){
  Wire.begin(D2,D1);

  EEPROM.begin(1024);
  int data = 15;
  int address = 0; //data will be stored in cells 0 & 1

  lcdDisplay.init();
  lcdDisplay.backlight();
  lcdDisplay.home();
  lcdDisplay.print(data);
  
  Serial.begin(115200);
  Serial.print( "data: " );
  Serial.println( data);
  
  // Write data to EEPROM
  EEPROM.put( address, data );

}

void loop(){}
// This code is for reading the value from the eeprom
#include <EEPROM.h>
#include <LiquidCrystal_I2C.h>
#include <Wire.h>

LiquidCrystal_I2C lcdDisplay(0x3F, 16, 2);
int address = 0;
int data; //So we can test the read.


void setup(){
  Wire.begin(D2,D1);
  EEPROM.begin(1024);


  lcdDisplay.init();
  lcdDisplay.backlight();
  lcdDisplay.home();

  
  Serial.begin(115200);

  
  // Read the data.
  EEPROM.get( 0, data );

  lcdDisplay.setCursor(0,1);
  lcdDisplay.print(data);
  Serial.print( "data: " );
  Serial.println( data);
}

void loop(){}

Post complete, minimal demonstration sketches. I don't feel like looking through some unnecessary LCD code.

  double address = 0; //data will be stored in cells 0 & 1

Addresses are NOT floating point values. Why the heck are you using double as the address type?

  double data = 999999999.0980;

Which Arduino are you running this code on? On most Arduinos, double and float are the same type. A float can not handle that many significant digits.

  lcdDisplay.print(double (data),4);

You look pretty stupid casting a double to a double.

  // Read the data.
 
  lcdDisplay.setCursor(0,1);
  lcdDisplay.print(result,5);
  Serial.print( "result: " );
  Serial.println( result,5 );

Well, you forgot to actually read squat. Or to define result as any type…

  int data = 15;
  int address = 0; //data will be stored in cells 0 & 1
 
void setup(){
  Wire.begin(D2,D1);

  EEPROM.begin(1024);
  int data = 15;
  int address = 0; //data will be stored in cells 0 & 1

Why do you have two variables named data and two variables named address?

Posting code that ACTUALLY compiles and post the output that the program(s) actually produce will give you credibility. Posting what you have so far does not.

void loop(){

EEPROM.get( address, result );
  }

How can you claim that it's not working when there's no output on any Arduino pin that would actually tell you whether it read anything or the value of the thing?

  EEPROM.begin(1024);

Which Arduino are you using? Because that won't compile for any AVR Arduino (UNO, MEGA, Nano, Micro, Mini...)

It's probably ESP8266.

pert:
It's probably ESP8266.

...and that's actually the answer. The ESP8266 EEPROM library only writes to flash when you call EEPROM.commit() or EEPROM.end().
https://arduino-esp8266.readthedocs.io/en/latest/libraries.html#eeprom