Issue 97091

Summary: move functions ERF and ERFC to ::rtl::math namespace
Product: Calc Reporter: Regina Henschel <rb.henschel>
Component: codeAssignee: ooo
Status: CLOSED FIXED QA Contact: issues@sc <issues>
Severity: Trivial    
Priority: P3 CC: issues, ooo
Version: DEV300m36   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Issue Type: PATCH Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 69069    
Attachments:
Description Flags
patch part for the folder sal
none
patch part for the folder scaddins
none
patch now based on odff06, move erf and erfc from scaddins to sal
none
patch now based on odff06, move erf and erfc from scaddins to sal none

Description Regina Henschel 2008-12-10 10:16:21 UTC
The functions erf() and erfc() belong to C99, but they are not provided by MSVC
Express compilers. Those functions are needed in other calculations for example
normsdist() - otherwise they would not be in C99. Unfortunately the functions
are currently addin-functions and therefore cannot be used in other places in
the code at all.

I propose to move the calculations to sal and make them available like it has be
done for expm1 and log1p. Doing so, they can be used easily where needed and
they can be exchanged by the compiler variants when those are available.
Comment 1 ooo 2008-12-10 11:55:30 UTC
Sounds reasonable. Will add an implementation to rtl::math.
Comment 2 Regina Henschel 2009-03-09 20:56:55 UTC
Created attachment 60834 [details]
patch part for the folder sal
Comment 3 Regina Henschel 2009-03-09 20:57:44 UTC
Created attachment 60835 [details]
patch part for the folder scaddins
Comment 4 Regina Henschel 2009-03-09 21:00:28 UTC
The patches are based on DEV300_m42.
Comment 5 Regina Henschel 2009-03-22 22:17:15 UTC
Created attachment 61104 [details]
patch now based on odff06, move erf and erfc from scaddins to sal
Comment 6 Regina Henschel 2009-03-22 22:18:20 UTC
Created attachment 61105 [details]
patch now based on odff06, move erf and erfc from scaddins to sal
Comment 7 ooo 2009-03-24 17:36:21 UTC
In cws odff06:

revision 269982
sal/inc/rtl/math.h
sal/inc/rtl/math.hxx
sal/rtl/source/math.cxx
sal/util/sal.map
scaddins/source/analysis/analysishelper.cxx

Note: I removed the unnecessary (and mismatching because of different calling
convention and throws declaration) forward declaration of rtl_math_erfc() before
rtl_math_erf()
Comment 8 ooo 2009-09-04 12:14:36 UTC
Present in CWS build.