> Date: Wed, 24 Oct 2007 09:14:37 +0200 > From: "Frank Hamilton" <[EMAIL PROTECTED]> > Subject: [Jprogramming] units dimensions (gm,gm,s) > > Has anyone considered an application to calculate with systems of > units, such as SI? I understand that it would be difficult to include > in the primitives, but as an application it would be extremely useful > a lot of the time. . . .
Some years ago ago I proposed the inclusion in value representations of dates and times. This could have been smoothly implemented would not have required any additional primitive functions. I have no record of when, where or what I proposed, so the following is from (early morning) memory. Dates to be represented like 2007m10d25. Elapsed times to be represented like 5d3h15m42s12.3. Dates to be extensible by clock time as 2007m10d25h5. Obvious variations on these would allow omission of some leading or trailing components, but in all cases the values would begin and end with a decimal digit. The arithmetic is interesting, although there would be quite a few domain errors. Dates would not in general add multiply or divide, but differences would yield times and times could be added to or subtracted from dates to yield dates. Times could be added to or subtracted from times to yield times, multiplied or divided by plain numbers to yield times, and divided by times to yield plain numbers. Note that a time could thus be divided by 0s1 to convert it to pure seconds, or by 0m1 for minutes. Later consideration could be given to including rates (inverse times) but this would make matters perhaps too complex. I imagine negative dates would signify BCE (though the absence of a year zero would be a problem) and negative times should not be a problem though I can't imagine what their significance would be (overdueness, perhaps). I would urge that something of this kind should be done before any handling of other dimensions, both because experience with dates and times would inform design of such extension and because there are many traps in SI units (see, for example, ftp://ftp.comp.utas.edu.au/pub/nholmes/ca/nmrdys.pdf). Neville Holmes, P.O.Box 404, Mowbray 7248, Tasmania Normal e-mail: [EMAIL PROTECTED] Sick of deleting your inbox? Yahoo!7 Mail has free unlimited storage. http://au.docs.yahoo.com/mail/unlimitedstorage.html ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
