This is the mail archive of the gsl-discuss@sourceware.cygnus.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: fundamental constants


The constants in math.h need to stay without the L otherwise all
calculations involving them would be promoted to long double. In the
GNU C library there are separate macros for double and long double
constants, e.g. M_E & M_El, to avoid this problem. We should support
these I guess.

Thomas Walter writes:
 > >>>>> "Brian" == Brian Gough <bjg@network-theory.co.uk> writes:
 > 
 >     Brian> Thomas Walter writes:
 >     >> By the way:  'long double' values should have a 'L' at the end then
 >     >> compiler knows they are 'long double'.  I suggest to fix this in the
 >     >> template headerfiles.  AFAIK this is required if one wants to
 >     >> precalculate math values with for example 40 decimal digits which
 >     >> should be enough to fill each bit.
 > 
 >     Brian> I'm not clear which of the header files you are referring to here. For
 >     Brian> templates_on.h we should be using 0.0L 1.0L etc, yes.
 > 
 > Hello,
 > sorry for not being exact.
 > Yes this is what I mean.
 > 
 > If you are interested I have a script for the program 'calc' which
 > calculates all the math constants you can find in 'math.h' and a lot
 > more with a precision (default = 42, the universal answer 8-) ) you
 > want.
 > 
 > Bye
 > Thomas
 > 
 > -- 
 > Warum hat eine Leiterbahn keine 90 Grad Winkel sondern 2 mal 45 Grad?
 > Weil die Elektronen sonst immer gegen die Wand laufen 8-)))
 > 
 > ----------------------------------------------
 > Dipl. Phys. Thomas Walter
 > Inst. f. Physiklische Chemie II
 > Egerlandstr. 3				Tel.: ++9131-85 27326 / 27330
 > 91058 Erlangen, Germany			email: walter@pctc.chemie.uni-erlangen.de
 > 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]