poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48124] The Precision is lossed when i prasing excel used poi
Date Wed, 04 Nov 2009 18:26:41 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=48124

David Fisher <dfisher@jmlafferty.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from David Fisher <dfisher@jmlafferty.com> 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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message