> Basically there are 2 ways to fix this problem within Inline::Java: > > 1- Send the actual double bytes to Java instead of sending a string > representation of the double. However I'm quite sure there will be > some portability issues (byte ordering, ...) with this and it may lead > to problems. > > 2- Use the "sprintf patch" with a user configurable precision. That > would maintain current functionality and add the extra precision only > when required by the user.
My $0.02 is that something along the lines of 1 is better. 2 would require the user to actually think about what precision is needed, which of course might be different on different platforms that the code is intended to run on, and is also likely to be much more expensive. FWIW, now that I understand the issues, I am working around it in my code by explicitly sprintf()ing the values that I care about before trying to send them to java. Thanks! Ben