这是我用于显示七段的代码,但是在此代码中存在一个问题,即可能会丢失精度。请帮我解决这个问题
void ComputeDisplayValue(String value){
SevenSeg.NumDigits = 5;
long temp = Long.parseLong(value.substring(0,1));
SevenSeg.DisplayValue[0] = SevenSeg.SegmentMap[ temp ];
temp = Long.parseLong(value.substring(1,2));
SevenSeg.DisplayValue[1] = SevenSeg.SegmentMap[ temp ];
temp = Long.parseLong(value.substring(2,3));
SevenSeg.DisplayValue[2] = SevenSeg.SegmentMap[ temp ];
temp = Long.parseLong(value.substring(3,4));
SevenSeg.DisplayValue[3] = SevenSeg.SegmentMap[ temp ];
temp = Long.parseLong(value.substring(4,5));
SevenSeg.DisplayValue[4] = SevenSeg.SegmentMap[ temp ];*/
/* Suppress leading zero in 12 hour mode */
}