Re: [Flashforth-devel] Floating point library - open issues
Brought to you by:
oh2aun
From: om1zz <om...@vo...> - 2015-06-01 09:32:57
|
4. Stack(s) issue? When running following test (math functions calculations in a simple loop): https://github.com/igor-m/EXPERIMENTAL_ZZ/blob/master/examples/Big%20Torture%20Test%20NO%20NANS%20and%20BIG%20_POS_NEG.txt it locks (with "rtc time" clock running or not (inerrupt not init), with do-loop or for-next loop as the main test loop). With default settings: data stack = 96 return stack = 96 min XC16 stack = 128 with dspic33 and pic24 chips, FF - 17.5.2015, @27MHz it usually locks near the end of the first loop. With settings like: data stack = 180 return stack = 180 min XC16 stack = 128 with dspic33 and pic24 chips, with FF - 17.5.2015, @27MHz it locks after a longer time and ~dozens/hundreds of loops, With data stack = 254 return stack = 254 min XC16 stack = 128 with dspic33 and pic24 chips, with FF - 17.5.2015, @27MHz it passes the test (it runs for about 8 minutes). With default 96 settings it restarts with OS after the crash, with 180 settings with W. When doing the specific calculations (at which it crashes) from the prompt, I get correct results and I see no issues. I think it should work with the 96 default, as the calculation within the test are single line, simple primitive calculations without any loops, nestings or recursions. It seems there is a subtile issue somewhere, I cannot find the cause however. Igor ______________________________________________________________ > Od: "om1zz" <om...@vo...> > Komu: "flashforth-devel" <fla...@li...> > Datum: 30.05.2015 10:53 > Předmět: Floating point library - open issues > >Hi, >as discussed with Mike before, there are few open issues with floating point library, which are not critical, but needs some tweaking to be perfect, however. > >1. handling largest positive and largest negative number, it crashes now. >2. printing NaN, crashes >3. "e" for exponent > >1. > >0x7f7fffff == 3.402823466385288598E38 >0xff7fffff == -3.402823466385288598E38 > >does > >$ffff $7f7f fs. - crash >$ff7f $ffff fs. - crash > >2. > >-1.0e3 flog fs. crash >-1.0e3 fsqrt fs. crash >$ffff $7fff fs. crash >$ffff $ffff fs. crash > >Those calcs shall print something like "NaN" > >The bove issues come from following - the floating point library was written for amorth, and the math written in asm returned specific agreed values for those results. XC16 returns different values in FF. > >3. > >Mainly an issue with 0e 3e 123e as it could be recognised as HEX value when in hex. "E" may solve the problem, when agreed so. > >Igor > |