
"Paul A Bristow" <pbristow@hetp.u-net.com> wrote in message news:E1CPhm8-0004eI-89@he203war.uk.vianw.net... | 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 ;-) | | 1 Should I no longer cater for non-compliant compilers (usually old-style | function specifications? yes. | I only have MSVC 8.0 available. | | 2 How do I check that my code is Standard C compatible (as well as C++)? compile with /TC compile all files as .c /TP compile all files as .cpp | 3 How do I tell whether the compiler is a C compiler or a C++ compiler (for | #if ing). | #if __cplusplus #if _STDC__ ... ? #if !defined(__cpluplus ) ... we have C | 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? | I have also immediately come up against the problems of IEEE 754 compliance, | argument checks, NaN, infs and exception throwing. | | 6 Should I assume IEEE 754 compliance and signal #error "Only works with | IEEE compliant compilers"? but this is not guaranteen by the standard, is it? | 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... | Comments welcome. good to see you working on this :-) -Thorsten