Your first steps with the worksheet calculator | Version 1.0
RedcrabX is a worksheet calculator: instead of a single input line you work on a free-form canvas where each calculation lives in its own MathBox. Results are shown immediately as you type.
Key ideas:
.rcx) and can be reopened at any time.The main window is divided into three zones:
| Zone | Description |
|---|---|
| Ribbon (top) | Add boxes, change font, toggle panels, open/save files, print. |
| Function Panels (left side) | Collapsible panels with clickable function buttons. Click a button to insert the function name at the cursor position in the active MathBox. |
| Canvas (center) | The worksheet: drag boxes freely, resize them, arrange the layout as you like. |
Click one of the ribbon buttons in the Functions group: Functions, Special, Business, Physics, Geometry, Electrics, or Temp. Coeff. Each button toggles the corresponding panel open or closed.
2 + 3 * 4.= sign: 14.2 + 3 * 4 = 14 100 / 4 - 7 = 18 2^10 = 1024 sqrt(2) = 1.41421356
^ (power) > * / > + -.
Use parentheses to override: (2 + 3) * 4 → 20.
Use := to assign a value to a variable.
Variable names are case-sensitive and may contain letters, digits, and underscores.
r := 5 // assign radius A := pi * r^2 // use it: A = 78.53981634 U := 230 // voltage I := 10 P := U * I = 2300 // power
When assigning numeric values, you can use SI engineering prefixes (like kilo, milli, micro) to write large and small numbers more compactly:
resistor := 4.7k // 4700 ohms capacitor := 220u // 0.00022 farads (u = micro) frequency := 5M // 5000000 hertz delay := 100n // 0.0000001 seconds (nano)
For micro, you can use u (as above) or the standard symbol µ.
Supported prefixes include k (kilo), M (mega), G (giga),
m (milli), u/µ (micro), n (nano), and more.
Full details are in the MathBox Guide.
| Name | Value | Description |
|---|---|---|
pi | 3.14159265… | Circle constant π |
e | 2.71828183… | Euler’s number |
phi | 1.61803399… | Golden ratio φ |
Functions are called with parentheses: name(arg1, arg2, …).
You can type a function name directly or click the corresponding button in a function panel
to insert it at the cursor.
sin(30) = 0.5 // DEG mode sqrt(144) = 12 log(1000) = 3 abs(-7.5) = 7.5 round(3.7) = 4 max(3, 8, 2) = 8
sqrt(pow_ur(230, 50)) = 32.53 V // voltage from power and resistance round(pi * 1000) / 1000 = 3.142
Each panel is a collapsible sidebar with function buttons grouped by topic. Click any button to paste the function name (and argument placeholders) into the active MathBox.
| Group | Typical functions |
|---|---|
| Rounding | round, floor, ceiling, truncate |
| Power & Root | sqrt, cbrt, pow, rsqrt |
| Logarithm | ln, log, log2, exp, expm1, log1p |
| Integer math | gcd, lcm, factorial, fibonacci, mod, divrem |
| Sign & Clamp | abs, sign, clamp, min, max |
| Number theory | digitsum, digitroot, binomial |
| Finance | discount, markup, vat, sint, cint, compound |
| Bitwise | andbit, orbit, xorbit, shl, shr, rotl, rotr |
| Group | Typical functions |
|---|---|
| Trigonometry | sin, cos, tan, sec, csc, cot |
| Inverse trig | asin, acos, atan, arcsec, arccsc, arccot |
| Hyperbolic | sinh, cosh, tanh, sech, csch, coth |
| Inv. hyperbolic | asinh, acosh, atanh, arcsech, arccsch, arccoth |
| Geometry solids | bicylinder(...=...), tricylinder(...=...), ngonpyramid(a,h,n), ngonbipyramid(a,h,n), ngonfrustum(a,b,h,n), frustum(rs,rl,h) |
| Angle – Conversion | deg2rad, rad2deg, dms2deg, angpct(deg=...), angpct(pct=...) |
| Angle – Normalization | norm360, norm180, norm_angle |
| Angle – Relations | complement, supplement, anglediff |
| Special trig | sinc, versine, haversine, chord, gudermannian |
| Group | Typical functions |
|---|---|
| Descriptive stats | average, median, stdev, var, skewness, kurtosis |
| Spread & order | min, max, range, iqr, mad |
| Aggregates | sum, product, count, geomean, harmean |
| Percentages | percentof, pctdiff, ratiopct, discount, markup |
| Tax & interest | vat, taxof, sint, cint, cintearn, compound |
| Sets | union, intersect, setdiff, symdiff, subset, card |
| Group | Typical functions |
|---|---|
| Matrix ops | det, inv, transpose, trace, rank, chol, eigenvalues |
| Norms | norm, norm2, vnorm1, vnorminf, magnitude |
| Linear solve | inv(A) * b or Cholesky decomposition |
| Rotation matrices | rotx, roty, rotz, ypr, rpy |
| Quaternions | qmul, qconj, qnorm, qtomatrix, qtoeuler, qaxis, qangle |
| Force & work | centforce(...=..., ...=..., ...=...) – centrifugal force relation F = m·v²/r with any three named parameters (F, m, v, r)vst(...=..., ...=...) – speed-distance-time solver v = s/t with named unit variants: v|vms|vkmh, s|sm|skm, t|ts|tmin|thaccmotion(...=..., ...=..., ...=...) – uniformly accelerated motion solver using any 3 of s, v, v0, a, t, returning all five valuescircvel(...=..., ...=...) – circular motion speed v = 2·π·r/T using radius (r|rm|rkm) and period (T|ts|tm|tmin|th|td), output in m/s or km/hdrawtarget(name) – selects active DrawBox target by box name (example: drawtarget(D1))drawrect(x,y,h,w) – draws a rectangle on the active DrawBox target using pixel coordinates (top-left origin)drawcircle(x,y,r) – draws a circle on the active DrawBox target using center/radius in pixel coordinatesdrawline(x1,y1,x2,y2) – draws a line segmentdrawarrow(x1,y1,x2,y2) – draws a line with a filled arrowhead at the enddrawdot(x,y,r) – draws a filled dotdrawellipse(x,y,rx,ry) – draws an ellipsedrawarc(x,y,r,a1,a2) – draws a circular arc (angles in toolbar unit)drawtext(x,y,"text") – draws a text labeldrawclear() – clears the active DrawBox canvasdrawcross(x,y,size) – draws a crosshair markerdrawdim(x1,y1,x2,y2,offset) – draws a full dimension line with extension lines and arrowheadsdrawpoly(x1,y1,...) – draws a closed polygon from vertex pairsdrawgrid(spacing) – draws a background grid; drawgrid(sx,sy) for non-square gridorbvel(...=..., ...=..., ...=...) – orbital speed from radius, swept angle, and time (ts|tm|th), returning both m/s and km/h (angle follows DEG/RAD mode)freefall(g,h) – ideal free-fall table (time [s], speed [m/s], speed [km/h]) from g and h |
| Complex numbers | re, im, magnitude, phase, conjugate |
Full documentation: ElectricsGuide.html
| Group | Typical functions |
|---|---|
| Coulomb & Charge | coulomb, charge, energy |
| EC Electrical | altvolt (AC voltage characteristics table: Ueff / Us / Uss / Ug) |
| EC Electrical | voltang(Ueff, φ) – instantaneous sine voltage at angle φ [°]: u = Ueff·√2·sin(φ) [V] |
| EC Electrical | voltime(Ueff, f, t) – instantaneous sine voltage at time t [ms]: u = Ueff·√2·sin(2π·f·t/1000) [V] |
| EC Electrical | acperiod(f=…) / acperiod(T=…) – period ↔ frequency converter: T = 1/f [s/Hz] |
| EC Electrical | rmssqr(Us) – RMS value of a symmetric square wave: U_rms = Us [V] |
| EC Electrical | rmstri(Vs) – RMS value of a symmetric triangular wave: U_rms = Vs/√3 [V] |
| Wires & Resistors | parres(R1, R2, …) – parallel resistors, any count: 1/R = Σ 1/Ri [Ω] |
| Wires & Resistors | voltser(Unew, Um, Rm) – voltmeter series resistor: Rs = Rm·(Unew/Um−1) [Ω] |
| Wires & Resistors | ampshunt(Inew, Im, Rm) – ammeter shunt resistor: Rs = Rm·Im/(Inew−Im) [Ω] |
| Wires & Resistors | piatt(Z, dB) – Pi attenuator: R1=R3 shunt, R2 series [Ω] — K=10^(dB/20) |
| Wires & Resistors | tatt(Z, dB) – T attenuator: R1=R3 series, R2 shunt [Ω] — K=10^(dB/20) |
| Wires & Resistors | rcseries(C, f, R, U) – RC series circuit: Xc, Z, UR, UC, I, P, Q, S, φ |
| Inductor | rlseries(L, R, U, f) – RL series circuit: XL, Z, UR, UL, I, P, Q, S, φ |
| Inductor | lcrres(L, C, R, U) – series RLC resonance: f0, I0, U0, XL/XC, Q, d, b, fo, fu, Ifg, Zfg |
| Inductor | lcrseries(L, C, R, f, U) – RLC series circuit: XL, XC, Z, UL, UC, UR, I, P, QL, QC, S, φ |
| Inductor | lcrparallel(L, C, R, f, U) – RLC parallel circuit: XL, XC, Z, IL, IC, IR, I, P, QL, QC, S, φ |
| Inductor | lcrrespar(L, C, R, U) – parallel RLC resonance: f0, I0, IL, IC, XL/XC, Q, d, b, fo, fu |
| Inductor | rlparallel(L, R, U, f)
|
| Capacitor | rccharge(R, C, U, t) – RC charging voltage: Uc(t) = U·(1−e^(−t/(R·C))) |
| Capacitor | rcdischarge(R, C, U, t) – RC discharging voltage: Uc(t) = U·e^(−t/(R·C)) |
| Capacitor | rcval(U=…, Ul=…, t=…, C=…) – RC solver: find R [Ω] or C [F] from charging target voltage |
| Wires & Resistors | rcparallel(C, f, R, U) – RC parallel circuit: Xc, Z, IR, IC, I, φ, P, Q, S |
| Wires & Resistors | rcfilter(Z, fc) – RC filter design: R [Ω], C [F], τ [s], Xc [Ω] |
| Wires & Resistors | rclp(R, C, f, U) – RC low-pass analysis: Xc, U2, dB, φ, f0, Z, UR, I, τ |
| Wires & Resistors | rchp(R, C, f, U) – RC high-pass analysis: Xc, U2, dB, φ, f0, Z, UC, I, τ |
| Inductor | rllp(R, L, f, U) – RL low-pass analysis: XL, U2, dB, φ |
| Inductor | rlhp(R, L, f, U) – RL high-pass analysis: XL, U2, dB, φ |
| Capacitor | rcint(…=…, …=…) – RC integrator (5τ): R, C, τ, t1, T, f from any two of R/C/f/T |
| Capacitor | rcdif(…=…, …=…) – RC differentiator (5τ): R, C, τ, t1, T, f from any two of R/C/f/T |
| dB Converter | dbcon (power: P1/P2/db | voltage: U1/U2/db) |
| Ohm & Power | pow_ui, volt_ri, cur_ur, resist_ui |
| Capacitor | xc, capq, taurc, rcfc(…=…,…=…) – RC cutoff frequency solver [Hz/Ω/F] |
| Inductor | induc_el, xl(…=…,…=…), taul(…=…,…=…), rlfc(…=…,…=…), lcres(…=…,…=…), luit(…=…,…=…,…=…) |
| Power factor | pow_factor, apparent_pow, reactive_pow, active_pow, pow_phase |
| Three-phase | phase3_s3, ph3pow(Ul=…,Il=…,cosφ=…) |
| Wires |
| Group | Typical functions |
|---|---|
| Gamma & Beta | gamma, beta, digamma, erf, erfc |
| Bessel | besselj, bessely, besseli, besselk, sphericalbesselj |
| Hankel | hankelh1re, hankelh1im, hankelmod, hankelarg |
| Airy | airyai, airybi, airyai_prime, airybi_prime |
| Zeta & Eta | riemannzeta, eta |
| Struve | struveh0, struveh1 |
| ML Activations | relu, sigmoid, tanh, softmax_first, swish, mish, selu |
| Derivatives (Backprop) | relu_prime, sigmoid_prime, tanh_prime, swish_prime |
A read-only reference table of temperature coefficients α (1/K) for common metals,
alloys, and semiconductors. Use the values together with
resdrift(alpha=α, Rk=…, dT=…)
from the Electrics panel.
Enter a comma-separated list inside square brackets:
v := [1, 2, 3, 4, 5] sum(v) = 15 average(v) = 3 stdev(v) = 1.58113883
Use the [start..end] or [start..end:step] notation to generate arrays without typing every value:
[1..6] → [1, 2, 3, 4, 5, 6] // integer range, step = 1 [1..12:0.1] → [1.0, 1.1, 1.2, …, 12.0] // 111 elements, step = 0.1 [0..10:2] → [0, 2, 4, 6, 8, 10] // custom integer step [5..1] → [5, 4, 3, 2, 1] // descending range
Rows are separated by semicolons:
A := [1, 2; 3, 4] // 2×2 matrix det(A) = -2 inv(A) = [-2, 1; 1.5, -0.5] transpose(A) = [1, 3; 2, 4]
Curly braces create a set (unordered, no duplicates):
A := {1, 2, 3}
B := {2, 3, 4}
union(A, B) → {1, 2, 3, 4}
intersect(A, B) → {2, 3}
card(A) = 3
Trigonometric functions respect the global angle mode, which can be toggled in the ribbon.
| Mode | sin(30) | sin(pi/6) | Use when |
|---|---|---|---|
| DEG | 0.5 | 0.01745… | Working with angles in degrees (most engineering) |
| RAD | −0.98803… | 0.5 | Working with radians (mathematics, signal processing) |
deg2rad(x) and
rad2deg(x) are always available regardless of the current mode.
// DEG mode sin(90) = 1 cos(60) = 0.5 atan2(1,1) = 45 // degrees // RAD mode sin(pi/2) = 1 cos(pi/3) = 0.5 atan2(1,1) = 0.7854 // radians (= π/4)
Results are displayed with automatic precision. You can control the format:
| Feature | Description |
|---|---|
| Decimal places | Set the number of decimal places in the ribbon font/format toolbar. Applies to all MathBoxes. |
| Automatic units | Electrical functions print their SI unit when called directly (e.g. pow_ui(230,10) → 2300 W). Assigned variables show no unit. |
| Duration display | Results of charge_t, energy_t, and dur() are shown as HH:MM:SS. |
| Array display | Arrays are shown as [a, b, c, …]; matrices as [a, b; c, d]. |
| Box Type | Ribbon Button | Purpose |
|---|---|---|
| TextBox | TextBox | Write text for notices and documentation. |
| PlotBox | PlotBox | 2D function plot. Type a function of x, e.g. sin(x). |
| ChartBox | Chart | Bar or line chart from array variables defined in MathBoxes above. |
| ImageBox | Image | Insert an image (PNG, JPG) onto the canvas for annotation. |
| DrawBox | DrawBox | Pixel-canvas drawing controlled by MathBox draw* commands. See DrawBox Guide. |
| ProgramBox | Code | Embeds a Lua 5.2 script interpreter. Read MathBox variables via var.name and draw on a DrawBox with all draw* functions. Press Ctrl+Enter to run. See ProgramBox Guide. |
| SliderBox | Slider | Interactive slider whose value is published as a MathBox variable (default S1). See Slider Guide. |
| Key | Action |
|---|---|
| Ctrl+a – z | Insert lowercase Greek letter (e.g. Ctrl+a → α, Ctrl+p → π) |
| Ctrl+Shift+A – Z | Insert uppercase Greek letter (e.g. Ctrl+Shift+P → Π) |
| Ctrl+1 | Insert square-root symbol √ |
| // | Insert fraction bar (type // to create a visual fraction) |
| Ctrl+^ | Toggle exponent (superscript) input on / off |
U := 230 // supply voltage [V] R := 47 // resistance [Ω] I := U / R = 4.89361702 // current [A] P := pow_ui(U, I) = 1125.53 W // power with unit
data := [12.3, 11.8, 13.1, 12.7, 11.5, 13.4, 12.9] average(data) = 12.52857 stdev(data) = 0.67737 median(data) = 12.7 iqr(data) = 1.05
a := 3 // leg a b := 4 // leg b c := hypot(a, b) = 5 // hypotenuse alpha := atan2(a, b) = 36.86990° // DEG mode grade := angpct(deg=alpha) = 75 alpha2 := angpct(pct=12) = 6.8428° tri := abcangles(3,4,5) tri.alpha = 36.86990° tri.beta = 53.13010° tri.gamma = 90° poly := polyangles(6) poly.sum = 720° poly.interior = 120° poly.exterior = 60° t := eqtri(h=4) t.a = 4.6188 t.u = 13.8564 t.A = 9.2376 iso := isotri(a=10,h=6) iso.b = 7.81025 iso.P = 25.6205 iso.A = 30 iso.alpha = 50.1944° iso.gamma = 79.6111° rt := rtri(c=12,alpha=40) rt.a = 7.71345 rt.b = 9.19253 rt.h = 5.90689 rt.A = 35.4426 rt.P = 28.90598 rt.beta = 50° py := pythag(a=3,b=4) py.c = 5 py.h = 2.4 py.A = 6 py.P = 12 py.alpha = 36.8699° py.beta = 53.1301° s := isortri(A=36) s.a = 12 s.b = 8.4853 s.h = 6 s.P = 28.9706 Atri := triarea(10,6) Atri = 30 Atri2 := triangarea(7,9,30) // DEG mode Atri2 = 15.75 Atri3 := triarea2ang(10,40,60) // DEG mode Atri3 = 30.687 Atri4 := triheron(3,4,5) Atri4 = 6 sq := square(seite=5) sq.a = 5 sq.d = 7.0711 sq.U = 20 sq.A = 25 gr := goldrect(a=10) gr.a = 10 gr.b = 6.1803 gr.phi = 1.6180 p := parallelogram(8,5,60) p.A = 34.6410 p.P = 26 p.e = 11.3578 Ap := paraaera(8,5) Ap = 40 r := rect(l=8,b=5) r.l = 8 r.b = 5 r.d = 9.434 r.U = 26 r.A = 40
rho := 1.72e-8 // Cu resistivity [Ω·m] l := 50 // one-way length [m] A := 2.5e-6 // cross-section [m²] I := 16 // load current [A] dU := voltdrop(rho, I, l, A, 0) = 11.01 V dU% := voltdropct(230, rho, I, l, A, 0) = 4.79 %
alpha := 0.00393 // Cu temperature coefficient [1/K] Rk := 100 // resistance at 20 °C [Ω] dT := 80 // temperature rise [K] Rw := resdrift(alpha=alpha, Rk=Rk, dT=dT) = 131.44 Ω // reverse: find temperature from measured warm resistance resdrift(alpha=alpha, Rk=Rk, Rw=131.44) = 80 K
// Power mode – db = 10 · log10(P1 / P2) dbcon(P1=2, P2=1) = 3.0103 dB // level from two powers dbcon(P1=2, db=3.0103) = 1 W // reference power P2 dbcon(P2=1, db=3.0103) = 2 W // input power P1 // Voltage mode – db = 20 · log10(U1 / U2) dbcon(U1=2, U2=1) = 6.0206 dB // level from two voltages dbcon(U1=2, db=6.0206) = 1 V // reference voltage U2
A := [2, 1; 5, 3] det(A) = 1 inv(A) = [3, -1; -5, 2] A * inv(A) = [1, 0; 0, 1] // identity check
RedcrabX Quick Start Guide — further topics: MathBox Guide | Electrics Guide | Geometry Guide | Plot Guide | DrawBox Guide | ProgramBox Guide | Chart Guide | Slider Guide