Re: [hatari-devel] FPU update

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On 6 February 2017 at 18:14, Andreas Grabher <andreas.grabher@xxxxxxxxxxxx> wrote:
Great! Looking forward to the new version! Is it possible to add some special values to the test cases? I'm thinking of stuff like smallest normal for each precision, inputs that will overflow, underflow, overflow or underflow through rounding, maybe some zeros, infinities and (signaling) NaNs and different bit patterns, that do not always cause inexact exceptions (e.g. powers of 2).
We recently found some bugs, that did not show with the test utility, because the affected values were not used. e.g. we discovered, that overflow in SoftFloat always sets the inexact bit (fixed), while this should only happen, if rounded off bits are non-zero.

The problems you are describing should be gone with SoftFloat.

I did include some special values, but they are probably not exhaustive. And they are not taking part in all of the test types (just a specific test that such values are loaded/interpreted properly).

However they can be combined with the other tests too.

If there are other special values you want added, let me know what they are (with equivalent hex data if possible, to save me looking them up! some appear poorly documented) . The current 'special' values are:

(float versions)

cf_special_const:
cf_zero: dc.l $00000000
cf_nzero: dc.l $80000000 ; neg zero
cf_one: dc.l $3f800000
cf_gtone: dc.l $3f800001 ; smallest value greater than 1
cf_0333: dc.l $3eaaaaab ; 1/3
cf_pminn: dc.l $00800000 ; positive min normal
cf_pmins: dc.l $00000001 ; positive min subnormal 
cf_pmax: dc.l $7f7fffff ; positive max
cf_pinfinity: dc.l $7f800000 ; positive inf.
cf_ninfinity: dc.l $ff800000 ; negative inf.
cf_NaN: dc.l $7fffffff ; NaN

(double versions)

cd_special_const:
cd_zero: dc.q $0000000000000000
cd_nzero: dc.q $8000000000000000
cd_one: dc.q $3ff0000000000000
cd_gtone: dc.q $3ff0000000000001
cd_0333: dc.q $3fd5555555555555
cd_pminn: dc.q $0010000000000000
cd_pmins: dc.q $0000000000000001
cd_pmax: dc.q $7fefffffffffffff
cd_pinfinity: dc.q $7ff0000000000000
cd_ninfinity: dc.q $fff0000000000000
cd_NaN: dc.q $7fffffffffffffff



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/