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.

  • Load reserve and escape route checks

    Finds the load factor at which a design first reaches its limit, and the narrowest door on the best way out of every room.

    • CadCraft
    • BimCraft
    • DetailCraft
    • PartCraft
    64-bit, stated limit
    3 calculations
    64-bit Open item
  • Luminaire files and point-by-point illuminance

    Reads luminaire photometry files (IES LM-63 and EULUMDAT) and works out the direct illuminance on a grid of points, with its minimum, average, maximum, uniformity and power density.

    • CadCraft
    • BimCraft
    64-bit, stated limit
    17 calculations in 2 files
    64-bit
  • Lumped system models

    Operating point and response over time of electrical, thermal, hydraulic and mechanical networks built from lumped elements.

    Every app 64-bit, stated limit
    12 calculations in 3 files
    64-bit Open item
  • Magnet study: 2D field, force and torque

    Solves the magnetic field of a sketch's profiles (air, iron, magnets, coils) and reports the peak flux density and the force and torque on chosen bodies.

    • PartCraft
    64-bit, stated limit
    18 calculations in 3 files
    64-bit
  • Magnetic and electric field solvers

    The field of wire segments, the mutual inductance of loops, and 2D finite-element magnetic and electric fields with energy, capacitance and force.

    Every app 64-bit, stated limit
    12 calculations in 2 files
    64-bit Open item
  • Manufacturing cost estimate

    Estimates what a part costs to machine or print from its volume, bounding box, material price and shop rates.

    • PartCraft
    64-bit, stated limit
    5 calculations
    64-bit
  • Map coordinate reprojection

    Moves points, and a model's position on the map, between coordinate systems.

    • BimCraft
    • CivilCraft
    64-bit, stated limit
    3 calculations in 2 files
    64-bit
  • Markers: pieces laid on fabric

    Keeps the pieces of a marker on the fabric, checks grain direction and overlaps, and works out the marker's length and fabric use (Apparel add-on).

    • CadCraft
    64-bit, stated limit
    9 calculations
    64-bit Open item
  • Marks and sheets written to PDF

    Draws the takeoff's marks into a copy of the PDF, with a legend of quantities, and writes a DWG or DXF sheet as a vector PDF page.

    • TakeoffCraft
    64-bit, stated limit
    4 calculations in 3 files
    64-bit
  • Mass-haul diagram

    Works out the mass ordinate at each section, the balance points, the volume moved in each balanced stretch and its average haul distance.

    • CivilCraft
    64-bit, stated limit
    5 calculations
    64-bit
  • Massing options from a room program

    Adds up a room program, finds building shapes that hold it inside a buildable envelope, and reports each option's footprint, gross area, surplus and site coverage.

    • BimCraft
    64-bit, stated limit
    7 calculations
    64-bit
  • Massing options placed on a lot

    Reads alternative building footprints, places each inside the buildable envelope, and writes the envelope back as a file in millimeters.

    • CivilCraft
    64-bit, stated limit
    6 calculations
    64-bit Open item
  • Massing window read-outs and typed height

    The footprint and floor-area read-outs of a building mass, the zoning coverage field, and what happens to a typed height.

    • CivilCraft
    64-bit, stated limit
    3 calculations
    64-bit
  • Matching and blending NURBS curves and surfaces

    Moves the end of a curve or the edge of a surface so it meets another with position, tangent or curvature continuity, and builds blends between them.

    • ModelCraft
    • PartCraft
    64-bit, stated limit
    7 calculations
    64-bit
  • Material flow simulation

    Runs a discrete-event simulation of conveyors, stations, buffers, gates and automated vehicles and reports throughput, lead times, queue lengths and utilization.

    • ModelCraft
    64-bit, stated limit
    18 calculations
    64-bit Open item
  • Material packs: property curves by temperature

    Returns a material property at a temperature from a pack's fitted curve, with its unit, valid range and fit error.

    • PartCraft
    64-bit, stated limit
    3 calculations
    64-bit
  • Material units, gravity and custom material limits

    The unit factor from density to the solver's mass unit, the gravity constant, and the limits on a custom material.

    • PartCraft
    64-bit, stated limit
    3 calculations
    64-bit Open item
  • Member axes and section properties

    Works out each frame member's length and local axes, and the area, second moments and torsion constant of a section from its outline.

    • CadCraft
    • BimCraft
    • DetailCraft
    64-bit, stated limit
    6 calculations
    64-bit Open item
  • MEP equipment, ports and refrigerant line sets

    Builds generic mechanical equipment from typed sizes, places its pipe and duct ports, sizes refrigerant line sets from a capacity table and routes them between units.

    • BimCraft
    64-bit, stated limit
    12 calculations in 3 files
    64-bit
  • MEP openings and clearances shown and exported

    Brings run points into the viewer frame and writes the opening sizes and positions to the screen list, the CSV and the BCF.

    • BimCraft
    64-bit, stated limit
    4 calculations
    64-bit
  • Molar mass and group-contribution estimates

    Works out a molecule's formula and molar mass from its structure and estimates boiling point, critical constants, formation energies and heat capacity by Joback's method.

    • CadCraft
    • BimCraft
    64-bit, stated limit
    4 calculations
    64-bit
  • Molecular dynamics

    Simulates atoms under Lennard-Jones, bonded and Coulomb forces and reports temperature, pressure, energies, density, radial distribution and diffusion.

    • CadCraft
    • BimCraft
    64-bit, stated limit
    22 calculations in 3 files
    64-bit Open item
  • Move, rotate and mirror

    Moves, rotates and mirrors selected members, footings and stairs, and keeps each section facing the right way.

    • DetailCraft
    64-bit, stated limit
    10 calculations
    64-bit
  • Multigrid preconditioner for stress analysis

    Builds and applies the smoothed-aggregation multigrid cycle that speeds up the conjugate-gradient solve of the tetrahedral stress model.

    • PartCraft
    64-bit, stated limit
    8 calculations
    64-bit
  • Non-uniform scale of an exact body

    Scales a solid by different factors along different axes while keeping it an exact boundary model.

    • PartCraft
    64-bit, stated limit
    10 calculations
    64-bit Open item
  • Nonlinear study fields and thermal stress history

    The defaults and checks of a nonlinear or contact study, and the time steps and loads of a thermal stress history.

    • PartCraft
    64-bit, stated limit
    4 calculations in 2 files
    64-bit
  • Numbers in a PartCraft script file

    Writes a part's dimensions, positions and parameters as text in a .pcscript file and reads them back.

    • PartCraft
    64-bit, stated limit
    3 calculations
    64-bit Open item
  • Numbers written into edited PDF page content

    How a number is written into the content stream of a PDF page that MarkupCraft edits.

    • MarkupCraft
    64-bit, stated limit
    1 calculation
    64-bit
  • Numbers written into the IFC model

    Turns the millimeter values the building tools work in into the coordinates, directions, extrusion depths and quantities stored in the IFC file.

    • BimCraft
    64-bit, stated limit
    8 calculations
    64-bit Open item
  • Numbers written into the VBA macro export

    Turns a part's lengths, angles, points and check values into the numbers written in the exported .swb macro text, in meters and radians.

    • PartCraft
    64-bit, stated limit
    11 calculations
    64-bit Open item
  • Numbers written to the saved PDF

    Writes each markup into the PDF as an annotation: its position, its points, its drawn appearance, the sheet's scale and the measured text.

    • MarkupCraft
    64-bit, stated limit
    13 calculations
    64-bit Open item
  • NURBS lengths, areas, closest points and tessellation

    Measures a curve's length and a surface's area, finds the point of a curve or surface nearest a given point, and turns curves and surfaces into polylines and triangle grids within a tolerance.

    • ModelCraft
    • PartCraft
    64-bit, stated limit
    10 calculations in 3 files
    64-bit Open item
  • Offcut stock after nesting

    Works out the usable material left on a plate after a nest, keeps it as numbered remnants with their size and area, and nests the next job on remnants first.

    • CadCraft
    • PartCraft
    64-bit, stated limit
    13 calculations
    64-bit
  • Open pit benches, haul ramp and pit surface

    Works out the outline, area and perimeter of each bench, a haul ramp down the pit wall with its length and drop, and the pit cut into the ground with the volume dug.

    • CivilCraft
    64-bit, stated limit
    6 calculations
    64-bit
  • OpenEXR and Radiance HDR picture files

    Reads and writes rendered pictures and environment pictures as OpenEXR and Radiance HDR files.

    • BimCraft
    • ModelCraft
    64-bit, stated limit
    6 calculations in 2 files
    64-bit
  • Orthogonal pipe router

    Finds a pipe route between two nozzles that runs only along X, Y and Z, keeps clear of obstacles and has few bends, and reports its length.

    • BimCraft
    64-bit, stated limit
    6 calculations
    64-bit Open item
  • Overhead conductor sag and tension

    Works out the load on a conductor in each load case, its tension by change of state on the ruling span, and the sag, length and support tensions of every span.

    • CivilCraft
    64-bit, stated limit
    10 calculations in 2 files
    64-bit
  • Overhead line checks: clearances, support loads and sizing

    Checks an overhead line span by span and support by support: clearance to the ground and to obstacles, phase spacing, insulator swing, the loads on each support, its size, foundation and fittings.

    • CivilCraft
    64-bit, stated limit
    17 calculations in 4 files
    64-bit Open item
  • P&ID placement, zones and values written to the drawing

    Places P&ID symbols on process lines and connection points, cuts lines around inline symbols, draws hazard zones to scale, and writes imported stream values and relief sizes into the drawing.

    • CadCraft
    64-bit, stated limit
    8 calculations
    64-bit Open item
  • Pad daylight lines and the graded surface

    Finds where the cut and fill slopes around a pad meet the existing ground, and builds the proposed surface from the pad, its slopes and the ground outside them.

    • CivilCraft
    64-bit, stated limit
    7 calculations
    64-bit
  • Parameters and equations

    Evaluates named parameters and the equations that drive dimensions, writes the results into the drawing or part, and solves backward for a parameter when a driven value is edited.

    • CadCraft
    • PartCraft
    64-bit, stated limit
    9 calculations
    64-bit Open item
  • Parametric PCB footprints

    Pad positions, pad sizes and the courtyard of standard-style footprints, worked out from pitch, row spacing and pin count.

    Every app 64-bit, stated limit
    7 calculations
    64-bit
  • Part export to STL, 3MF, DXF and STEP

    Writes the part's mesh, a sketch, a face profile or a flat pattern to a file.

    • PartCraft
    64-bit, stated limit
    9 calculations
    64-bit Open item
  • Pass or fail against a regulation limit

    Decides whether a found value meets the minimum, maximum or range of a regulation rule.

    • CadCraft
    • BimCraft
    • CivilCraft
    • DetailCraft
    64-bit, stated limit
    1 calculation
    64-bit
  • Pattern along a path

    Places copies of a feature or body at stations along a path, optionally turned to follow it.

    • PartCraft
    64-bit, stated limit
    5 calculations
    64-bit
  • Pattern outlines: curves, lengths and areas

    Turns the points of a clothing pattern outline into a smooth curve, and measures lengths, areas and positions along it (Apparel add-on).

    • CadCraft
    64-bit, stated limit
    10 calculations
    64-bit
  • Pattern pieces from drawing geometry

    Makes a pattern piece from polylines, arcs, circles and ellipses of the drawing, places notches on it and moves its points by grips (Apparel add-on).

    • CadCraft
    64-bit, stated limit
    9 calculations
    64-bit Open item
  • PDF underlay in a plot

    Plots the lines, curves, fills and text of a PDF underlay at its place in the drawing.

    • CadCraft
    64-bit, stated limit
    1 calculation
    64-bit Open item
  • Pen sketch cleanup

    Decides what a freehand stroke was meant to be (a line, circle, arc, rectangle or polyline) and makes that exact shape, then joins nearby ends.

    • CadCraft
    • MarkupCraft
    64-bit, stated limit
    9 calculations
    64-bit
  • People flow and evacuation time

    How fast people pass doors, corridors and stairs, which way each room empties, and how long it takes everyone to reach an exit.

    Every app 64-bit, stated limit
    6 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.