[boost] Re: [math constants] a new approach (perhaps)
by Daniel Frey other posts by this author
Mar 1 2004 10:18AM messages near this date
[boost] Re: [math constants] a new approach (perhaps)
|
[boost] Re: [math constants] C++ Language gurus views needed and
Codewarrior & Comeau testers
Thorsten Ottosen wrote:
> Yes, of course. BTW, I've attached the file since
> my messages seems to format the code like ****.
>
> br
>
> Thorsten
With no offense intended, but that's a very simple version which doesn't
work in many situations. The problems of your solution are:
- Doesn't work well for UDTs (try std::complex, some conversions are
ambiguous then)
- Doesn't scale for new types (you need to know all of them in the
single header that defines the constant)
- Doesn't work for more complex expressions (pi*pi*t instead of T(pi)*pi*t)
- Doesn't work for function calls (srqt(pi)*t instead of sqrt(T(pi))*t)
- Doesn't solve the naming dilemma (how to spell the constant "pi*pi"?)
- Doesn't work well with unit libraries AFAICS (again not scaling well)
I really suggest you look at my code at
<http://groups.yahoo.com/group/boost/files/MathConstants/> , which solves
all of the above points. Feel free to ask questions.
Regards, Daniel
--
Daniel Frey
aixigo AG - financial solutions & technology
Schloß-Rahe-Straße 15, 52072 Aachen, Germany
fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99
eMail: daniel.frey@[...].de, web: http://www.aixigo.de
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Thorsten Ottosen
Thorsten Ottosen
Daniel Frey
Thorsten Ottosen
Daniel Frey
Thorsten Ottosen
Daniel Frey
Thorsten Ottosen
Guillaume Melquiond
Daniel Frey
Bronek Kozicki
Bronek Kozicki
Bronek Kozicki
Daniel Frey
Bronek Kozicki
Daniel Frey
Daniel Frey
Bronek Kozicki
Daniel Frey
Daniel Frey
Bronek Kozicki
Daniel Frey
Bronek Kozicki
Bronek Kozicki
Daniel Frey
Paul A Bristow
Paul A Bristow
Paul A Bristow
Paul A Bristow
Phil Richards
Daniel Frey
Paul A Bristow
David Abrahams
Paul A Bristow
David Abrahams
|