Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Microsoft follies (visual C/C++ 6.0) Answer found. (cough, cough) :)

Author: Dieter Buerssner

Date: 09:37:26 02/08/04

Go up one level in this thread


On February 08, 2004 at 12:27:23, Sune Fischer wrote:

>Perhaps a warning wouldn't hurt, although I'm not sure the compiler in general
>will analyze mathematical expressions to see if they produce something
>illogical.

Any compiler must be able to evaluate constant expressions at compile time.

>Multiply a float with a float you get a float

This is not true in this generality. It is actually very often wrong, and the
result will be a double. Requiring this could produce very inefficient floating
point code. BTW: if you multiply/add/... two short, you get an int.

Regards,
Dieter



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.