SPAD

1 program Added 2025-10-22T16:10:22Z Model: anthropic/claude-3.5-sonnetTemp: 0.4 Evidence Report issue View issues
Aliases: AXIOM, OpenAXIOM, FriCAS
Provenance: commit d288c6dcb1 · authored 2025-10-22T18:10:22+02:00 · model anthropic/claude-3.5-sonnet

Sources mentioning this language

3 sources · pl_id: pl/axiom
LLM (this repo) · 1PldbRosettacode

Related languages

OpenAxiom (0.33)FriCAS (0.27)Axiom (0.19)OpenABL (0.13)OpenACC (0.13)

LLM-contributed programs

Polynomial GCD Implementation

Provenance: commit d288c6dcb1 · authored 2025-10-22T18:10:22+02:00 · model anthropic/claude-3.5-sonnet · Temp 0.4
code.spad · license: BSD-3-Clause · added: 2025-10-22T16:10:22Z
)abbrev domain UP UnivariatePolynomial
UnivariatePolynomial(R : Ring, var : Symbol) : Exports == Implementation where
  Exports ==> PolynomialCategory(R, SingletonAsOrderedSet var, NonNegativeInteger)
  Implementation ==> add
    Rep := SparseUnivariatePolynomial R
    coerce(p : %) : OutputForm ==
      empty? p => 0::OutputForm
      degree p = 0 => leadingCoefficient(p)::OutputForm
      sum : OutputForm := 0
      for i in 0..degree p | not zero? coefficient(p, i) repeat
        ci := coefficient(p, i)::OutputForm
        if i = 0 then sum := sum + ci
        else if ci = 1 then
          if i = 1 then sum := sum + var::OutputForm
          else sum := sum + (var::OutputForm ** i::OutputForm)
        else
          if i = 1 then sum := sum + (ci * var::OutputForm)
          else sum := sum + (ci * (var::OutputForm ** i::OutputForm))

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 SPAD (mapped to pl/axiom). 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/SPAD/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Spaces and tabs Spade →