fast math?

Nick Burrett nick at
Mon Feb 3 05:00:32 PST 2003

Luigi Dalmazio wrote:
> I am developing several programs (in C++ with GCC under Linux, Athlon 
> processor) that make intense usage of sqrt(), sin(), atan() and other 
> math functions. Under Linux there is a compiler flag (fast_math) which 
> works greatly and (apparently) without loss of precision makes double 
> precision math functions much faster then fixed point, low precision 
> functions. I would like to know if the Risc OS implementation of the 
> compiler offers this flag or other useful alternatives to improve 
> floating point performances even loosing some bit of precision. As I 
> said above, I make a lot of math calculations and I need an acceptable 
> fp performance even with some restrictions on precision with respect to 
> the standard.

Yes. The -ffast-math option is supported for RISC OS.



Nick Burrett
Network Engineer, Designer Servers Ltd.

More information about the gcc mailing list