Source: https://guthlabs.ai/docs/instruments/complex-roots-de-moivre-visualizer/implementation/

instrument implementation / implementation-contract

# Complex Roots & De Moivre Visualizer implementation

A source-bound implementation contract for Complex Roots & De Moivre Visualizer; deployment and executable qualification remain separate.

Status: **VERIFIED_CLEAN**Lifecycle: **implementation-contract**

## Binding contract

This record describes what an executable surface must bind and validate. It does not claim that a public calculator, package, or production route is deployed.

**Record owner**: Guth Instruments

**Lifecycle**: verified-clean

**Evidence ID**: t8-032

**Effect**: Computation or source lookup only

## Input and validation requirements

The n=0 input makes the root formula divide by zero and must be rejected. The zero-complex-input boundary also exposes an undefined argument unless the implementation special-cases zero; angle-unit ambiguity can additionally produce different valid-looking plots.

## Required corrections

No binding erratum is attached to this unique-name record. Implementers must still preserve the declared units, domain, and failure behavior.

## Inspectable interface fixture

The sample below is evidence for interface and validation tests, not a production implementation.

````
{
  "inputs": {
    "complex_number": "4+0i",
    "n": 2
  },
  "expected_outputs": {
    "roots": [
      "2",
      "-2"
    ],
    "de_moivre_power": "16",
    "spot_checks": [
      {
        "at": "r=4.000000000, theta=0.000000000 radians",
        "input_side": {
          "real": 16,
          "imag": 0
        },
        "answer_side": {
          "real": 16,
          "imag": 0
        }
      },
      {
        "at": "r=3.000000000, theta=1.047197551 radians (pi/3)",
        "input_side": {
          "real": -4.5,
          "imag": 7.794228634
        },
        "answer_side": {
          "real": -4.5,
          "imag": 7.794228634
        }
      }
    ]
  },
  "reference_data": {
    "root_equation": "w^2=4",
    "polar_form": "4=4(cos(0)+i sin(0))",
    "de_moivre": "[4(cos(theta)+i sin(theta))]^2=16(cos(2theta)+i sin(2theta))"
  },
  "working": "For the roots, r^(1/n)=4^(1/2)=2 and theta=0. The root angles are (0+2*pi*k)/2. For k=0, angle=0, giving 2(cos(0)+i sin(0))=2. For k=1, angle=pi, giving 2(cos(pi)+i sin(pi))=-2. De Moivre: 4^2[cos(2*0)+i sin(2*0)]=16(1+i*0)=16. Spot check 2: z=3(cos(pi/3)+i sin(pi/3))=1.500000000+2.598076211i. Direct squaring gives (1.500000000)^2-(2.598076211)^2=-4.500000000 for the real part and 2(1.500000000)(2.598076211)=7.794228634 for the imaginary part. The De Moivre side is 9(cos(2*pi/3)+i sin(2*pi/3))=-4.500000000+7.794228634i."
}
````

## Other records

[01**Overview**](<https://guthlabs.ai/docs/instruments/complex-roots-de-moivre-visualizer/>)[02**Mechanism**](<https://guthlabs.ai/docs/instruments/complex-roots-de-moivre-visualizer/mechanism/>)[04**Qualification**](<https://guthlabs.ai/docs/instruments/complex-roots-de-moivre-visualizer/qualification/>)

## Sources and evidence

These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.

- `VERIFIED_LEDGER.json`

- `evidence-tranche8/tranche8-results.json`
