The library provides functions for reading and writing histograms to a file as binary data or formatted text.
GSL_EFAILEDif there was a problem writing to the file. Since the data is written in the native binary format it may not be portable between different architectures.
GSL_EFAILEDif there was a problem reading from the file. The data is assumed to have been written in the native binary format on the same architecture.
%fformats for floating point numbers. The function returns 0 for success and
GSL_EFAILEDif there was a problem writing to the file. The histogram output is formatted in three columns, and the columns are separated by spaces, like this,
range range bin range range bin range range bin .... range[n-1] range[n] bin[n-1]
The values of the ranges are formatted using range_format and the value of the bins are formatted using bin_format. Each line contains the lower and upper limit of the range of the bins and the value of the bin itself. Since the upper limit of one bin is the lower limit of the next there is duplication of these values between lines but this allows the histogram to be manipulated with line-oriented tools.
gsl_histogram_fprintf. The histogram h must be preallocated with the correct length since the function uses the size of h to determine how many numbers to read. The function returns 0 for success and
GSL_EFAILEDif there was a problem reading from the file.