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

  • Float to half

    The 16-bit half closest to a number.

    Half floats in EXR exr/util.js
    • BimCraft
    • ModelCraft
    32-bit in part
  • Measure to SI

    A property value in meters, square meters or cubic meters.

    area = v × L²; volume = v × L³

    IFC measures in SI for USD usd/ifc.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Depth, volume and flow unit factors

    Converts the solver's meters, cubic meters and cubic meters per second to the units the window shows.

    mm = m × 1000; in = m × 39.3700787; yd³ = m³ ÷ 0.028316846592 ÷ 27; ft³/s = m³/s ÷ 0.028316846592

    Rainfall run read-outs: deepest water and depth scale rain-ui.js
    • CivilCraft
    64-bit
  • Deepest water

    The deepest water anywhere in the run, as shown in the facts list.

    deepest = max over cells of maxDepth, converted to mm or in

    Rainfall run read-outs: deepest water and depth scale rain-ui.js
    • CivilCraft
    32-bit in part
  • Depth scale of the picture

    The depth at which the picture reaches its deepest color, printed in the legend.

    top = max(0.02, 99.5th percentile of wet maxDepth cells)

    Rainfall run read-outs: deepest water and depth scale rain-ui.js
    • CivilCraft
    32-bit in part
  • Assistant rounding to 3 decimals

    Rounds a result to 3 decimals before the assistant is given it.

    round(v × 1000) ÷ 1000

    Assistant and window read-outs of radio link and coverage geo-agent.js
    • CivilCraft
    64-bit
  • Coverage share and map

    The share of the area covered, the farthest covered point and a coarse map of received power.

    map cell = r3(p) when p ≥ sensitivity, else null

    Assistant and window read-outs of radio link and coverage geo-agent.js
    • CivilCraft
    32-bit in part
  • Coverage read-out in the window

    The share covered, the farthest covered distance and the cell count shown for a coverage item.

    covered % = covered × 100; farthest = distance as returned

    Assistant and window read-outs of radio link and coverage geo-ui.js
    • CivilCraft
    32-bit in part
  • Array position from the coordinate system

    The latitude and longitude of the middle of the array's region.

    c = mean of corners; (lon, lat) = toLonLat(c); rounded to 1e-5°

    Solar array site and saved summary solar-run.js
    • CivilCraft
    64-bit
  • Saved plan summary

    The counts, kWp and yearly kWh the file keeps for an array.

    kWh = round(annual AC kWh)

    Solar array site and saved summary solar-run.js
    • CivilCraft
    64-bit
  • Area read-out

    Prints an area in the project's area unit.

    text = round to 0 decimals, grouped

    Massing window read-outs and typed height massing-ui.js
    • CivilCraft
    64-bit
  • Typed height to floors

    Turns a height the person types into a whole number of floors.

    floors = clamp(round(H ÷ floor height), 1, max floors)

    Massing window read-outs and typed height massing-ui.js
    • CivilCraft
    64-bit
  • Zoning coverage percent

    Turns the percent a person types for building coverage into the stored fraction.

    coverage = n ÷ 100

    Massing window read-outs and typed height massing-ui.js
    • CivilCraft
    64-bit
  • Bench rim line segments

    Segment pairs for the rim of each bench.

    Pit and solar table meshes in the 3D view site3d-pit.js
    • CivilCraft
    32-bit, display only
  • Haul ramp ribbon

    A road-wide ribbon on the pit walls for the haul ramp.

    offset = (−dy, dx) ÷ length × width ÷ 2; lift = 0.02 × width

    Pit and solar table meshes in the 3D view site3d-pit.js
    • CivilCraft
    32-bit, display only
  • Solar table triangle normal

    A flat-shaded triangle with its normal.

    n = (b − a) × (c − a) ÷ |…|

    Pit and solar table meshes in the 3D view site3d-solar.js
    • CivilCraft
    32-bit, display only
  • Pit scene in project units

    Converts a pit's ramp and bench outlines from meters back to project units for the 3D view.

    coordinate ÷ k, where k is meters per project unit

    Pit and solar table meshes in the 3D view pit-view.js
    • CivilCraft
    32-bit, display only
  • 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.js
    • MarkupCraft
    64-bit
  • Round to 3 decimals

    The rounding applied to every coordinate in the package.

    round(v × 1000) ÷ 1000

    Redline package coordinates redline.js
    • MarkupCraft
    64-bit
  • 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.js
    • MarkupCraft
    64-bit
  • Ring area

    The area inside a closed outline.

    A = |Σ (xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ)| ÷ 2

    Area markup with cut-outs, and clipboard placement holes.js
    • MarkupCraft
    64-bit
  • Ring perimeter

    The closed length of an outline.

    P = Σ hypot(Δx, Δy)

    Area markup with cut-outs, and clipboard placement holes.js
    • MarkupCraft
    64-bit
  • 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.js
    • MarkupCraft
    64-bit
  • 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.js
    • MarkupCraft
    64-bit
  • 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.js
    • MarkupCraft
    64-bit
  • 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.js
    • MarkupCraft
    64-bit
  • Character advance

    The advance width of one character in 1/1000 em.

    Text width from built-in font metrics font.js
    • MarkupCraft
    64-bit
  • String width

    The width of a string at a font size.

    width = (Σ advance ÷ 1000) × size

    Text width from built-in font metrics font.js
    • MarkupCraft
    64-bit
  • Start editing a key

    Saves the current points as the basis and shows the key at full strength.

    point = basis + offset

    Shape keys: offsets, editing and blending anim/shapes.js
    • ModelCraft
    32-bit in part
  • Finish editing a key

    Turns the edited points into the key's offsets and puts the mesh back to its basis.

    offset = edited − basis; point = basis

    Shape keys: offsets, editing and blending anim/shapes.js
    • ModelCraft
    32-bit in part
  • Key from imported positions

    Makes a key that moves the basis to a list of positions (glTF morph targets, USD blend shapes).

    offset = position − basis point

    Shape keys: offsets, editing and blending anim/shapes.js
    • ModelCraft
    32-bit in part
  • Blend of the keys

    The points of a mesh with each key at its weight.

    pᵢ = basisᵢ + Σ wₖ × offsetₖ,ᵢ

    Shape keys: offsets, editing and blending anim/shapes.js
    • ModelCraft
    32-bit in part
  • Deformed copy of a mesh

    The mesh moved by its shape keys and then its skin, which the view, picking and exports read.

    points = blend of keys; then skin applied to the same array

    Shape keys: offsets, editing and blending anim/deform.js
    • ModelCraft
    32-bit in part
  • Bone data for the card

    Packs the bone matrices (or dual quaternions) for the kernel.

    Skinning on the graphics card anim/skin-gpu.js
    • ModelCraft
    32-bit, display only
  • Skinned points read back

    Runs one skin on the card and reads the points back.

    Skinning on the graphics card anim/skin-gpu.js
    • ModelCraft
    32-bit, display only
  • Key time of a baked frame

    The timeline time given to each baked frame.

    t = round((from + f ÷ fps) × 1000) ÷ 1000

    Baked physics key times anim/bake.js
    • ModelCraft
    64-bit
  • Time of day to seconds

    Turns HH:MM text into seconds.

    seconds = h × 3600 + m × 60

    Shift calendar working time addons/flow/lib/calendar.js
    • ModelCraft
    Exact
  • Weekly on-intervals

    The merged list of on-intervals in a week, with windows that pass midnight wrapped.

    length = to − from (+ one day if the end is not after the start)

    Shift calendar working time addons/flow/lib/calendar.js
    • ModelCraft
    Exact
  • On time between two instants

    The total seconds the calendar is on between two times.

    Σ (off − on) over the on-intervals inside [a, b]

    Shift calendar working time addons/flow/lib/calendar.js
    • ModelCraft
    64-bit
  • Factor from text

    A factor from a plain number, a percent of the size, or a percent change.

    f = n; n ÷ 100; 1 ± n ÷ 100

    Typed scale factors and shrinkage allowance scale-factors.js
    • ModelCraft
    • PartCraft
    64-bit
  • Shrinkage allowance

    The pattern factor for a casting that shrinks by a percentage.

    add: 1 + s ÷ 100; exact: 1 ÷ (1 − s ÷ 100)

    Typed scale factors and shrinkage allowance scale-factors.js
    • ModelCraft
    • PartCraft
    64-bit
  • Meters per file unit

    The conversion factor for each unit system a 3DM file can name.

    meters = file value × factor

    Units and tolerance read from a 3DM file io/3dm/read.js
    • ModelCraft
    • PartCraft
    64-bit
  • Units and tolerance from the file settings

    Reads the unit system, custom meters-per-unit and the tolerance from a file's settings record.

    Units and tolerance read from a 3DM file io/3dm/read.js
    • ModelCraft
    • PartCraft
    64-bit
  • Density to tonnes per cubic millimeter

    Converts a density in kg/m³ to t/mm³ for the solver.

    ρ(t/mm³) = ρ(kg/m³) × 10⁻¹²

    Material units, gravity and custom material limits materials.js
    • PartCraft
    Exact
  • Gravity constant

    The default gravity used for self-weight, in millimeters per second squared.

    g = 9810 mm/s²

    Material units, gravity and custom material limits materials.js
    • PartCraft
    64-bit
  • Custom material check

    Checks a material from a file or a person and fills in a library material's thermal values.

    Material units, gravity and custom material limits materials.js
    • PartCraft
    64-bit
  • Four significant digits

    Prints a result with 4 significant digits.

    toPrecision(4); toExponential(3) when |v| ≥ 1e5 or 0 < |v| < 1e-3

    Simulation numbers shown as text sim-ui.js
    • PartCraft
    64-bit
  • Fixed decimals

    Prints a number with a set number of decimals, and fills number boxes with 6 decimals.

    toFixed(dp), trailing zeros removed

    Simulation numbers shown as text sim-ui.js
    • PartCraft
    64-bit
  • Normalized mode shapes

    Samples each mode at the plot vertices and scales it to a largest displacement of 1.

    uᵥ = sample(modeᵥ) ÷ max |u|

    Mode shapes returned by the simulation worker sim-worker.js
    • PartCraft
    32-bit in part

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.