ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] g++ и неточности с плавающей точкой
@ 2008-04-07 18:30 Michael Pozhidaev
  2008-04-08 11:00 ` Sergey Vlasov
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Pozhidaev @ 2008-04-07 18:30 UTC (permalink / raw)
  To: community

Привет всем!

Вопрос к знатокам глубин работы g++. Во время отладки порядочно нагромождённой 
программы на C++ обратил внимание на то, что результаты вычислений с плавающей точкой отличаются в зависимости от параметров оптимизации и отладки.
То, что получается при -g, отличается от того, что получается при -O2.
Вопрос в том, результат ли это недоглядок, вроде использования 
неинициализированных переменных или такое поведение нормально.
Можно ли добиться, чтобы вычисления всегда проходили стабильно или 
g++ явно генерирует различный код, приводящий к разным результатам даже на корректной программе?
-- 
С уважением и наилучшими пожеланиями, Михаил Пожидаев. E-mail: msp@altlinux.ru.
Томский государственный университет. Факультет информатики. http://www.csd.tsu.ru
AltLinux Team. http://www.altlinux.ru



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-04-08 13:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-07 18:30 [Comm] g++ и неточности с плавающей точкой Michael Pozhidaev
2008-04-08 11:00 ` Sergey Vlasov
2008-04-08 13:43   ` Michael Pozhidaev

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