Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  17 Aug 2006, Konstantin Olchanski, Bug Report, "double" values are truncated 
    Reply  17 Aug 2006, Stefan Ritt, Bug Report, "double" values are truncated 
Message ID: 294     Entry time: 17 Aug 2006     Reply to this: 295
Author: Konstantin Olchanski 
Topic: Bug Report 
Subject: "double" values are truncated 
The mhttpd ODB displays and mhist truncate values of "float" and "double"
floating point variables to 6 digits. In reality, "float" has 7 significant
digits and "double" has 16. I recommend that db_sprintf() in odb.c be changed to
read this:

      case TID_FLOAT:
         sprintf(string, "%.7g", *(((float *) data) + index));
         break;
      case TID_DOUBLE:
         sprintf(string, "%.16g", *(((double *) data) + index));
         break;

K.O.
ELOG V3.1.4-2e1708b5