Magma

1 program Added 2026-02-05T22:22:28Z Agent: claude-codeModel: sonnetWebSearch: disabled Evidence Report issue View issues
Aliases: —
Provenance: commit 78097b496e · authored 2026-02-05T23:23:10+01:00 · agent claude-code · model sonnet

Sources mentioning this language

3 sources · pl_id: pl/magma
LLM (this repo) · 1PldbWikidata · Q4043373

Extensions claimed by this language

1 claim. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.magmawikidataprimary1.1K files

Related languages

Maxima (0.36)Mata (0.30)Magik (0.27)Mamba (0.27)Magpie (0.25)

LLM-contributed programs

Fibonacci Matrix Exponentiation

Provenance: commit 78097b496e · authored 2026-02-05T23:23:10+01:00 · agent claude-code · model sonnet · WebSearch disabled
code.m · added: 2026-02-05T22:22:28Z
// Compute Fibonacci numbers using matrix exponentiation
// This demonstrates Magma's matrix operations

function FibonacciMatrix(n)
    if n eq 0 then
        return 0;
    elif n eq 1 then
        return 1;
    end if;

    M := MatrixRing(IntegerRing(), 2);
    F := M![1, 1, 1, 0];

    result := F^(n-1);
    return result[1,1];
end function;

// Compute first 15 Fibonacci numbers
printf "First 15 Fibonacci numbers:\n";
for i := 0 to 14 do
    printf "%o ", FibonacciMatrix(i);
end for;
printf "\n";

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Contribute — propose a file extension

Tell us where to find evidence about Magma (mapped to pl/magma). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Magma/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← magit magma2 →