Date: Mon, 16 Nov 1998 17:19:07 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Toni Rasanen cc: djgpp AT delorie DOT com Subject: Re: Float optimization? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On Mon, 16 Nov 1998, Toni Rasanen wrote: > First, should I use float or double as my innerloop variables? My advice is to always use double, unless you have large arrays and memory is at premium. > Which one is actually faster, or do they have any difference? There should be no significant difference, since the FPU does everything in 80-bit long double format, and converts it to float or double only when it stores data in memory. Computations with floats are much less accurate (slightly more than 6 significant digits), so complex computations might produce unexpected results unless you are very careful in writing the code.