comp.lang.ada
 help / color / mirror / Atom feed
* Update: The Ultimate SI Units Checker
@ 2002-10-14 11:12 Grein, Christoph
  0 siblings, 0 replies; only message in thread
From: Grein, Christoph @ 2002-10-14 11:12 UTC (permalink / raw)


The ultimate SI Units checker deals with physical items in full generality,
including arbitrary powers and roots, checking the correctness of dimensions
in all expressions:

   Current_Density := (4.0/9.0) * Eps0 *
                      Sqrt (2.0 * Electron_Charge / Electron_Mass) *
                      Voltage**(3/2) / Distance**2;

With the advent of Gnat 3.16w, a lot of unnecessary qualifications could be
removed from the code, which were necessary because of a bug in earlier
versions. [Instead of the simple expression Voltage**(3/2) above, where the 
exponent
3/2 is a rational number, you had to write Voltage**Rational'(3/2).]

Other compilers probably do not have these problems with overload resolution,
so you should try the updated version in any case.

[Even with Gnat 3.16w, a few buggy cases remain, where qualification is still 
needed,
but these are rare: Rational'(-1/2).]


Temperature scales like Celsius and Fahrenheit have been added (the 
corresponding SI unit is Kelvin) with conversion functions taking into account 
whether temperatures or temperature differences are converted. (For differences,
e.g. 1K = 1°C, but not for tempertures themselves.)

See <http://home.T-Online.de/home/Christ-Usch.Grein/Ada/SI.html>

SI is released under GMGPL. Enjoy...

                                 o     _      _          _
 --------- __o       __o      /\_    _ \\o   (_)\__/o   (_)
 ------- _`\<,_    _`\<,_    _>(_)  (_)/<_     \_| \    _|/' \/
 ------ (_)/ (_)  (_)/ (_)  (_)         (_)    (_)     (_)'  _\o_
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mein Radunfall
My bike accident


Christoph Grein
Mitglied von Ada-Deutschland
Member of Ada Germany
http:/www.ada-deutschland.de

http://home.T-Online.de/home/Christ-Usch.Grein
eMail: Christ-Usch.Grein@T-Online.de



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-14 11:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-14 11:12 Update: The Ultimate SI Units Checker Grein, Christoph

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox