This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Floating point emulation


On Fri, Nov 29, 2002 at 10:35:06AM +0100, Daniel Lidsten wrote:
> Hi,
> 
> In my application i can increase the performance if i use "double
> precision" for my floating point calculation. However, i don't know what
> is used today since there is no such option in the compiler. Currently i
> specify the "-msoft-float" option - is this "single precision", double,
> or any other?

"soft float" relates to *how* the operations are performed.
Namely, in software (as opposed to "hard float" (ack I'm not
actually sure what the proper term is :/ ) where the
operations are performed by a floating point unit, ie it's
done in hardware.) So that has nothing to do with the
precision used.

IIRC, precision is chosen by the type:
void main( void ) {
  float x,y;
  double z;
}

I haven't used floats in years (decades? hmm) so don't quote
me on that...
(Incidently, if you are compiling with -msoft-float, I don't
expect that using doubles will "increase performance", as
you'll double the amount of work the processor has to do...)

HTH,
Y.


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]