This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 11706 vs ([lno] Canonical iv creation)


Paolo Carlini <pcarlini@suse.de> writes:

| Gabriel Dos Reis wrote:
| 
| >__pow_helper() is for raising any arbitrary numeric type to an integer
| > exponent.  In particular it is used for complex<T> too.
| Ah yes, I forgot about pow(z, n)! Thanks.
| But, in that case, we can use it *only* for complex, not for cmath.

After a replacement is figured out, you may move its definition to
<complex> if you must; but we're not there.

| Therefore, my plan would be: let's keep the overloads for double alone
| (e.g., pow(double,
| double)) but let's actually exploit ::pow,  __builtin_powf,
| __builtin_powl for implementing
| pow(double, int), pow(float, int), pow(long double, int).
| 
| Sounds reasonable?

Let me make sure I understand. 

  (1) don't overload for pow(double, double_, because it is the same as
      ::pow. 

  (2) Don't use ::pow in std_cmath.h.

  (3) For raising to integer power, please consult

    http://gcc.gnu.org/ml/gcc-patches/2003-08/msg00160.html

-- Gaby


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