Floats not working?


#1

Hello everybody,

Please can somebody tell me if it isn’t possible to do some simple floating point calculation? For example: I have to convert a radial value to a decimal value. I’ve noticed that in RTE modes the calculation works without any problem, but in Target mode I get some weird results. Does somebody know a workaround for this?

Kind regards,

Chris


#2

Nobody answers on this forum :question: :question: :question: :frowning:


#3

have you tried to click “Search” near the top of the page, then enter “float” in “Search for Keywords:” and then press the “Search” button?

Maybe that will answer your question…

Best Regards,
Jan


#4

or did you try searching in the Manuals for “float” or “floating point”… :question:


#5

I’ve accepted the fact that there is no support for floating var’s on my Q2501.
Though, I’m not very happy with this.
Is there any reason, why?

It would be nice to calculate waypoint distance on the fly. :frowning:

Heinz


#6

You didn’t say anything about what compiler is used for the target.

I don’t see why floats wouldn’t be available on Q2501. Even if not supported directly in hardware (FPU) it should still be no problem with FPU emulation.

Maybe it’s GCC that is the problem or something else in the compile stage that is not properly set to allow floats.
In what way do you see the problem?


#7

I, too, think that only %f in sprintf is a problem when using gcc. floating point operations should be possible…


#8

Hi All,

The problem is with GCC compiler and usage of %f format string. The floating point manipulations (like additons, multiplications and substraction etc ) work fine.

Please refer to the following link to know how to print floating point numbers in GCC compiler.
wavecom.com/modules/movie/sc … t=floating

Best Regards,
Open AT Fan.