# casidora

![](icons/icon128.png)

**casidora** is a local-first scientific, engineering, and everyday calculator for Google Chrome. It is a **Manifest V3 browser extension** with a compact toolbar popup and an expanded calculator workspace in its own tab. It is not a hosted website and does not need a remote calculation service.

The calculation engine is inspired by the workflow and feature families of the Casio fx-570ES PLUS / compatible fx-991ES PLUS. It is not a bit-for-bit emulator of Casio firmware and does not reproduce every feature of every Casio model. Numerical differentiation, integration, and iterative equation solving are approximations; see [Limitations](#limitations-and-numerical-notes).

![](<Screenshot 2026-11-07 030131.png>)

> **Project status:** casidora is not published on the Chrome Web Store. Install it locally from the source repository using the Git instructions below.

## Contents

- [What casidora can do](#what-casidora-can-do)
- [Download and install](#download-and-install)
- [First calculation](#first-calculation)
- [Interface guide: where each feature lives](#interface-guide-where-each-feature-lives)
- [Everyday and scientific calculations](#everyday-and-scientific-calculations)
- [Memory registers and history](#memory-registers-and-history)
- [Specialist tools and command reference](#specialist-tools-and-command-reference)
- [Solve common problems](#solve-common-problems)
- [Tips for using casidora efficiently](#tips-for-using-casidora-efficiently)
- [How the extension works](#how-the-extension-works)
- [Project files](#project-files)
- [Development and tests](#development-and-tests)
- [Limitations and numerical notes](#limitations-and-numerical-notes)
- [Privacy and security](#privacy-and-security)
- [License and third-party notices](#license-and-third-party-notices)

## What casidora can do

- **Everyday arithmetic:** addition, subtraction, multiplication, division, parentheses, powers, factorials, percentages, fractions, reciprocal, and answer reuse.
- **Scientific mathematics:** trigonometric, inverse-trigonometric, hyperbolic, inverse-hyperbolic, logarithmic, exponential, root, rounding, and number-theory functions.
- **Complex numbers:** rectangular complex arithmetic and supported complex powers, roots, logarithms, trigonometric functions, conjugates, real/imaginary extraction, and polar/rectangular conversion.
- **Equation workflows:** quadratic and cubic polynomial roots, simultaneous 2- and 3-variable linear systems, numerical root solving, and variable substitution.
- **Calculus and tables:** numerical differentiation, definite numerical integration, finite summation, and one- or two-function value tables.
- **Statistics:** one-variable summaries, frequency-weighted data, paired-data summaries, regression models, estimates, and standard-normal distribution helpers.
- **Engineering:** binary/octal/decimal/hexadecimal conversion, bitwise operations, scientific constants, metric/unit conversions, matrices, and vectors.
- **Personal calculation memory:** registers `A`–`F`, `M`, `X`, `Y`, and `ANS`, independent-memory controls, and recent calculation history.
- **Norm mode:** a reduced basic keypad and memory-register panel without the Scientific or Tools panels.
- **Workspace and appearance:** expanded new-tab calculator, optional browser fullscreen, System/Light/Dark themes, and custom slim scrollbar styling.

## Project website

The static CASIDORA project website is included at the repository root. Open `index.html` to preview it locally, or configure the repository to publish the root directory with GitHub Pages. The website files are `index.html`, `styles.css`, `script.js`, and `config.js`; see [WEBSITE_README.md](WEBSITE_README.md) for setup notes. Add the official repository URL to `config.js` when it is published.

## Download and install

casidora is not in the Chrome Web Store. Clone the project's Git repository:

```bash
git clone <REPOSITORY-URL>
cd casidora
```

Replace `<REPOSITORY-URL>` with the repository address when it is available. This README intentionally uses Git clone as the download method; a Chrome Web Store listing or direct ZIP download is not provided here.

### Load casidora into Chrome

1. Clone the repository with the commands above.
2. Open Google Chrome and go to `chrome://extensions`.
3. Turn on **Developer mode**.
4. Click **Load unpacked**.
5. Select the cloned `casidora` directory. Select the directory that contains `manifest.json` directly, not its parent directory.
6. Open Chrome's Extensions menu. Pin **casidora** to the toolbar for quick access.
7. Click the casidora toolbar icon to open its calculator popup.

### Open the expanded workspace

Click the expand/fullscreen icon in the popup header. casidora opens `full.html` in a new Chrome tab. The expanded layout places the keypad on the left, the expression and result area in the upper-right, and the Scientific/Tools/Norm panels and memory controls below. In the expanded tab, click the same header icon to enter or exit the browser's native fullscreen mode.

### Update an installed Git checkout

From the repository directory:

```bash
git pull
```

Then visit `chrome://extensions` and click the **Reload** icon on the casidora extension card.

## First calculation

1. Click the expression field labelled **EXPRESSION**.
2. Type an expression, or use the on-screen keypad and Scientific function buttons to insert symbols at the cursor.
3. Press **Enter** or click **Calculate** / `=`.
4. Read the answer in the **RESULT** area. Use **Copy result** to copy it.
5. Use `Ans` in the next expression to refer to the previous answer.

Try these starter expressions:

| Goal | Enter | What it does |
|---|---|---|
| Parentheses and order of operations | `(12 + 8) * 3` | Adds inside the parentheses, then multiplies. |
| Percentage increase | `100 + 5%` | Adds five percent of 100. |
| Percentage of a value | `100 * 5%` | Calculates five percent of 100. |
| Square root | `sqrt(81)` | Calculates the square root. |
| Trigonometry | `sin(pi / 2)` | Returns 1 when the angle mode is RAD. |
| Complex root | `sqrt(-4)` | Returns `2i`. |
| Reuse the previous result | `Ans * 3` | Multiplies the last answer by three. |
| Convert decimal to fraction | `fraction(0.875)` | Returns a simplified fraction and decimal. |

### Expression syntax

Use `+`, `-`, `*`, `/`, `^`, `!`, `%`, commas for function arguments, and parentheses for grouping. Use `*` for multiplication and `/` for division when typing expressions. The visual keypad displays `×` and `÷` but inserts the parser's `*` and `/` operators.

Examples:

```text
2 + 3 * 4             → 14
(2 + 3) * 4           → 20
2^8                   → 256
5!                    → 120
1 / 3                 → decimal approximation
100 + 5%              → 105
100 * 5%              → 5
```

The parser follows arithmetic precedence: exponentiation is evaluated before multiplication/division, which are evaluated before addition/subtraction. Use parentheses whenever you want to make grouping explicit. The percent operator is interpreted as a percentage literal in addition/subtraction expressions, as shown above.

## Interface guide: where each feature lives

| Location in the interface | Control | Purpose |
|---|---|---|
| Popup header, upper-right | **Expand icon** | Opens the expanded calculator in a separate tab. |
| Expanded-tab header, upper-right | **Fullscreen icon** | Toggles browser-native fullscreen for that tab. |
| Header, beside the expand icon | **Theme** | Cycles System → Light → Dark. |
| Top row of calculator card | **Mode selector** | Selects COMP, CMPLX, STAT, BASE-N, EQN, MATRIX, TABLE, or VECTOR mode. The calculation commands described below perform the relevant operations. |
| Top row of calculator card | **Number format selector** | Selects NORM, FIX, SCI, or ENG result display formatting. |
| Top row of calculator card | **RAD / DEG / GRA** | Clicks through angle units. It affects trigonometric angle inputs/outputs and angle-related functions. |
| Top row of calculator card | **AC** | Clears the expression field. |
| Main display | **EXPRESSION** | Type or edit the expression/command here. |
| Main display | **RESULT** | Shows the answer, a multi-line result, or an error message. |
| Main display action row | **Calculate** | Evaluates the expression currently in the field. Press Enter as an alternative. |
| Main display action row | **Copy result** | Copies the displayed result when copying is available. |
| FUNCTION tabs | **Scientific** | Displays the scientific-function insertion buttons. |
| FUNCTION tabs | **Tools** | Displays ready-made examples for equation solving, calculus, statistics, engineering and conversions. Clicking a Tool fills the expression field; it does not automatically calculate it. Press Enter or Calculate afterward. |
| FUNCTION tabs | **Norm** | Hides Scientific and Tools, leaving the basic keypad and memory-register panel. |
| Left/lower calculator area | **Basic keypad** | Inserts parentheses, digits, decimal point, operators, `Ans`, or evaluates with `=`. |
| Below the keypad | **MEMORY REGISTERS** | Shows the current values for A, B, C, D, E, F, M, X, Y, and ANS. Click a register chip to insert its name into the expression. |
| Beside MEMORY REGISTERS | **M+ / M− / Clear M / Reset all** | Adds or subtracts the current `Ans` from M, clears only M, or resets all named registers. |
| Bottom of the interface | **History** | Shows recent calculations. Click an entry to put its expression back into the input field. |
| Bottom of the interface | **Functions & syntax** | Opens the built-in quick reference. You can also enter `help` in the expression field and calculate. |

The expanded workspace uses the same calculator engine and controls as the popup. It is intended for longer expressions and more comfortable use of the keypad and lower function panels.

## Everyday and scientific calculations

### Basic keypad

The keypad contains `( )`, backspace (`⌫`), `/`, digits `0`–`9`, `*`, `-`, `+`, decimal point, `Ans`, and `=`. Clicking a key inserts its content at the current cursor position in the expression field. Backspace deletes the selected text or the character immediately before the cursor.

The **AC** button clears the complete expression. The keyboard **Escape** key also clears it. Press **Enter** to calculate; **Shift+Enter** keeps the normal multiline-input behavior.

### Scientific panel

Open **Scientific** in the FUNCTION tabs. Its buttons insert the following operations into the expression field:

| Button label | Inserted expression | Function |
|---|---|---|
| `sin`, `cos`, `tan` | `sin(`, `cos(`, `tan(` | Sine, cosine, and tangent. |
| `sin⁻¹`, `cos⁻¹`, `tan⁻¹` | `asin(`, `acos(`, `atan(` | Inverse trigonometric functions. |
| `sinh`, `cosh`, `tanh` | Corresponding function call | Hyperbolic functions. |
| `sinh⁻¹`, `cosh⁻¹`, `tanh⁻¹` | `asinh(`, `acosh(`, `atanh(` | Inverse hyperbolic functions. |
| `√`, `∛` | `sqrt(`, `cbrt(` | Square root and cube root. |
| `ln`, `log` | `ln(`, `log(` | Natural logarithm and base-10 logarithm. |
| `π`, `e`, `i` | `pi`, `e`, `i` | Pi, Euler's number, and imaginary unit. |
| `xʸ`, `n!` | `^`, `!` | Power and factorial operators. |
| `Abs` | `abs(` | Absolute value / complex magnitude. |
| `nCr`, `nPr` | `ncr(`, `npr(` | Combinations and permutations. |
| `x⁻¹` | `inv(` | Reciprocal. |
| `Ans` | `Ans` | Previous answer. |
| `logₐ` | `logbase(` | Logarithm with a specified base; enter value and base. |
| `eˣ` | `exp(` | Exponential function. |
| `Ran#`, `RanInt#` | `rand()`, `ranint(1,6)` | Random decimal, or random integer in a range. |
| `gcd`, `lcm` | `gcd(`, `lcm(` | Greatest common divisor and least common multiple. |
| `Rnd`, `Frac` | `round(`, `frac(` | Rounding and fractional part. |

A button that inserts `function(` leaves the cursor after the opening parenthesis. Enter its argument and close it with `)`. For a two-argument function, separate the arguments with a comma, for example `logbase(8,2)`.

### Angle units: RAD, DEG, and GRA

Click the angle badge to cycle through:

- **RAD:** radians; this is the default.
- **DEG:** degrees.
- **GRA:** gradians.

For example, `sin(90)` equals 1 in DEG mode, while `sin(pi/2)` equals 1 in RAD mode. Inverse trigonometric functions return their angle in the selected unit. Hyperbolic functions do not use the angle setting.

You can also convert explicit angle values with `deg(x)`, `rad(x)`, or `grad(x)`. These functions convert degrees/radians/gradians according to their names; they do not change the current angle-mode selector.

### Number display formats

Use the selector beside the mode selector:

- **NORM:** default general number formatting.
- **FIX:** fixed number of decimal places.
- **SCI:** scientific notation.
- **ENG:** engineering notation with exponents in multiples of three.

Set a specific precision by entering a command, for example `format(FIX,2)`, `format(SCI,5)`, or `format(ENG,4)`. Restore default display with `format(NORM)`. Precision must be an integer from 0 to 10. The selector chooses the format; the command form also lets you set the precision.

## Memory registers and history

### Named registers

casidora includes `A`, `B`, `C`, `D`, `E`, `F`, `M`, `X`, `Y`, and `ANS`.

Assign a value with `register=expression`:

```text
A=12/4
B=sin(30)
X=5
A+B
```

Register assignments also set `Ans` to the assigned value. Use a register name in later expressions. Register chips in the MEMORY REGISTERS area show the stored value; click a chip to insert the register name at the current cursor position.

`Ans` is updated by ordinary expression evaluation and by commands that explicitly set the answer. Use it when chaining calculations, such as `Ans * 1.18` after calculating a price.

### Independent memory M

- **M+:** adds the current `Ans` to register `M`.
- **M−:** subtracts the current `Ans` from register `M`.
- **Clear M:** sets M to zero but leaves the other registers unchanged.
- **Reset all:** resets A, B, C, D, E, F, M, X, Y, and ANS to zero.

Typed equivalents are `mplus(value)`, `mminus(value)`, and `mclear()`. The typed commands add/subtract the supplied value expression rather than requiring it to be the current displayed answer.

### History

Select **History** at the bottom of the interface to show recent calculations. The list displays the most recent entries (up to eight in the visible panel); click an entry to restore its original expression to the input field for editing or recalculation. Use **Clear** in the History panel to remove the saved history. The engine keeps up to 50 history entries.

History is a convenience for replay, not a symbolic derivation log. It stores the entered expression, result/error text, and time; it does not explain the algebraic steps used to obtain an answer.

## Specialist tools and command reference

Open **Tools** in the FUNCTION tabs to see example commands grouped as ready-to-use chips. Clicking a chip places its command into the expression field. Edit its sample data and then calculate it. You can also type commands directly.

The command forms below are supported by the calculation engine. Commands are case-insensitive except that register names are conventionally written in uppercase. Array data must use square brackets and commas.

### Equation solving and variable substitution

| Tool / command | Example | What it does |
|---|---|---|
| Quadratic | `solve:quadratic(a,b,c)` | Solves `a·x² + b·x + c = 0`; returns two real or complex roots. `a` must not be zero. |
| Cubic | `solve:cubic(a,b,c,d)` | Solves `a·x³ + b·x² + c·x + d = 0`. |
| Simultaneous linear system | `solve:linear([[a,b,c],[d,e,f]])` | Solves a 2-variable augmented system. For 3 variables, provide a 3×4 augmented matrix. |
| Numerical root | `solve:root(expression,guess)` | Numerically searches for a root in X, starting from the supplied guess. Use `solve:root(expression,variable,guess)` to choose another register variable. |
| CALC substitution | `calc(expression,X=value)` | Evaluates an expression with a temporary variable value without permanently replacing the stored register. The alternate form is `calc(expression,X,value)`. |

Examples:

```text
solve:quadratic(1,-5,6)
solve:cubic(1,-6,11,-6)
solve:linear([[1,1,6],[1,-1,2]])
solve:root(X^2-2,1)
calc(X^2+3X,X=4)
```

For simultaneous equations, each augmented row contains the coefficients followed by the right-hand-side value. For example, `[[1,1,6],[1,-1,2]]` represents `x+y=6` and `x-y=2`.

### Calculus, summation, and tables

| Command | Example | What it does |
|---|---|---|
| Numerical derivative | `diff(expression,x-value)` | Estimates the derivative at the specified X value using a central finite difference. |
| Definite integral | `int(expression,start,end)` | Estimates the definite integral over the interval using Simpson's rule with 1,000 subintervals. |
| Summation | `sigma(expression,start,end)` or `sum(expression,start,end)` | Evaluates the expression for each integer X in the inclusive range and adds the values. |
| Function table | `table(f,start,end,step)` | Displays X and f(X) at each step. |
| Two-function table | `table(f,g,start,end,step)` | Displays X, f(X), and g(X). |

Examples:

```text
diff(X^3,2)
int(X^2,0,3)
sigma(X^2,1,5)
table(sin(X),0,pi,pi/4)
table(sin(X),cos(X),0,pi,pi/4)
```

`table` requires a positive step and can generate at most 100 rows. `sigma` requires integer bounds, with the end greater than or equal to the start, and is limited to 10,001 terms.

### Statistics and regression

Enter a dataset as a list of numbers. For paired data, use a list of `[x,y]` rows.

| Command | Example | What it does |
|---|---|---|
| One-variable summary | `stat:summary([values])` | Returns count, sum, sum of squares, mean, population SD, sample SD, minimum, median, and maximum. |
| Frequency-weighted summary | `stat:summary([[value,frequency],...])` | Summarizes values with integer frequencies. |
| Single statistic | `stat:mean(data)`, `stat:sum(data)`, `stat:variance(data)`, `stat:stddev(data)`, `stat:min(data)`, `stat:max(data)` | Returns the requested statistic; `stddev` shows population and sample standard deviations. |
| Paired summary | `stat:paired([[x,y],...])` | Shows paired sums, means, standard deviations, and extrema. |
| Paired totals | `stat:sumx(data)`, `stat:sumy(data)`, `stat:sumxy(data)`, etc. | Returns a selected paired-data aggregate. Supported names include `sumx`, `sumy`, `sumx2`, `sumy2`, `sumxy`, `sumx3`, `sumx2y`, `sumx4`, `meanx`, `meany`, `sdx`, `sdy`, `ssdx`, `ssdy`, `minx`, `maxx`, `miny`, and `maxy`. |
| Regression | `stat:reg(data,model)` | Fits a regression and reports its equation; linear is the default model. |
| Estimate Y | `stat:estimate(data,x,model)` | Estimates Y at a given X using the selected regression. |
| Estimate X | `stat:estimatex(data,y,model)` | Estimates X for a given Y. A quadratic model may return two X values. |
| Normal PDF | `stat:pdf(z)` | Standard-normal probability density at z. |
| Normal CDF | `stat:cdf(z)` | Standard-normal cumulative probability up to z. |
| CDF between bounds | `stat:cdf(lower,upper)` | Standard-normal probability between lower and upper. |
| Upper tail | `stat:q(z)` | Standard-normal upper-tail probability. |
| Two-tail probability | `stat:r(z)` | Two-sided standard-normal tail probability using |z|. |
| Inverse normal | `stat:invnorm(p)` | Returns the standard-normal quantile for probability p. |
| Standardize | `stat:t(x,mean,sd)` | Computes `(x - mean) / sd`; sd must be positive. |

Regression model names supported by `stat:reg` / `stat:estimate` are `linear`, `quadratic`, `logarithmic`, `exponential`, `abx`, `power`, and `inverse`.

Example:

```text
stat:summary([10,12,23,24,32])
stat:paired([[1,2],[2,4],[3,5]])
stat:reg([[1,2],[2,4],[3,5]],linear)
stat:estimate([[1,2],[2,4],[3,5]],4,linear)
stat:cdf(-1.96,1.96)
```

For frequency data, each pair is `[value, frequency]`, and the frequency must be an integer from 0 to 100,000. Regression data must contain paired numeric values. Logarithmic, power, and exponential fits require data in domains where their transformations are defined.

### BASE-N and bitwise operations

Use the Tools chip or enter:

```text
base:bin(255)
base:oct(255)
base:dec(255)
base:hex(255)
base:and(12,10)
base:or(12,10)
base:xor(12,10)
base:not(12)
```

`bin`, `oct`, `dec`, and `hex` convert a real-valued expression (truncated to an integer) into the requested base. `and`, `or`, and `xor` combine integer operands with bitwise logic. `not` performs the bitwise complement. The engine uses JavaScript's signed 32-bit bitwise operations; binary output is presented as a 16-bit padded string.

### Matrices

Enter matrices as arrays of rows. Matrix operations are under the **Tools** panel and use the `mat:` command prefix.

| Command | Example | What it does |
|---|---|---|
| Determinant | `mat:det([[1,2],[3,4]])` | Calculates a square matrix determinant. |
| Inverse | `mat:inv([[1,2],[3,4]])` | Calculates the inverse of an invertible square matrix. |
| Transpose | `mat:transpose([[1,2],[3,4]])` | Swaps rows and columns. |
| Addition / subtraction | `mat:add(A,B)`, `mat:sub(A,B)` | Adds or subtracts same-sized matrices. |
| Multiplication | `mat:mul(A,B)` | Multiplies matrices when their dimensions are compatible. |
| Scalar multiply | `mat:scale(A,k)` | Multiplies every entry by scalar k. |
| Integer power | `mat:pow(A,n)` | Raises a square matrix to an integer power from −10 to 10. |

The current matrix validator supports square matrices up to 3×3. Matrix power requires a square matrix and an integer exponent in the stated range. Inversion requires a non-singular matrix.

### Vectors

Vectors must contain two or three numeric components. Use the `vec:` command prefix.

| Command | Example | What it does |
|---|---|---|
| Magnitude | `vec:mag([3,4])` | Calculates vector length. |
| Unit vector | `vec:unit([3,4])` | Returns the unit direction; a zero vector has no unit vector. |
| Dot product | `vec:dot([1,2,3],[4,5,6])` | Calculates the scalar dot product. |
| Cross product | `vec:cross([1,0,0],[0,1,0])` | Calculates the 3D cross product; requires 3D vectors. |
| Angle | `vec:angle([1,0,0],[0,1,0])` | Calculates the angle between vectors in the selected RAD/DEG/GRA unit. |
| Add / subtract | `vec:add(A,B)`, `vec:sub(A,B)` | Adds or subtracts same-dimension vectors. |
| Scale | `vec:scale(A,k)` | Multiplies every component by scalar k. |

### Scientific constants and unit conversions

**Scientific constants:** enter `const(code)` with a code from 01 to 40. For example, `const(28)` returns the speed of light constant (`C0`). The available symbolic names can also be entered directly in expressions, such as `C0`, `G0`, `NA`, `KB`, `RGAS`, or `ATM`.

| Code | Constant | Code | Constant |
|---:|---|---:|---|
| 01 | MP | 02 | MN |
| 03 | ME | 04 | MMU |
| 05 | A0 | 06 | H |
| 07 | MUN | 08 | MUB |
| 09 | HBAR | 10 | ALPHA |
| 11 | RE | 12 | LAMBDAC |
| 13 | GAMMAP | 14 | LAMBDACP |
| 15 | LAMBDACN | 16 | RINF |
| 17 | U | 18 | MUP |
| 19 | MUE | 20 | MUNNEUTRON |
| 21 | MMUMAG | 22 | FARADAY |
| 23 | ECHARGE | 24 | NA |
| 25 | KB | 26 | VM |
| 27 | RGAS | 28 | C0 |
| 29 | C1 | 30 | C2 |
| 31 | SIGMA | 32 | EPSILON0 |
| 33 | MU0 | 34 | PHI0 |
| 35 | G0 | 36 | GQUANTUM |
| 37 | Z0 | 38 | CELSIUS0 |
| 39 | GNEWTON | 40 | ATM |

**Conversions:** enter `conv(code,value)` with a code from 01 to 40. The Tools panel's Unit conversion chip is an example; edit the code/value as needed.

| Code | Conversion | Code | Conversion |
|---:|---|---:|---|
| 01 | in → cm | 02 | cm → in |
| 03 | ft → m | 04 | m → ft |
| 05 | yd → m | 06 | m → yd |
| 07 | mile → km | 08 | km → mile |
| 09 | nmi → m | 10 | m → nmi |
| 11 | acre → m² | 12 | m² → acre |
| 13 | US gal → L | 14 | L → US gal |
| 15 | UK gal → L | 16 | L → UK gal |
| 17 | pc → km | 18 | km → pc |
| 19 | km/h → m/s | 20 | m/s → km/h |
| 21 | oz → g | 22 | g → oz |
| 23 | lb → kg | 24 | kg → lb |
| 25 | atm → Pa | 26 | Pa → atm |
| 27 | mmHg → Pa | 28 | Pa → mmHg |
| 29 | hp → kW | 30 | kW → hp |
| 31 | kgf/cm² → Pa | 32 | Pa → kgf/cm² |
| 33 | kgf·m → J | 34 | J → kgf·m |
| 35 | psi → kPa | 36 | kPa → psi |
| 37 | °F → °C | 38 | °C → °F |
| 39 | J → cal | 40 | cal → J |

Example: `conv(2,12)` converts 12 centimetres into inches.

### Fractions, coordinates, and extra math helpers

| Function | Example | What it does |
|---|---|---|
| Fraction | `fraction(0.875)` | Converts a decimal to a simplified fraction and also reports the decimal. |
| Mixed fraction | `mixed(2.75)` | Converts a decimal to a mixed-fraction display where possible. |
| Round | `round(3.14159,2)` | Rounds to the selected number of decimal places (0–10). |
| Floor / ceiling / truncate | `floor(2.9)`, `ceil(2.1)`, `trunc(-2.9)` | Rounds down, rounds up, or removes the fractional part. |
| Sign / min / max | `sign(-4)`, `min(2,4,1)`, `max(2,4,1)` | Returns sign, minimum, or maximum. |
| GCD / LCM | `gcd(18,24)`, `lcm(4,6)` | Greatest common divisor / least common multiple. |
| Random | `rand()` or `ran()` | Generates a pseudorandom decimal in [0,1). |
| Random integer | `ranint(1,6)` | Generates an integer from min through max, inclusive. |
| Fractional part | `frac(-2.4)` | Returns the signed fractional part. |
| Rectangular to polar | `pol(3,4)` | Returns the magnitude and adds the polar angle as a result note. |
| Polar to rectangular | `rect(5,53.1301)` | Returns a complex rectangular value using the selected angle unit. |
| DMS to decimal | `dms(12,30,0)` | Converts degrees/minutes/seconds to decimal degrees. |
| Decimal to DMS | `todms(12.5)` | Adds a formatted DMS note to the result. |
| Error function | `erf(1)` | Evaluates the error function. |
| Hypotenuse | `hypot(3,4)` | Calculates the square root of the sum of squares. |

The expression parser also supports `log10(x)` as an alias of `log(x)`, `perm(n,r)` as an alias of `npr(n,r)`, `comb(n,r)` as an alias of `ncr(n,r)`, and `fracpart(x)` as an alias of `frac(x)`. `pow(a,b)` is an alternate form of `a^b`.

### Complex-number functions

The imaginary unit is `i`. For example, enter `2+3i`, `sqrt(-4)`, or `(1+i)^2`. Supported functions include:

- `re(z)` and `im(z)` — real and imaginary parts.
- `abs(z)` — complex magnitude.
- `arg(z)` — complex argument in the selected angle unit.
- `conj(z)` — complex conjugate.
- `pol(x,y)` — rectangular coordinates to magnitude/angle (the angle is shown in a note).
- `rect(r,theta)` — polar magnitude/angle to a complex rectangular value.

Some operations require real-valued inputs. If an operation such as `floor`, `log`, `gcd`, or a statistical command receives a complex value, it will report that the input must be real.

### Multiple calculations in one input

Separate expressions with a semicolon or colon to evaluate them in sequence:

```text
2+2; 3*3; Ans+1
```

The output contains the result for each statement. Each expression is evaluated in order, so `Ans` in a later statement can refer to an earlier answer.

## Solve common problems

### “Unknown symbol” or “Unknown function”

- Check spelling. Function names must be in the supported function list; `sine()` is not an alias for `sin()`.
- Make sure variable names are one of `A`, `B`, `C`, `D`, `E`, `F`, `M`, `X`, `Y`, or `ANS`.
- Define a register before using it, for example `X=5`.
- Use `pi`, `e`, and `i` for the mathematical constants.
- For named physical constants, use one of the documented constant names such as `C0` or a code with `const(28)`.

### “Expected )” or unexpected token

- Check that every opening parenthesis has a matching closing parenthesis.
- Use commas between function arguments, for example `logbase(8,2)`.
- Do not use a decimal comma; use a period for decimal fractions (`3.14`).
- Use `*` for multiplication and `/` for division in typed expressions.

### A trigonometric answer looks wrong

Check the angle badge before evaluating. `sin(90)` is 1 in DEG mode, but not in RAD mode. Use `sin(pi/2)` in RAD mode. Also remember that inverse trig functions return values in the selected angle unit.

### SOLVE cannot converge

`solve:root()` is iterative and depends on the initial guess. Try a different starting value nearer to the root. If the function has several roots, a different guess may converge to a different one. Check that the expression is defined around the guess and that the derivative there is not effectively zero. The command may fail for roots it cannot reach reliably.

For polynomial equations, use `solve:quadratic()` or `solve:cubic()` instead of the iterative root command when the equation has the corresponding form.

### Matrix operation fails

- Use a rectangular nested array such as `[[1,2],[3,4]]`.
- Matrix operations are limited to square matrices up to 3×3 for determinant/inverse and supported compatible dimensions for arithmetic.
- Addition and subtraction require equal dimensions; multiplication requires compatible row/column dimensions.
- An inverse does not exist for a singular matrix.
- Matrix powers require a square matrix and an integer exponent from −10 to 10.

### Vector operation fails

- Enter vectors as `[x,y]` or `[x,y,z]`.
- Paired vectors must have the same number of components.
- Cross product requires two 3D vectors.
- The unit vector of `[0,0]` or `[0,0,0]` is undefined.
- The angle between a zero vector and another vector is undefined.

### Statistical or regression result is unavailable

- Check that a one-variable dataset is a numeric array such as `[2,4,6]`.
- Paired/regression data must use rows such as `[[1,2],[2,4],[3,5]]`.
- Frequency pairs must be `[value,frequency]` and frequencies must be non-negative integers.
- Logarithmic and power regressions need valid positive-domain data for the logarithms/powers involved.
- `stat:invnorm(p)` requires a probability strictly between zero and one.

### The result is approximate or differs from another calculator

Check the displayed number format first; FIX, SCI, and ENG can change the displayed representation without changing the underlying calculation. Numerical `diff`, `int`, and `solve:root` are approximations/iterative calculations. Small differences can occur due to numerical method, finite precision, and input setup. For high-stakes engineering, financial, or scientific work, independently verify results with an appropriate validated tool.

### The extension does not load

- Confirm that the selected folder contains `manifest.json` directly.
- Open `chrome://extensions` and check the error shown on the casidora card.
- Make sure the source checkout is complete and files such as `popup.html`, `popup.js`, `calculator.js`, and `icons/` are present.
- After pulling updates, click **Reload** on the extension card.

### The full workspace or fullscreen does not open

The popup expand control opens a new tab through the extension's Chrome API. If the tab does not open, reload the extension and try again. Browser-native fullscreen is requested from a user click in the expanded tab; some browser or environment restrictions may prevent fullscreen. The expanded tab remains usable without native fullscreen.

### Registers or theme settings appear reset

Preferences and calculator state are stored locally by the browser. Clearing extension/browser site data, using a different Chrome profile, or reinstalling in a way that removes extension storage may reset saved values. Use the same Chrome profile to retain the same local state.

## Tips for using casidora efficiently

1. **Use the right workspace.** Use the popup for quick arithmetic; use the expanded tab for long expressions, larger function panels, and side-by-side keypad/display work.
2. **Keep a reusable value in a register.** Save constants or intermediate results with `A=...`, `B=...`, or `X=...`, then reuse the register by name.
3. **Chain calculations with Ans.** Calculate once, then write the next expression using `Ans` instead of retyping the result.
4. **Use the Tools chips as templates.** Click the closest example, replace the sample numbers/data, and calculate. This avoids having to memorize command prefixes.
5. **Set angle mode before a trig-heavy task.** RAD is common in calculus; DEG is common when working with degrees. Check the badge before entering data.
6. **Choose a suitable number format.** Use NORM for general use, FIX for fixed decimal places, SCI for very large/small values, and ENG for engineering notation.
7. **Use Norm for distraction-free arithmetic.** Norm removes the scientific and Tools panels while keeping the simple keypad and memory controls visible.
8. **Replay history instead of retyping.** Restore an earlier expression from History, edit one part, and calculate again.
9. **Copy the displayed answer when needed.** The Copy result control copies the visible result text, including additional lines where present.
10. **Use explicit parentheses in complex expressions.** This makes grouping obvious and reduces input mistakes.

## How the extension works

1. Chrome reads `manifest.json` as the extension's Manifest V3 configuration and registers the toolbar action.
2. Clicking the toolbar action opens `popup.html` with `popup.css` and `popup.js`.
3. Clicking the expand icon opens `full.html` in a new tab. The full workspace reuses the popup styles and JavaScript and adds `full.css` for its layout.
4. `popup.js` creates a `CalculatorEngine` instance from `calculator.js`, connects UI events, inserts button text into the expression field, runs calculations, displays results, and renders registers/history.
5. `calculator.js` tokenizes and parses the entered expression and dispatches specialist commands to mathematical routines. It intentionally does not use `eval()` or `Function()` to execute user expressions.
6. Calculator state and preferences are persisted using browser-local storage where available. The arithmetic and specialist calculation logic runs locally in the extension.

The mode selector records the selected calculation mode. The specialized operations themselves are invoked through the Tools buttons or typed commands listed in this README; selecting a mode does not open a separate step-by-step wizard or data-entry screen.

## Project files

| File or folder | What it contains / does |
|---|---|
| `manifest.json` | Chrome Manifest V3 metadata: extension name/version/description, toolbar popup, and icon paths. The current manifest declares no Chrome permissions. |
| `popup.html` | The calculator's popup structure: expression/result display, selectors, Scientific and Tools tabs, Norm panel, keypad, memory registers, history, and quick reference area. |
| `popup.css` | Popup appearance, layout, light/dark/system theme variables, responsive styling, rounded controls, and custom scrollbar. |
| `popup.js` | Connects the UI to `CalculatorEngine`; handles calculation, input insertion, angle and number-format controls, theme cycling, panel switching, history, registers, clipboard, and opening the full workspace. |
| `full.html` | Expanded calculator tab. It reuses `popup.css` and `popup.js` and includes the expanded layout stylesheet. |
| `full.css` | Layout rules specific to the expanded workspace, including the left keypad and right-side display/function areas. |
| `calculator.js` | Core engine: expression tokenizer/parser; arithmetic and complex-number support; built-in mathematical functions; angle and display formats; registers and history; solver, calculus, table, statistics, BASE-N, matrix, vector, constants, and conversion commands. |
| `icons/` | Extension icons for Chrome's supported icon sizes. |
| `tests/calculator.test.mjs` | Automated Node.js tests for calculator-engine behavior. |
| `package.json` | Project metadata and the `npm test` script. No third-party runtime dependencies are declared. |
| `README.md` | Project introduction, installation, feature and command reference, usage guide, troubleshooting, and file map. |
| `CONTRIBUTING.md` | Contribution and change-proposal guidance. Read the license restrictions before attempting to modify or redistribute project files. |
| `SECURITY.md` | Security expectations, privacy notes, and vulnerability-reporting guidance. |
| `CHANGELOG.md` | User-facing record of release changes. |
| `LICENSE.txt` | CASIDORA Proprietary Source-Available License governing casidora. Read it before using or interacting with the source. |
| `design.md` | Visual design direction and interface-design reference. |
| `index.html`, `styles.css`, `script.js`, `config.js` | Static project website structure, styling, behavior, and repository URL configuration. |
| `WEBSITE_README.md` | Preview and publishing instructions for the CASIDORA project website. |
| `SKILL.md` | Project-specific development/maintenance guidance. |
| `DESIGN_CREDITS.md` | Attribution for the third-party visual-design inspiration. |

## Development and tests

Requirements: **Node.js 18 or newer**. The project has no declared third-party runtime dependencies.

Run the tests from the project root:

```bash
npm test
```

After a permitted change, reload casidora from `chrome://extensions` and manually check both the popup and expanded tab. Test light, dark, and system themes; the Scientific, Tools, and Norm panels; memory actions; history replay; and at least one command from each specialist group. See [CONTRIBUTING.md](CONTRIBUTING.md) and read [LICENSE.txt](LICENSE.txt) before making any changes.

## Limitations and numerical notes

- casidora targets selected fx-570ES PLUS / compatible fx-991ES PLUS feature families. It is not a complete calculator emulator, firmware clone, or representation of every function across all Casio calculators.
- It uses expression entry rather than an exact reproduction of Casio Natural Textbook Display.
- `diff()` uses a central finite-difference estimate. `int()` uses composite Simpson's rule with 1,000 subintervals. `solve:root()` uses an iterative numerical method and an initial guess.
- Floating-point results may contain normal numerical rounding error. Display precision is controlled separately by NORM/FIX/SCI/ENG.
- Matrices are limited to 3×3 by the current validator. Table output is limited to 100 rows. Summation is limited to 10,001 terms.
- This software is provided under the terms and warranty disclaimer in [LICENSE.txt](LICENSE.txt). Validate important results independently before relying on them.

## Privacy and security

The extension manifest currently declares no Chrome permissions. It does not need access to the active webpage, an account, or a hosted backend to perform calculations. Expressions are processed locally by the calculator engine. Preferences, register values, and history may be saved in browser-local storage so they can be restored in the same Chrome profile.

See [SECURITY.md](SECURITY.md) for security notes and how to report a suspected vulnerability. As with any extension installed outside the Chrome Web Store, review the source and install only from a repository/release you trust.

## License and third-party notices

casidora is governed by the **CASIDORA Proprietary Source-Available License** in [LICENSE.txt](LICENSE.txt). The source may be publicly viewable for personal evaluation, learning, and reference, and the license permits personal, non-commercial use of an official, unmodified release. It does **not** grant general rights to modify, create derivatives or forks, redistribute, resell, or commercially exploit the software. Additional use requires prior written permission from the copyright holder. The license also describes limited GitHub-platform rights that may apply when the repository is public. Read the complete license before cloning, installing, using, or interacting with the source.

The supplied visual-design reference credits Unslop by Damir Sokolovsky under CC BY 4.0; that separate attribution is documented in [DESIGN_CREDITS.md](DESIGN_CREDITS.md). Third-party software, assets, and documentation remain subject to their own license terms. The casidora license does not replace or override those separate terms.
