Signed 16-bit integer, from -32768 through 32767; checked arithmetic.
Signature
Integer arithmetic checks overflow; floating-point arithmetic rounds each operation at its declared precision and rejects nonfinite results. Mixed representations require explicit conversion, which rejects loss of range or precision. Values serialize as decimal strings so JSON hosts retain the exact value.
Methods
Examples
Calculate at a declared precision
Both operands have this dtype; changing the annotation changes its range and precision.
main.kj
Loading…Drag to orbit · select to inspect
0 entities
Scene controls
Results
Loading the language runtime…
Output 0
No output.
State
Compile source to inspect its values.
TraceNo execution yet
- Executed source spans appear here.
Expected output
42
Rust definition
Rust SDK Scalar with an explicit dtype and validated bits; exact scalar JSON uses strings.
View Rust documentation →Support: runtime