Resources Numerical accuracy
Calculations
Every calculation under our calculation policies: what it works out, its formula and the precision it runs at. Open one to see its code as it is in the released app.
Calculations
-
Reading a 64-bit integer
Reads an unsigned or signed 64-bit integer.
Numbers sent between people editing together live-client.js Every appExact -
Cost of one call
The cost of a call from its token counts and the model's prices.
cost = (in × price in + out × price out) ÷ 1,000,000
Spending on a person's own AI model ai-byok.js Every app64-bit -
Spending today and this month
The cost, tokens and number of calls for the current day and month, and the calls in the last hour.
amount = Σ cost of the calls in the period
Spending on a person's own AI model ai-byok.js Every app64-bit -
Check before a call
Refuses a call when the calls per hour, the day's or month's spending, or the day's tokens could pass a limit.
refuse when spent + worst-case cost > limit; worst case = cost(estimated input, largest allowed output)
Spending on a person's own AI model ai-byok.js Every app64-bit -
Recorded cost and the token estimate
Stores each call's cost and estimates the input tokens of the next request.
estimated tokens = ⌈JSON length ÷ 3⌉ + 500
Spending on a person's own AI model ai-byok.js Every app64-bit -
Flow through a passage
Persons per second through a door or corridor of a given width.
rate = max(0, Fsm × (width − 2 × boundary))
People flow and evacuation time people.js Every app64-bit -
Speed and specific flow at a density
Walking speed and flow per meter of width at a given density of people.
S = k × (1 − 0.266 × D); Fs = S × D; k = 1.4 m/s
People flow and evacuation time people.js Every app64-bit -
Rate and speed of each passage
The flow rate and walking speed each passage gets, from its own values or the defaults for its kind.
People flow and evacuation time people.js Every app64-bit -
Door service time and walking time
How long a door takes per person, how long the passage takes to walk, and each room's distance to an exit in time.
service = 1 ÷ rate; walk = length ÷ speed; to exit = least total walking time
People flow and evacuation time people.js Every app64-bit -
Which way a room empties
The next passage for people in a room: the one with the least remaining walking time to an exit.
keep a hop when toExit(next) < toExit(room) − 1e-9; choose the least walk + toExit(next)
People flow and evacuation time people.js Every app64-bit -
Evacuation results
People evacuated, the time the last person reaches an exit, peak occupancy and density per room, and queues per door.
time = latest arrival at any exit; density = peak people in a room ÷ its area
People flow and evacuation time people.js Every app64-bit -
Joint frames at a pose
Each joint's rotation and offset from its parent at the given joint values.
Rigid-body dynamics of a mechanism dynamics.js Every app64-bit -
Joint torques for a motion (inverse dynamics)
The torque or force each joint needs for given positions, velocities and accelerations, with gravity, external loads and damping.
outward: ω, α, a of each link; F = m × a_com; N = I α + ω × (I ω); inward: τᵢ = axis · n (revolute) or axis · f (prismatic) + damping × q̇ᵢ
Rigid-body dynamics of a mechanism dynamics.js Every app64-bit -
Mass matrix
The joint-space mass matrix at a pose.
column j = rnea(q, q̇ = 0, q̈ = unit vector j) with no gravity, damping or external loads
Rigid-body dynamics of a mechanism dynamics.js Every app64-bit -
Joint accelerations for given torques (forward dynamics)
The acceleration of each joint under applied torques.
M q̈ = τ − h
Rigid-body dynamics of a mechanism dynamics.js Every app64-bit -
Kinetic and potential energy
The mechanism's kinetic, potential and total energy at a pose and velocity.
KE = ½ q̇ᵀ M q̇; PE = −Σ m × (g · p_com)
Rigid-body dynamics of a mechanism dynamics.js Every app64-bit -
Simulated motion over time
Joint positions and velocities at each time step under gravity and applied torques.
RK4: y₊ = y + dt ÷ 6 × (k₁ + 2k₂ + 2k₃ + k₄); steps = round(T ÷ dt); t = step × dt
Rigid-body dynamics of a mechanism dynamics.js Every app64-bit -
Courtyard of a footprint
The rectangle around all pads, grown by a margin.
courtyard = (min(x − w ÷ 2) − m, min(y − h ÷ 2) − m, max(x + w ÷ 2) + m, max(y + h ÷ 2) + m)
Parametric PCB footprints footlib.js Every app64-bit -
Two-terminal chip
Two pads at half the pitch either side of the center.
x = ∓ pitch ÷ 2
Parametric PCB footprints footlib.js Every app64-bit -
Dual-row surface-mount package
Pads in two rows, numbered counter-clockwise from the top left.
y = ((n ÷ 2 − 1) ÷ 2 − i) × pitch; x = ∓ row spacing ÷ 2
Parametric PCB footprints footlib.js Every app64-bit -
Dual in-line through-hole package
Drilled pads in two rows.
y = ((n ÷ 2 − 1) ÷ 2 − i) × pitch; x = ∓ row spacing ÷ 2
Parametric PCB footprints footlib.js Every app64-bit -
Pin header
Drilled pads in one or two rows at a pitch.
x = (r − (rows − 1) ÷ 2) × pitch; y = ((n − 1) ÷ 2 − i) × pitch
Parametric PCB footprints footlib.js Every app64-bit -
Quad flat package
Pads on four sides, numbered counter-clockwise from the top left.
along a side: ((n − 1) ÷ 2 − i) × pitch; across: ± span ÷ 2
Parametric PCB footprints footlib.js Every app64-bit -
Axial through-hole part
Two drilled pads at half the lead pitch either side of the center.
x = ∓ pitch ÷ 2
Parametric PCB footprints footlib.js Every app64-bit -
Content stream number writer
Formats one number for a PDF content stream.
text = toFixed(v, 4) without trailing zeros
Numbers written into edited PDF page content base-lex.js64-bit- MarkupCraft
-
Round to 3 decimals
The rounding applied to every coordinate in the package.
round(v × 1000) ÷ 1000
Redline package coordinates redline.js64-bit- MarkupCraft
-
Position as a fraction of the sheet
A markup's box and points as fractions of the sheet's width and height.
fx = (x − x₀) ÷ w; fy = (y − y₀) ÷ h
Redline package coordinates redline.js64-bit- MarkupCraft
-
Ring area
The area inside a closed outline.
A = |Σ (xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ)| ÷ 2
Area markup with cut-outs, and clipboard placement holes.js64-bit- MarkupCraft
-
Ring perimeter
The closed length of an outline.
P = Σ hypot(Δx, Δy)
Area markup with cut-outs, and clipboard placement holes.js64-bit- MarkupCraft
-
Segment crossing test
Whether two segments properly cross, used to reject cut-outs that cross each other or the outline.
cross = (b − a) × (c − a); crossing if signs differ on both pairs
Area markup with cut-outs, and clipboard placement holes.js64-bit- MarkupCraft
-
Point in outline
Whether a point is inside an outline.
x < (xb − xa)(py − ya) ÷ (yb − ya) + xa
Area markup with cut-outs, and clipboard placement holes.js64-bit- MarkupCraft
-
Box round copied markups
The bounding box of all points and rectangles in a clip.
min and max of all x and y
Area markup with cut-outs, and clipboard placement clip.js64-bit- MarkupCraft
-
Paste offset
Moves pasted markups by an offset, or centers them on a point.
dx = cx − (x₀ + x₁) ÷ 2; x′ = x + dx
Area markup with cut-outs, and clipboard placement clip.js64-bit- MarkupCraft
-
Character advance
The advance width of one character in 1/1000 em.
Text width from built-in font metrics font.js64-bit- MarkupCraft
-
String width
The width of a string at a font size.
width = (Σ advance ÷ 1000) × size
Text width from built-in font metrics font.js64-bit- MarkupCraft
-
Millimeters per PDF point
The size of one PDF point in millimeters, the base of every preset scale.
MM_PER_PT = 25.4 ÷ 72
Sheet scale, typed lengths and measured values units.js64-bit- MarkupCraft
-
Calibration from a preset scale
Real millimeters per point for a scale chosen from the list, such as 1/4 inch = 1 foot or 1:100.
mmPerPt = (25.4 ÷ 72) × ratio
Sheet scale, typed lengths and measured values units.js64-bit- MarkupCraft
-
Calibration from two picked points
Real millimeters per point from a distance picked on the sheet and the real length typed for it.
mmPerPt = real length (mm) ÷ picked distance (pt)
Sheet scale, typed lengths and measured values units.js64-bit- MarkupCraft
-
Fractions and mixed numbers
Reads 1/2, 6 1/2 or 12.5 as a number.
a/b → a ÷ b; n a/b → n + a ÷ b
Sheet scale, typed lengths and measured values units.js64-bit- MarkupCraft
-
A typed length in millimeters
Reads what a person types for a length (24'-0", 12' 6 1/2", 3.5 m, 900 mm, or a bare number in the chosen unit) as millimeters.
mm = feet × 304.8 + inches × 25.4; metric: value × 1, 10 or 1000
Sheet scale, typed lengths and measured values units.js64-bit- MarkupCraft
-
A typed length with arithmetic
Reads entries such as 12'6" + 3/4" or 2*450mm as one length in millimeters.
Sheet scale, typed lengths and measured values units.js64-bit- MarkupCraft
-
Length as text
Writes a length in millimeters in the sheet's unit: feet and inches, feet, inches, meters or millimeters.
ft-in: round(mm ÷ 25.4 × 16) sixteenths; ft: mm ÷ 304.8; in: mm ÷ 25.4; m: mm ÷ 1000
Sheet scale, typed lengths and measured values units.js64-bit- MarkupCraft
-
Area as text
Writes an area in square millimeters in the area unit that goes with the sheet's length unit.
sq ft = mm² ÷ 92903.04; sq in = mm² ÷ 645.16; m² = mm² ÷ 1e6
Sheet scale, typed lengths and measured values units.js64-bit- MarkupCraft
-
Area and perimeter of an outline
The area and the perimeter of a closed outline, in points² and points.
area = |Σ (xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ)| ÷ 2; perimeter = Σ hypot(Δx, Δy)
Sheet scale, typed lengths and measured values units.js64-bit- MarkupCraft
-
Area measurement with cut-outs
The area and perimeter text of an area markup: the outline less its cut-outs, in real units.
area = (A_outline − Σ A_cut-out) × mmPerPt²; perimeter = (P_outline + Σ P_cut-out) × mmPerPt
Sheet scale, typed lengths and measured values units.js64-bit- MarkupCraft
-
Length under a calibration
A distance in points as a real length in the sheet's unit.
length = points × mmPerPt
Sheet scale, typed lengths and measured values units.js64-bit- MarkupCraft
-
Measured values of a markup
The length, area and perimeter, count, angle or arc length listed for a markup in the Properties panel and, through valueOf, in lists, CSV and BCF.
length = hypot(Δx, Δy) × mmPerPt; arc = r × |sweep| × mmPerPt; count = number of marks
Sheet scale, typed lengths and measured values markupcraft.js64-bit- MarkupCraft
-
Pointer position on the paper
The pointer's position on the sheet in the status line, in millimeters or inches of paper.
mm = pt ÷ 72 × 25.4; in = pt ÷ 72
Sheet scale, typed lengths and measured values markupcraft.js64-bit- MarkupCraft
-
Scale carried to a replacement sheet
When markups are carried to a new revision of a sheet, the old sheet's calibration is given to the new one if it has none.
|w_old − w_new| ≤ 1 pt and |h_old − h_new| ≤ 1 pt
Sheet scale, typed lengths and measured values markupcraft.js64-bit- MarkupCraft
-
Size of a pasted area
The size on the sheet of a copied area pasted as a picture: the same size on paper, or the same real size when both sheets have a scale.
k = mmPerPx ÷ mmPerPt (both scaled), else ptPerPx; w = px_w × k; h = px_h × k
Sheet scale, typed lengths and measured values markupcraft.js64-bit- MarkupCraft
A calculation is added only after its source was read. Each statement can be checked in the code shown on its policy's page; the app repositories are public. When a release changes a calculation, its page says so until it has been read again.