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: Where are std::sinf( float ) etc.


Ed Smith-Rowland <3dw4rd@verizon.net> writes:

| I'm sorry if my imprecise language got things off to a rocky start.
| 
| I was looking towards section 8 of TR1 and looking over where we were
| and what was left to do.  During the course of these investigations I
| was looking over how the standard library currently implements these
| functions.  I was surprised to see some of the TR1 items such as math
| function overloads and fpclassify and like template functions already
| implemented.  Now I understand the history (these were user-requested
| enhancements) and are separate from TR1 (although potentially useful).
| 
| My suggestion was NOT to add TR1 math functions to c_std/std_cmath.h
| but rather to create a new tr1/std_cmath.h with the TR1 math functions
| and all the overloads in a manner very similar to what is in
| c_std/std_cmath.h but in a separate location and under namespace
| std::tr1::. This left me with some questions:
| 
|    1. Given that some math functions from TR1 and the templates for
|       fpclassify, isnan, etc. are already in as enhancemets should we
|       either check off those parts of TR1 as "done" with a note in the
|       manual that they are NOT in std::tr1:: but in std:: OR should we
|       go ahead and re-implement those functions in a tr1/std_cmath.h and
|       under std::tr1.  I guess I'm in favor of the latter.  Also,
|       removing the existing enhancements would cause a lot of
|       unnecessary heartache for the people that wanted tem in te first
|       place.  It is very likely that they won't be extensions for much
|       longer anyway.

Ouch.  I definitely have no strong opinion here.  One of the basic
sanity check I would request is you make sure that

      &xxx == &std::tr1::xxx (== &std::xxx)

for the traditional cases.

That probably mean I would just check the box and say that those are
already in there in a different namespace.  I guess my sufferings from
the earlier attempts are biaising my opinion.

|    2. Where were the suffixed math functions?  Given the insistence in
|       TR1 for suffixed versions of the new math functions in addition to
|       the overloads I had assumed that the current standard required the
|       current math functions to be available in suffixed versions.  Some
|       sentence in the latest C++ draft left me with the impression that
|       these were supposed to be in but I can't find what I was looking
|       for now.  Anyway, I was evidently wrong although that would seem
|       to me to imply that TR1 is either incomplete or inconsistent in
|       this regard.

Again, I don't have answers here.

I would think that the special functions offer more interesting
challenges :-)

| I hope this clarifies my earlier message.

It does.  Thanks!

-- Gaby


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