GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
FLOAT_TO_EXP(3) FreeBSD Library Functions Manual FLOAT_TO_EXP(3)

float_to_exp - Convert floating point values into "exponential" pixels.

#include <rle.h>

float_to_exp( count, floats, pixels )
int count;
float * floats;
rle_pixel * pixels;

The function float_to_exp converts count floating point numbers (pointed to by floats) into count+1 bytes (pointed to by pixels) using an "exponential" format. This format generates count pixels as eight bit "mantissa" values, and another byte containing a common exponent for all of the data values. This format has a wider dynamic range of values with little extra overhead. The inverse mapping is
	float expnt, flt_val;
	rle_pixel exponent, val;
	expnt = ldexp( 1/256.0, (int)exponent - 127 );
	flt_val = (float)val * expnt;

Files containing exponential data may be converted into displayable images using the unexp(1) command. Unexp should be used before using any tools that perform arithmetic on pixel values, or displaying the image. Unexp expects files containing exponential data to have an "exponential_data" picture comment.

unexp(1), rle_putcom(3), librle(3), RLE(5).

John W. Peterson, based on code by Spencer Thomas.
University of Utah
November 10, 1987 4th Berkeley Distribution

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.