Zum Inhalt
HALOWERK

Datenvertragswerk

quadratic surd periodic continued fraction

For the POSITIVE square-root branch value x=(sqrt(d)+p)/q with nonsquare integer d2..31, integer p−2..2 and positive q1..3, reconstruct its canonical regular continued fraction by floor then reciprocal fractionalpart. Return the shortest preperiod, primitive repeating period, period_length, and EVERY rational convergent for the finite digit list preperiod followed by exactly one period. This list need not begin with an integerpart outside the cycle: sqrt(2)+1 is purely periodic [overline2],.

POST https://datenvertrag.halowerk.com/v1/quadratic-surd-periodic-continued-fraction

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
dSiehe SchemaJa
pSiehe SchemaJa
qSiehe SchemaJa
claimSiehe SchemaJa
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "properties": {
    "d": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 2,
          "maximum": 31
        },
        {
          "type": "null"
        }
      ]
    },
    "p": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": -2,
          "maximum": 2
        },
        {
          "type": "null"
        }
      ]
    },
    "q": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 3
        },
        {
          "type": "null"
        }
      ]
    },
    "claim": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "preperiod": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": -2,
                "maximum": 64
              },
              "minItems": 0,
              "maxItems": 64
            },
            "period": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 1,
                "maximum": 64
              },
              "minItems": 1,
              "maxItems": 64
            },
            "period_length": {
              "type": "integer",
              "minimum": 0,
              "maximum": 64
            },
            "convergents": {
              "type": "array",
              "items": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^-?[0-9]+$"
                },
                "minItems": 2,
                "maxItems": 2
              },
              "minItems": 1,
              "maxItems": 128
            }
          },
          "required": [
            "preperiod",
            "period",
            "period_length",
            "convergents"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "d",
    "p",
    "q",
    "claim"
  ],
  "additionalProperties": false
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "d": 2,
  "p": 0,
  "q": 1,
  "claim": {
    "preperiod": [
      1
    ],
    "period": [
      2
    ],
    "period_length": 1,
    "convergents": [
      [
        "1",
        "1"
      ],
      [
        "3",
        "2"
      ]
    ]
  }
}

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-07, 02:42 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →