Browse documentation
Getting started

Development numeric types for 0.0.3

Explore Number, fixed width integer and Float32 development contracts, checked overflow, packed arrays and explicit precision loss.

Implemented in development

The 0.0.3 development line implements Number, fixed width integers and Float32, including packed arrays and Tensor conversions that preserve dtype. It keeps Int64 as the default integer type and Float64 as the default floating type.

The public stable native runtime remains 0.0.2. This page documents development work; it does not announce a 0.0.3 binary release or a release date. The Downloads page continues to identify the published packages. Native implementation source remains planned for the 0.1.0 milestone.

Find the numeric type you need

Start with Number when a scalar variable or function should accept different numeric representations. A Number value retains its concrete integer, Float32 or Float64 type. It is not an arbitrary precision value, an automatic choice of the smallest storage, or a packed array element type. Use the fixed width integer guide for exact ranges and checked overflow, or the Float32 guide for explicit precision and packed storage.

Run with a matching development runtime

The complete Number example, integer example and Float32 example require a compatible native development runtime with these additions. The current public stable update does not provide them. Development runtimes and editor packages are not offered for download by this documentation.

With a matching development runtime installed, save a complete source example in your experiment folder, then check and run it:

sh
aner check examples/float32.aner
aner run examples/float32.aner

The examples contain their own inputs and need no external service, dataset or credentials. The Float32 Tensor example uses CPU execution. Optional accelerator backends retain their own hardware and build requirements.

Numeric contracts

  • Number is an import free scalar abstraction that preserves the concrete integer, Float32 or Float64 representation.
  • Integer types include Int8, UInt8, Int16, UInt16, Int32, UInt32, Int64 and UInt64, with checked ranges, checked overflow and compact packed arrays.
  • Float32 provides IEEE 754 binary32 scalars and four byte packed payload slots in Array, DynamicArray and NDArray.
  • Tensor bridges preserve Float32 or Float64 dtype, require an explicit matching destination type, and return detached copies.

Automatic numeric conversions must preserve the actual value. Explicit constructors such as Float32(value) or explicit array casts permit documented rounding; checked integer constructors reject values outside their destination range. Float32 widens exactly to Float64. Integer division with / produces Float64; use integer_div for checked integer division. Number does not choose smaller storage based on a value's magnitude and is not a packed array element type.

The Float32 guide describes precision boundaries, typed array conversions, Tensor rank limits and gradient behavior. Int128 and UInt128 remain future work.

Keep earlier experiments reproducible

The published 0.0.1 and 0.0.2 runtimes retain their original identities. Retain the original executable and recorded inputs for historical results. aner versions lists local installations, and aner rollback restores the previous selected runtime without downloading it.

Each guide and example retains its capability, device and editor requirements. Check release and development status and the verified systems on Downloads.

Aner documentation · Reference and guides