Resources

Numerical accuracy

The calculations in our apps: the policy each one is under, the precision it runs at, and the code itself.

This device: processor, memory, graphics The standard Precision is not robustness

  • 941 calculation policies
  • 6,917 calculations in 1,248 source files
  • 143 exact
  • 6,286 in 64-bit
  • 335 with a 32-bit step
  • 437 open items
  • Last reviewed

Calculation policies

A policy says how one family of calculations keeps its precision. Open one to see its calculations, by source file, and their code.

  • Reverberation time of a box room

    Works out the reverberation time of a box-shaped room in each frequency band by four formulas: Sabine, Eyring, Fitzroy and Arau-Puchades.

    • BimCraft
    64-bit, stated limit
    2 calculations
    64-bit
  • Revision overlay: what changed under a mark

    Compares the pictures of an old sheet and its revision and flags the marks whose drawing changed.

    • TakeoffCraft
    64-bit, stated limit
    4 calculations in 2 files
    64-bit
  • Rigid body simulation

    Drops, stacks and collides boxes and spheres under gravity and records where each one is at every frame, to be baked into keys.

    • ModelCraft
    64-bit, stated limit
    12 calculations
    64-bit Open item
  • Rigid-body dynamics of a mechanism

    Joint torques for a given motion, the mass matrix, joint accelerations for given torques, energy, and a simulated motion over time.

    Every app 64-bit, stated limit
    6 calculations
    64-bit
  • River water surface profiles by the standard step method

    Works out the water surface, energy level, critical depth, velocities, Froude number and flow split at each river cross section for steady flow.

    • CivilCraft
    64-bit, stated limit
    15 calculations in 2 files
    64-bit Open item
  • Road intersections, striping and signs

    Works out curb returns, the pavement outline and area of an intersection, sight distance, stripe and dash layouts, crosswalk bars, sign positions and the quantities of each.

    • CivilCraft
    64-bit, stated limit
    14 calculations
    64-bit Open item
  • Roof faces, gable ends, fascia and soffit

    Matches each roof edge to the wall under it and builds the roof's sloped slabs, gable walls, fascia boards and soffit panels with their areas and lengths.

    • BimCraft
    64-bit, stated limit
    7 calculations
    64-bit
  • Room outline by flood fill

    Finds the room around a clicked point on a picture of the sheet and returns its outline as an area mark.

    • TakeoffCraft
    64-bit, stated limit
    4 calculations in 2 files
    64-bit
  • Room outline, walls and openings

    Builds the room a cabinet job sits in: its corners, the frame of each wall, inside tests, distances to walls, and the doors and windows along the walls.

    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit, stated limit
    19 calculations in 2 files
    64-bit Open item
  • Room reverberation time

    Works out how long sound takes to die away in each room, per octave band, from the room's volume, its surfaces and the air.

    • BimCraft
    64-bit, stated limit
    11 calculations in 2 files
    64-bit Open item
  • Room, floor and ceiling quantities

    Writes the shape, areas, perimeter and volume of rooms, floor slabs and ceilings found from the drawn walls.

    • BimCraft
    64-bit, stated limit
    6 calculations
    64-bit Open item
  • Running saved geotechnical, survey, pit and link items

    Converts a saved item from project units to meters, runs the engine for it (soil profile, slope stability, settlement, traverse, pit, radio link, coverage) and converts the results back.

    • CivilCraft
    64-bit, stated limit
    9 calculations
    64-bit
  • Sanitary drain sizing by fixture units

    Adds up the fixture units each drain carries, finds which run flows into which, and picks the smallest pipe size the plumbing tables allow.

    • BimCraft
    64-bit, stated limit
    4 calculations
    64-bit
  • Sanitary sewer design flows and pipe sizes

    Works out the peak sanitary flow in each pipe of a gravity network from people and area, checks capacity and velocity, and picks pipe sizes.

    • CivilCraft
    64-bit, stated limit
    6 calculations
    64-bit Open item
  • Scan clean-up and JPEG decoding

    Reads a scanned image, turns it into black and white, finds how far the sheet is rotated and turns it straight.

    • CadCraft
    • BimCraft
    • ModelCraft
    • CivilCraft
    • PartCraft
    64-bit, stated limit
    6 calculations in 2 files
    64-bit Open item
  • Scanned drawings: size, scale, align, crop and trace

    Places a scanned picture, scales and turns it from picked points, crops it, and turns its traced ink into lines, arcs and circles in drawing coordinates.

    • CadCraft
    64-bit, stated limit
    9 calculations in 2 files
    64-bit Open item
  • Scattered plants, rocks and people: how many and where

    Works out how many items a scatter set asks for from the area it covers and its density, and picks the points they stand on.

    • BimCraft
    • ModelCraft
    64-bit, stated limit
    4 calculations
    64-bit
  • Schedule risk (Monte Carlo)

    The finish at P10, P50, P80 and P90, how often each task is critical, and which durations drive the finish.

    Every app 64-bit, stated limit
    3 calculations
    64-bit
  • Script result fields and meshes shown in the window

    The scalar a script's field plot colors by, its range, and the outer surface of a result mesh.

    • PartCraft
    64-bit, stated limit
    4 calculations
    32-bit, display only
  • Seam allowance: the cut line

    Draws the cut line round a pattern piece at each edge's seam allowance, with the corner rules pattern makers use (Apparel add-on).

    • CadCraft
    64-bit, stated limit
    7 calculations
    64-bit Open item
  • Seismic loads and story drift to ASCE 7-22

    The seismic base shear and story forces by the equivalent lateral force procedure, the building's period, the weight of each floor and the drift check.

    • CadCraft
    • BimCraft
    • DetailCraft
    64-bit, stated limit
    11 calculations in 2 files
    64-bit
  • Settlement, flexible mats, pile groups and retaining walls

    Estimates elastic settlement, analyzes a footing as a plate on springs, shares a load over a pile group and checks a cantilever retaining wall.

    • DetailCraft
    64-bit, stated limit
    11 calculations
    64-bit
  • Sheet metal bends and flat pattern

    Works out the bent profile of a sheet metal base, the bend allowance of every bend, and the flat pattern with its bend lines, size and area.

    • PartCraft
    64-bit, stated limit
    13 calculations in 2 files
    64-bit Open item
  • Sheet nesting

    Lays parts out on sheets or a roll, reports the sheets used and the efficiency, checks the result, reads part outlines from DXF and writes the nest as DXF.

    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit, stated limit
    19 calculations
    64-bit Open item
  • Sheet scale read from the sheet's text

    Finds scale notations in a PDF sheet's text and picks the listed scale to offer for the sheet.

    • TakeoffCraft
    64-bit, stated limit
    3 calculations
    64-bit
  • SHX font text: strokes and width

    Turns the shapes of a loaded .shx font into strokes, and gives a text's width and the position of each stroke in the drawing.

    • CadCraft
    64-bit, stated limit
    7 calculations in 2 files
    64-bit
  • Simulation numbers shown as text

    How the simulation window rounds the numbers it prints and puts into input boxes.

    • PartCraft
    64-bit, stated limit
    2 calculations
    64-bit
  • Single-part shop drawing

    Draws one part with its holes, copes and section, and prints its dimensions, cut angles and weight.

    • DetailCraft
    64-bit, stated limit
    5 calculations
    64-bit
  • Site ground, building pads and cut and fill

    Builds the site's ground from survey points, grades building pads into it, works out the cut and fill volumes, drapes paving on it and writes the ground to LandXML.

    • BimCraft
    64-bit, stated limit
    17 calculations
    64-bit Open item
  • Site outline, building placement and levels

    Stores the site boundary with its area and perimeter, places the building on the site, adds or splits levels, and turns a site-study mass into walls and floors.

    • BimCraft
    64-bit, stated limit
    11 calculations in 2 files
    64-bit Open item
  • Site surroundings in local meters

    Converts the buildings, parcels and zones found around an address from longitude and latitude to meters east and north of the address point, as suggestions a person can add to the model.

    • BimCraft
    • ModelCraft
    • CivilCraft
    64-bit, stated limit
    4 calculations
    64-bit
  • Sketch exchange macro and import

    Writes the drawing as a .swb sketch macro with its coordinates in meters, and reads an exported sketch back as geometry, constraints and dimensions.

    • CadCraft
    64-bit, stated limit
    8 calculations
    64-bit Open item
  • Sketch intersections with splines

    Finds where a sketch spline crosses a line, an arc, a circle or another spline.

    • PartCraft
    64-bit, stated limit
    3 calculations
    64-bit
  • Sketch photo to drawing

    Finds a sheet of paper in a photo, straightens it, and turns the pen lines on it into lines and arcs at a stated scale.

    • CadCraft
    64-bit, stated limit
    6 calculations
    64-bit Open item
  • Sketch photo to drawing: sheet, perspective and scale

    Finds the sheet of paper in a photo, straightens it, and places the traced lines and arcs in the drawing at a stated scale.

    • ModelCraft
    • CivilCraft
    64-bit, stated limit
    7 calculations in 2 files
    64-bit Open item
  • Sketch profiles as closed polygons

    Turns the lines, arcs, circles and splines of a sketch into closed polygon loops, tests whether a point is inside them, and gives a loop's area.

    • PartCraft
    64-bit, stated limit
    5 calculations
    64-bit
  • Sketch solver

    Moves the points and radii of a sketch until every relation and dimension is met, and reports how many degrees of freedom are left and which relations conflict or repeat.

    • PartCraft
    64-bit, stated limit
    11 calculations in 2 files
    64-bit Open item
  • Sketch splines: length, nearest point, polyline and offset

    The length of a sketch spline, the point on it nearest a given point, its points within a chord tolerance, and its offset curve.

    • PartCraft
    64-bit, stated limit
    4 calculations
    64-bit
  • Sky view and daylight factor

    Works out how much of the sky each window sees and the daylight factor on a grid of points in a room.

    • BimCraft
    64-bit, stated limit
    19 calculations
    64-bit
  • Slope stability

    Finds the factor of safety of a circular slip surface by Bishop's simplified method or the ordinary method of slices, and searches for the critical circle.

    • CivilCraft
    64-bit, stated limit
    6 calculations
    64-bit Open item
  • Snapping to and measuring the sheet's own linework

    Reads the vector lines of a PDF page or a CAD sheet, snaps picked points to them, and measures a whole connected path or closed loop from one click.

    • TakeoffCraft
    64-bit, stated limit
    11 calculations in 4 files
    64-bit Open item
  • Solar array layout on roofs and ground

    Finds the roof planes that can carry modules, fits modules inside a plane with a setback, and lays out ground rows with a spacing that avoids shade at the winter solstice.

    • BimCraft
    • CivilCraft
    64-bit, stated limit
    8 calculations
    64-bit
  • Solar array shading

    Works out, for each hour of each month's representative day, the share of a solar array's sample points that the model shades from the direct sun, and the share of the beam light lost.

    • BimCraft
    • CivilCraft
    64-bit, stated limit
    4 calculations
    64-bit
  • Solar array site and saved summary

    The latitude and longitude kept for a ground PV array and the numbers the file keeps for its plan.

    • CivilCraft
    64-bit, stated limit
    2 calculations
    64-bit
  • Solar one-line currents, devices and wires

    Works out the current on each run of a solar one-line diagram and picks the overcurrent device and wire size from the tables the person gives.

    • BimCraft
    64-bit, stated limit
    6 calculations
    64-bit Open item
  • Solar yield estimate

    Estimates the DC and AC energy a solar array gives in a year, month by month, with shading, temperature, losses and inverter clipping, and its performance ratio.

    • BimCraft
    • CivilCraft
    64-bit, stated limit
    8 calculations
    64-bit Open item
  • Solvers shared by the process engine

    The linear solve, Newton iteration, ODE integrator and bracketed root finder that the flowsheet, reactors and design specifications call.

    • CadCraft
    • BimCraft
    64-bit, stated limit
    4 calculations
    64-bit Open item
  • Solving an expression for one parameter

    Finds the value of one parameter that makes an expression give a wanted result, the other parameters held.

    • CadCraft
    • BimCraft
    • PartCraft
    64-bit, stated limit
    2 calculations
    64-bit Open item
  • Sound insulation ratings and the mass law

    Works out the single-number airborne and impact sound ratings from sixteen third-octave values, and estimates a plain wall's sound reduction from its mass.

    • BimCraft
    64-bit, stated limit
    6 calculations
    64-bit Open item
  • Spending on a person's own AI model

    Adds up what calls to a person's own AI model have cost today and this month, and stops a call that could pass the limits the person set.

    Every app 64-bit, stated limit
    4 calculations
    64-bit

A policy is added only after its source was read. Each statement can be checked in the code shown on its page; the app repositories are public. When a release changes a calculation, its page says so until it has been read again.

The standard

  • 64-bit everywhere

    Every calculation runs in 64-bit floating point (IEEE 754 double precision), from the number you type to the number you read.

  • 15 digits, always

    A 64-bit number keeps any 15-digit value intact and takes 17 digits to write out in full. Our rule for every calculation: carry all 17 between steps, and order the arithmetic so that avoidable rounding never costs one of the first 15.

  • 32-bit gets a warning

    A 32-bit number keeps about 7 digits. Where a 32-bit step can reach a number you read, the calculation is flagged in the lists below, and the app will warn that the result can have less mathematical precision.

This device

The apps calculate in 64-bit on every device. Work handed to the graphics processor is the exception: browsers expose graphics processors as 32-bit calculators, which can provide less mathematical precision.

A browser reports a rounded or capped view of the machine, never a full inventory: it gives the number of processor threads (not the model), memory rounded down and capped at 8 GB (Chromium only), and one graphics adapter even when a machine has several. What the browser reports about graphics is a capability, not a measurement of the card. The size of a graphics card's memory bus (a 192-bit bus, for example) says how fast data moves, not how precisely it calculates. Most graphics cards can calculate in 64-bit natively, slowly, but WebGL and WebGPU do not offer it to web pages.

Approaches

Every policy takes one of five approaches to keeping its precision.

Exact values 8 policies
Constants and factors are held as exact fractions from their definitions. The arithmetic is ordered so that no rounded factor is ever used.
Exact predicates 1 policy
Coordinates are 64-bit. The yes-or-no decisions that shape the geometry (which side of a line, inside or outside a circle) are computed exactly, so rounding cannot flip one.
64-bit, direct 337 policies
Every value is a 64-bit number from input to result. Formulas are closed form or a direct solve, and every comparison uses a stated tolerance.
64-bit, stated limit 428 policies
The arithmetic is 64-bit, but the method or the data sets the accuracy: a solver tolerance, a mesh, a step size, a datum shift, a table. The limit is stated where the result is shown.
Display only 49 policies
Computed to draw the screen, often in 32-bit on the graphics processor. No number a person reads, saves or exports comes from it.
32-bit step, flagged 118 policies
One step stores or exchanges 32-bit values that reach a number a person reads. It is listed here with its open item, and the step is either moved to 64-bit or the app will warn where the number is read.

Precision is not robustness

Mathematical precision is how many digits a number keeps. Geometric robustness is whether a shape stays valid: every intersection found, every solid closed, every face joined to its neighbors. They are different properties, and a CAD system can have the first without the second.

Every geometric algorithm rests on yes-or-no questions. Is this point left or right of that line? Do these two edges cross? Is this point inside that circle? Each answer is the sign of a small expression. When three points are almost in line, the true value of that expression can be smaller than the rounding error of the arithmetic that computes it, and the sign comes out wrong. That happens at 15 digits as readily as at 7.

One wrong sign is not a small error in the last digit. It is a different decision: an intersection that is missed, two triangles that overlap, a face that points the wrong way, a solid with a gap in it. Every coordinate can be correct to 15 digits while the shape they describe is invalid.

A point C almost on the line from A to B. Magnified, C is a tiny distance to one side of the line. A B C C left or right?
C lies a rounding error away from the line through A and B. Which side it is on decides how the geometry is built.

What makes geometry robust

  • Exact predicates

    The yes-or-no questions are answered exactly. The fast 64-bit answer is used when it is safely away from zero. When it is not, the sign is computed again with as many digits as it takes.

  • Decide once

    A decision about a shape is recorded as topology, and every later step agrees with it. The same question is never asked twice with a chance of two answers.

  • Stated tolerances

    Where a tolerance is used it is written down, scaled to the size of the geometry and applied the same way everywhere.

  • Local origins

    Coordinates far from zero are moved to a local origin before the work, so the digits are spent on the geometry and not on the distance to the origin.

  • Valid by construction

    Algorithms whose result is guaranteed to be a closed solid, whatever the input, in place of ones that repair the result afterwards.

  • More than the language

    These choices matter more than the programming language. JavaScript, C++ and Rust all compute with the same 64-bit numbers: the same algorithm is as robust, or as fragile, in each.

Where our apps stand

The list on this page records both properties. Surface triangulation in CivilCraft and BimCraft uses exact predicates. Solid modeling in PartCraft runs on a kernel whose result is a closed solid by construction. The intersections in the CadCraft app use stated tolerances today, and exact tests for the near-parallel and near-tangent cases are an open item. Each policy says which approach it takes.