public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* constants update
@ 2008-01-06 23:15 Jochen Küpper
  2008-01-08 18:42 ` Brian Gough
  0 siblings, 1 reply; 9+ messages in thread
From: Jochen Küpper @ 2008-01-06 23:15 UTC (permalink / raw)
  To: gsl-discuss, help-gsl

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

Hi Everybody,

the new CODATA 2006 values are published! It would be great if someone  
would be willing to spend the time to update
   const/calc-units-update.el
to implement the current "official" values in GSL. At the moment these  
are essentially at CODATA 1998, and they were updated last in 2002.

My apologies that I do not implement it myself, I am simply to busy  
these days. I hope someone else is up to the task and I, at least,  
would really appreciate it!


The current values can be found in the article
   CODATA Recommended Values of the Fundamental Physical Constants: 2006
on the arXiv:
   http://arxiv.org/abs/0801.0028
and at
   physics.nist.gov/constants
Maybe one could even utilize the TeX code of the arXiv submission?


A related question: Are there people around who would be interested to  
include atomic/isotopic weights as constants in GSL?

Greetings,
Jochen
-- 
Einigkeit und Recht und Freiheit                http://www.Jochen-Kuepper.de
     Liberté, Égalité, Fraternité                GnuPG key: CC1B0B4D
         Sex, drugs and rock-n-roll



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 186 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: constants update
  2008-01-06 23:15 constants update Jochen Küpper
@ 2008-01-08 18:42 ` Brian Gough
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Gough @ 2008-01-08 18:42 UTC (permalink / raw)
  To: Jochen Küpper; +Cc: gsl-discuss, help-gsl

At Mon, 7 Jan 2008 00:14:52 +0100,
Jochen Küpper wrote:
> 
> The current values can be found in the article
>    CODATA Recommended Values of the Fundamental Physical Constants: 2006
> on the arXiv:
>    http://arxiv.org/abs/0801.0028
> and at
>    physics.nist.gov/constants
> Maybe one could even utilize the TeX code of the arXiv submission?

They have an ascii table at
http://physics.nist.gov/cuu/Constants/Table/allascii.txt

(via http://physics.nist.gov/cuu/Constants/index.html)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: constants update
  2008-01-10  9:23   ` Jochen Küpper
  2008-01-10 10:19     ` Oliver Jennrich
@ 2008-01-10 22:22     ` Brian Gough
  1 sibling, 0 replies; 9+ messages in thread
From: Brian Gough @ 2008-01-10 22:22 UTC (permalink / raw)
  To: Jochen Küpper; +Cc: gsl-discuss

At Thu, 10 Jan 2008 10:23:28 +0100,
Jochen Küpper wrote:
> here is a patch to upgrade some (very few!) constants to CODATA 2006.
> Hopefully this can also serve someone else as a guide to update more  
> values in GSL.

Thanks, I've applied the patch and updated the lisp file to work with
the latest version of Emacs Calc.

-- 
Brian Gough

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: constants update
  2008-01-10 10:19     ` Oliver Jennrich
  2008-01-10 11:21       ` Jochen Küpper
@ 2008-01-10 12:39       ` Brian Gough
  1 sibling, 0 replies; 9+ messages in thread
From: Brian Gough @ 2008-01-10 12:39 UTC (permalink / raw)
  To: gsl-discuss

At Thu, 10 Jan 2008 11:16:24 +0100,
Oliver Jennrich wrote:
> I'm wondering if updating the constants without a possibility to
> revert to an earlier version is a good idea.
> 
> Would it be useful to have something like
> 
> GSL_CONST_MKSA_SPEED_OF_LIGHT_2000
> GSL_CONST_MKSA_SPEED_OF_LIGHT_2006
> 
> and
> 
> 
> GSL_CONST_MKSA_SPEED_OF_LIGHT
> 
> to be either of the two, depending on a #define?

In the end I decided that since these header files don't have any
dependencies, it's simpler to let people keep a specific version in
their own program if they really need it.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: constants update
  2008-01-10 10:19     ` Oliver Jennrich
@ 2008-01-10 11:21       ` Jochen Küpper
  2008-01-10 12:39       ` Brian Gough
  1 sibling, 0 replies; 9+ messages in thread
From: Jochen Küpper @ 2008-01-10 11:21 UTC (permalink / raw)
  To: gsl-discuss; +Cc: Oliver Jennrich

[-- Attachment #1: Type: text/plain, Size: 1345 bytes --]

On 10.01.2008, at 11:16, Oliver Jennrich wrote:

> I'm wondering if updating the constants without a possibility to  
> revert to an earlier version is a good idea.

Generally this is an important point for reproducibility.

However, personally, I do not care. Under normal circumstances I want  
to use the current "correct" values. If I want to reproduce some old  
calculation I use the same old GSL version to really get the same  
calculation results - after all the code also changes continuously.

> Would it be useful to have something like
>
> GSL_CONST_MKSA_SPEED_OF_LIGHT_2000
> GSL_CONST_MKSA_SPEED_OF_LIGHT_2006
>
> and
>
> GSL_CONST_MKSA_SPEED_OF_LIGHT
>
> to be either of the two, depending on a #define?

The default value should definitely be the latest, but one could  
envision to have
   GSL_CONST_CODATA_1998
define the values according to that standard. However, someone needs  
to implement it and it needs to be maintained as time goes and new  
standards are published.
It should also be made clear that everybody uses the latest values  
for scientific calculations...

Greetings,
Jochen
-- 
Einigkeit und Recht und Freiheit                http://www.Jochen- 
Kuepper.de
     Liberté, Égalité, Fraternité                GnuPG key: CC1B0B4D
         Sex, drugs and rock-n-roll



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 186 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: constants update
  2008-01-10  9:23   ` Jochen Küpper
@ 2008-01-10 10:19     ` Oliver Jennrich
  2008-01-10 11:21       ` Jochen Küpper
  2008-01-10 12:39       ` Brian Gough
  2008-01-10 22:22     ` Brian Gough
  1 sibling, 2 replies; 9+ messages in thread
From: Oliver Jennrich @ 2008-01-10 10:19 UTC (permalink / raw)
  To: Jochen Küpper; +Cc: gsl-discuss

On Jan 10, 2008 10:23 AM, Jochen Küpper <jochen@fhi-berlin.mpg.de> wrote:
> Brian,
>
> On 10.01.2008, at 10:01, Jochen Küpper wrote:
>
> > Therefore, someone needs to create a patch for calc-units-
> > update.el, i.e., as the following:
>
>
> here is a patch to upgrade some (very few!) constants to CODATA 2006.
> Hopefully this can also serve someone else as a guide to update more
> values in GSL.

I'm wondering if updating the constants without a possibility to
revert to an earlier version is a good idea.

Would it be useful to have something like

GSL_CONST_MKSA_SPEED_OF_LIGHT_2000
GSL_CONST_MKSA_SPEED_OF_LIGHT_2006

and


GSL_CONST_MKSA_SPEED_OF_LIGHT

to be either of the two, depending on a #define?
>
>
> Greetings,
> Jochen
> --
> Einigkeit und Recht und Freiheit                http://www.Jochen-
> Kuepper.de
>      Liberté, Égalité, Fraternité                GnuPG key: CC1B0B4D
>          Sex, drugs and rock-n-roll
>
>
>
>



-- 
Space -- the final frontier

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: constants update
  2008-01-10  9:02 ` Jochen Küpper
@ 2008-01-10  9:23   ` Jochen Küpper
  2008-01-10 10:19     ` Oliver Jennrich
  2008-01-10 22:22     ` Brian Gough
  0 siblings, 2 replies; 9+ messages in thread
From: Jochen Küpper @ 2008-01-10  9:23 UTC (permalink / raw)
  To: Brian Gough; +Cc: gsl-discuss


[-- Attachment #1.1: Type: text/plain, Size: 544 bytes --]

Brian,

On 10.01.2008, at 10:01, Jochen Küpper wrote:

> Therefore, someone needs to create a patch for calc-units- 
> update.el, i.e., as the following:


here is a patch to upgrade some (very few!) constants to CODATA 2006.
Hopefully this can also serve someone else as a guide to update more  
values in GSL.

Greetings,
Jochen
-- 
Einigkeit und Recht und Freiheit                http://www.Jochen- 
Kuepper.de
     Liberté, Égalité, Fraternité                GnuPG key: CC1B0B4D
         Sex, drugs and rock-n-roll




[-- Attachment #1.2: codata2006.diff --]
[-- Type: application/octet-stream, Size: 3004 bytes --]

Index: calc-units-update.el
===================================================================
RCS file: /cvs/gsl/gsl/const/calc-units-update.el,v
retrieving revision 1.5
diff -u -r1.5 calc-units-update.el
--- calc-units-update.el	2 Jul 2007 16:34:25 -0000	1.5
+++ calc-units-update.el	10 Jan 2008 09:15:56 -0000
@@ -1,6 +1,6 @@
 ;; calc-units-update.el -- update for calc-units.el, a calculator for Emacs
 ;;
-;; Copyright (C) 2002 Jochen Küpper
+;; Copyright (C) 2002,2008 Jochen Küpper
 ;;
 ;; This file is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published
@@ -17,6 +17,10 @@
 ;;   - Journal of Physical and Chemical Reference Data, 28(6), 1713-1852, 1999.
 ;;   - Reviews of Modern Physics, 72(2), 351-495, 2000.
 ;;   - http://physics.nist.gov/cuu/Constants/index.html
+;; * CODATA 2006
+;;   - http://arxiv.org/abs/0801.0028
+;;   - http://physics.nist.gov/cuu/Constants/
+;;   - http://www.physics.nist.gov/cuu/Constants/Table/allascii.txt
 ;; * NIST
 ;;   - http://physics.nist.gov/Pubs/SP811/appenB9.html
 ;; * NASA JPL
@@ -28,13 +32,13 @@
   '(;; length
     ( au      "149597870691. m"        "Astronomical Unit" ) ;; NASA JPL 
     ;; mass
-    ( amu     "1.66053873e-27 kg"      "Unified atomic mass" ) ;; CODATA
+    ( amu     "1.660538782e-27 kg"      "Unified atomic mass" ) ;; CODATA 2006 (1.660538782(83)e-27 kg)
     ;; pressure
     ( inH2O   "2.490889e2 Pa"          "Inch of water" ) ;; NIST 
-    ( e       "1.602176462e-19 C"      "Elementary charge" ) ;; CODATA
-    ( ech     "1.602176462e-19 C"      "Elementary charge" ) ;; CODATA
+    ( ech     "1.602176487e-19 C"      "Elementary charge" ) ;; CODATA 2006 (1.602176487(40)e-19 C)
+    ( e       "ech"                    "Elementary charge" )
     ;; other physical quantities (CODATA 1998)
-    ( h       "6.62606876e-34 J s"     "*Planck's constant" )
+    ( h       "6.62606896e-34 J s"     "*Planck's constant" ) ;; CODATA 2006 (6.62606896(33)e-34 J s)
     ( hbar    "h / 2 pi"               "Planck's constant" )
     ( mu0     "4 pi 1e-7 H/m"          "Permeability of vacuum" )
     ( Grav    "6.673e-11 m^3/kg^1/s^2" "Gravitational constant" )
@@ -43,8 +47,8 @@
     ( mp      "1.67262158e-27 kg"      "Proton rest mass" )
     ( mn      "1.67492716e-27 kg"      "Neutron rest mass" )
     ( mu      "1.88353109e-28 kg"      "Muon rest mass" )
-    ( Ryd     "10973731.568549 h c/m"  "Rydberg's constant (energy)" )
-    ( k       "1.3806503e-23 J/K"      "Boltzmann's constant" )
+    ( Ryd     "10973731.568527 h c/m"  "Rydberg's constant (energy)" ) ;; CODATA 2006 (10973731.568527(73) m-1)
+    ( k       "1.3806504e-23 J/K"      "Boltzmann's constant" ) ;; CODATA 2006 (1.3806504(24)e-23 J K-1)
     ( fsc     "7.297352533e-3"         "Fine structure constant" )
     ( muB     "927.400899e-26 J/T"     "Bohr magneton" )
     ( muN     "5.05078317e-27 J/T"     "Nuclear magneton" )

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 186 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: constants update
  2008-01-09 17:07 Richard Mathar
@ 2008-01-10  9:02 ` Jochen Küpper
  2008-01-10  9:23   ` Jochen Küpper
  0 siblings, 1 reply; 9+ messages in thread
From: Jochen Küpper @ 2008-01-10  9:02 UTC (permalink / raw)
  To: gsl-discuss; +Cc: Richard Mathar

[-- Attachment #1: Type: text/plain, Size: 1856 bytes --]

On 09.01.2008, at 14:54, Richard Mathar wrote:

> On behalf of
> http://sourceware.org/ml/gsl-discuss/2008-q1/msg00008.html
> see also
> http://sourceware.org/ml/gsl-discuss/2006-q1/msg00007.html .


This server (and sources.redhat.com) seems to down! I found your  
message in Google's cache...

AFAICT this patch never made it into GSL, presumably because it is a  
diff for the wrong file. The constants headers are generated from  
const.el, which utilizes alc-units-update.el to override emacs'  
calc.el predefined constants.

Therefore, someone needs to create a patch for calc-units-update.el,  
i.e., as the following:
(The new value is form the old cached message, not directly from  
CODATA.)

Index: calc-units-update.el
===================================================================
RCS file: /cvs/gsl/gsl/const/calc-units-update.el,v
retrieving revision 1.5
diff -u -u -r1.5 calc-units-update.el
--- calc-units-update.el        2 Jul 2007 16:34:25 -0000       1.5
+++ calc-units-update.el        10 Jan 2008 08:58:48 -0000
@@ -34,7 +34,7 @@
      ( e       "1.602176462e-19 C"      "Elementary charge" ) ;; CODATA
      ( ech     "1.602176462e-19 C"      "Elementary charge" ) ;; CODATA
      ;; other physical quantities (CODATA 1998)
-    ( h       "6.62606876e-34 J s"     "*Planck's constant" )
+    ( h       "6.6260693e-34 J s"      "*Planck's constant" ) ;;  
CODATA 2006
      ( hbar    "h / 2 pi"               "Planck's constant" )
      ( mu0     "4 pi 1e-7 H/m"          "Permeability of vacuum" )
      ( Grav    "6.673e-11 m^3/kg^1/s^2" "Gravitational constant" )


Greetings,
Jochen
-- 
Einigkeit und Recht und Freiheit                http://www.Jochen- 
Kuepper.de
     Liberté, Égalité, Fraternité                GnuPG key: CC1B0B4D
         Sex, drugs and rock-n-roll



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 186 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: constants update
@ 2008-01-09 17:07 Richard Mathar
  2008-01-10  9:02 ` Jochen Küpper
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Mathar @ 2008-01-09 17:07 UTC (permalink / raw)
  To: gsl-discuss


On behalf of
http://sourceware.org/ml/gsl-discuss/2008-q1/msg00008.html
see also
http://sourceware.org/ml/gsl-discuss/2006-q1/msg00007.html .

R. J. Mathar

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-01-10 22:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-06 23:15 constants update Jochen Küpper
2008-01-08 18:42 ` Brian Gough
2008-01-09 17:07 Richard Mathar
2008-01-10  9:02 ` Jochen Küpper
2008-01-10  9:23   ` Jochen Küpper
2008-01-10 10:19     ` Oliver Jennrich
2008-01-10 11:21       ` Jochen Küpper
2008-01-10 12:39       ` Brian Gough
2008-01-10 22:22     ` Brian Gough

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).