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

  • Calculated composition for the lab system

    A stream's composition as mass or mole fractions, percent or ppm, to send back as calculated values.

    wᵢ = zᵢ × MWᵢ ÷ Σ(z × MW); mass % = w × 100; ppm = w × 1e6

    Lab results to stream composition process/env/lims.js
    • CadCraft
    • BimCraft
    64-bit
  • Rational tag value

    A TIFF RATIONAL (two 32-bit integers) as one number.

    value = numerator ÷ denominator

    TIFF scan resolution raster/tiff.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • CivilCraft
    • PartCraft
    64-bit
  • Resolution in dots per inch

    The horizontal and vertical resolution of a page, in dots per inch.

    dpi = resolution × 2.54 (centimeter files); dpi = resolution (inch files)

    TIFF scan resolution raster/tiff.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • CivilCraft
    • PartCraft
    64-bit
  • Triangulate a polygon with holes

    The triangles of a polygon, as indexes into its point list.

    Polygon triangulation (ear clipping) usd/earcut.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Winding of a ring

    Whether a ring runs clockwise or counterclockwise.

    sum = Σ (xⱼ − xᵢ) × (yᵢ + yⱼ)

    Polygon triangulation (ear clipping) usd/earcut.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Orientation of three points

    On which side of the line through two points a third point lies.

    area = (q.y − p.y) × (r.x − q.x) − (q.x − p.x) × (r.y − q.y)

    Polygon triangulation (ear clipping) usd/earcut.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Removing duplicate and collinear points

    Drops points that repeat their neighbor or lie on the line between their neighbors.

    Polygon triangulation (ear clipping) usd/earcut.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Ear test

    Whether a corner can be cut off as a triangle: it is convex and no other point of the ring lies inside it.

    Polygon triangulation (ear clipping) usd/earcut.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Point in triangle

    Whether a point lies inside or on a triangle.

    three cross products of (corner − point) pairs, each ≥ 0

    Polygon triangulation (ear clipping) usd/earcut.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Bridge from a hole to the outer ring

    The point of the outer ring a hole is connected to.

    x = p.x + (h.y − p.y) × (p′.x − p.x) ÷ (p′.y − p.y); tan = |h.y − p.y| ÷ (h.x − p.x)

    Polygon triangulation (ear clipping) usd/earcut.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Do two segments cross

    Whether two edges intersect, including touching and collinear overlap.

    Polygon triangulation (ear clipping) usd/earcut.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Is the middle of a diagonal inside the polygon

    Whether a diagonal between two corners runs through the inside of the polygon.

    midpoint = ((a.x + b.x) ÷ 2, (a.y + b.y) ÷ 2); even-odd count of edges crossed by a ray

    Polygon triangulation (ear clipping) usd/earcut.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Fire rating text as minutes

    A rating written as '2HR', '120 min', 'REI 120' or a bare number, as minutes.

    minutes = round(hours × 60)

    Assistant answers: fire ratings and room areas ask-tools.js
    • BimCraft
    64-bit
  • Matching walls to the rating asked for

    Which walls are rated exactly, or at least, the time asked for.

    want = minutes, or hours × 60; match: minutes ≥ want, or minutes = want

    Assistant answers: fire ratings and room areas ask-tools.js
    • BimCraft
    64-bit
  • Rooms under or over an area

    The rooms smaller or larger than a limit, with each area in square meters and square feet.

    limit in m² = limit in sq ft × 0.09290304; area in sq ft = area ÷ 0.09290304

    Assistant answers: fire ratings and room areas ask-tools.js
    • BimCraft
    64-bit
  • Elements above, and the gap to each

    What sits over an element's footprint and how far above its top each one starts.

    gap = max(0, lowest Y of the other element − top Y of this element)

    Assistant answers: what is above an element ask-tools.js
    • BimCraft
    32-bit in part
  • Rounding to a number of decimals

    A value rounded to three decimals (or another count) for the workbook.

    round(x, d) = Math.round(x × 10ᵈ) ÷ 10ᵈ

    COBie export: sizes, areas and durations assets-bim-cobie.js
    • BimCraft
    64-bit
  • Lengths and areas written to the sheet

    Floor elevation and height, room height and room areas as the workbook holds them.

    length = round(x × k, 3); area = round(x × k², 3)

    COBie export: sizes, areas and durations assets-bim-cobie.js
    • BimCraft
    64-bit
  • Floor height

    The height of each floor, from its elevation to the next floor's.

    height = elevationₙ₊₁ − elevationₙ

    COBie export: sizes, areas and durations assets-bim-cobie.js
    • BimCraft
    64-bit
  • Warranty duration in years

    The length of a warranty from its start and end dates.

    years = (end − start) ÷ (365.25 × 86400000 ms), rounded to 0.1

    COBie export: sizes, areas and durations assets-bim-cobie.js
    • BimCraft
    64-bit
  • Expected life read from a workbook

    A type's expected life in years, from a value in years, months, weeks or days.

    years = months ÷ 12, weeks ÷ 52.1775, days ÷ 365.25; rounded to 0.1

    COBie export: sizes, areas and durations assets-bim-cobie.js
    • BimCraft
    64-bit
  • Warranty end date from its duration

    The day a warranty ends, when the workbook gives only its start and its length in years.

    end = start + round(years × 12) months

    COBie export: sizes, areas and durations assets-bim-cobie.js
    • BimCraft
    64-bit
  • Service life read from the file

    The service life shown in the asset form, in years.

    years = seconds ÷ 31557600, or Y + M ÷ 12; rounded to 0.1

    Asset service life and maintenance due dates assets-bim.js
    • BimCraft
    64-bit
  • Service life written to the file

    The service life as the IFC property holds it.

    IFC2x3: seconds = round(years × 31557600); IFC4: 'P' + years + 'Y'

    Asset service life and maintenance due dates assets-bim.js
    • BimCraft
    64-bit
  • Day number of a date

    A calendar date as a count of days since 1970-01-01.

    day = round(ms at 00:00 UTC ÷ 86400000)

    Asset service life and maintenance due dates assets-bim.js
    • BimCraft
    Exact
  • Overdue or due soon

    Whether an asset's next maintenance date has passed or falls within 30 days.

    d = day(next due) − day(today); overdue if d < 0; soon if d ≤ 30

    Asset service life and maintenance due dates assets-bim.js
    • BimCraft
    Exact
  • Reading text as a number

    A cell of a sensor file as a value.

    Sensor readings: values, times and limits assets-bim-sensors.js
    • BimCraft
    64-bit
  • Time text as milliseconds

    The time of a reading, from Unix time or a written date and time.

    Unix seconds × 1000; with a zone: UTC ms − sign × (hh × 60 + mm) × 60000

    Sensor readings: values, times and limits assets-bim-sensors.js
    • BimCraft
    64-bit
  • High or low against the limits

    Whether a reading is above the asset's high limit or below its low limit.

    high if v > high; low if v < low

    Sensor readings: values, times and limits assets-bim-sensors.js
    • BimCraft
    64-bit
  • Open or closed surface

    The elements of a batch whose triangles do not close.

    key = round(x × 1e4), round(y × 1e4), round(z × 1e4); open if any edge count is odd

    Section caps: which elements are closed solids caps-closed.js
    • BimCraft
    32-bit, display only
  • Elements split over several batches

    Checks again, over all its parts, an element that is drawn in more than one batch.

    Section caps: which elements are closed solids caps-closed.js
    • BimCraft
    32-bit, display only
  • Number from a factor or cost cell

    A cell such as '$1,250.00' as a number.

    Imported carbon factors, prices and climate data data-packs.js
    • BimCraft
    64-bit
  • Carbon factor from a file row

    A material's embodied-carbon factor in the unit the carbon pane works in.

    A1-A3 factor = value × unit factor (1 for kg, m, m², m³ and items; 0.001 for tonnes)

    Imported carbon factors, prices and climate data data-packs.js
    • BimCraft
    64-bit
  • Monthly climate from NASA POWER

    Twelve monthly values of daily sunlight on a horizontal surface and of air temperature.

    ghi = value rounded to 0.01 kWh/m²/day; T = value rounded to 0.01 °C

    Imported carbon factors, prices and climate data data-packs.js
    • BimCraft
    64-bit
  • Monthly climate from PVGIS

    Twelve monthly values of daily sunlight and air temperature, averaged over the years in the answer.

    ghi = Σ H(h)_m ÷ years ÷ days in month; T = Σ T2m ÷ years; both rounded to 0.01

    Imported carbon factors, prices and climate data data-packs.js
    • BimCraft
    64-bit
  • Location sent to the climate provider

    The latitude and longitude put into the request address.

    latitude.toFixed(3), longitude.toFixed(3)

    Imported carbon factors, prices and climate data data-packs.js
    • BimCraft
    64-bit
  • Room floors and opening sills for flooding

    Each room's floor height above the lowest level and each opening's sill height, in meters.

    floor = (elevation − lowest elevation) ÷ 1000; sill = max(0, sill) ÷ 1000

    Building data for flood, wind and earthquake checks hazard-model.js
    • BimCraft
    64-bit
  • Storey height, area, width and mass

    The storey data the wind and earthquake checks use, from the model's levels and outlines.

    area = Σ |outline area| ÷ 1e6; h = (next elevation − elevation) ÷ 1000; z = (elevation − datum) ÷ 1000 + h ÷ 2; mass = area × mass per m²; T1 = 0.1 × storeys when not given

    Building data for flood, wind and earthquake checks hazard-model.js
    • BimCraft
    64-bit
  • Storey data from the analysis frame

    The same storey data when the stiffness comes from the structural frame instead of a typed period.

    z = (floor z − base) ÷ 1000 − h ÷ 2; width = extent of the nodes within 150 mm of the floor

    Building data for flood, wind and earthquake checks hazard-model.js
    • BimCraft
    64-bit
  • Date text as a day number

    A YYYY-MM-DD date as a count of days since 1970-01-01.

    day = Date.UTC(y, m, d) ÷ 86400000

    4D schedule dates and status ifc-4d.js
    • BimCraft
    Exact
  • Built, in progress or waiting on a date

    The state of every element that belongs to a task, on a chosen day.

    built if day > finish; in progress if start ≤ day ≤ finish; waiting if day < start

    4D schedule dates and status ifc-4d.js
    • BimCraft
    Exact
  • Task counts of a stage or package

    How many tasks of a group are done, running and still to do on a day.

    4D schedule dates and status ifc-4d.js
    • BimCraft
    Exact
  • Millimeters per unit of one IFC unit

    The size in millimeters of an SI or conversion-based length unit.

    mm per unit = prefix table value, or conversion factor × mm of the base unit

    IFC length unit and placement matrices ifc-util.js
    • BimCraft
    64-bit
  • Length unit of the file

    The millimeters per length unit of the open file, from its project units.

    IFC length unit and placement matrices ifc-util.js
    • BimCraft
    64-bit
  • Product of two 4 × 4 matrices

    Two placements combined into one.

    (A·B)ᵣ꜀ = Σₖ Aᵣₖ × Bₖ꜀

    IFC length unit and placement matrices ifc-util.js
    • BimCraft
    64-bit
  • A point moved by a matrix

    A point in one frame as a point in another.

    p′ = M · (x, y, z, 1)

    IFC length unit and placement matrices ifc-util.js
    • BimCraft
    64-bit
  • Inverse of a 4 × 4 matrix

    The matrix that undoes a placement.

    M⁻¹ = adj(M) ÷ det(M)

    IFC length unit and placement matrices ifc-util.js
    • BimCraft
    64-bit
  • Where a federated model goes

    The matrix that puts a second model in the first model's coordinates, moved by an offset.

    M = T(offset) · C_ref · C⁻¹

    IFC length unit and placement matrices ifc-util.js
    • BimCraft
    64-bit
  • Placed triangles of an element

    Every triangle of an element in the file's Z-up coordinates and length unit.

    p = (x, −z, y) of (C⁻¹ · M · v) × (1000 ÷ unitMm)

    Element triangles for analysis ifc-util.js
    • BimCraft
    32-bit in part
  • Placed point in millimeters

    A point of an element's own frame in the file's coordinates, in millimeters.

    p = (M · (x, y, z, 1)) × unitMm

    Field layout points from the model layout-bim.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.