Boost logo

Boost :

From: Kevin Lynch (krlynch_at_[hidden])
Date: 2001-10-09 15:53:28

Eric Ford wrote:
> > There is documentation: std_math.html
> I haven't looked at the code, but the documentation looks good.
> Thanks for doing that.
> Am I correct that the next step is to try to persuade people to
> provide patches or at least feedback so it can become portable?

If the people that have been participating in the discussion so far
don't see any major issues with the code, then I think that would be the
next step.

> I don't understand the pow issue.
> What's wrong with something like type promotion often used for the
> arithmetic operators?

Probably nothing .... I was just trying to implement the most
straightforward template code possible so as to maximize the number of
compilers this code worked on and to maximize the number of compilers
where the code would be excised completely by the optimizer (we're
sometimes going through three levels of calls, std_math::sin<T>(T) ->
std::sin(T) -> sin[f,l](T), on noncompliant compilers, and the fewer
layers of additional crud on top, the better). I guess most of that
isn't really an issue though. I'll see if I can take your ideas and
implement it on top of the current code for now.

> BTW- It might be nice if we used a general type promotion framework.
> Is someone working on that? If so, what's the status? Is there a
> working version we could use? If not, we could modify the
> unit_promotion code I posted in qualified_unit.
> E

I don't know the answers to any of those questions ... if we had such a
framework, I'd use it, but the only place that it is really needed here
is in this one pow issue (and it could probably fix up the div
implementation as well). So unless I'm missing something, we don't
_need_ it elsewhere at the current time, and a small hack like this
would work wonders for the time being. Or perhaps I'm missing the point
of this paragraph? It certainly wouldn't be the first time....

Of course, we could always design and provide a type promotion framework
in addition to all the rest of this code. I'm open to working on that
too :-)

Kevin Lynch				voice:	 (617) 353-6065
Physics Department			Fax: (617) 353-6062
Boston University			office:	 PRB-565
590 Commonwealth Ave.			e-mail:	 krlynch_at_[hidden]
Boston, MA 02215 USA

Boost list run by bdawes at, gregod at, cpdaniel at, john at