float

From DavinciWiki
(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
{{DavinciWiki_Function}}
+
{{DavinciWiki_Function|
[[category:C_Programs]]
+
Convert an object to FLOAT format.
 +
|
 +
Arguments: Any three dimensional numeric array
 +
 +
Return Value: The array converted into floating point precision
 +
|
 +
Syntax: float(object)
 +
 +
The float() function copies and converts an object to FLOAT format. The behavior of float() when dealing with values out of the representable range, 1.4e-45 to 3.4e38, is undefined. This function is equivalent to format(object=VAL, format=FLOAT).
 +
|
 +
dv> a
 +
5x5x1 array of byte, bsq format [25 bytes]
 +
25      74      36      11      55
 +
81      62      12      37      99
 +
27      29      58      34      5
 +
85      41      23      97      48
 +
66      88      25      30      74
 +
 +
dv> float(a)
 +
5x5x1 array of float, bsq format [100 bytes]
 +
25.0000 74.0000 36.0000 11.0000 55.0000
 +
81.0000 62.0000 12.0000 37.0000 99.0000
 +
27.0000 29.0000 58.0000 34.0000 5.00000
 +
85.0000 41.0000 23.0000 97.0000 48.0000
 +
66.0000 88.0000 25.0000 30.0000 74.0000
 +
 
 +
|
 +
|
 +
|
 +
*[[char]]
 +
*[[byte]]
 +
*[[int]]
 +
*[[double]]
 +
|
 +
|
 +
}}
 
[[category:Functions]]
 
[[category:Functions]]
 +
[[category:Davinci Core]]
 
[[category:Format Conversion]]
 
[[category:Format Conversion]]

Revision as of 14:59, 22 February 2006



64-bit SafeYes

Description

Convert an object to FLOAT format.

Arguments and Return Values

Arguments: Any three dimensional numeric array

Return Value: The array converted into floating point precision

Usage

Syntax: float(object)

The float() function copies and converts an object to FLOAT format. The behavior of float() when dealing with values out of the representable range, 1.4e-45 to 3.4e38, is undefined. This function is equivalent to format(object=VAL, format=FLOAT).

Examples

dv> a
5x5x1 array of byte, bsq format [25 bytes]
25      74      36      11      55
81      62      12      37      99
27      29      58      34      5
85      41      23      97      48
66      88      25      30      74

dv> float(a)
5x5x1 array of float, bsq format [100 bytes]
25.0000 74.0000 36.0000 11.0000 55.0000
81.0000 62.0000 12.0000 37.0000 99.0000
27.0000 29.0000 58.0000 34.0000 5.00000
85.0000 41.0000 23.0000 97.0000 48.0000
66.0000 88.0000 25.0000 30.0000 74.0000


DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Related Functions

Recent Core Changes

Modified On: 07-06-2009

Personal tools