Am 14.08.2013 08:47, schrieb 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(rmNearest);
I find that system.round() is still doing banker's rounding. Am I missing something?
rmNearest is banker's rounding.
I don't see this TfpuRoundingMode mentioned anywhere in the documentation, other than the "get" and "set" functions for the same. What does it effect?
Just click on TFPURoundingMode mentioned in the link.

...
Anyway I guess I am going to have to write my own round() function :P

Seems so.

Regards,
Sven
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to