bc

1 program Added 2025-10-23T08:27:19Z Model: google/gemini-2.5-proTemp: 0.4 Evidence Report issue View issues
Aliases: basic calculator, bench calculator
Provenance: commit 455f5651d6 · authored 2025-10-23T10:27:19+02:00 · model google/gemini-2.5-pro

Sources mentioning this language

6 sources · pl_id: pl/bc
LLM (this repo) · 1PldbPygmentsWikipediaRosettacodeWikidata · Q300897

Wikipedia infobox

Pulled from the wikimedia/structured-wikipedia snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and pl_fact.csv for the long-table provenance.

Designed byRobert Morris · Lorinda Cherry of Bell Labs
First appeared1975
Homepagehttps://www.gnu.org/software/bc/

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
.bcpygmentsprimary602.9K files

Related languages

CCalc (0.26)Hoc (0.25)BBC BASIC (0.24)Beta BASIC (0.23)BaCon BASIC (0.22)

LLM-contributed programs

Towers of Hanoi solver

Provenance: commit 455f5651d6 · authored 2025-10-23T10:27:19+02:00 · model google/gemini-2.5-pro · Temp 0.4
code.bc · license: Public Domain · added: 2025-10-23T08:27:19Z
/*
 *
 * Towers of Hanoi
 *
 * By: P.H. Hirst
 *
 * hanoi(n) will print the moves to solve the
 * Towers of Hanoi puzzle with n disks.
 *
 * hanoi(n,s,d,u) will print the moves to transfer
 * n disks from spire s to spire d using spire u
 * as an intermediate.
 *
 */

define hanoi(n,s,d,u) {
    auto i, os

    if (n <= 0) { return }

    if (s == 0) { s = 1 }
    if (d == 0) { d = 3 }
    if (u == 0) { u = 2 }

    hanoi(n-1, s, u, d)

    os = scale; scale = 0
    print "Move disk ", n, " from ", s, " to ", d, "\n"
    scale = os

    hanoi(n-1, u, d, s)
}

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 bc (mapped to pl/bc). 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/bc/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← BBx bc-neliac →