Thanks for that David; I was certain this question had been asked recently and looked for your previous response but could not find it. Might be worth pointing out to the OP that if all they are doing is logging the value then they could simply return the result from HSSFDataFormatter.convertCellValue(Cell);
Yours Mark B Bugzilla from [email protected] wrote: > > https://issues.apache.org/bugzilla/show_bug.cgi?id=48124 > > David Fisher <[email protected]> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > Status|NEW |NEEDINFO > > --- Comment #1 from David Fisher <[email protected]> 2009-11-04 > 10:26:39 UTC --- > I am going to answer you in two parts. > > (1) How floating point numbers work. > > This is not a POI issue. It is how doubles work. Double precision numbers > are > atored in a certain binary format and on 64 bit architectures you get more > bits > in your mantissa. This is the mathematics of numbers represented by the > form of > mantissa ** exponential, like for instance 1 / 3 = 0.3333333333333333. 64 > bits > gives you more. Some hardware even uses extra bits beyond the 64. > > I suggest that you try these google searches and learn about how floating > point > works. > > (a) 32 bit jvm on 64 bit linux > > (b) ieee-754 > > (c) java double precision > > If you want further explanation then you will need to tell us about your > hardware and jvm versions, and we might have an insight. > > You might be better off on a linux or redhat list for this issue. > > (2) A question. > > In your program how are you using the result of getNumericCellValue? How > are > you writing the value to your log? > > Regards, > Dave > > -- > Configure bugmail: > https://issues.apache.org/bugzilla/userprefs.cgi?tab=email > ------- You are receiving this mail because: ------- > You are the assignee for the bug. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > -- View this message in context: http://old.nabble.com/DO-NOT-REPLY--Bug-48124--New%3A-The-Precision-is-lossed-when-i-prasing-excel-used-poi-tp26194123p26202070.html Sent from the POI - Dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
