From: Michael Pozhidaev <msp@altlinux.ru>
To: community@lists.altlinux.org
Subject: [Comm] g++ и неточности с плавающей точкой
Date: Tue, 08 Apr 2008 01:30:31 +0700
Message-ID: <m363uty0u0.fsf@blard.localdomain> (raw)
Привет всем!
Вопрос к знатокам глубин работы g++. Во время отладки порядочно нагромождённой
программы на C++ обратил внимание на то, что результаты вычислений с плавающей точкой отличаются в зависимости от параметров оптимизации и отладки.
То, что получается при -g, отличается от того, что получается при -O2.
Вопрос в том, результат ли это недоглядок, вроде использования
неинициализированных переменных или такое поведение нормально.
Можно ли добиться, чтобы вычисления всегда проходили стабильно или
g++ явно генерирует различный код, приводящий к разным результатам даже на корректной программе?
--
С уважением и наилучшими пожеланиями, Михаил Пожидаев. E-mail: msp@altlinux.ru.
Томский государственный университет. Факультет информатики. http://www.csd.tsu.ru
AltLinux Team. http://www.altlinux.ru
next reply other threads:[~2008-04-07 18:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-07 18:30 Michael Pozhidaev [this message]
2008-04-08 11:00 ` Sergey Vlasov
2008-04-08 13:43 ` Michael Pozhidaev
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=m363uty0u0.fsf@blard.localdomain \
--to=msp@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