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

  • Rotation about an axis

    The matrix that turns geometry by an angle about an axis through a point.

    R = c I + s [d]× + (1 − c) d dᵀ, c = cos a, s = sin a, a = deg × π ÷ 180; translation = p − R p

    Vectors, plane frames and transforms vec.js
    • PartCraft
    64-bit
  • Reflection in a plane

    The matrix that mirrors geometry in a plane.

    M = I − 2 n nᵀ; translation = 2 (o·n) n

    Vectors, plane frames and transforms vec.js
    • PartCraft
    64-bit
  • Matrix applied to a point

    Transforms a point by a 4 × 4 matrix.

    p′ = M₃ₓ₃ p + t

    Vectors, plane frames and transforms vec.js
    • PartCraft
    64-bit
  • Matrix product

    Multiplies two 4 × 4 matrices.

    C = A B

    Vectors, plane frames and transforms vec.js
    • PartCraft
    64-bit
  • Small linear system

    Solves A x = b for a small dense system.

    Gaussian elimination with partial pivoting, then back substitution

    Vectors, plane frames and transforms vec.js
    • PartCraft
    64-bit
  • Number shown with up to four decimals

    Formats a length or number for display.

    text = value rounded to dp decimals (4 by default); |value| < 10⁻⁹ shown as 0

    Vectors, plane frames and transforms vec.js
    • PartCraft
    64-bit
  • Cage move from the gizmo

    The transform applied to the selected cage vertices while the gizmo is dragged.

    M = W_now × W_start⁻¹

    Freeform cage edits from the workspace ws-form.js
    • PartCraft
    64-bit
  • Point for a new face

    The position stored when a face is drawn by clicks.

    existing vertex within 9 px, else ray ∩ plane y = 0 rounded to 0.001

    Freeform cage edits from the workspace ws-form.js
    • PartCraft
    64-bit
  • Direction of an edge extrusion

    The direction and distance open edges are extruded by.

    d = Σ (edge middle − face center); offset = d ÷ |d| × distance

    Freeform cage edits from the workspace ws-form.js
    • PartCraft
    64-bit
  • Tolerance for joining a new face

    The distance within which a new face's points join existing cage vertices.

    tol = 10⁻⁶ × max(1, size setting)

    Freeform cage edits from the workspace ws-form.js
    • PartCraft
    64-bit
  • Picked point as an anchor

    The anchor position in the part's own axes and the face normal at the pick.

    p = M⁻¹ p_pick, each coordinate rounded to 6 decimals; n = (b − a) × (c − a) ÷ length

    Anchor points of manual annotations ws-illustrate.js
    • PartCraft
    64-bit
  • Is a face square to the tool axis

    Decides whether a picked flat or round face can be machined from the setup's tool axis.

    accepted when ||n·axis| − 1| ≤ 10⁻⁹

    Machining picks and readouts ws-manufacture.js
    • PartCraft
    64-bit
  • Matching a pick to one already stored

    Decides whether a clicked face is already in the operation's geometry, to add or remove it.

    same when names agree and |at − ref| < 10⁻³

    Machining picks and readouts ws-manufacture.js
    • PartCraft
    64-bit
  • Numbers shown in the panel

    Formats stock sizes, feeds, gouge depth and remaining stock for the panel.

    text = value rounded to dp decimals (3 by default), trailing zeros dropped

    Machining picks and readouts ws-manufacture.js
    • PartCraft
    64-bit
  • Rounding for the panel

    Rounds a result to a few significant digits before the panel words it.

    Advanced simulation add-on: result summary and color bands addons/advanced-sim/lib/results.js
    • PartCraft
    64-bit
  • Summary rows

    The load reached, largest displacement and stress, plastic strain, contact force and penetration of a result.

    load = √(F_x² + F_y² + F_z²) × λ; penetration % = 100 × penetration ÷ h

    Advanced simulation add-on: result summary and color bands addons/advanced-sim/lib/results.js
    • PartCraft
    64-bit
  • Color bands and legend

    Splits the plot mesh into bands of equal value range and gives each band's limits.

    band = floor((v − lo) ÷ (hi − lo) × n), clamped to 0 … n − 1; limits: lo + (hi − lo) × i ÷ n

    Advanced simulation add-on: result summary and color bands addons/advanced-sim/lib/results.js
    • PartCraft
    64-bit
  • Permeability of free space

    The constant μ0 used in every hand formula.

    μ0 = 4 × 10⁻⁷ × π

    Magnetics add-on: template shapes and hand formulas addons/magnetics/lib/templates.js
    • PartCraft
    64-bit
  • Round conductor as a polygon

    The corners of the polygon that stands for a round wire.

    pᵢ = (cx + r cos(2πi ÷ n), cy + r sin(2πi ÷ n)), n = 48

    Magnetics add-on: template shapes and hand formulas addons/magnetics/lib/templates.js
    • PartCraft
    64-bit
  • C-core gap field

    The flux density in the air gap of a C-core electromagnet by the magnetic circuit formula.

    B = μ0 × NI ÷ ((g + l ÷ μr) × 10⁻³), l = 2(w − tk) + 2(h − tk) − g

    Magnetics add-on: template shapes and hand formulas addons/magnetics/lib/templates.js
    • PartCraft
    64-bit
  • Magnet in a closed iron frame

    The flux density in a permanent magnet set in one leg of a closed frame.

    B = Br × (lm ÷ μrm) ÷ (lm ÷ μrm + L ÷ μr), L = 2(w − tk) + 2(h − tk) − lm

    Magnetics add-on: template shapes and hand formulas addons/magnetics/lib/templates.js
    • PartCraft
    64-bit
  • Field round one wire

    The flux density at two radii from the center of a round conductor.

    B = μ0 × I ÷ (2π × r × 10⁻³), r = 2a

    Magnetics add-on: template shapes and hand formulas addons/magnetics/lib/templates.js
    • PartCraft
    64-bit
  • Force between two wires

    The force per meter between two parallel conductors.

    F = μ0 × |I₁ × I₂| ÷ (2π × d × 10⁻³)

    Magnetics add-on: template shapes and hand formulas addons/magnetics/lib/templates.js
    • PartCraft
    64-bit
  • Template sizes within their ranges

    Clamps each size a person types to the template's allowed range.

    Magnetics add-on: template shapes and hand formulas addons/magnetics/lib/templates.js
    • PartCraft
    64-bit
  • Mesh volume

    The signed volume enclosed by a triangle mesh.

    V = Σ a·(b × c) ÷ 6

    Mesh volume, area and watertightness checks field/measure.js
    • PartCraft
    64-bit
  • Mesh area

    The total area of a triangle mesh.

    A = Σ |(b − a) × (c − a)| ÷ 2

    Mesh volume, area and watertightness checks field/measure.js
    • PartCraft
    64-bit
  • Closed and manifold checks

    Counts open, non-manifold and flipped edges, bad vertices, pieces and the Euler number.

    Euler number = vertices used − edges + triangles

    Mesh volume, area and watertightness checks field/measure.js
    • PartCraft
    Exact
  • Anchor point as assembled

    Where an annotation's anchor sits when the parts are assembled.

    Manual annotations: measured lengths, angles and radii illustrate/annotate.js
    • PartCraft
    64-bit
  • Circle through three points

    The center and radius of the circle through three points.

    n = ab × ac; c = a + ((n × ab)|ac|² + (ac × n)|ab|²) ÷ (2|n|²); r = |c − a|

    Manual annotations: measured lengths, angles and radii illustrate/annotate.js
    • PartCraft
    64-bit
  • Measured value

    The length, angle or radius an annotation shows.

    length = |P₁ − P₀|; angle = acos(û·ŵ) × 180 ÷ π; radius from the circle through three points

    Manual annotations: measured lengths, angles and radii illustrate/annotate.js
    • PartCraft
    64-bit
  • Significand width of a number

    How many bits of a number this device keeps.

    bits = the first n where 1 + 2⁻ⁿ = 1

    Device number check accuracy.js Every app
    Exact
  • Digits of a graphics float

    The number of significant digits stated for the graphics processor's float type.

    bits < 23: digits = max(1, ⌊(bits + 1) × log₁₀ 2⌋); bits ≥ 23: the fixed text "about 7"

    Device number check accuracy.js Every app
    64-bit
  • Size and position text

    A dimension, port size or port position as text in millimeters.

    text = round(x × 10⁴) ÷ 10⁴

    Library configurator sizes library-configurator.js Every app
    64-bit
  • Option value used for matching

    The text an option value is compared by when the page picks the variant that matches the selected options.

    numbers: round(v × 10⁴) ÷ 10⁴ as text; other values: trimmed text

    Library configurator sizes library-configurator.js Every app
    64-bit
  • Required and found values as text

    A limit or a measured value in words, such as ≤ 196.85 mm or 863.6–965.2 mm.

    text = round(x × 100) ÷ 100, then the unit

    Check report values problems.js Every app
    64-bit
  • Built-in unit factors

    The factor from each built-in unit of mass, time, force, pressure, energy, power, current, voltage and volume to SI.

    lb = 0.45359237 kg; lbf = 4.4482216152605 N; psi = 6894.757293168 Pa; psf = 47.88025898 Pa

    Calc sheet units, functions and driven parameters calc.js Every app
    64-bit
  • Constants and fallback lengths

    pi, e, standard gravity g0, and the length units used when no unit table is given.

    g0 = 9.80665 m/s²; in = 0.0254 m; ft = 0.3048 m; yd = 0.9144 m

    Calc sheet units, functions and driven parameters calc.js Every app
    64-bit
  • Unit lookup

    The SI factor and dimension of a unit name.

    deg = π ÷ 180; rad = 1

    Calc sheet units, functions and driven parameters calc.js Every app
    64-bit
  • Dimension comparison

    Whether two values have the same dimensions, so they can be added, compared or converted.

    |aᵢ − bᵢ| < 1e-9 for each of the five exponents

    Calc sheet units, functions and driven parameters calc.js Every app
    64-bit
  • Power

    a ^ b for a value with units.

    value = aᵇ; dimensions × b

    Calc sheet units, functions and driven parameters calc.js Every app
    64-bit
  • Conversion with to

    M to kN m: checks the dimension and records the unit to show the answer in.

    shown = value ÷ factor of the target unit

    Calc sheet units, functions and driven parameters calc.js Every app
    64-bit
  • Shown amount

    The number and unit a row displays, and the amount passed to other modules.

    amount = value ÷ factor

    Calc sheet units, functions and driven parameters calc.js Every app
    64-bit
  • Square root and absolute value

    sqrt(a) and abs(a) for a value with units.

    √a halves the dimensions

    Calc sheet units, functions and driven parameters calc.js Every app
    64-bit
  • Rounding to a step

    round, floor and ceil, with an optional step such as round(x, 5 mm).

    round(a ÷ s) × s

    Calc sheet units, functions and driven parameters calc.js Every app
    64-bit
  • Minimum, maximum, sum and average

    min, max, sum and avg of values of one kind.

    sum = Σ aᵢ in order; avg = sum ÷ n

    Calc sheet units, functions and driven parameters calc.js Every app
    64-bit
  • Trigonometry, logarithms and exponent

    sin, cos, tan, their inverses, atan2, ln, log10, exp and pow.

    sin, cos, tan of radians; asin, acos need |x| ≤ 1; ln, log10 need x > 0

    Calc sheet units, functions and driven parameters calc.js Every app
    64-bit
  • Reading an app parameter

    @Name: the app's parameter as a value in SI.

    value = parameter value × factor of its unit

    Calc sheet units, functions and driven parameters calc.js Every app
    64-bit
  • Values written to driven parameters

    What each drive would set in the app: the row's answer in the parameter's unit.

    value = row value ÷ factor of the unit; change when |current − value| > 1e-9 × max(1, |value|)

    Calc sheet units, functions and driven parameters calc.js Every app
    64-bit
  • Rotation about an axis

    The rotation matrix for an angle about an axis.

    R = cos θ I + sin θ [a]× + (1 − cos θ) a aᵀ

    Rotations, transforms and small linear algebra (motion) math.js Every app
    64-bit
  • Roll, pitch and yaw from a matrix

    The three angles of a rotation matrix.

    pitch = asin(−R₃₁); roll = atan2(R₃₂, R₃₃); yaw = atan2(R₂₁, R₁₁)

    Rotations, transforms and small linear algebra (motion) math.js Every app
    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.