FIRST_DIGIT Name
FIRST_DIGIT
Purpose
This function returns the first significant digit.
Category
Mathematics
Calling Sequence
Result = FIRST_DIGIT( Indata )
Inputs
Indata: A scalar or array of type floating point.
Outputs
Result: Returns the value of the first significant digit(s)
of Indata. Procedure
This function searches recursively until it finds the first
signficant digit. Example
Determine the first significant digit of 0.0345.
result = first_digit( 0.0345 )
Modification History
Written by: Daithi A. Stone, 2000-06-20.
Modified: DAS, 2000-07-06 (removed LENGTH.pro).
Modified: DAS, 2000-09-25 (removed zero bug).
Modified: DAS, 2001-01-11 (fixed rounding bug).