This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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: How to determine that 2.0 == (float) 2 in a front-end.


x**6.0 can be rendered as x**6 (which is y=x*x, z=y*y, z=z*y).         

Note that this is liikely less accurate than calling a well written 
pow routine.

Note that for example x*x*x*x is generally more accurate than x**2**2

I don't necesarily argue for the more accurate form (generally Fortran
operates in the "who cares that much about last bit accuracy anyway")
but it is good to be aware of these things.


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