OOrbitCress
Product

Product features · Bounded Collatz trajectories

01

OrbitCress keeps the trajectory and both stopping limits in view during code review, so reaching one is distinguished from exhausting a step or value cap.

01

Connection

Base URL, credentials and a reachable server.

02

Selection

A model available through the configured endpoint.

03

Capabilities

Context limits and tool support are determined by the model and server.

Bounded Collatz trajectories

● ● ●OrbitCress●
A concrete starting point · Bounded Collatz trajectories ×
def collatz(start, max_steps, value_cap):
    if any(type(v) is not int for v in (start, max_steps, value_cap)):
        raise ValueError("limit.integer")
    if not 0 <= max_steps <= 10000 or not 1 <= start <= value_cap <= 10**18:
        raise ValueError("limit.range")
    result = [start]
    for _ in range(max_steps):
        if start == 1:
            return result
        start = start // 2 if start % 2 == 0 else 3 * start + 1
        if start > value_cap:
            raise ValueError("value.cap")
        result.append(start)
    if start != 1:
        raise ValueError("step.cap")
    return result
✳Generate a Collatz trajectory from a positive integer under explicit step and value caps.
✓ ChangesReview before applying ↗
Illustrative workspace
AI coding workspace

Your next change starts here.

Get the Windows app ↗