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.

  • 6,917 calculations in 1,248 source files
  • 143 exact
  • 6,286 in 64-bit
  • 335 with a 32-bit step
  • Last reviewed

Calculations

  • Lead time in days

    Reads a lead time such as 2-3 weeks or 5 business days as a number of days.

    weeks × 7; months × 30; business days → ⌈n × 7 ÷ 5⌉; result rounded to 0.1 day

    Supplier stock and lead-time check lib-supply/supply.js
    • TakeoffCraft
    • DetailCraft
    64-bit
  • Price from text

    Reads a price cell as a whole number of 1/10000 dollar.

    price = round(n × 10000)

    Supplier stock and lead-time check lib-supply/supply.js
    • TakeoffCraft
    • DetailCraft
    64-bit
  • A need in the supplier's unit

    The needed quantity in the unit the supplier's row uses.

    tonnes = kilograms ÷ 1000

    Supplier stock and lead-time check lib-supply/supply.js
    • TakeoffCraft
    • DetailCraft
    64-bit
  • Short, late or in stock

    For each need: the matching supplier row, the shortfall and the status.

    short = max(0, need − stock); late: no stock figure and lead > limit

    Supplier stock and lead-time check lib-supply/supply.js
    • TakeoffCraft
    • DetailCraft
    64-bit
  • Values in the reported problems

    The required and found values of a shortage or a long lead time in the problems list.

    Supplier stock and lead-time check lib-supply/supply.js
    • TakeoffCraft
    • DetailCraft
    64-bit
  • Stock figure from text

    Reads a stock cell such as 1,200 or Out of stock as a number, or as in stock or not.

    Supplier stock and lead-time check supply.js
    • TakeoffCraft
    • DetailCraft
    64-bit
  • Lead time in days

    Reads a lead time such as 2-3 weeks or 5 business days as a number of days.

    weeks × 7; months × 30; business days → ⌈n × 7 ÷ 5⌉; result rounded to 0.1 day

    Supplier stock and lead-time check supply.js
    • TakeoffCraft
    • DetailCraft
    64-bit
  • Price from text

    Reads a price cell as a whole number of 1/10000 dollar, the unit the takeoff's rates use.

    price = round(n × 10000)

    Supplier stock and lead-time check supply.js
    • TakeoffCraft
    • DetailCraft
    64-bit
  • Short, late or in stock

    For each estimate row with a quantity: the matching supplier row, the shortfall and the status.

    short = max(0, need − stock); late: no stock figure and lead > limit

    Supplier stock and lead-time check supply.js
    • TakeoffCraft
    • DetailCraft
    64-bit
  • Values in the reported problems

    The required and found values of a shortage or a long lead time in the problems list.

    Supplier stock and lead-time check supply.js
    • TakeoffCraft
    • DetailCraft
    64-bit
  • Supplier prices into the price library

    Sets a library entry's material rate to the matching supplier row's price.

    Supplier stock and lead-time check supply.js
    • TakeoffCraft
    • DetailCraft
    64-bit
  • 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 app
    64-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 app
    64-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 app
    64-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 app
    64-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 app
    64-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 app
    64-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 app
    64-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 app
    64-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 app
    64-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 app
    64-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 app
    64-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 app
    64-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 app
    64-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 app
    64-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 app
    64-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 app
    64-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 app
    64-bit
  • Two-terminal chip

    Two pads at half the pitch either side of the center.

    x = ∓ pitch ÷ 2

    Parametric PCB footprints footlib.js Every app
    64-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 app
    64-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 app
    64-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 app
    64-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 app
    64-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 app
    64-bit
  • Span text to millimeters

    A listed span, as a number or as feet-inches text, in millimeters.

    mm = ft × 304.8 + (in + n ÷ d) × 25.4

    Joist depth from a span table the person loads tji-table.js
    • BimCraft
    64-bit
  • Table units to millimeters

    Depth, spacing and bearing of the loaded table in millimeters.

    Joist depth from a span table the person loads tji-table.js
    • BimCraft
    64-bit
  • Spacing match

    Whether a requested on-center spacing is served by a listed column.

    0.98 × listed ≤ want ≤ 1.005 × listed

    Joist depth from a span table the person loads tji-table.js
    • BimCraft
    64-bit
  • Smallest depth that reaches the span

    The joist size for a span, spacing and load case.

    first candidate with max + 10⁻⁶ ≥ span

    Joist depth from a span table the person loads tji-table.js
    • BimCraft
    64-bit
  • Listed maximum span for a size

    The listed span of a named framing size at a spacing and case.

    Joist depth from a span table the person loads tji-table.js
    • BimCraft
    64-bit
  • Depth written on the drawing

    The depth text used in the size label.

    in = round(mm ÷ 25.4 × 1000) ÷ 1000

    Joist depth from a span table the person loads tji-table.js
    • BimCraft
    64-bit
  • Summed K of a list of fittings

    The total loss coefficient of the fittings on one link at its own Reynolds number and diameter.

    K = Σ nᵢ × Kᵢ(Re, D)

    Fitting losses summed from a pack process/equip/fittingk.js
    • CadCraft
    • BimCraft
    64-bit
  • Head loss of a fitting

    The head loss in meters from K and the velocity.

    h = K × v² ÷ (2g)

    Fitting losses summed from a pack process/equip/fittingk.js
    • CadCraft
    • BimCraft
    64-bit
  • Meets the limit

    True, false or null for a found value against a rule.

    min − e ≤ found ≤ max + e

    Pass or fail against a regulation limit addons/regs/lib/rows.js
    • CadCraft
    • BimCraft
    • CivilCraft
    • DetailCraft
    64-bit
  • Material and band thicknesses

    The thickness of each library sheet and edge band in millimeters and in inches.

    Cabinet material sizes, grooves and drill files addons/cabinetcraft/lib/materials.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    Exact
  • Rules from the material picks

    The thicknesses, groove and band thicknesses that the construction rules use.

    groove = min(tback, 0.6 × tcarcass)

    Cabinet material sizes, grooves and drill files addons/cabinetcraft/lib/materials.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Sheet size for a material

    The sheet width and height a material is cut from.

    in = round(mm ÷ 25.4 × 4) ÷ 4

    Cabinet material sizes, grooves and drill files addons/cabinetcraft/lib/materials.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Hole positions in the drill XML

    The x and y of each hole as written in the drill file.

    x = round(x × 1000) ÷ 1000

    Cabinet material sizes, grooves and drill files addons/cabinetcraft/lib/export.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • G-code scale and thickness

    The unit scale and cut depth passed to the sheet G-code writer.

    thickness_mm = thickness × scale

    Cabinet material sizes, grooves and drill files addons/cabinetcraft/lib/export.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Run point to viewer frame

    A run point in the viewer frame in meters.

    p = Lm · C · (storey · p ÷ 1000)

    MEP openings and clearances shown and exported mep/structure-ui.js
    • BimCraft
    64-bit
  • Opening rows in the CSV

    The insulation, size, X, Y, Z and through length of an opening as written in the CSV.

    v = round(mm)

    MEP openings and clearances shown and exported mep/structure-ui.js
    • BimCraft
    64-bit

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.