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
-
Convert between two units
A value in one unit as a value in another unit of the same kind.
result = v × (n₁ × d₂) ÷ (d₁ × n₂)
Unit conversion unit-table.js Every appExact -
Typed text to a unit
What was typed, with its unit, as a value in the unit the field wants.
3 yd typed into a feet field = convert(3, yd, ft) = 9
Unit conversion unit-table.js Every appExact -
A value to the base unit
A number in any unit as meters, square meters, cubic meters, radians or rise over run.
base = v × n ÷ d (v × π × n ÷ d for degrees and gons)
Unit conversion unit-table.js Every app64-bit -
A base value to a unit
A stored base value as a number in the unit shown.
value = base × d ÷ n (base ÷ π × d ÷ n for degrees and gons)
Unit conversion unit-table.js Every app64-bit -
Task duration
A task's duration in days, counting its start and finish day.
duration = finish − start + 1
Construction schedule dates and critical path schedule-io.jsExact- BimCraft
-
Date read from a project file
Turns a date and time from a project XML file into a day number.
day = date part of the text
Construction schedule dates and critical path schedule-io.jsExact- BimCraft
-
Link lag read from a project file
Converts a dependency's lag from tenths of a minute to whole days.
lag (days) = Math.round(LinkLag ÷ 10 ÷ minutes per day)
Construction schedule dates and critical path schedule-io.js64-bit- BimCraft
-
Offset of each dependency
Turns each link type and lag into the least number of days between the two tasks' starts.
FS: d = dur_pred + lag; SS: lag; FF: dur_pred + lag − dur_succ; SF: lag − dur_succ
Construction schedule dates and critical path schedule-io.jsExact- BimCraft
-
Early and late dates, float and the critical path
Each task's earliest start and finish, latest start and finish, float, and whether it is critical.
ES = max(own start, ES_pred + d); EF = ES + dur − 1; LS = min(finish − dur + 1, LS_succ − d); float = LS − ES
Construction schedule dates and critical path schedule-io.jsExact- BimCraft
-
Unit sizes
Builds each unit's row: its fraction of the base unit and the factor used for quick conversion.
factor = n ÷ d (× π for degrees and gons)
Unit table: reading and writing values unit-table.js Every appExact -
Numbers and fractions
Reads 6, 6.5, 6 1/2, 6-1/2 or 1/2 as a number.
whole + numerator ÷ denominator
Unit table: reading and writing values unit-table.js Every app64-bit -
Feet and inches
Reads 12'6", 12'-6 1/2" or 6" as inches.
inches = feet × 12 + inches
Unit table: reading and writing values unit-table.js Every app64-bit -
Degrees, minutes and seconds
Reads 45°30'15" or 45d30m15s as degrees.
degrees + minutes ÷ 60 + seconds ÷ 3600
Unit table: reading and writing values unit-table.js Every app64-bit -
Slopes
Reads 2%, 3H:1V, 1:3 or 6/12 as a grade (rise over run).
percent ÷ 100; H:V → V ÷ H; rise:run → rise ÷ run
Unit table: reading and writing values unit-table.js Every app64-bit -
Writing feet and inches
Writes a length as feet, inches and a fraction of an inch.
n = round(|inches| × den); feet = ⌊n ÷ 12den⌋; inches = ⌊rest ÷ den⌋; fraction = rest ÷ den, reduced
Unit table: reading and writing values unit-table.js Every app64-bit -
Writing degrees, minutes and seconds
Writes an angle as degrees, minutes and seconds.
t = round(|degrees| × 3600 × 10^dec); split by 3600 and 60
Unit table: reading and writing values unit-table.js Every app64-bit -
Writing decimals
Writes a number with a fixed count of decimals.
text = v.toFixed(dec)
Unit table: reading and writing values unit-table.js Every app64-bit -
Date text as a day number
A YYYY-MM-DD date as a count of days since 1970-01-01.
day = Date.UTC(y, m, d) ÷ 86400000
4D schedule dates and status ifc-4d.jsExact- BimCraft
-
Built, in progress or waiting on a date
The state of every element that belongs to a task, on a chosen day.
built if day > finish; in progress if start ≤ day ≤ finish; waiting if day < start
4D schedule dates and status ifc-4d.jsExact- BimCraft
-
Task counts of a stage or package
How many tasks of a group are done, running and still to do on a day.
4D schedule dates and status ifc-4d.jsExact- BimCraft
-
Time of day to seconds
Turns HH:MM text into seconds.
seconds = h × 3600 + m × 60
Shift calendar working time addons/flow/lib/calendar.jsExact- ModelCraft
-
Weekly on-intervals
The merged list of on-intervals in a week, with windows that pass midnight wrapped.
length = to − from (+ one day if the end is not after the start)
Shift calendar working time addons/flow/lib/calendar.jsExact- ModelCraft
-
On time between two instants
The total seconds the calendar is on between two times.
Σ (off − on) over the on-intervals inside [a, b]
Shift calendar working time addons/flow/lib/calendar.js64-bit- ModelCraft
-
Factor from text
A factor from a plain number, a percent of the size, or a percent change.
f = n; n ÷ 100; 1 ± n ÷ 100
Typed scale factors and shrinkage allowance scale-factors.js64-bit- ModelCraft
- PartCraft
-
Shrinkage allowance
The pattern factor for a casting that shrinks by a percentage.
add: 1 + s ÷ 100; exact: 1 ÷ (1 − s ÷ 100)
Typed scale factors and shrinkage allowance scale-factors.js64-bit- ModelCraft
- PartCraft
-
Defining constants
The pound, standard gravity, inch and foot, and the pound-force, gallon and British thermal unit built from them.
lbf = 0.45359237 × 9.80665; gal = 231 × 0.0254³; BTU = 1055.05585262 J
Engineering units: factors, dimensions and conversion engineer/eng-units.jsExact- PartCraft
-
Unit table
Each unit's factor to SI and its dimension.
Engineering units: factors, dimensions and conversion engineer/eng-units.jsExact- PartCraft
-
SI prefixes
A prefixed unit such as kPa or mm from its base unit.
factor = prefix × unit factor
Engineering units: factors, dimensions and conversion engineer/eng-units.js64-bit- PartCraft
-
Combining units
The factor and dimension of a product or quotient of two units.
f = f_a × f_bᵉ; dimension = d_a + e × d_b
Engineering units: factors, dimensions and conversion engineer/eng-units.js64-bit- PartCraft
-
Reading a unit text
Turns a text such as W/(m^2 K) into one factor and one dimension.
Engineering units: factors, dimensions and conversion engineer/eng-units.js64-bit- PartCraft
-
Value to SI
A value in a given unit as its SI value.
SI = v × f
Engineering units: factors, dimensions and conversion engineer/eng-units.js64-bit- PartCraft
-
Value from SI
An SI value in a given unit.
v = SI ÷ f
Engineering units: factors, dimensions and conversion engineer/eng-units.js64-bit- PartCraft
-
Unit to unit
A value converted from one unit to another of the same kind.
result = v × f_from ÷ f_to
Engineering units: factors, dimensions and conversion engineer/eng-units.js64-bit- PartCraft
-
Temperature points
Celsius and Fahrenheit readings to and from kelvin.
K = °C + 273.15; K = (°F − 32) × 5 ÷ 9 + 273.15
Engineering units: factors, dimensions and conversion engineer/eng-units.js64-bit- PartCraft
-
Typed length to feet
Normalizes what was typed and reads it as one length, or as arithmetic over lengths.
Typed lengths and item units units.js64-bit- TakeoffCraft
-
One length with a metric unit, or feet and inches
Reads one normalized length into feet.
ft = meters ÷ 0.3048
Typed lengths and item units units.jsExact- TakeoffCraft
-
Numbers and fractions in a typed length
Splits the text into numbers, fractions and foot or inch marks.
fraction = a ÷ b (integers)
Typed lengths and item units units.jsExact- TakeoffCraft
-
Feet and inches combined
Combines a feet part and an inches part (whole number plus fraction) into feet.
ft = feet + (inches + fraction) ÷ 12
Typed lengths and item units units.jsExact- TakeoffCraft
-
Bare number in the default unit to feet
Converts a number in feet, inches, meters, centimeters or millimeters to feet.
ft = v ÷ 12; ft = v ÷ 0.3048; ft = v ÷ 1000 ÷ 0.3048
Typed lengths and item units units.jsExact- TakeoffCraft
-
Item unit factors
The factor from feet or square feet to each unit an item can be reported in.
Typed lengths and item units units.jsExact- TakeoffCraft
-
Feet and square feet into an item's unit
Converts a length in feet or an area in square feet to the unit that goes with an item.
m = ft × 0.3048; area = sf × perSqFt
Typed lengths and item units units.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.