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?

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?


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

Cheers,
~David.

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

Reply via email to