[EpiData-list] problem in digits

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Mon Dec 23 06:17:37 CST 2013


On 2013-12-23 10:31, epidata-list at lists.umanitoba.ca wrote:
> Dear EpiData-list:
>
>   
>
> When I build a "qus" file as following:
>
>   
>
> cnid  chinaidno  ##################
>
>   
>
> But I have the trouble when I enter the data, it always appears wrong number at the last two digits.
>
> For example: I want to enter the data as 221133445566778899.
>
> But the last two digit”99” will change to some other digits such as 34 or other,randomly.
>
> How can I solve the problem?
Dear MingQiu CHEN

This is not possible. Any 32-bit computer is only capable of having at 
max 15 significant digits and this is only under special circumstances - 
normally this is around 12 or 13 digits.

Without knowing exactly how you experience the issue, my guess is that 
the number changes after you have saved the record and browse the data 
(either going back is the records or list data).

The reason for this is that while typing the digits, the data is stored 
as a string or simply a list of characters. But during the save, the 
entry is checked for validity, converted internally to a 32-bit floating 
point number and there the change occurs. Becaus you number has 18 
significant digits the computer is bound somehow to loosen the 
precission - hence the number displayed will most likely not be the same 
as you displayed.

If you do not need the data stored as a floating point number (eg. if it 
is part of some serial no., key or ID) and you do not need it for 
calculation/statistics later on, I would recommend that you store such 
information as a string rather than a number.

Kind regards,
Torsten Bonde Christiansen.
EpiData Association.


More information about the EpiData-list mailing list