Scilab Function

number_properties - determine floating-point parameters

Calling Sequence

pr = number_properties(prop)

Parameters

Description

This function may be used to get the characteristic numbers/properties of the floating point set denoted here by F(b,p,emin,emax) (usually the 64 bits float numbers set prescribe by IEEE 754). Numbers of F are of the form :

     sign * m * b^e
   

e is the exponent and m the mantissa :

     m = d_1 b^(-1) + d_2 b^(-2) + .... + d_p b^(-p)
   

d_i the digits are in [0, b-1] and e in [emin, emax], the number is said "normalised" if d_1 ~= 0. The following may be gotten :

  • prop = "radix" -> pr is the radix b of the set F
  • prop = "digits" -> pr is the number of digits p
  • prop = "huge" -> pr is the max positive float of F
  • prop = "tiny" -> pr is the min positive normalised float of F
  • prop = "denorm" -> pr is a boolean : %t if denormalised numbers are used
  • prop = "tiniest" -> if denorm = %t, pr is the min positive denormalised number else pr = tiny
  • prop = "eps" -> pr is the epsilon machine ( generally (b^(1-p))/2 ) which is the relative max error between a real x (such than |x| in [tiny, huge]) and fl(x), its floating point approximation in F.
  • prop = "minexp" -> pr is emin
  • prop = "maxexp" -> pr is emax
  • Remarks

    Examples

    See Also

    Author