← Back to catalogue
Research draft

integer

vr.tr.integer · XCT.QTY

Let an agent reason about integers mathematically and in computing, where fixed-width representations add overflow and signedness issues.

Thing Registry Cross-cutting context

Research draft, second pass

A second pass drafted this model: the structure a model of this thing needs, and what is known about it in the world. The line under this one says how the second half was obtained - researched against sources, or recalled without web access, in which case nothing here was read anywhere and every claim is a lead to verify. Unreviewed either way.

written by Claude from model knowledge without web access - no source was read, every claim is a lead to verify

Researched by: Claude

Purpose and description

Let an agent reason about integers mathematically and in computing, where fixed-width representations add overflow and signedness issues.

A number that is zero, a positive whole number or the negative of one: ..., -2, -1, 0, 1, 2, ...; the set Z.

What it is for: Counting, indexing, identifiers and exact arithmetic.

It can be add, subtract and multiply, staying within the integers; divide with remainder; store it, in fixed or arbitrary precision; use it as an identifier, such as a process id or block address.

Distinguishing features

Whole numbers, positive, negative and zero

Closed under addition, subtraction and multiplication, not division

Computer integers have fixed ranges unless arbitrary precision

Numeric identifiers are not quantities

What it looks like

Digits without a fractional part, optionally with a minus sign.

Physical character

int32 range: -2147483648 to 2147483647 dimensionless

int64 maximum: 9223372036854775807 dimensionless

How it is recognised

Numerals with no decimal point

Types such as int32, int64, BigInt in code

Identifiers that look like integers are labels, not quantities

Related models

is a kind of - the set Z

number

has property - positive, negative or zero

sign

is used as - numeric labels

identifier

is confused with - approximate reals

floating-point number

In practice

Families and kinds

natural numbers and non-negative integers

even and odd integers

primes

signed and unsigned machine integers

Identifiers

OEIS A-numbers integer sequences

Standards and regulation

ISO 80000-2 notation

ISO/IEC 9899 C and other language standards defining integer types

Failure modes and hazards

Integer overflow and wraparound

Signed and unsigned mismatches

Rounding when integers pass through floating point, such as in JSON beyond 2^53

Doing arithmetic on identifiers

Also called

process identifiereven house numberodd house numberlogical block addressintersection numbernon-negative integerorder of reflexionMiller indexSkewes' numberminimum vertex degreesphericityTakeuchi numbertrinomial coefficientEntringer numberorder of a difference equationBelgian numbertrimorphic numberLoeschian numberperfect digital invariantnegative index of inertiaorder of a differential equationWieferich numberDescartes numberRiesel numberSierpinski numberproduct of two integersnonzero integernon-positive integereven numberodd numberPell numberalmost perfect numberRamsey numberheptanacci numberMarkov numberFriedman numbercyclic numberself numbercabtaxi numberpowerful number

+13

Where this came from

wikidata · CC0 1.0

Also registered as vr.tr.integer

Drafted structure

Bundle to layer to finding to question, as the second pass will find it: 4 bundles · 8 layers · 8 findings · 16 questions.

Mathematics Properties of integers.

Mathematical properties underpin all use.

Arithmetic

Operations and closure.

Operations

Operations and results.

  1. Does the operation stay within the integers? definition
  2. How is division with remainder defined here for negatives? boundary

Properties

Parity, primality, divisibility.

Properties

Number-theoretic properties.

  1. Is it even or odd, prime or composite? measurement
  2. What are its divisors? measurement
Representation In computers.

Fixed-width integers behave differently from mathematical ones.

Width and sign

int32, int64, unsigned.

Type

The type and range.

  1. Which integer type holds this value, and what is its range? definition
  2. Is it signed or unsigned? definition

Overflow

Wraparound and errors.

Overflow handling

How overflow is handled.

  1. Can this calculation overflow? boundary
  2. Is overflow checked, wrapped or saturated? definition
Interchange Passing integers between systems.

Formats can silently lose precision.

Formats

JSON, CSV, databases.

Format limits

Limits of formats.

  1. Will this integer survive the format without loss? boundary
  2. Should it be sent as a string? action

Parsing

Leading zeros and separators.

Parsing rules

Parsing rules.

  1. How are leading zeros and separators handled? boundary
  2. Is the value an identifier rather than a number? definition
Identifiers Integers as labels.

Many integers are labels, not quantities.

Label or quantity

Nature of the value.

Nature

Whether the integer is a label.

  1. Is this integer a quantity or a label? definition
  2. What operations make sense on it? boundary

Uniqueness

Scope of identifiers.

Scope

Where the identifier is unique.

  1. Within what scope is this identifier unique? boundary
  2. Can it be reused? boundary

What the second pass must settle

  • Should machine integer types be separate entries?
  • How should identifiers be marked so they are not treated as quantities?
  • The registry entry has merged aliases such as house numbers; should they be split off?