Re: [fpc-pascal] math round vs banker's round

2013-08-13 Thread David Emerson
Thanks for the suggestions, guys! José Mejuto wrote: > SimpleRoundTo I think. But I want an integer result, and this returns a floating point. Sven Barth wrote: Take a look at SetRoundMode in unit Math: http://www.freepascal.org/docs-html/rtl/math/setroundmode.html After calling SetRoundMode

Re: [fpc-pascal] math round vs banker's round

2013-08-13 Thread Ludo Brands
On 08/14/2013 08:03 AM, Sven Barth wrote: > Am 13.08.2013 23:48 schrieb "David Emerson" >: >> >> Hi all, >> >> I have just discovered that the system.round function has this very > odd behavior of rounding towards an even number when the fractional part > is .5 -- in t

Re: [fpc-pascal] math round vs banker's round

2013-08-13 Thread Sven Barth
Am 13.08.2013 23:48 schrieb "David Emerson" : > > Hi all, > > I have just discovered that the system.round function has this very odd behavior of rounding towards an even number when the fractional part is .5 -- in the system.round documentation this is described as "banker's rounding" > > I do not

Re: [fpc-pascal] math round vs banker's round

2013-08-13 Thread José Mejuto
El 13/08/2013 23:47, David Emerson escribió: Hi all, I have just discovered that the system.round function has this very odd behavior of rounding towards an even number when the fractional part is .5 -- in the system.round documentation this is described as "banker's rounding" I do not like thi

[fpc-pascal] math round vs banker's round

2013-08-13 Thread David Emerson
Hi all, I have just discovered that the system.round function has this very odd behavior of rounding towards an even number when the fractional part is .5 -- in the system.round documentation this is described as "banker's rounding" I do not like this behavior. How can I use a more mathemat