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.

  • Splines: curve points, fitting and editing

    Evaluates a spline, builds one through fit points or from control points, turns it into points for drawing and measuring, and inserts control points without changing the curve.

    • CadCraft
    64-bit, stated limit
    12 calculations in 2 files
    64-bit Open item
  • Sprinkler layout and hydraulic calculation

    Places sprinkler heads on a grid in a room, builds the branch and main network, sizes the pipes and finds the pressure and flow the design area needs against the water supply.

    • BimCraft
    64-bit, stated limit
    16 calculations in 3 files
    64-bit Open item
  • Stack plume rise and air dispersion screening

    Works out the effective height of a stack plume, the worst-case and hour-by-hour ground concentrations at receptors, and the contours drawn on a plan.

    • CadCraft
    • BimCraft
    64-bit, stated limit
    10 calculations in 2 files
    64-bit Open item
  • Standard part templates

    Builds a parametric part for a standard bolt, nut, washer, pin, bearing or key at a size from the standards tables.

    • PartCraft
    64-bit, stated limit
    4 calculations
    64-bit Open item
  • Standard sections: member solids, mass and parts list

    Builds a steel member as a solid from a standard section, shows a section's mass per meter, and totals the placed parts into a parts list.

    • CadCraft
    64-bit, stated limit
    4 calculations
    64-bit
  • Statistical comparison of rendered pictures

    Decides whether two renderers give the same picture, and whether a test scene returns the expected brightness, by comparing block means against the pictures' own noise.

    • BimCraft
    • ModelCraft
    64-bit, stated limit
    5 calculations
    64-bit
  • Steel member checks on a solved frame

    Runs the steel code checks along every member for every strength combination, finds the governing ratio, checks the deflection limit, and finds what gives way first.

    • CadCraft
    • BimCraft
    • DetailCraft
    64-bit, stated limit
    12 calculations in 2 files
    64-bit
  • Steel member resistance to EN 1993-1-1

    The design resistances of a rolled I or H section: classification, tension, bending, shear, buckling, lateral-torsional buckling and the combined checks.

    • CadCraft
    • BimCraft
    • DetailCraft
    64-bit, stated limit
    11 calculations
    64-bit Open item
  • Steel member strength to AISC 360-16

    The design strengths of a rolled I-shape in tension, compression, bending and shear, and the combined bending and axial check.

    • CadCraft
    • BimCraft
    • DetailCraft
    64-bit, stated limit
    12 calculations
    64-bit Open item
  • Steel profiles: area, mass per meter and sizes

    Looks up a steel section or builds a plate or custom profile, and gives its outline, area, mass per meter, width, depth and perimeter.

    • DetailCraft
    64-bit, stated limit
    5 calculations
    64-bit
  • STEP curves and surfaces: parameters from points

    Finds where a 3D point of an edge lies on a free-form curve or surface, so the face it bounds can be laid out flat and triangulated.

    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit, stated limit
    5 calculations
    64-bit
  • STEP files of NURBS curves and surfaces

    Writes B-spline curves and surfaces, with their trims, to a STEP file in millimeters and reads such files back.

    • ModelCraft
    • PartCraft
    64-bit, stated limit
    7 calculations
    64-bit
  • STEP import: triangles for curved faces

    Turns each face of an imported STEP solid into triangles that stay within a chord tolerance of the true surface and share their edge points with the neighboring faces.

    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit, stated limit
    14 calculations
    64-bit
  • Stock simulation and machining time

    Simulates the stock being cut by every tool move, reports material removed, stock left and gouges, and estimates the machining time.

    • PartCraft
    64-bit, stated limit
    8 calculations
    64-bit
  • Storm drainage: rational method, pipe sizing and grade lines

    Works out the runoff reaching each pipe, the pipe size that carries it, and the hydraulic and energy grade lines through the network.

    • CivilCraft
    64-bit, stated limit
    9 calculations
    64-bit Open item
  • Storm hydrographs routed through the pipe network

    Carries each catchment's runoff over time down the pipes and reports the peak flow, its time and the attenuation at every pipe and structure.

    • CivilCraft
    64-bit, stated limit
    6 calculations
    64-bit Open item
  • Straight stair geometry

    Works out the risers, treads, pitch and the stringer and tread parts of a straight steel stair from its rise, going and width.

    • DetailCraft
    64-bit, stated limit
    4 calculations
    64-bit
  • Sun gain through windows

    Works out the heat the sun brings through each window over one clear day: the gain at each time step, the peak and the daily total.

    • BimCraft
    64-bit, stated limit
    4 calculations
    64-bit
  • Sun position

    Works out where the sun is for a date, time and place: azimuth, altitude with refraction, declination and the equation of time.

    • CivilCraft
    64-bit, stated limit
    3 calculations
    64-bit
  • Sun position and light on a tilted plane for solar

    Gives the sun's direction for each solar hour and the direct, sky and ground-reflected light falling on a module plane, from a clear-sky model or typed monthly totals.

    • BimCraft
    • CivilCraft
    64-bit, stated limit
    8 calculations
    64-bit
  • Sun position for shadows

    The sun's altitude and azimuth for a date, clock time, latitude, longitude and time zone, and the direction shadows are cast from.

    • CadCraft
    • BimCraft
    • ModelCraft
    • CivilCraft
    64-bit, stated limit
    5 calculations
    64-bit
  • Supplier stock and lead-time check

    Reads a supplier's stock list and checks each quantity the model needs against it: how much is short, and how long the wait is.

    • TakeoffCraft
    • DetailCraft
    64-bit, stated limit
    12 calculations in 2 files
    64-bit
  • Supports preview and material estimate

    Finds the faces that overhang past an angle, places simple column or tree supports under them, and estimates the support material.

    • ModelCraft
    64-bit, stated limit
    5 calculations
    64-bit
  • Surface features built with the kernel

    Makes freeform surface bodies and turns them into solids: patches, lofts, network surfaces, offsets, thickened and stitched surfaces.

    • PartCraft
    64-bit, stated limit
    8 calculations
    64-bit
  • Surface through a network of curves

    Builds one B-spline surface that passes through a grid of profile curves and guide curves, and reports how far it strays from them.

    • PartCraft
    64-bit, stated limit
    19 calculations
    64-bit
  • Survey levels from text and the survey check

    Reads spot levels written as text or block attributes into points with a height, and checks a surveyor's drawing for unit, origin, flat-contour, outlier and duplicate problems.

    • CadCraft
    • BimCraft
    • CivilCraft
    64-bit, stated limit
    6 calculations
    64-bit
  • Survey network adjustment

    Adjusts a survey network or a leveling run by least squares, closes a traverse by the compass rule, and reports residuals, the variance factor and error ellipses.

    • CivilCraft
    64-bit, stated limit
    10 calculations
    64-bit Open item
  • Survey point files: reading and writing

    Reads survey points from CSV or text files, counts them by description group, and writes them back as a PNEZD file.

    • CivilCraft
    64-bit, stated limit
    3 calculations
    64-bit
  • Tapered, revolved and swept solids

    Builds a solid from a 2D outline: an extrusion with tapered sides, a revolution about an axis, or a sweep along a path.

    • CadCraft
    64-bit, stated limit
    6 calculations
    64-bit
  • Tetrahedral mesh of a part

    Builds the tetrahedral analysis mesh of a solid from its surface triangles: element sizes, inside and outside, cut points on the surface, boundary vertices on the true faces, and the mesh quality and volume that are reported.

    • PartCraft
    64-bit, stated limit
    20 calculations
    64-bit
  • Tetrahedral stress, vibration and buckling solve

    Assembles the stiffness of the tetrahedral model, applies supports and loads, and solves for displacements, natural frequencies and the pre-stress of a buckling study.

    • PartCraft
    64-bit, stated limit
    12 calculations in 2 files
    64-bit
  • Text from drawings as stroked edges

    The line segments that draw the text of an imported drawing in the 3D model, and the width of a string.

    • CadCraft
    • ModelCraft
    • PartCraft
    64-bit, stated limit
    3 calculations
    64-bit
  • Text positions: search hits and the OCR text layer

    Works out where a found word sits on the sheet, the cloud drawn round it, and where the words read from a scanned page are placed.

    • MarkupCraft
    64-bit, stated limit
    6 calculations in 2 files
    64-bit
  • Text width from built-in font metrics

    The width of a text string, used to size and wrap text boxes in the markup.

    • MarkupCraft
    64-bit, stated limit
    2 calculations
    64-bit
  • Thread dimensions and modeled threads

    Works out a thread's diameters and profile from its size, picks the size that fits a round face, and builds the helical solid of a modeled thread.

    • PartCraft
    64-bit, stated limit
    8 calculations
    64-bit Open item
  • Threaded solver kernels and conjugate gradients

    Runs the matrix products, dot products and vector updates of the simulation solvers on several threads, and the conjugate-gradient solves built on them.

    • PartCraft
    64-bit, stated limit
    12 calculations
    64-bit
  • Three-phase flash

    Splits a mixture into a vapor and two liquids at a temperature and pressure with an activity-coefficient model.

    • CadCraft
    • BimCraft
    64-bit, stated limit
    4 calculations
    64-bit
  • Time of day, date and exposure from plain words

    Works out the clock hour for a named time of day (dawn, noon, golden hour, dusk and so on), the date for a season, and the exposure for the weather.

    • ModelCraft
    64-bit, stated limit
    3 calculations
    64-bit
  • Tolerance stack-ups

    Adds up a chain of dimensions and their tolerances across an assembly: the nominal and mean gap, the worst-case and statistical spread, each link's share, and the share of assemblies expected outside the limits.

    • PartCraft
    64-bit, stated limit
    10 calculations
    64-bit Open item
  • Traced sketch into model edges

    Turns the lines, arcs and circles traced from a photo of a hand sketch into straight edges on the ground.

    • ModelCraft
    64-bit, stated limit
    1 calculation
    64-bit
  • Tracing a scan into lines and arcs

    Turns the black-and-white pixels of a scanned drawing into lines and arcs, cleans them up, and offers their ends, middles, centers and crossings as snap points.

    • CadCraft
    • BimCraft
    • ModelCraft
    • CivilCraft
    • PartCraft
    64-bit, stated limit
    10 calculations in 2 files
    64-bit Open item
  • Transition curves and sampled alignment geometry

    Evaluates the six kinds of transition curve (clothoid, cubic parabola, Bloss, Helmert, sine half-wave, sine), finds the nearest point on one, and cuts curves into straight pieces for linework.

    • CivilCraft
    64-bit, stated limit
    12 calculations
    64-bit
  • Trees, people and cars from numbers

    Generates the mesh and plan symbol of each starter tree, shrub, rock, person and car from a size and a seed.

    • ModelCraft
    64-bit, stated limit
    7 calculations
    64-bit
  • Trim

    Cuts a line, arc, circle, polyline or construction line at the objects that cross it and keeps or removes the pieces.

    • CadCraft
    64-bit, stated limit
    4 calculations
    64-bit Open item
  • Trimmed surfaces: loops, cut tessellation and area

    Keeps the part of a surface inside trim loops drawn in its (u, v) plane, cuts the tessellation along them and reports the area of the part shown.

    • ModelCraft
    • PartCraft
    64-bit, stated limit
    11 calculations
    64-bit Open item
  • Truss geometry, cut list and shop outputs

    Builds the centerline frame of a truss from its type or from the roof's section, and produces the cut list, joint schedule, jig drawing, stock plan, 3D members and CAD drawings.

    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit, stated limit
    26 calculations in 7 files
    64-bit Open item
  • Truss layout over a roof

    Sets out the trusses along a roof: where each one stands, its span, and which trusses share a design, including hip-end girders and jacks and valley sets.

    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit, stated limit
    9 calculations in 2 files
    64-bit Open item
  • Turning a face mesh back into an extrusion

    Recognizes a closed triangle mesh that is a straight prism and rewrites it in the IFC file as an outline pulled along a depth, so it stays editable.

    • BimCraft
    64-bit, stated limit
    6 calculations
    64-bit Open item
  • Units and tolerance read from a 3DM file

    The size of one file unit in meters and the modeling tolerance of an opened 3DM file.

    • ModelCraft
    • PartCraft
    64-bit, stated limit
    2 calculations
    64-bit
  • Unsteady flow routing down a river

    Routes a flood hydrograph down the cross-sections of a river model and reports water levels, flows, their peaks and a volume balance over time.

    • CivilCraft
    64-bit, stated limit
    6 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.