# patashu/break_eternity.js architecture

> Architecture diagram of the GitHub repository patashu/break_eternity.js, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/patashu/break_eternity.js
- Repository: https://github.com/patashu/break_eternity.js

## Overview

break_eternity.js is a JavaScript arbitrary-range Decimal library. Users construct Decimal values from numbers, strings, or other Decimals, then call arithmetic, logarithmic, and hyperoperator methods to obtain new Decimal results. Its runtime is concentrated in src/index.ts; src/lru-cache.ts provides a supporting cache. The excerpts show construction and string parsing, but not the full implementation, so the capability nodes reflect README documentation rather than claims about unsampled internal call paths.

Main entry points: [`src/index.ts`](https://github.com/patashu/break_eternity.js/blob/master/src/index.ts) (Decimal API), [`src/lru-cache.ts`](https://github.com/patashu/break_eternity.js/blob/master/src/lru-cache.ts) (LRU cache)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_decimal["Decimal runtime"]
  node_decimal_api["Decimal API<br/>[index.ts]"]
  node_input_parsing["Input parsing<br/>[index.ts]"]
  node_numeric_ops["Numeric operations<br/>[index.ts]"]
  node_hyper_ops["Hyperoperators<br/>[index.ts]"]
  node_representation["Layered representation<br/>[index.ts]"]
end

subgraph group_support["Runtime support"]
  node_lru_cache["LRU cache<br/>[lru-cache.ts]"]
end

node_user(("Library user"))

node_user -->|"constructs and calls"| node_decimal_api
node_decimal_api -->|"parses strings"| node_input_parsing
node_user -->|"supplies input"| node_input_parsing
node_user -->|"calls operations"| node_numeric_ops
node_user -->|"calls hyperoperators"| node_hyper_ops
node_user -->|"creates components"| node_representation
node_decimal_api -->|"imports"| node_lru_cache

click node_decimal_api "https://github.com/patashu/break_eternity.js/blob/master/src/index.ts"
click node_input_parsing "https://github.com/patashu/break_eternity.js/blob/master/src/index.ts"
click node_numeric_ops "https://github.com/patashu/break_eternity.js/blob/master/src/index.ts"
click node_hyper_ops "https://github.com/patashu/break_eternity.js/blob/master/src/index.ts"
click node_representation "https://github.com/patashu/break_eternity.js/blob/master/src/index.ts"
click node_lru_cache "https://github.com/patashu/break_eternity.js/blob/master/src/lru-cache.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_decimal_api,node_input_parsing,node_numeric_ops,node_hyper_ops,node_representation,node_user toneBlue
class node_lru_cache toneAmber
```

## Components

### Decimal runtime

- [Decimal API](https://github.com/patashu/break_eternity.js/blob/master/src/index.ts): `src/index.ts`
- [Input parsing](https://github.com/patashu/break_eternity.js/blob/master/src/index.ts): `src/index.ts`
- [Numeric operations](https://github.com/patashu/break_eternity.js/blob/master/src/index.ts): `src/index.ts`
- [Hyperoperators](https://github.com/patashu/break_eternity.js/blob/master/src/index.ts): `src/index.ts`
- [Layered representation](https://github.com/patashu/break_eternity.js/blob/master/src/index.ts): `src/index.ts`

### Runtime support

- [LRU cache](https://github.com/patashu/break_eternity.js/blob/master/src/lru-cache.ts): `src/lru-cache.ts`

### Other components

- **Library user**

## Connections

- Library user → Decimal API: constructs and calls (evidence: `README.md`)
- Decimal API → Input parsing: parses strings (evidence: `src/index.ts`)
- Library user → Input parsing: supplies input (evidence: `README.md`)
- Library user → Numeric operations: calls operations (evidence: `README.md`)
- Library user → Hyperoperators: calls hyperoperators (evidence: `README.md`)
- Library user → Layered representation: creates components (evidence: `README.md`)
- Decimal API → LRU cache: imports (evidence: `src/index.ts`)
