This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Single precision
- From: <tm_gccmail at mail dot kloo dot net>
- To: Peter Barada <pbarada at mail dot wm dot sps dot mot dot com>
- Cc: ccroswhite at get2chip dot com, gcc at gcc dot gnu dot org
- Date: Thu, 9 Jan 2003 14:05:26 -0800 (PST)
- Subject: Re: Single precision
On Thu, 9 Jan 2003, Peter Barada wrote:
>
> >A better solution is probably to #define double float immediately after
> >including any header files.
>
> If so, then cast all the floating point constants so the compiler will
> use them as single precision constants instead of their default of
> double precision which will then cause the float to get promoted to a
> double and *then* operate on the constant. Unless you case the
> constants, the code will end up slower. As an example:
Ohyeah, forgot about taht...good point!
Toshi