| От | Bruno Wolff III |
|---|---|
| Тема | Re: Arbitrary precision modulo operation |
| Дата | |
| Msg-id | 20040426173844.GD18684@wolff.to обсуждение исходный текст |
| Ответ на | Arbitrary precision modulo operation (Chadwick Boggs <chadwickboggs@yahoo.com>) |
| Список | pgsql-general |
On Mon, Apr 26, 2004 at 10:18:52 -0400, Chadwick Boggs <chadwickboggs@yahoo.com> wrote: > I need to perform modulo operations on extremely large numbers. The % > operator is giving me number out of range errors and the mod(x, y) > function simply seems to return the wrong results. Also, my numerator > is in the format of a quoted string, which the mod function can't take. I tried some large values and seem to be getting reasonable results. I did get some negative remainders, but I didn't find anything in the mod documentation on whether or not these were allowed. For small values I always got positive remainders so it isn't consistantly return the remainder closest to zero. My guess is that it has to do rounding when dividing numerics.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера