edwig / BCD

Binary Coded Decimal. Research project for use with SQL_NUMERIC_STRUCT datatype
MIT License
12 stars 1 forks source link

Expected values wrong for div and add in function TestOperatoren #3

Closed sisirajaya closed 4 years ago

sisirajaya commented 4 years ago

in lines 553 and 554 of Testing.cpp the values must be revered.

char r_small_div = "1.5159130887395963684392407742872"; char r_small_add = "2111111100999999.3343333322232221";

sisirajaya commented 4 years ago

One more thiong. test.txt file must be updated to reflect the change. at present: Type Time Value


calc 0.000000 +1.5159130887395963684392407742872 double 0.000001 +2111111100999999.250000000000000 afp 0.000516 +2111111100999999.33433333222322214321 icd 0.000030 +2111111100999999.33433333222322214321 bcd 0.000026 +2111111100999999.33433333222322214321

calc value is wrong.

Testing [division] for a total of [1000] iterations:

Type Time Value


calc 0.000000 +2111111100999999.3343333322232221 double 0.000001 +1.515913088739596 afp 0.038148 +1.51591308873959636843924077428723430242042752396100737400336 icd 0.000584 +1.5159130887395963684392407742872343024204 bcd 0.001061 +1.51591308873959636843924077428723430242

Calc value is wrong!