Listing 3: Sorted Summation
float fs_add(float * flt_arr) { long i; float lcl_arr[ARR_SIZE], sum = 0.0; for (i = 0; i < ARR_SIZE; i++) lcl_arr[i] = flt_arr[i]; qsort(lcl_arr, ARR_SIZE, sizeof(float), flt_abs_compare); for (i = 0; i < ARR_SIZE; i++) sum += lcl_arr[i]; return sum; } /* End of File */