Hi all,

On 8/14/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > converts its argument to a string via SvPV, which on linux ends up calling
> > gcvt() with a precision of 15. 

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.

I'll try to implement one of these in the next release.


Patrick


> 
> Just to make this more clear:
> 
>   DB<1> p 0.0562 * 1e16
> 562000000000000
>   DB<2> p 0.05620000000000028 * 1e16
> 562000000000003
>   DB<3> p pack("U*",unpack("U*",0.0562)) * 1e16
> 562000000000000
>   DB<4> p pack("U*",unpack("U*",0.056200000000000028)) * 1e16
> 562000000000000
> 
> 
> 


-- 
=====================
Patrick LeBoutillier
Laval, Québec, Canada

Reply via email to