This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

The format of Scientific notification

For the printf command, the default format of the E argument is:
« - »d.ddddE« - »dd

eg. 1.234E-05

In my case i dont need the leading zero in the exponent.

I want the output like this:
1.234E-5

Can i change the printf output with any argument?
Do i have to make my own printf function?
Or can i change the compilers printf command?

Parents
  • Peter,

    Er du sikker paa at en '51 er den rette processor for dette job?

    I really think that,based on the questions you have asked that you need to consider e.g. an ARM for this. The '51 is plain MISERABLE as a floating point processor due to the architecture being designed not for computing, but for control. Of course, if you are runnibg porocess for hours between each float, that will be another case.

    Erik

Reply
  • Peter,

    Er du sikker paa at en '51 er den rette processor for dette job?

    I really think that,based on the questions you have asked that you need to consider e.g. an ARM for this. The '51 is plain MISERABLE as a floating point processor due to the architecture being designed not for computing, but for control. Of course, if you are runnibg porocess for hours between each float, that will be another case.

    Erik

Children