Target environment is RHEL 7 or CentOS 7, written in C with Makefiles (old school), using GMP libraries for extended precision integer support.
The program I need is to produce some sample datasets over a specific range of numbers. the program will take from the command line two arguments, first a count, then either "-P<decimal number>" or "-p<binary number." as follows:
$gendata -c128 -P3867925982150275591002933
$gendata -c64 -p1010011010001101011101001
gendata will then take the square root of this number P and produce count data samples for a and b which bracket the square root point, such that a and b differ in bit length by at most 1, with the following relationship a < sqrt < b.
Calculate the minimum value of a, such that the bit length requirement is met. Then output count samples equally spaced between Amin and sqrt, of a and b (where b is calculated as P/a) one sample per line in the form:
-A<decimal a> -B<decimal b> -a<binary a> -b<binary b>
Deliverable is emailed zipfile with gendata.c and Makefile
This should be an extremely short project, completed in an hour or two, for an experience C programmer