BBSysco development log 
Business Basic Systems Corporation

July 9, 2007

Sped up numeric conversion

Filed under: Calculation logic — Mike King @ 4:48 pm

When working through some of the overflow testing I noticed that the numeric to display routine was converting the data to floating point then using sprintf to convert to display. This was not the most efficient method to convert the data so I replaced the logic with a simple integer math conversion.

While in the module I added some consideration for a future expansion to >14 digits by adding BB_MAX_PRECISION as a control vaue to define the current max precision of 14.

I also added code to use long long if present since that should be a faster divide.

July 5, 2007

Math improved

Filed under: Calculation logic — Mike King @ 11:32 pm

Completed the math changes today to implement long long variables.  This has made much of the computations a lot easier in the multiply and divide.  I haven’t looked at the Add/Subtract routines — perhaps over the weekend I will to see if the change would help them as well.

July 4, 2007

Multiplication

Filed under: Calculation logic — Mike King @ 11:35 pm

We added logic to handle multiplication with long-long data types for multiplication where possible in order to improve performance.  During the changes we also improved the general performance of the multiplication logic for systems that don’t have long-long support.

Tomorrow we should complete the testing of this logic and move on to consolidating the math routines into a common function rather than seperate modules for each operation.  This should help reduce the module count and help centralize the math logic into a new module likely called “mthLib”.

Also today we moved “msb.unx” into msb.c.  Long term this should me renamed, likely bbplus.c as it contains the central ‘main’ routine.

July 3, 2007

Some time for C

Filed under: Calculation logic — Mike King @ 11:54 pm

Found a little time to work on more of the math functions and migrate them, were possible, to use long long data types. The multiply seems to be the toughest since there is the chance of an overflow, but likely will just make sure we are dealing with no more than 4×16 bit values.

Also spent some time on the Rounding logic to see if long long would improve the logic there plus fixed a bug that occurred during a 48 bit overflow.

Powered by WordPress