| От | Jasen Betts |
|---|---|
| Тема | Re: Round integer division |
| Дата | |
| Msg-id | i04un6$jc8$2@reversiblemaps.ath.cx обсуждение исходный текст |
| Ответ на | Round integer division (Lee Hachadoorian <lee.hachadoorian@gmail.com>) |
| Список | pgsql-sql |
On 2010-06-25, Lee Hachadoorian <lee.hachadoorian@gmail.com> wrote: > > > On 06/25/2010 07:00 PM, Scott Marlowe wrote: >> That all floating point representations are approximate? >> > But if it's error due to approximation, shouldn't the result be random? > I tried this for a handful of larger numbers, and it appears to > consistently round to the even number. Wouldn't that have to be > intentionally programmed that way? Yes it is, an enginneer at intel made that decision in the 70s when the 8087 coprocessor was developed. If you're not running on x86-like hardware the round operation may do something different.
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера