User loginNavigation 
Dimensional analysis typingThis link describes an implementation of dimensional analysis in C++ using the Boost MPL. What this means is that physical quantities have a type parametrised by a tuple of integers representing the order of physical dimension (i.e. mass, length, time, etc...) with rules determining what operations can be carried out. This is a standard sanity check for equations in physics and easily catches typos. For example the equation for the force acting on two massive bodies is G(m_{1}m_{2})/d^{2}. If this were accidentally entered as This is clearly a useful techniques for say, rocket guidance systems. What other languages are capable of doing this without having to declare a morass of types and functions relating those types to each other? By Zombywuf at 20070219 12:42  LtU Forum  previous forum topic  next forum topic  other blogs  9698 reads

Browse archivesActive forum topics 
Recent comments
1 week 4 days ago
4 weeks 6 days ago
14 weeks 1 day ago
14 weeks 3 days ago
16 weeks 5 hours ago
16 weeks 5 hours ago
16 weeks 1 day ago
17 weeks 5 days ago
18 weeks 5 hours ago
18 weeks 9 hours ago