up: FLOAT32     index Zimbu documentation

CLASS FLOAT32.float32 @public

summary

     

The builtin type float32.

The object methods can be used on a float32 variable or value:

 string val = 12.0.ToString()

Most things here work just like on float, except with smaller precision. See the float documentation.

Predefined values are NAN (Not A Number), INF (infinity) and NINF (negative infinity).

In case of doubt about specific computations, check the documentation for the C math library.

NOTE: When compiled to Javascript a float32 is stored as a float, since Javascript only supports float numbers.

$Size() int @public  Return the number of bytes in a float32.
$ToString() string @public  Return the number in a short form.
 
 

members (alphabetically)

     

FUNC $Size() int @public

     

Return the number of bytes in a float32.

Always returns 4, since a float32 is 32 bits

FUNC $ToString() string @public

     

Return the number in a short form.

For example, 1.234.ToString() returns "1.234".

This uses 6 decimal places and uses the exponent notation when that is shorter.

license

      Copyright 2014 Bram Moolenaar All Rights Reserved.

      Licensed under the Apache License, Version 2.0. See the LICENSE file or obtain a copy at: http://www.apache.org/licenses/LICENSE-2.0