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

  • Points in a slice

    The points that lie within a thickness of a plane.

    |pos − (at − origin)| ≤ thick ÷ 2

    Point cloud positions and read-in values pointcloud.js
    • CadCraft
    • BimCraft
    32-bit in part
  • Intensities scaled to 0 to 65535

    The intensity of each kept point on a common 16-bit scale.

    out = round((v − lo) ÷ (hi − lo) × 65535)

    Point cloud positions and read-in values pointcloud.js
    • CadCraft
    • BimCraft
    32-bit in part
  • LAS record decoder

    The x, y, z of each LAS point from its stored integers.

    x = Int32 × scale + offset

    Point cloud positions and read-in values pointcloud.js
    • CadCraft
    • BimCraft
    64-bit
  • Size of the cloud

    The extent of the cloud in each axis shown in the summary.

    size = max − min

    Point cloud positions and read-in values pointcloud.js
    • CadCraft
    • BimCraft
    64-bit
  • Round a box edge outward to 32-bit

    A 32-bit number that is never above (down) or never below (up) the 64-bit value.

    Ray hits against 32-bit triangle records compute/bvh-core.js
    • BimCraft
    • ModelCraft
    32-bit in part
  • Ray and triangle

    Whether a ray meets a triangle and at what distance t and barycentric u, v.

    t = (e2 · (s × e1)) ÷ (e1 · (d × e2))

    Ray hits against 32-bit triangle records compute/bvh-core.js
    • BimCraft
    • ModelCraft
    32-bit in part
  • Ray and box slab test

    The distance at which a ray enters a box, or Infinity.

    t = (box − o) ÷ d, max of the near, min of the far

    Ray hits against 32-bit triangle records compute/bvh-core.js
    • BimCraft
    • ModelCraft
    64-bit
  • Instance inverse matrix

    The world-to-object matrix of an instance as 12 numbers.

    M⁻¹ = adj(M) ÷ det(M), translation = −M⁻¹ t

    Ray hits against 32-bit triangle records compute/bvh-scene.js
    • BimCraft
    • ModelCraft
    32-bit in part
  • Ray into object space of an instance

    The ray origin and direction in an instance frame, and the triangle test that follows.

    Ray hits against 32-bit triangle records compute/bvh-scene.js
    • BimCraft
    • ModelCraft
    32-bit in part
  • Triangle records from world triangles

    The 12-number triangle records the scatter ray tests use.

    e1 = v1 − v0; e2 = v2 − v0

    Ray hits against 32-bit triangle records rt/rt-scatter-ui.js
    • BimCraft
    • ModelCraft
    32-bit in part
  • Accumulation buffer read back

    The per-pixel sums of red, green, blue and sample count.

    Path-traced picture sums and the saved file render/pt-gpu.js
    • BimCraft
    • ModelCraft
    32-bit in part
  • Sum of an exact range of samples

    The sum of samples s0 to s0 + spp − 1 for every pixel.

    Path-traced picture sums and the saved file render/pt-gpu.js
    • BimCraft
    • ModelCraft
    32-bit in part
  • Render elements read back

    The per-pixel render elements and light-group sums.

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

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.