[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

passing floats



I agree with John Baxter regarding the use of floating-point for future
portability of applications. Almost all platforms support the "float" and
"double" data types in the same way (even THINK C, if you ask it nicely
<g>).

With more and more applications being developed for multiple platforms, it
becomes even more important to use "standard" representations for data. The
IEEE standard floating-point formats are the ones which will be the most
portable.

However, there are always cases where it pays greatly to "bend" the rules.
If you're writing a signal processing application that requires a great
number of computations that must be accomplished in "real time", then I'd
say that it's fair to use whatever methodology results in the most
efficient execution. But even then, one should pay attention to potential
portability by isolating the most heavily used functions, so that they can
be converted individually.

-rich-