1Mathematical and scientific constants
2=====================================
3
4In this module some usefull constants are defined. There are four groups
5of constants:
6
7-  mathematical,
8
9-  physical in mks unit system,
10
11-  physical in cgs unit system and
12
13-  physical number constants (e.g. fine structure)
14
15The other modules are created during the initialisation of . For
16convenience the mathematical, physical mks constants and number
17constants also are available in the namespace of . If the used GSL
18version is before gsl1.4, see
19
20::
21
22    pygsl.compiled_gsl_version
23
24than the module names are cgs and mks. Form gsl1.5 these modules have
25been renamed to cgsm and mksa. So to use cgs constants one has to write
26
27::
28
29    import pygsl.const
30    import pygsl.const.cgs
31    print pygsl.const.cgs.speed_of_light/pygsl.const.speed_of_light
32
33for gsl :math:`<` 1.5 and
34
35::
36
37    import pygsl.const
38    import pygsl.const.cgsm
39    print pygsl.const.cgsm.speed_of_light/pygsl.const.speed_of_light
40
41. Of course the result is . Short examples are given at top of each
42section.
43
44The actual values are taken form the GSL headers. The GNU Scientific
45Library reference provides a more detailed description of these
46constants.
47
48Mathematical constants
49----------------------
50
51::
52
53    from pygsl.const.m import *
54    print sqrt2*sqrt2
55
56|
57| Prints .
58| Here comes the list:
59
60l\|l\|lconstantNameGSL Namevalue
61
62Scientific constants in mksa units
63----------------------------------
64
65::
66
67    from pygsl.const import cgsm
68    print "a teaspoon contains %g m^3"%mks.teaspoon
69
70These are the provided constants:
71
72l\|l\|lconstantNamegsl Nameunit
73
74Scientific constants in cgsm units
75----------------------------------
76
77::
78
79    from pygsl.const import cgsm
80    print "a teaspoon contains %g ml"%cgs.teaspoon
81
82You can access the following constants:
83
84l\|l\|lconstantNamegsl Nameunit or value
85
86Scientific number constants
87---------------------------
88
89::
90
91    from pygsl.const import *
92    # an alternative to
93    # from pygsl.const.num import *
94    print "fine structure is 1/137 with an error of %g%%"%(abs(1.0/137.0/fine_structure-1.0)*100.0)
95
96Only two constants are available:
97
98l\|l\|lconstantNamegsl Nameunit
99