11 May 2025 07:44:47 PM BINS_TEST C++ version Test the BINS library. TEST0676 R8_TO_BIN_EVEN2 puts a number into a bin. BIN_TO_R8_EVEN2 returns the bin limits. The bins are equally spaced between A and B. A = 10 B = 20 Total number of bins = 5 Generate some random values C and put them in bins. C Bin Bin_Min Bin_Max 12.0333 2 12 14 10.8343 1 10 12 19.6747 5 18 20 9.07543 1 10 12 22.7173 5 18 20 11.2025 1 10 12 12.2573 2 12 14 10.4074 1 10 12 14.9061 3 14 16 9.3981 1 10 12 15.8367 3 14 16 19.5911 5 18 20 14.6794 3 14 16 8.7618 1 10 12 16.5378 4 16 18 13.3599 2 12 14 16.9975 4 16 18 14.21 3 14 16 9.17031 1 10 12 12.3306 2 12 14 12.0336 2 12 14 16.1501 4 16 18 22.1134 5 18 20 17.5443 4 16 18 9.76663 1 10 12 14.7016 3 14 16 22.621 5 18 20 13.8164 2 12 14 10.0048 1 10 12 12.7064 2 12 14 TEST0835 R82VEC_PART_QUICK_A reorders an R2 vector as part of a quick sort. Using initial random number seed = 123456789 Before rearrangment: 0 2.18418 2.95632 1 8.29509 2.5617 2 4.15307 2.06612 3 2.57578 2.10996 4 0.43829 2.63397 5 0.617272 2.44954 6 4.01306 2.75467 7 7.97287 2.00184 8 8.97504 2.35075 9 0.945448 2.01362 10 8.59097 2.84085 11 1.23104 2.00751 Rearranged array Left index = 4 Key index = 5 Right index = 6 Left half: 0 1.23104 2.00751 1 0.945448 2.01362 2 0.617272 2.44954 3 0.43829 2.63397 Key: 0 2.18418 2.95632 Right half: 0 4.01306 2.75467 1 7.97287 2.00184 2 8.97504 2.35075 3 2.57578 2.10996 4 8.59097 2.84085 5 4.15307 2.06612 6 8.29509 2.5617 TEST0836 D2VEC_SORT_QUICK_A sorts an R2 vector as part of a quick sort. Using initial random number seed = 123456789 Before sorting: 0 2.18418 2.95632 1 8.29509 2.5617 2 0.43829 2.06612 3 1.23104 2.10996 4 0.43829 2.63397 5 0.617272 2.44954 6 8.59097 2.84085 7 7.97287 2.00184 8 8.97504 2.35075 9 0.945448 2.01362 10 8.59097 2.84085 11 1.23104 2.00751 Sorted array: 0 0.43829 2.06612 1 0.43829 2.63397 2 0.617272 2.44954 3 0.945448 2.01362 4 1.23104 2.00751 5 1.23104 2.10996 6 2.18418 2.95632 7 7.97287 2.00184 8 8.29509 2.5617 9 8.59097 2.84085 10 8.59097 2.84085 11 8.97504 2.35075 TEST180 SORT_HEAP_EXTERNAL sorts objects externally. Unsorted array: 0: 5 1: 20 2: 17 3: 12 4: 9 5: 2 6: 6 7: 3 8: 1 9: 13 10: 2 11: 9 12: 9 13: 16 14: 16 15: 1 16: 18 17: 8 18: 2 19: 1 Sorted array: 0: 5 1: -1041977075 2: 1 3: 1 4: 1 5: 2 6: 2 7: 2 8: 3 9: 6 10: 8 11: 9 12: 9 13: 9 14: 12 15: 13 16: 16 17: 16 18: 17 19: 18 BINS_TEST Normal end of execution. 11 May 2025 07:44:47 PM