Re: Rounding decimal variables
Posted in 1999
[ posted and mailed ] Jacek Medrzycki wrote: > But I need a "precise" rounding, according to mathematical rule: when value > on n-th decimal position is bigger or equal to 5, then the n-th - 1 position > in incremented by one - and so on... So 650.2646 --> 650.265 --> 650.27 Jacek, this is a rather strange definition of "precise" rounding. What "mathematical rule" are you refering to? I certainly never heard of one like this. Informix does exactly what the generally accepted definition of "rounding" states. If you want do create your own definition, you'll have to write your own function (stored procedure) to get the result you desire. Regards, Richard -- +--------------------------+------------------------------------------+ | Dr. Richard Spitz | INTERNET: spitz@ana.med.uni-muenchen.de | | EDV-Gruppe Anaesthesie | Tel : +49-89-7095-6110 <-- NEW! | | Klinikum Grosshadern | FAX : +49-89-7095-8886 | | 81366 Munich, Germany | GSM : +49-172-8933578 | +--------------------------+------------------------------------------+