Skip to content

Features ​

The three steps ​

Every FURY computation follows the same steps: define the units, attach them to numbers, compute.

f90
program bolt
!< Quick start: how fast is Bolt?
use fury
implicit none
type(uom64)   :: metre, second
type(qreal64) :: distance, time, speed

metre  = uom64('m = metre = meter [length] {metre}')
second = uom64('s = sec = second [time] {second}')

distance = 100._R8P * metre
time     = 9.58_R8P * second
speed    = distance / time

print '(A)', 'distance : '//distance%stringify(format='(F6.2)')
print '(A)', 'time     : '//time%stringify(format='(F6.2)')
print '(A)', 'speed    : '//speed%stringify(format='(F6.3)', with_dimensions=.true.)
endprogram bolt
$ bolt
distance : 100.00 m
time     :   9.58 s
speed    : 10.438 m.s-1 [length.time-1]

Feature map ​

AreaFeaturesWhere
Unitsunits from a string: symbols, synonyms, conversion aliases, dimensions, compound units of reference units, main alias, name; printing with or without each partUnit grammar, Units
Algebraproducts, quotients, integer and real powers of units, with cancelling exponents and derived dimensions; comparisons ==, /=Units
Quantitiesa real magnitude, its unit and a name; constructor, number * unit; arithmetic with quantities and numbers of any kind; powers; comparisons; formatted printingQuantities
Consistencysums, differences, assignments and conversions of inconsistent units stop the program (error stop, exit status 1); dimensions checked against the exponents of the symbolsErrors
Conversionsfactors, protected factors, offsets, several aliases per unit; conversions through a common alias and through the main alias of a compound unit; user-supplied non-linear convertersConversions
Systemsthe SI system: 42 units, 28 decimal and binary prefixes, 15 constants (2019 SI, CODATA 2018); queries by name, symbol, synonym, main alias or prefixed symbol; systems of your ownUnits systems
Precisionevery type in 32, 64 and 128 bits; mixed-kind arithmetic, comparisons and assignments; optional quadruple precisionPrecision
BuildsFoBiS (static and shared libraries, gfortran and Intel), fpm; tests; a converter appInstallation

The types ​

TypeModulePurpose
uom32, uom64, uom128furyunit of measure
qreal32, qreal64, qreal128furyphysical quantity
system_si32, system_si64, system_si128furythe SI system
system_abstract32, system_abstract64, system_abstract128furythe base of a units system
uom_converterfurythe base of a user-supplied converter
uom_reference*, uom_symbol*furythe building blocks of a unit: a reference unit and a symbol

fury also exports the kind parameters of PENF: R4P, R8P, R16P, R_P, I1P, I2P, I4P, I8P, I_P, and its str, strz functions.

Released under GPL v3, BSD 2-Clause, BSD 3-Clause or MIT, at your choice.