Univeristy of Alabama in Huntsville

UAH LTG IDL Library

IDL Routines from Phillip Bitzer and UAH Lightning Group

summary     class     fields     routine details     file attributes

misc/

pmb_convert_float_to_binary.pro

Misc, Numbers


Function for converting a float (4 bytes) to it's 4-byte equivelent. The calculation is done using the IEEE754 standard. On error, a zero byte array is returned.

Examples

To get the 4 bytes corresponding to 13.25:

print, pmb_convert_float_to_binary(13.25)

Author information

History

Modification History:

Written 12-??-11 PMB Added error catcher 20121016 PMB

Routines

top pmb_convert_float_to_binary

result = pmb_convert_float_to_binary(this_num)

Given a float, return the 4 byte value of the float

Return value

a 4 byte array

Parameters

this_num in required type=float

the float you which to convert to a binary

Other attributes

Uses:

binary(Coyote)

File attributes

Modification date: Tue Mar 25 17:15:54 2014
Lines: 64
Docformat: rst rst