From: Paul A Bristow (pbristow_at_[hidden])
Date: 2004-11-04 16:39:30
| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]] On Behalf Of Thorsten Ottosen
| Sent: 04 November 2004 17:47
| To: boost_at_[hidden]
| Subject: [boost] Re: Math functions - requirements 'spec'
| "Paul A Bristow" <pbristow_at_[hidden]> wrote in message
| | Following the view of C and C++ Working groups at Redmond
| | that a working implementation of my proposal for math functions
| | was a necessary condition for consideration for a TR-2 standard,
| | I have been skirmishing with the problems of converting
| | Stephen Moshier's Cephes code into something that works for
| both C++ and C.
| | Several issues have emerged, mainly revealing my ignorance with C
| | - a state of bliss in which I would have preferred to remain ;-)
| | 5 Do I have to use exclusively C /* */ style comments
| :-((? (Or can I
| | assume that C compilers will understand // comments?)
| why do you want to implement it for C also?
because I have been recommended to present follow the example of C99 math
which are applicable to both C and C++. And I have therefore
made a proposal to both C and C++ WGs
| | 6 Should I assume IEEE 754 compliance and signal #error
| "Only works with IEEE compliant compilers"?
| but this is not guaranteed by the standard, is it?
No, but tons of code assumes this, and portable ways of checking for isnan
and is finite are essential.
So new question: is it OK if I assume C99 additions (which include these)?
| | 13 Do you also recommend making checking arguments
| optional (with #ifdefs)?
| | So that those who want the ultimate in speed at any risk
| can switch checking
| | off?
| first make it work...
It already does as Cephes C code, so now seems the right time to #if
| good to see you working on this :-)
I only said I was thinking about it - looks VERY tedious and messy,
even assuming the underlying code is fine. There are dozens of functions
Never mind proper testing ...
You will understand that I don't want to find that reviewers suddenly have
other new ideas.