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

  • EXR channels from the sums

    The mean (or raw sum) of each channel for the EXR and render file.

    mean = Σ ÷ max(samples, 1)

    Path-traced picture sums and the saved file render/pt-output.js
    • BimCraft
    • ModelCraft
    32-bit in part
  • 16-bit PNG

    The picture as 16 bits per channel.

    v₁₆ = round(clamp(v, 0, 1) × 65535)

    Path-traced picture sums and the saved file render/pt-output.js
    • BimCraft
    • ModelCraft
    32-bit in part
  • Reopening a render file

    The sums and counts read back from the layers file.

    Path-traced picture sums and the saved file render/pt-output.js
    • BimCraft
    • ModelCraft
    32-bit in part
  • Save as 16-bit PNG

    Chooses the 32-bit or the 8-bit path to write the 16-bit PNG.

    Path-traced picture sums and the saved file render/render-ui.js
    • BimCraft
    • ModelCraft
    32-bit in part
  • 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
  • Pressure thrust

    The axial force on a blind end or an unbalanced joint.

    F = P × π × Di² ÷ 4

    Pipe stress support helpers process/equip/pipestress2.js
    • CadCraft
    • BimCraft
    64-bit
  • Variable spring selection

    The spring sizes that carry the hot load and travel within the allowed load variation.

    variation = |travel| × rate ÷ hot load

    Pipe stress support helpers process/equip/pipestress2.js
    • CadCraft
    • BimCraft
    64-bit
  • Stop clearance check

    Whether the thermal displacement closes a gap or stop.

    Pipe stress support helpers process/equip/pipestress2.js
    • CadCraft
    • BimCraft
    64-bit
  • Fall along a run

    The corner points with the slope applied to the heights.

    zᵢ = zᵢ − slope × Σ √(Δx² + Δy²)

    Pipe run points with fall applied addons/plant/lib/runs.js
    • BimCraft
    64-bit
  • Outside diameter of a run

    The pipe outside diameter in millimeters from the size table.

    od = in × 25.4

    Pipe run points with fall applied addons/plant/lib/runs.js
    • BimCraft
    64-bit
  • Length of a sew-line edge

    The length of one edge of the sew line at a size.

    Pattern piece lengths, seam walking and areas addons/apparel/lib/measure.js
    • CadCraft
    64-bit
  • Distance round the outline between two points

    The forward and backward length along the sew line between two snapped points.

    fwd = ((d_b − d_a) mod L + L) mod L; back = (L − fwd) mod L

    Pattern piece lengths, seam walking and areas addons/apparel/lib/measure.js
    • CadCraft
    64-bit
  • Seam walking

    The lengths of two edges, their difference and the notch offsets along the seam.

    diff = lenB − lenA; off = bₖ − aₖ

    Pattern piece lengths, seam walking and areas addons/apparel/lib/measure.js
    • CadCraft
    64-bit
  • Perimeter and area per size

    The sew and cut perimeter and area of each size of a piece.

    area = |Σ shoelace|

    Pattern piece lengths, seam walking and areas addons/apparel/lib/measure.js
    • CadCraft
    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
  • Relative difference

    The fraction by which a coarse result differs from the refined result.

    |a − b| ÷ |b|

    Spread between coarse and refined results study/live.js
    • CadCraft
    • BimCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Ring orientation

    The signed area that decides if a ring runs counter-clockwise.

    A = ½ Σ (xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ)

    Polygon triangulation by ear clipping ifc/geo-tri.js
    • BimCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    64-bit
  • Cross product and inside test

    Which side of a line a point lies on and whether a point is inside a triangle.

    cross = (bx−ax)(cy−ay) − (by−ay)(cx−ax)

    Polygon triangulation by ear clipping ifc/geo-tri.js
    • BimCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    64-bit
  • Hole bridge

    The vertex of the outer ring a hole is joined to.

    Polygon triangulation by ear clipping ifc/geo-tri.js
    • BimCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    64-bit
  • Ear test

    Whether a corner can be cut off as a triangle.

    Polygon triangulation by ear clipping ifc/geo-tri.js
    • BimCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    64-bit
  • Triangulate rings on a plane

    The triangles of 3D rings that lie on one plane.

    Polygon triangulation by ear clipping ifc/geo-tri.js
    • BimCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    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
  • Opening text in the BCF

    The insulation, gap and position written into the BCF description.

    MEP openings and clearances shown and exported mep/structure-ui.js
    • BimCraft
    64-bit
  • Gap and need shown for a soft clash

    The gap and the needed clearance shown in the list in the display unit.

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

    The point positions of a model definition and its loose edges.

    Model points written to USD usd/m3d.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    32-bit in part
  • Mesh arrays

    The point, normal, UV and color arrays of a mesh.

    Model points written to USD usd/m3d.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    32-bit in part
  • Number to text

    The text a number is written as, by type.

    f32: text = shortest s with fround(+s) = fround(x)

    Number text in USD files usd/usda-write.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    32-bit in part
  • Shortest digits

    A number to p significant digits without trailing zeros.

    Number text in USD files usd/usda-write.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Type name to number type

    Which number type a USD type name uses (32-bit float, half or 64-bit double).

    Number text in USD files usd/sdf.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    Exact
  • Inline values

    A value that the file stores inside its 32-bit payload word.

    Floats read from USD files usd/usdc-read.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    32-bit in part
  • Raw arrays

    A packed array of numbers of one type.

    Floats read from USD files usd/usdc-read.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    32-bit in part
  • Compressed float arrays

    An array stored as whole numbers or as a lookup table and indexes.

    Floats read from USD files usd/usdc-read.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    32-bit in part
  • Float text rounding

    A float or half value read from .usda text.

    Floats read from USD files usd/usda-read.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    32-bit in part
  • Arrays from text

    A list of parsed numbers as a typed array of the right type.

    Floats read from USD files usd/usda-read.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    32-bit in part
  • Half to float

    The value of a 16-bit half float.

    v = ± (1 + m ÷ 1024) × 2^(e − 15)

    Half floats in USD usd/util.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    32-bit in part
  • Float to half

    The 16-bit half closest to a number.

    Half floats in USD usd/util.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    32-bit in part
  • Half to float

    The value of a 16-bit half float.

    v = ± (1 + m ÷ 1024) × 2^(e − 15)

    Half floats in EXR exr/util.js
    • BimCraft
    • ModelCraft
    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.