Noa Resare wrote:
When investigating a regression in BigDecimal i found out that
java.lang.Double truncates strings that it tries to parse to MAXNUMLEN
(defined to 64 in include/defs.h) before parsing it to a double.

The attached patch makes the java-string to c-string conversion be made
onto dynamically allocated memory.

If someone wonders why this is important it is because the test
((new BigDecimal("1e1000")).doubleValue))==Double.POSITIVE_INFINITY
fails. It turns out that BigDecimal.doubleValue() is implemented by
sending BigDecimal.toString() to Double.parseDouble(). Of course
BigDecimal.toString() returns a string 1000 chars long.


Please apply.

Thanks a lot for the patch, Noa, and catching that rather weird bug :) Checked in, keep 'em coming.


ps. the mauve regressions when comparing 1.1.4 to HEAD cvs is steadily
shrinking. Now down to 6 uninvestigated.

Good work! Thanks for that, too :)

cheers,
dalibor topic

_______________________________________________
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to