This raw image file format was first described by Greg Ward [Ward92]. It uses only 32 bits (4 bytes) per pixel, which makes it comparable to the usual integer file formats. Furthermore this file format is much better to compress than a naive four floats format, which brings additional space savings. The idea is to use an 8-bit mantissa for each primary and follow it with a single 8-bit exponent. The mantissa is usually normalized in floating point formats to lie between 0.5 and 1. In this raw image format, only the largest mantissa will certainly lie in this range. Actually, this format favors the largest primary value, and has a limited dynamic range. The error introduced is negligible, since in the case of primary values differencing in few orders of magnitude, the largest primary will determine the pixel's color anyhow. The following, simple example will illustrate this idea. If color is

it will be converted to:

or, in 32 bit floating point format

Note that in the above example, the exponent -1 was translated to
127. In order to cover negative exponents as well, some offset should
be added to the unsigned values. In this case 128 was chosen, which
reserves the same range for values greater than 1 and less than 1. It
is possible to adjust this offset value if necessary, but since
it will rarely be the necessary. This file format
covers about 76 orders of magnitude with
relative accuracy.
The complete code for encoding the images using the RADIANCE file format can be found in the Real Pixels article [Ward92] or on the RADIANCE WWW page [RADI97].