[GiNaC-list] Checking consistency of units in GiNaC
john.pye at student.unsw.edu.au
Thu Jul 21 08:54:07 CEST 2005
Has anyone tried to add *units-of-measurement checking* to GiNaC?
I have some nice unit-checking code here as part of the freesteam project,
This class prevents things like "1 * bar + 3 * kg", and also ensures
validity of things like "Density rho = 5 * kg / (2 * metre2)"
This units class could conceivably be extended to pass through
expressions rather than simple numerical results, but operations like
differentiation might need to become units-savvy I suspect.
Does anyone have any comments on the advisability / feasibility of
trying to do this, or have any references I should follow up relating to
other people attempting this?
School of Mechanical and Manufacturing Engineering
The University of New South Wales
Sydney NSW 2052 Australia
t +61 2 9385 5127
f +61 2 9663 1222
More information about the GiNaC-list