Jason Dawes wrote:
> >So my belief is, NewFloatMgr.h is not necessary. If someone wants to
> >convince me otherwise, you'll need to explain why my app works without
> >it.
>
> Because it's an app - you're linking in [the runtime] libraries which
> include fun things like __lmul, which do floating point multiplication. If
> you don't link libraries such as these in you'll get link errors. Surprise
> surprise, you don't get link errors if you use NewFloatMgr.
I'm not sure I quite understand this. You're saying if I do "a * b"
where a and b are floats, the compiler (gcc in my case) will generate a
call to __lmul. Ok, that's pretty standard for C compilers. I assume
MW does something similar? Then naturally I need to link the library
that includes __lmul for my app to link correctly.
But including NewFloatMgr.h surely doesn't change this, right? You
can't overload operators in C. Perhaps you mean "you don't get link
errors if you use NewFloatMgr.h *AND* you use explicit function calls
instead of operators"? What would be the advantage of doing that? The
code would just be harder to read. I guess the NewFloatMgr.h functions
are in ROM while the floating point lib is in RAM, so you save code
space. Is that it?
--Mark