number

number, data type

number is the default floating-point numeric type in Envision (float32). Numeric literals have this type, including literals without a fractional part.

Examples

a = 1.5
b = a + 1
c = b * 2
d = c / 5

table T = with
  [| as A, as B, as C, as D |]
  [| a, b, c, d |]

show table "Numbers" with
  T.A
  T.B
  T.C
  T.D

This produces the following table:

A B C D
1.5 2.5 5 1

Remarks

Single-precision arithmetic provides roughly 1e-6 relative accuracy for most computations.

Envision also supports i64 (signed 64-bit integer) and f64 (64-bit floating-point) values, with long and double as respective aliases.

User Contributed Notes
0 notes + add a note