[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
suggested patches for C/C++ math library macros
From: |
Julian C. Cummings |
Subject: |
suggested patches for C/C++ math library macros |
Date: |
Tue, 3 Aug 2004 12:29:55 -0700 |
Hello
Guido,
I have been
volunteering to do maintenance on the blitz C++ Array class library for the past
few years. As you know, several of the C++ support macros were contributed
by the author of blitz, Todd Veldhuizen. I have run across a few minor
bugs and inconsistencies with the m4 macros that check for some specific math
routines. I am attaching a couple of patch files that correct these
problems.
The ieee_math and
system_v_math macros refer to fairly obscure math library standards. As
near as I can tell from flipping through math.h header files on various systems,
"ieee" corresponds to items provided when XOPEN_SOURCE or the equivalent macro
is defined. The SGI math.h header refers to these items as the XPG4
standard. Meanwhile, "system_v" appears to correspond to items provided in
the C99 extensions to the C standard library. Based upon the
categorizations that appear in current math.h header files, I have supplemented
and reorganized the lists of functions that are tested for in the ieee_math and
system_v_math macros. I have added tests for cbrt, jn, gamma and yn to
ieee_math. I have moved tests for ilogb, hypot, nextafter, remainder and
scalb from system_v_math to ieee_math. In addition, I added tests for
trunc and finite to system_v_math, and I removed the test for fmod
because it is in the standard C math library.
I also corrected a
problem that was causing the ieee_math check to possibly fail under the IBM xlC
compiler. If you compile with the -qthreaded flag or use the reentrant
version xlC_r of the compiler, the IBM math.h header provides reentrant versions
of the gamma and lgamma functions. So I have modified the test program in
the ieee_math macro to account for this possibility and allow the
ieee_math check to pass under xlC_r.
I hope that you can
incorporate these modifications into a future version of the
ac-archive.
Regards, Julian
C.
Dr. Julian C. Cummings
Staff Scientist, CACR/Caltech
(626)
395-2543
address@hidden
ieee_math.patch
Description: Binary data
system_v_math.patch
Description: Binary data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- suggested patches for C/C++ math library macros,
Julian C. Cummings <=