geometric_series

std.seq.geometric_series · Level L4

The geometric series Σ_{k≥0} a·rᵏ, elementwise: the partial sum of its first N terms, a(1 − rᴺ)/(1 − r) (N·a for r = 1); and, where |r| < 1, its limit a/(1 − r) and the remainder a·rᴺ/(1 − r) after N terms, with converges = 1. Where |r| ≥ 1 the series diverges (or, for r = −1, oscillates), and the limit, remainder and converges are 0. The reference adds the N terms one by one.

S_N = a(1 − rᴺ)/(1 − r), S = a/(1 − r) for |r| < 1

Signature

geometric_series(a: f64[s], r: f64[s], N: i64[s]) → f64[s], f64[s], f64[s], f64[s]

Structure

The function as NOVA stores it: one box per input, operation and output, and arrows that carry values. A double border marks another library function this one runs — called once, or by Scan once per element; select it to open that function.

0.0af64[s]rf64[s]Ni64[s]1.0NegatenripowrNSubtractomCastNfEqualis_oneMaximumarWhereomsSubtractomrNDividelim_rawLessconvergesDivideqMultiplyrem_rawMultiplylimitWheretermsMultiplyremainderMultiplypartialremainderf64[s]limitf64[s]partialf64[s]convergesf64[s]
  • input
  • operation
  • constant
  • call
  • output

Verification

  • Signature proven by NOVA’s shape solver, for every size.
  • Equal to the reference a·Σ_{k<N} rᵏ term by term; a·r^N/(1 − r) and a/(1 − r) for |r| < 1 in exact rational arithmetic, on all 40 test cases.
  • All 696 float64 results inside the running error bound; the closest uses 55% of it.
  • Interpreter and NumPy backend return bit-identical results.
  • At float32 too: the 40 test cases rounded to float32, and 40 of them inside the running error bound at u = 2⁻²⁴; the closest uses 45% of it.
Accuracy in detail
correctly rounded (the float64 nearest the exact value)
72%
bit-equal to the NumPy formula in float64
67%
largest error, in units in the last place
9.44

Identity

Calls
Called by
—
sha256:05a7be5fb252dd45699d2dae19b830d3c02a71a315049418ba3d6ad6c400167b

The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.

Control handle

Symbol
Ω:std.seq.geometric_series · Ω:geometric_series
Pins
sha256:83dafb7ea3e399d3876ed2519a0a0e5396fc433ef2b344eba3f9e103fe9d562dthis graph and the 3 it reaches through calls
Evidence
sha256:f88cdeededf94ff21c7b90e5201db40ff3c692715dc7dec64a7407c61b499d4dthe hash of its verification record
Needs
no capability: a pure function

Through NOVA’s control layer, the symbol launches this function only while the program still matches what it pins: a change to this graph, or to any graph it reaches, needs a migration first.

ΣEML 2026

Efficient New Language — a high-density semantic overlay for humans and AI agents.

This site’s demos run on the real EML toolchain, in your browser.

© 2026 EveMissLab (一言諾科技有限公司) / Neo.K. All rights reserved.