DDecayMarsh
Product

Product features · Runge–Kutta decay steps

01

Review the four slope estimates in DecayMarsh and distinguish the numerical result from the analytic decay value.

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.

Runge–Kutta decay steps

● ● ●DecayMarsh●
A concrete starting point · Runge–Kutta decay steps ×
def decay_steps(initial, rate, dt, steps):
    if any(type(v) not in (int, float) for v in (initial, rate, dt)):
        raise ValueError("decay.numeric")
    if not -10**6 <= initial <= 10**6 or not 0 <= rate <= 1000 or not 0 <= dt <= 1 or rate * dt > 1:
        raise ValueError("decay.range")
    if type(steps) is not int or not 0 <= steps <= 1000:
        raise ValueError("decay.steps")
    y = float(initial)
    for _ in range(steps):
        k1 = -rate * y
        k2 = -rate * (y + dt*k1/2)
        k3 = -rate * (y + dt*k2/2)
        k4 = -rate * (y + dt*k3)
        y += dt*(k1 + 2*k2 + 2*k3 + k4)/6
    return y
✳Integrate scalar exponential decay with up to 1000 classical Runge–Kutta steps using finite bounded inputs.
✓ ChangesReview before applying ↗
Illustrative workspace
AI coding workspace

Your next change starts here.

Get the Windows app ↗