Since people here have been pondering about this issue lately: the design
document <http://www.sgi.com/Technology/STL/thread_safety.html> applies to
GCC's templates as well. IIUC this looks rather sound, the worst thing
thus being our refcounting. How do I do a portable spin-lock?
Regards
-rbk.
--
Richard Kreckel
<Richard.Kreckel(a)Uni-Mainz.DE>
<http://wwwthep.physik.uni-mainz.de/~kreckel/>
Hi folks,
I have just checked with Martin v. Löwis about that issue. Martin is
quite C-standard-literal. The question arouse how to call the (already
present) Gamma function in GiNaC once and for all. The standard ISO/IEC
9899:1999, frequently dubbed as C99, states:
> 7.12.8.3 The lgamma functions
> Synopsis
> #include <math.h>
> double lgamma(double x);
> float lgammaf(float x);
> long double lgammal(long double x);
>
> Description
>
> The lgamma functions compute the natural logarithm of the absolute
> value of gamma of x: log-e | G(x) |. A range error occurs if x is too
> large or if x is a negative.
>
> Returns
>
> The lgamma functions return the value of the natural logarithm of the
> absolute value of gamma of x.
>
> 7.12.8.4 The tgamma functions
>
> Synopsis
> #include <math.h>
> double tgamma(double x);
> float tgammaf(float x);
> long double tgammal(long double x);
>
> Description
>
> The tgamma functions compute the gamma function of x: G(x). A domain
> error occurs if x is a negative integer or zero. A range error may
> occur if the magnitude of x is too large or too small.
>
> Returns
>
> The tgamma functions return the gamma function value.
The next revision of ISO/IEC 14882:1998 (the C++ standard) will follow
this definition from the C standard. Since it is kind of a policy not to
work against the language C++ I vote for forgetting about esthetic
qualms and adopting this behaviour and call it ex tgamma(ex) in GiNaC
0.x.y | x>5. A function ex lgamma(ex) may be introduced as well to make
the distinction clear.
Any serious objections?
-richy.
--
Richard Kreckel
<Richard.Kreckel(a)Uni-Mainz.DE>
<http://wwwthep.physik.uni-mainz.de/~kreckel/>
...means "Just another Release of GiNaC". Version 0.5.4 has just been
uploaded to the usual places. See the file NEWS to learn about what has
changed.
Enjoy!
-rbk.
PS: No, I didn't forget to tag...
PPS: ...and no, config.h.in is not empty. ;-)
--
Richard Kreckel
<Richard.Kreckel(a)Uni-Mainz.DE>
<http://wwwthep.physik.uni-mainz.de/~kreckel/>
...don't commute. But there is more:
squark:~$ ginsh
ginsh - GiNaC Interactive Shell (GiNaC V0.5.3)
__, _______ Copyright (C) 1999-2000 Johannes Gutenberg University Mainz,
(__) * | Germany. This is free software with ABSOLUTELY NO WARRANTY.
._) i N a C | You are welcome to redistribute it under certain conditions;
<-------------' see the file COPYING for details.
Type ?? for a list of help topics.
> series(gamma(x),x,0,2);
-EulerGamma+Order(x^2)+(1/12*Pi^2+1/2*EulerGamma^2)*x+x^(-1)
> collect(",x);
-EulerGamma+Order(x^2)+(1/12*Pi^2+1/2*EulerGamma^2)*x+x^(-1)
> evalf(");
-0.5772156649015328606L0+(0.98905599532797255544L0)*x+Order(x^(2.0L0))+x^(-1.0L0)
> quit;
squark:~$ ginsh
ginsh - GiNaC Interactive Shell (GiNaC V0.5.3)
__, _______ Copyright (C) 1999-2000 Johannes Gutenberg University Mainz,
(__) * | Germany. This is free software with ABSOLUTELY NO WARRANTY.
._) i N a C | You are welcome to redistribute it under certain conditions;
<-------------' see the file COPYING for details.
Type ?? for a list of help topics.
> series(gamma(x),x,0,2);
-EulerGamma+Order(x^2)+(1/12*Pi^2+1/2*EulerGamma^2)*x+x^(-1)
> evalf(");
-0.5772156649015328606L0+(0.98905599532797255544L0)*x+Order(x^(2.0L0))+x^(-1.0L0)
> collect(",x);
Not a 32-bit integer: -9223372028264841217
squark:~$
In any case, exponents should remain integer and even rational.
Cheers
-rbk.
--
Richard Kreckel
<Richard.Kreckel(a)Uni-Mainz.DE>
<http://wwwthep.physik.uni-mainz.de/~kreckel/>
You should have a link from the main page stating the license of your
software. I could not find it.
____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1