From: Andrey Rybak <ra@iop.kiev.ua> To: "Список рассылки по использованию дистрибутивов ALT Linux" <community@altlinux.ru> Subject: [Comm] value overflow on C Date: Wed, 22 Feb 2006 13:25:34 +0200 Message-ID: <43FC4A2E.5030302@iop.kiev.ua> (raw) Привет коммунити! Вопрос по си. Есть необходимость определять, когда происходит превышение максимального значения стандартного типа при арифметических операциях. Типа такого: значение переменной errno становится равной ERANGE, если мат. функция (например pow() из math.h) имеет своим результатом значение больше, чем может быть представлено данным типом. Что-то подобное для операций сложения и умножения имеется? Эксперимент показал,что errno остается равным нулю при прибавлении единицы к максимальному int . И при выполнении прога никак не реагирует. Работает дальше, но с уже неверными величинами. Гугление и чтение Кернигана и Ричи не дали результата. Что посоветуете? Или ссылкой какой поделитесь. Немного ОТ, но прога то на альте :-)
next reply other threads:[~2006-02-22 11:25 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-02-22 11:25 Andrey Rybak [this message] 2006-02-22 11:51 ` Damir Shayhutdinov 2006-02-22 12:51 ` Andrey Rybak 2006-02-22 12:56 ` Damir Shayhutdinov 2006-02-22 13:41 ` Andrey Rybak 2006-02-22 14:23 ` Serge Skorokhodov 2006-02-22 14:36 ` Andrey Rybak 2006-02-22 15:13 ` Yura Kalinichenko 2006-02-23 9:39 ` Serge Skorokhodov 2006-02-23 9:51 ` Kaydannik Axel 2006-02-22 19:54 ` Kosserior 2006-02-22 17:28 ` spider 2006-02-22 18:19 ` Хихин Руслан 2006-02-25 12:07 ` Andrey Rybak
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=43FC4A2E.5030302@iop.kiev.ua \ --to=ra@iop.kiev.ua \ --cc=community@altlinux.ru \ --cc=community@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git