ADC: NTC sensor vs DS18B20

#include <math.h>
#define ADC_MAX 4095
volatile float ntc_temp;
volatile uint16_t adc_value;
volatile float resistance;
float ntc_temperature(void)
  {
    float cal;
    resistance=(float)ADC_MAX/adc_value;
    resistance=(10*resistance)-10;          // value of on board resistor is 10k
    cal=log(resistance/5);
    ntc_temp=(cal/3950)+(1/298.15);
    ntc_temp=1/ntc_temp;                    // In kalvin
    ntc_temp=ntc_temp-273.15;               // In Degree Celsius
    return (float)ntc_temp;
}
extern ADC_HandleTypeDef hadc;
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc)
  {
    adc_value=HAL_ADC_GetValue(hadc);
  }
#include "ntc.h"
#include "ssd1306.h"
#include "DS18B20.h"
uint8_t temp;
char display_digital[20],display_analog[20];
volatile double f_ntc_temp;
init_OLED();
clear_display();
HAL_ADC_Start_IT(&hadc);
OLCD_write_string(0,0,"IoT ThingHuB ");
while (1)
  {
	f_ntc_temp=ntc_temperature();
    temp=DS18B20ReadTemp();
    HAL_Delay(2000);
    sprintf(display_digital,"Dig:%.4f C ",temperature);
    sprintf(display_analog,"NTC:%.4f C  ",ntc_temp);
    OLCD_write_string(2,0,display_digital);
    OLCD_write_string(4,0,display_analog);
    HAL_ADC_Start_IT(&hadc);
    HAL_Delay(2000);
}