Resources

Numerical accuracy

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

  • 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.

  • 3D site export (GLB, OBJ, USD) and the 3D pointer readout

    Writes the 3D site as a GLB, OBJ or USD file, and shows the easting, northing and elevation under the pointer in the 3D view.

    • CivilCraft
    32-bit step, flagged
    7 calculations in 4 files
    32-bit in part Open item
  • 3D site view scene

    Builds the triangles and lines the 3D view draws: the ground with its elevation bands, roads, hardscape, plants, tracks, pipes and structures.

    • CivilCraft
    Display only
    4 calculations in 3 files
    32-bit, display only
  • 3D vectors, planes and transforms

    The vector, plane, ray and 4×4 matrix helpers that the 3D modeling kernel uses for every point it stores.

    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    64-bit, direct
    12 calculations
    64-bit Open item
  • Address to site: parcel area, distances and shares

    For a point and a set of open-data layers, works out the parcel's area, the distance to nearby buildings and the share of the parcel in each zoning district, soil unit and flood zone.

    • CivilCraft
    64-bit, stated limit
    6 calculations
    64-bit Open item
  • Alignment lines and circular curves

    Works out a horizontal alignment from its points of intersection: tangents, circular curves, curve facts, stations, and the station and offset of any point.

    • CivilCraft
    64-bit, direct
    7 calculations
    64-bit
  • Arithmetic on typed lengths

    Works out a length typed as an expression, such as 4+7/16 or 2*450mm, wherever a length is asked for.

    • CadCraft
    • ModelCraft
    • MarkupCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    64-bit, direct
    4 calculations
    64-bit
  • Assistant and window read-outs of radio link and coverage

    The numbers the assistant tools return for radio links and coverage, and the coverage read-out in the geotechnical and telecom window.

    • CivilCraft
    32-bit step, flagged
    4 calculations in 2 files
    32-bit in part Open item
  • Best route across the terrain

    Finds the least-cost path between two points on the ground within a steepest grade and a tightest curve, and reports its length, steepest grade, smallest radius and earthwork.

    • CivilCraft
    32-bit step, flagged
    5 calculations
    32-bit in part Open item
  • Block model, ultimate pit and mine schedule

    Estimates block grades from samples, values each block, finds the most valuable pit within a slope, and reports tonnes, grades, strip ratio and a discounted schedule.

    • CivilCraft
    64-bit, stated limit
    10 calculations
    64-bit
  • Board geometry and clearances

    Distances between tracks, pads and zones, point-in-shape tests, areas and pad positions on a printed circuit board.

    Every app 64-bit, direct
    10 calculations in 2 files
    64-bit Open item
  • Board placement and routing

    Where parts are placed and where tracks and vias run on a board, with the wire length reported.

    Every app 64-bit, stated limit
    8 calculations in 2 files
    64-bit Open item
  • Boring logs and the soil profile between borings

    Cleans boring logs, corrects blow counts, places borings along a section line and joins their layers into a soil profile.

    • CivilCraft
    64-bit, direct
    6 calculations
    64-bit
  • Building mass areas, levels and base earthwork

    Works out a building mass's footprint area, gross floor area, height, floor levels, the ground under it and the cut and fill to set it on the slope.

    • CivilCraft
    64-bit, stated limit
    9 calculations
    64-bit
  • Building mass mesh for the 3D view

    Builds the walls and roof of a building mass as a triangle mesh for drawing.

    • CivilCraft
    Display only
    1 calculation
    32-bit, display only
  • Building masses as IFC

    Writes building masses as an IFC4 file: footprints, storey levels, heights and areas.

    • CivilCraft
    64-bit, stated limit
    6 calculations
    64-bit
  • Calc sheet units, functions and driven parameters

    The unit factors, powers, functions and conversions of a calc sheet, and the values a sheet writes into the app's parameters.

    Every app 64-bit, direct
    13 calculations
    64-bit Open item
  • Calc sheets

    Unit-aware formulas saved with the file: spans, loads, moments, pass or fail checks.

    Every app 64-bit, direct
    3 calculations
    64-bit Open item
  • Check report values

    The required and found values written in the Problems panel and in the check report exported as CSV.

    Every app 64-bit, direct
    1 calculation
    64-bit Open item
  • Circuit solver

    Operating point, DC sweep, AC response and transient of a circuit of resistors, capacitors, inductors, sources, diodes, transistors and switches.

    Every app 64-bit, stated limit
    18 calculations in 2 files
    64-bit Open item
  • Clear-sky solar irradiance

    Estimates the beam and diffuse solar irradiance on a clear day from the day of the year, the sun's height, the site altitude and a climate type.

    • CivilCraft
    64-bit, stated limit
    1 calculation
    64-bit
  • Controller standard functions and integer types

    Timers, counters, arithmetic functions and type conversions of the soft controller.

    Every app 64-bit, direct
    6 calculations
    64-bit Open item
  • Coordinate reference systems

    Converts project coordinates to and from a named map projection, longitude and latitude, and other systems, and reports grid scale factor, convergence and elevation factor at a point.

    • CadCraft
    • BimCraft
    • CivilCraft
    64-bit, stated limit
    17 calculations in 2 files
    64-bit
  • Coordinate system helpers

    Finds the coordinate systems a project's coordinates fit, reads and writes latitude and longitude text, applies a local grid fit, and converts a project's coordinates to another system.

    • CivilCraft
    64-bit, direct
    7 calculations
    64-bit
  • Corridor cross sections and pavement quantities

    Sweeps a road or track assembly along an alignment and profile: section stations, edge and shoulder points, targets, daylight points, and the area and volume of pavement courses.

    • CivilCraft
    64-bit, stated limit
    6 calculations
    64-bit
  • Cross sections and end-area volumes along an alignment

    Cuts the ground and the design along sample lines square to an alignment, works out cut and fill areas at each section and the volumes between sections.

    • CivilCraft
    64-bit, direct
    10 calculations
    64-bit Open item
  • Culverts, bridges and junctions in a river model

    Works out the headwater above a culvert, the water surface above a bridge, and the flows and water levels where river reaches join, for the steady water surface profile.

    • CivilCraft
    64-bit, stated limit
    8 calculations
    64-bit Open item
  • Cut and fill map, spot levels, sloped pads and free sections

    Works out the depth of cut or fill cell by cell with its volumes, spot levels on a grid, the elevations of a sloped pad or ramp, and a section cut along any line with its cut and fill areas.

    • CivilCraft
    64-bit, stated limit
    8 calculations
    64-bit
  • Cut and fill volumes by the grid method

    The cut, fill and net volume between two surfaces.

    • CivilCraft
    64-bit, stated limit
    2 calculations
    64-bit
  • Data collector files and polar reduction

    Reads total-station field books (RW5, GSI, JobXML, CSV), reduces each shot to coordinates, and prepares directions and distances for the network adjustment.

    • CivilCraft
    64-bit, stated limit
    6 calculations
    64-bit Open item
  • Detention pond hydrology and routing

    Builds a runoff hydrograph, a stage and storage table and an outlet rating, routes the storm through the pond, sizes an orifice, and checks the result.

    • CivilCraft
    64-bit, stated limit
    12 calculations
    64-bit
  • Device number check

    The check on the accuracy page that reports how many bits this device's numbers carry, how many processor threads and how much memory the browser shows, and what it says about the graphics processor.

    Every app 64-bit, direct
    2 calculations
    64-bit
  • Drainage structure types and their library items

    Works out the inside and outside size of a manhole, inlet or junction type, and writes the type as a library item in millimeters and reads it back.

    • CivilCraft
    64-bit, direct
    6 calculations
    64-bit
  • DWG and DXF linework into project units

    Turns the lines, arcs, polylines, splines, ellipses and block references of a drawing into linework, feature lines and survey points in the project's units.

    • CivilCraft
    64-bit, stated limit
    15 calculations in 2 files
    64-bit
  • DWG object values written and read

    Carries the coordinates, angles, widths and scales of drawing objects between the drawing and the DWG file's object records.

    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit, direct
    15 calculations in 3 files
    64-bit Open item
  • DXF reading into the shared drawing model

    Reads an ASCII DXF file into the same model the DWG reader gives, for the apps that list, convert or draw DXF content.

    • CadCraft
    • BimCraft
    • TakeoffCraft
    • CivilCraft
    64-bit, direct
    4 calculations
    64-bit
  • Earthwork balance and haul plan

    Finds the pad level, and the tilt if allowed, at which cut fills the fill, and plans which cut goes to which fill and how far.

    • CivilCraft
    64-bit, stated limit
    9 calculations
    64-bit
  • Earthwork progress from repeat surveys

    Compares dated surveys with the original ground and the design to give volumes done and remaining, percent complete, over-cut and over-fill, stockpiles, and a forecast finish date.

    • CivilCraft
    64-bit, stated limit
    3 calculations
    64-bit
  • Earthwork, route and pond tools: values stored and exported

    Carries the results of the earthwork balancer, the route finder and the pond tools into the project, into CSV files and into the answers given to assistants.

    • CivilCraft
    64-bit, stated limit
    14 calculations in 2 files
    64-bit Open item
  • Elevation grids into survey points and a grid surface

    Places the cells of an elevation raster in the project's coordinates, converts heights between meters and feet, and makes survey points or a triangulated surface from the grid.

    • CadCraft
    • BimCraft
    • CivilCraft
    64-bit, stated limit
    7 calculations
    64-bit
  • Elevation grids read from GeoTIFF and ASCII files

    Reads a terrain grid's position, cell size and elevations from a GeoTIFF or an ESRI ASCII grid, with its scale, offset and no-data value.

    • BimCraft
    • CivilCraft
    64-bit, stated limit
    8 calculations
    64-bit
  • Fault trees and reliability block diagrams

    The probability of a top event, minimal cut sets, importance measures, system reliability and mean time to failure.

    Every app 64-bit, stated limit
    10 calculations
    64-bit Open item
  • Feature line arcs as straight pieces

    Cuts the arcs of a feature line into straight pieces for surfaces, grading, linework and DWG or DXF, and follows a line along an alignment for profile views.

    • CivilCraft
    64-bit, stated limit
    7 calculations
    64-bit
  • Feature line grades, arcs, offsets and crossings

    Works out a feature line's lengths, grades and arcs, sets elevations by grade, offsets the line, and finds where it crosses an alignment.

    • CivilCraft
    64-bit, direct
    15 calculations in 2 files
    64-bit
  • Floats read from USD files

    Reads numbers from .usda and .usdc files, in the type each value is stored as.

    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    32-bit step, flagged
    5 calculations in 2 files
    32-bit in part Open item
  • Flood extent on the ground surface

    Lays the computed river water surface over the ground and gives the flooded area, the waterline and the greatest depth.

    • CivilCraft
    64-bit, stated limit
    5 calculations
    64-bit Open item
  • Flow simulation (discrete events)

    Queues, servers, conveyors, vehicles and resources simulated event by event: utilization, waiting times, throughput and their confidence ranges.

    Every app 64-bit, stated limit
    15 calculations in 2 files
    64-bit Open item
  • Foundation settlement

    Works out the stress under a loaded rectangle, immediate and consolidation settlement of a layered soil, and how settlement develops with time.

    • CivilCraft
    64-bit, stated limit
    10 calculations
    64-bit Open item
  • Freeform mesh objects: quantities and placement on the ground

    Reads a mesh from an STL or OBJ file, works out its volume, surface area, footprint and height, and sets it on or into the terrain.

    • CivilCraft
    64-bit, stated limit
    5 calculations
    64-bit
  • GDSII layout: reals, flattening, areas and checks

    Reading and writing chip layout streams, flattening cell hierarchies, layer areas and the basic width, spacing and area checks.

    Every app 64-bit, stated limit
    12 calculations
    64-bit Open item
  • Gerber and drill file numbers

    The coordinates and sizes written to Gerber layers, drill files and the job file, and read back from them.

    Every app 64-bit, stated limit
    7 calculations
    64-bit Open item

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.