2008-12-05 Marek Habersack <mhabersack@novell.com>
authorMarek Habersack <grendel@twistedcode.net>
Fri, 5 Dec 2008 20:24:56 +0000 (20:24 -0000)
committerMarek Habersack <grendel@twistedcode.net>
Fri, 5 Dec 2008 20:24:56 +0000 (20:24 -0000)
commit8ba2d696e70a7ae25354a1e04ea947054308344d
treed5911c1e1b7d73f72a1a12e3a7a6751fc3a20599
parent3b096078b883e2f8818d6a1cc24f3b3226557a81
2008-12-05  Marek Habersack  <mhabersack@novell.com>

* configure.in: check whether round (3) and rint (3) are present
in the C library.

2008-12-05  Marek Habersack  <mhabersack@novell.com>

* sysmath.c (ves_icall_System_Math_Round2): if round (3) and rint
(3) functions are present in the C library use them to do the
job. If they are absent, make sure that the sum of int_part and
dec_part is rounded before returning. This is necessary due to the
division of dec_part by the power of 10 before the final addition
is performed - if the result is not rounded in some cases it will
yield invalid results.

svn path=/trunk/mono/; revision=120880
ChangeLog
configure.in
mono/metadata/ChangeLog
mono/metadata/sysmath.c