Re: Floating point calculations on 16 uC




db wrote:
> Hi,
>
> I'm doing floating point calculations on a Fujitsu MB90F474 16bit uC.
> All float calculations are done in the main loop context. Sometimes the
> result returns a garbage value. This seems to happen only when
> interrupts are enabled. Note that there are no globals or shared data
> involved.
>
> If anyone has had similar problems please let me know. Any advice when
> using floating point calculations would be appreciated.
>
> Regards
> Dieter

You dont say what kind of garbage your getting. Stack overruns are easy
to detect as it will trash your fixed variables starting from the
highest 1 (check your map file). Sometimes you can have problems with
far/near pointers. Compile useing the large model and see if your
problem dissapears. If all else fails disable each interrupt
individualy.

.



Relevant Pages

  • Re: Floating point calculations on 16 uC
    ... >> All float calculations are done in the main loop context. ... >> using floating point calculations would be appreciated. ... There is one rather ugly variant of stack overflow that I ran across many ... These sections often have notes on interactions with interrupts ...
    (comp.arch.embedded)
  • Re: Errors cancel sometimes
    ... I thought that it was remarkable, so I'm remarking on it. ... Goldberg's "What Every Computer Scientist Should Know About Floating ... elements of accurate numerical calculations on a computer as well. ... I'd be happy to have any pointers to more modern works that cover the ...
    (comp.programming)
  • Re: TDD: Test-Driven Design or Test-Driven Development?
    ... design idea, and conflating it. ... > requires one to implement floating point calculations. ... This decision may affect how the calculations are coded. ... Please describe the Test Driven Development process that you think we are ...
    (comp.object)
  • Re: Program Computes incorrectly under VPC.
    ... >>owners of this software that it should not be used for floating point math. ... > NONE of the spreadsheets in the world today have EVER ... > calculations, ... > percentage of algorithms will fail in VPC. ...
    (microsoft.public.mac.virtualpc)
  • Re: IEEE Decimal Float on Itanium
    ... I'm guessing you're contemplating some specific application here, and probably something involving PL/I. ... Currency calculations. ... switched a billing and management system from its floating point implementation over to integer calculations eons back. ...
    (comp.os.vms)