Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | provide ersatz for expm1 and log1p | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | porting | Reporter: | Regina Henschel <rb.henschel> | ||||||
Component: | code | Assignee: | ooo | ||||||
Status: | CLOSED FIXED | QA Contact: | issues@porting <issues> | ||||||
Severity: | Trivial | ||||||||
Priority: | P3 | CC: | issues, ooo, stephan.bergmann.secondary | ||||||
Version: | DEV300m20 | ||||||||
Target Milestone: | OOo 3.1 | ||||||||
Hardware: | All | ||||||||
OS: | Windows XP | ||||||||
Issue Type: | PATCH | Latest Confirmation in: | --- | ||||||
Developer Difficulty: | --- | ||||||||
Issue Depends on: | |||||||||
Issue Blocks: | 91547, 91870 | ||||||||
Attachments: |
|
Description
Regina Henschel
2008-07-12 18:02:29 UTC
Created attachment 55086 [details]
ersatz for expm1 and log1p, and test values
I think this should go into ::rtl::math where a wrapper would call either the compiler provided function or the replacement. Stephan, what do you think? Btw, is there a way to detect at compilation time whether a compiler supports these functions, other than using #ifdef __MSC_VER or similar respectively the usual configure attempt to test compile a function call? @er: Yes, adding something to sal/inc/sal/math.h seems reasonable. I am not aware of a good way to test for existence of those functions in math.h; #if __STDC_VERSION__ >= 199901L would work for C (conservatively), but not necessarily for C++. Grabbing issue. Created attachment 58470 [details]
changes in patch form
In cws odff05: revision 264877 sal/inc/rtl/math.h sal/inc/rtl/math.hxx sal/rtl/source/math.cxx sal/util/sal.map A slightly different approach than the attached patch. This makes the functions available to C sources as well, and provides one single point to change in case we wanted to replace the replacements with compiler-builtins for specific platforms. Code present in CWS build. Available in masters, closing. |