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.
Calculations
-
Cut set probabilities and bounds
The probability of each minimal cut set and two bounds on the top event.
rare event: min(1, Σ P(cut set)); upper bound: 1 − Π (1 − P(cut set))
Fault trees and reliability block diagrams logic.js Every app64-bit -
Importance measures
How much each event matters to the top event.
Birnbaum = P(top | p = 1) − P(top | p = 0); Fussell–Vesely = (P − P₀) ÷ P; RAW = P₁ ÷ P; RRW = P ÷ P₀
Fault trees and reliability block diagrams logic.js Every app64-bit -
Reliability of a component
The chance a block still works at the mission time.
R = e^(−λt); Weibull: R = e^(−(t ÷ η)^β)
Fault trees and reliability block diagrams logic.js Every app64-bit -
Block diagram reliability
The reliability of series, parallel and k-of-n arrangements.
series = OR of failures; parallel = AND; reliability = 1 − P(failure)
Fault trees and reliability block diagrams logic.js Every app64-bit -
Mean time to failure
The mean life of a system that is not repaired.
MTTF = ∫ R(t) dt by Simpson's rule, 4000 steps, to the time R ≤ 1e-9
Fault trees and reliability block diagrams logic.js Every app64-bit -
Common-cause split
The independent and the shared part of a failure rate.
independent = λ (1 − β); common = λ β
Fault trees and reliability block diagrams logic.js Every app64-bit -
Gamma function
Γ(x), used for the mean life.
Lanczos approximation, g = 7, 9 coefficients; reflection below 0.5
Weibull life data weibull.js Every app64-bit -
Weibull distribution functions
Failure probability, reliability, density, hazard, quantile, mean and B-life.
F = 1 − e^(−(t ÷ η)^β); quantile = η (−ln(1 − F))^(1 ÷ β); mean = η Γ(1 + 1 ÷ β)
Weibull life data weibull.js Every app64-bit -
Log-likelihood
How well a shape and scale explain the failure and suspension times.
Σ failures ln f(t) + Σ suspended ln R(t)
Weibull life data weibull.js Every app64-bit -
Maximum-likelihood fit
Shape, scale and their confidence bounds from failure times, with suspensions.
g(β) = Σ tᵝ ln t ÷ Σ tᵝ − 1 ÷ β − mean ln t = 0; η = (Σ tᵝ ÷ r)^(1 ÷ β)
Weibull life data weibull.js Every app64-bit -
Median ranks
The plotting position of each failure, adjusted for suspended units.
F = (rank − 0.3) ÷ (n + 0.4); rank increment = (n + 1 − previous rank) ÷ (1 + units at or after this one)
Weibull life data weibull.js Every app64-bit -
Rank regression fit
Shape and scale from a straight line on the Weibull plot.
β = S_xy ÷ S_xx on (ln t, ln(−ln(1 − F))); η = e^(−a ÷ β)
Weibull life data weibull.js Every app64-bit -
Duration drawn for a task
One trial's duration of a task given as minimum, most likely and maximum.
u < f: min + √(u (max − min)(mode − min)); else max − √((1 − u)(max − min)(max − mode)); duration = round(v)
Schedule risk (Monte Carlo) simulate.js Every app64-bit -
Finish percentiles, mean and spread
The finish day at each confidence level over all trials.
P = sorted[⌈p × n⌉ − 1]; mean = Σ ÷ n; sd = √(Σ (x − mean)² ÷ n)
Schedule risk (Monte Carlo) simulate.js Every app64-bit -
Criticality and sensitivity
The share of trials in which a task was critical, and the correlation of its duration with the finish.
criticality = times critical ÷ n; sensitivity = Σ (d − d̄)(F − F̄) ÷ √(Σ (d − d̄)² × n × sd²)
Schedule risk (Monte Carlo) simulate.js Every app64-bit -
Source signals
Step, ramp, sine and pulse sources as functions of time.
sine: offset + amp × sin(2π f t + phase); ramp: v₀ + (v₁ − v₀)(t − t₀) ÷ (t₁ − t₀)
Lumped system models model.js Every app64-bit -
Resistive element laws
The flow through a resistor, damper, orifice, diode or user law for a given difference across it.
resistor: i = v ÷ R; orifice: i = v ÷ √(K √(v² + ε²)); diode: i = Is (e^(v ÷ nVt) − 1), a straight line above 40 nVt
Lumped system models model.js Every app64-bit -
Storage elements
Capacitors, masses, tanks, inductors and springs: what they store and how it enters the equations.
capacitive: i + d(C v)/dt = 0; inductive: v + d(L i)/dt = 0; spring: L = 1 ÷ k
Lumped system models model.js Every app64-bit -
Reported flow through an element
The current, heat flow, flow or force reported for an element.
the element's law at the solved state; diode: Is (e^(min(v, 40 nVt) ÷ nVt) − 1)
Lumped system models model.js Every app64-bit -
Dense linear solve
Solves the Newton step.
Gaussian elimination with partial pivoting
Lumped system models solve.js Every app64-bit -
Newton iteration
Finds the state that satisfies the equations at one time.
J_ij = (F_i(x + h e_j) − F_i(x − h e_j)) ÷ 2h, h = 1e-7 × max(|x_j|, 1); stop when |Δxᵢ| ≤ rtol |xᵢ| + atol + 1e-11 × max(1, largest |x|)
Lumped system models solve.js Every app64-bit -
Operating point
The steady state, or the state set by the given initial values.
one Newton solve from zero
Lumped system models solve.js Every app64-bit -
One time step
The state one step later.
trapezoid: (2 ÷ h)(S − S₀) − Ṡ₀ + g = 0; backward Euler: (1 ÷ h)(S − S₀) + g = 0
Lumped system models solve.js Every app64-bit -
Step-size control
Chooses the time step from an estimate of the error, when adaptive stepping is on.
err = max |x(two half steps) − x(one step)| ÷ (rtol |x| + atol), ÷ 3 for the trapezoid; h ← h × clamp(0.9 err^(−1/3), 0.2, 5)
Lumped system models solve.js Every app64-bit -
Value between stored times
A node value at a time between two computed points.
y = y₀ + (y₁ − y₀)(t − t₀) ÷ (t₁ − t₀)
Lumped system models solve.js Every app64-bit -
Parameter expressions
The value of a parameter written as an expression, such as 2*3.3e3.
numbers, parameters, + − × ÷ ^, brackets, pi
Lumped system models modelica.js Every app64-bit -
Thermal conductance to resistance
A thermal conductor from a model file as the engine's thermal resistance.
R = 1 ÷ G
Lumped system models modelica.js Every app64-bit -
Convex outline test
Whether a closed outline has no inward corner.
Back-outs clipped out of areas geom.js64-bit- TakeoffCraft
-
Polygon clipped to a convex polygon
The part of a polygon that lies inside a convex polygon.
t = d₁ ÷ (d₁ − d₂); corner = p + (q − p)·t
Back-outs clipped out of areas geom.js64-bit- TakeoffCraft
-
Area a back-out covers
How much of an area mark (outline minus cut-outs) a convex back-out covers, in square PDF units.
overlap = max(0, A(outline ∩ b) − Σ A(cut-out ∩ b))
Back-outs clipped out of areas geom.js64-bit- TakeoffCraft
-
Net area shown for a mark
The area in a mark's properties after its back-outs are taken off.
net = max(0, area − cut); plan area = max(0, plan − cut ÷ factor)
Back-outs clipped out of areas takeoffcraft.js64-bit- TakeoffCraft
-
One CAD object as points and bulges
The run or outline that stands for a line, arc, circle, polyline, ellipse, spline or 2D solid.
arc: p = c + r·(cos a, sin a), b = tan(sweep ÷ 4); ellipse: n = max(24, ⌈1440·sweep ÷ 2π⌉) chords
Lengths and areas taken from CAD objects cadgeom.js64-bit- TakeoffCraft
-
Hatch as outlines with holes
The outer loops of a hatch, each with the loops inside it as cut-outs.
Lengths and areas taken from CAD objects cadgeom.js64-bit- TakeoffCraft
-
Object placed on the sheet
Applies the sheet or viewport matrix to an object's points and decides whether a viewport shows it.
p′ = T·(mirror·x, y); b′ = b × sign(det T × mirror)
Lengths and areas taken from CAD objects cadgeom.js64-bit- TakeoffCraft
-
Marks made from picked objects
The point lists a linear or an area item takes from the picked objects.
Lengths and areas taken from CAD objects cadgeom.js64-bit- TakeoffCraft
-
Length and area of what is picked
The total length or net area of the picked objects in page units.
len = Σ length; area = Σ (gross − cut-outs)
Lengths and areas taken from CAD objects cadgeom.js64-bit- TakeoffCraft
-
Picked objects in real units
The length or area of the picked CAD objects shown above the sheet.
SF = area × k²; ft = len × k
Lengths and areas taken from CAD objects takeoffcraft.js64-bit- TakeoffCraft
-
Bézier curves cut into chords
Turns each cubic or quadratic curve of the page into 8 straight segments.
B(t) = u³p₀ + 3u²t·c₁ + 3u·t²·c₂ + t³p₃, u = 1 − t, t = s ÷ 8
Snapping to and measuring the sheet's own linework snap.js64-bit- TakeoffCraft
-
Where two segments cross
The crossing point of two segments, offered as a snap point.
u = ((c − a) × s) ÷ (r × s); point = a + r·u
Snapping to and measuring the sheet's own linework snap.js64-bit- TakeoffCraft
-
Snap point for a picked point
The end point, midpoint, intersection or nearest point on a line within the snap distance.
Snapping to and measuring the sheet's own linework snap.js64-bit- TakeoffCraft
-
Connected path through a segment
The segment that was clicked and everything joined to it end to end within the gap tolerance.
Snapping to and measuring the sheet's own linework pickpath.js64-bit- TakeoffCraft
-
Next segment at a junction
Chooses which segment a path continues along from an end point.
score = turn angle + (0.01 when the ends are more than 1e-9 apart)
Snapping to and measuring the sheet's own linework pickpath.js64-bit- TakeoffCraft
-
Vertices of a picked path
The points of the path in order, as they will be stored in the mark.
Snapping to and measuring the sheet's own linework pickpath.js64-bit- TakeoffCraft
-
Length of a picked path
The length of the path in sheet units.
L = Σ |pᵢ − pᵢ₋₁|
Snapping to and measuring the sheet's own linework pickpath.js64-bit- TakeoffCraft
-
Area of a picked loop
The area inside a closed path in square sheet units.
A = |Σ (xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ)| ÷ 2
Snapping to and measuring the sheet's own linework pickpath.js64-bit- TakeoffCraft
-
Closed loops around a clicked point
Finds the closed paths that have the clicked point inside, smallest first.
Snapping to and measuring the sheet's own linework pickpath.js64-bit- TakeoffCraft
-
A CAD sheet's lines for snapping
The drawing's own line segments in page units, through the sheet and viewport matrices.
Snapping to and measuring the sheet's own linework cadset.js64-bit- TakeoffCraft
-
Picked path in real units
The length and area of what is picked, shown while picking.
ft = L × k; SF = A × k²
Snapping to and measuring the sheet's own linework takeoffcraft.js64-bit- TakeoffCraft
-
Room around a point
Flood-fills the room and returns its outline in pixel corners.
Room outline by flood fill roomfill.js64-bit- TakeoffCraft
-
Outline traced along pixel edges
Walks the outer boundary of the filled region, corner by corner.
Room outline by flood fill roomfill.jsExact- TakeoffCraft
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.