Subject | Round |
---|---|
Author | Martin |
Post date | 2004-04-08T08:16:20Z |
Hi,
I divide double precision number in SP, e.g. like this:
A = DBL / 16777216;
A is declared as smallint.
If DBL = 1056269538, the resul of division is 62.958570... This number
is rounded up when passing to A, so A=63. But I always need in this
case to round it down or get just the number befor floating point, so
that value in A = 62. Is there way how to do it? Thanks.
--
Martin (mailto:moirae@...)
I divide double precision number in SP, e.g. like this:
A = DBL / 16777216;
A is declared as smallint.
If DBL = 1056269538, the resul of division is 62.958570... This number
is rounded up when passing to A, so A=63. But I always need in this
case to round it down or get just the number befor floating point, so
that value in A = 62. Is there way how to do it? Thanks.
--
Martin (mailto:moirae@...)