You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2012/12/31 02:22:38 UTC
[Bug 121561] New: Use of boost instead of system dependent
hyperbolic functions
https://issues.apache.org/ooo/show_bug.cgi?id=121561
Bug ID: 121561
Issue Type: DEFECT
Summary: Use of boost instead of system dependent hyperbolic
functions
Classification: Application
Product: spreadsheet
Version: AOO400-dev
Hardware: All
OS: All
Status: CONFIRMED
Severity: normal
Priority: P3
Component: code
Assignee: issues@openoffice.apache.org
Reporter: pfg@apache.org
CC: issues@openoffice.apache.org
Created attachment 80082
--> https://issues.apache.org/ooo/attachment.cgi?id=80082&action=edit
Use basic hyperbolic and power functions from boost in Sc
Some functions are known to have poor implementations in most OS's libc. The
results can be poor math but also we end up with functions that are highly
dependent on the operating system.
Boost, OTOH, has excellent implementations of some special functions.
I made a proof of concept patch to use Boost implementations of asinh, acosh,
and atanh.
This may serve as a proof-of-concept to do something similar with other
functions and to determine testing procedures for such cases.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
--- Comment #13 from SVN Robot <sv...@dev.null.org> ---
"pfg" committed SVN revision 1428523 into trunk:
i121561 - Attempt to fix windows build issue
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
Regina Henschel <rb...@t-online.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rb.henschel@t-online.de
--- Comment #6 from Regina Henschel <rb...@t-online.de> ---
Hi Pedro, bug 97605 contains my study of the accuracy problem and contains
documents with test cases, one for acosh and one for asinh. Please have a look
at them with your boost using version.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
--- Comment #12 from Pedro Giffuni <pf...@apache.org> ---
Just wondering why the robot didn't catch r1428523
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
Pedro Giffuni <pf...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #80086|0 |1
is obsolete| |
Attachment #80094|0 |1
is obsolete| |
--- Comment #20 from Pedro Giffuni <pf...@apache.org> ---
Created attachment 80270
--> https://issues.apache.org/ooo/attachment.cgi?id=80270&action=edit
patch for the scaddin error functions
This is a proof of concept patch to replace the erf functions with the ones in
boost.
This includes some unrelated fixes for the complex stuff.
--
You are receiving this mail because:
You are on the CC list for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
Pedro Giffuni <pf...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|CONFIRMED |ACCEPTED
--- Comment #7 from Pedro Giffuni <pf...@apache.org> ---
(In reply to comment #6)
> Hi Pedro, bug 97605 contains my study of the accuracy problem and contains
> documents with test cases, one for acosh and one for asinh. Please have a
> look at them with your boost using version.
Excellent tests Regina!
We are now better than Gnumeric and very near MuPad.
FWIW, I was already detecting similar issues in my tests in Symphony.
It seems the Symphony guys forgot to update RTL and still carry the
defects you detected.
I think this is ready for wider testing, so I will commit it.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
--- Comment #8 from SVN Robot <sv...@dev.null.org> ---
"pfg" committed SVN revision 1427988 into trunk:
i121561 - Use of boost instead of RTL hyperbolic/power functions.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of system dependent hyperbolic
functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
--- Comment #1 from Pedro Giffuni <pf...@apache.org> ---
Created attachment 80083
--> https://issues.apache.org/ooo/attachment.cgi?id=80083&action=edit
A basic spreadsheet to see that things work
I tried doing some very basic tests to see if these functions produce
consistent
results. The results are inconclusive from a precision POV, I basically only
got different results in the last digit in a result in atanh, and a small error
with small numbers in in acosh, but it seems pretty similar to the system
libraries.
More testing with small values of acosh are desirable.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of system dependent hyperbolic
functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
Pedro Giffuni <pf...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #80082|0 |1
is obsolete| |
--- Comment #4 from Pedro Giffuni <pf...@apache.org> ---
Created attachment 80086
--> https://issues.apache.org/ooo/attachment.cgi?id=80086&action=edit
Use hyperbolic and power function from boost in Sc
I adjusted the Boost policy so that it behaves like the original functions.
With this adjustments Regina's PMT test won't crash and Calc passes the test.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
--- Comment #18 from Pedro Giffuni <pf...@apache.org> ---
(In reply to comment #17)
> Created attachment 80102 [details]
> Use boost tgamma and lgamma
>
> This is yet untested but uses "true" gamma and log gamma from Boost.
>
The patch won't compile due to a bug in boost 1.48 :(
https://svn.boost.org/trac/boost/ticket/6400
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of system dependent hyperbolic
functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
Pedro Giffuni <pf...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #80082|0 |1
is patch| |
Attachment #80082|application/octet-stream |text/plain
mime type| |
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
--- Comment #11 from Pedro Giffuni <pf...@apache.org> ---
(In reply to comment #10)
> Created attachment 80094 [details]
> log of failed sc compile on win buildbot run #450
Thank you so much for the report.. and patience!
It looks like the MSVC doesn't like the default policy.
There is a MSVC specific hint in the Boost documentation:
http://www.boost.org/doc/libs/1_48_0/libs/math/doc/sf_and_dist/html/math_toolkit/policy/pol_tutorial/changing_policy_defaults.html
I committed a change and MSVC should be less strict about assertions now but it
may happen that this needs to be fixed in the Windows specific build or
reverted :(.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
--- Comment #16 from SVN Robot <sv...@dev.null.org> ---
"hdu" committed SVN revision 1428926 into trunk:
#i121561# workaround windows build problem with the new boost functions
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
Pedro Giffuni <pf...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ACCEPTED |CONFIRMED
Latest|--- |AOO 3.4.1
Confirmation on| |
Difficulty|--- |medium
Assignee|pfg@apache.org |issues@openoffice.apache.or
| |g
--- Comment #24 from Pedro Giffuni <pf...@apache.org> ---
I lost interest and I won't be working on this anymore.
I leave some patches in case someone else wants to work on it.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of system dependent hyperbolic
functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
--- Comment #2 from Regina Henschel <rb...@t-online.de> ---
Created attachment 80085
--> https://issues.apache.org/ooo/attachment.cgi?id=80085&action=edit
Testcases for PMT
Hi Pedro. Find attached the test cases for PMT, which I had used when fixing
function PMT in bug 91870. The blue values are calculated with a CAS. While the
rate goes zero the payment should converge monotonically to 7.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of system dependent hyperbolic
functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
--- Comment #3 from Pedro Giffuni <pf...@apache.org> ---
Comment on attachment 80085
--> https://issues.apache.org/ooo/attachment.cgi?id=80085
Testcases for PMT
Whoa ... very interesting !!!
The values seem OK, but Boost just failed the tests!
Looking at the "negative 1" and "negative 0" spreadsheets Calc crashes:
terminate called after throwing an instance of
'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<_STL::overflow_error>
>'
I will have to look at the Policy stuff.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
Pedro Giffuni <pf...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #80086|0 |1
is patch| |
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
--- Comment #21 from Pedro Giffuni <pf...@apache.org> ---
Created attachment 80271
--> https://issues.apache.org/ooo/attachment.cgi?id=80271&action=edit
Basic tests the error functions
These currently return the same values as the native implementations, so I only
include them for reference.
--
You are receiving this mail because:
You are on the CC list for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
--- Comment #22 from Pedro Giffuni <pf...@apache.org> ---
Created attachment 80272
--> https://issues.apache.org/ooo/attachment.cgi?id=80272&action=edit
Additional use of erf functions in sc (proof of concept)
This is was a test that seemed to work however, uses of erf in sc are
unnecessary as we can call directly the boost versions.
--
You are receiving this mail because:
You are on the CC list for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
hdu@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hdu@apache.org
--- Comment #9 from hdu@apache.org ---
Thanks for working on this important task!
The win buildbot complains in http://ci.apache.org/builders/aoo-win7/builds/451
about some problems caused by the changes though:
main/solver/350/wntmsci12.pro/inc\boost/math/special_functions/atanh.hpp(78) :
error C2784: '_Tp _STL::abs(const _STL::complex<_Tp> &)' : could not deduce
template argument for 'const _STL::complex<_Tp> &' from 'const value_type'
E:/slave14/aoo-win7/build/main/solver/350/wntmsci12.pro/inc/stl\stl/_complex.h(768)
: see declaration of '_STL::abs'
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
Pedro Giffuni <pf...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|CONFIRMED |RESOLVED
Resolution|--- |WONTFIX
--- Comment #25 from Pedro Giffuni <pf...@apache.org> ---
Some of this was done but in general there is a lack of interest.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
Pedro Giffuni <pf...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Use of boost instead of |Use of boost instead of RTL
|system dependent hyperbolic |hyperbolic/power functions
|functions |
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
Pedro Giffuni <pf...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #80272|0 |1
is patch| |
Attachment #80272|0 |1
is obsolete| |
Attachment #80272|application/octet-stream |text/plain
mime type| |
--
You are receiving this mail because:
You are on the CC list for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
--- Comment #17 from Pedro Giffuni <pf...@apache.org> ---
Created attachment 80102
--> https://issues.apache.org/ooo/attachment.cgi?id=80102&action=edit
Use boost tgamma and lgamma
This is yet untested but uses "true" gamma and log gamma from Boost.
The original code was based on the Boost implementation so this replacement
makes sense plus we get the advantages of type promotion.
While here, I replaced the author field in the log to "bst", to denote that we
are using Boost. No idea yet what secondary effects (if any) this may have.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
--- Comment #23 from Pedro Giffuni <pf...@apache.org> ---
Created attachment 80273
--> https://issues.apache.org/ooo/attachment.cgi?id=80273&action=edit
WIP: Use boost functions for Bessel.
This currently doesn't build, but it shows the cleanups that result of using
the boost functions instead.
--
You are receiving this mail because:
You are on the CC list for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
Pedro Giffuni <pf...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #80273|0 |1
is obsolete| |
--
You are receiving this mail because:
You are on the CC list for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
andrew@pitonyak.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andrew@pitonyak.org
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
--- Comment #10 from hdu@apache.org ---
Created attachment 80094
--> https://issues.apache.org/ooo/attachment.cgi?id=80094&action=edit
log of failed sc compile on win buildbot run #450
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
Rob Weir <ro...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|WONTFIX |---
--- Comment #26 from Rob Weir <ro...@apache.org> ---
Please refer to the process for marking issues WONTFIX:
http://wiki.openoffice.org/wiki/Issue_lifecycle
In particular, they should be discussed on the mailing list first.
Thanks!
-Rob
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
Pedro Giffuni <pf...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Issue Type|DEFECT |ENHANCEMENT
Assignee|issues@openoffice.apache.or |pfg@apache.org
|g |
--- Comment #19 from Pedro Giffuni <pf...@apache.org> ---
Just a status report: I made some fixes to our internal boost to fix a
compilation bug.
Running a comparison between boost gamma and our native gamma I get the exact
same results.
Running a comparison between the boost Normal function and our native normal
function I get the exact same results.
In general the results with Boost are good and the code looks a lot cleaner but
it is not exactly urgent to change the implementation if the results are the
same. Boost also causes many warnings.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
--- Comment #14 from hdu@apache.org ---
(In reply to comment #12)
> Just wondering why the robot didn't catch r1428523
The robot caught the change, tried to update the issue, could not connect and
so queued the update until the robot was woken up by another commit. Maybe it
should retry after 1min, 2min, 4min, ... instead
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
Pedro Giffuni <pf...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #80083|0 |1
is obsolete| |
--- Comment #5 from Pedro Giffuni <pf...@apache.org> ---
Created attachment 80090
--> https://issues.apache.org/ooo/attachment.cgi?id=80090&action=edit
Exercise a bit the Hyperbolic functions
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121561] Use of boost instead of RTL hyperbolic/power functions
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121561
--- Comment #15 from SVN Robot <sv...@dev.null.org> ---
"pfg" committed SVN revision 1428922 into trunk:
i121561 - Better attempt to fix the Windows build.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.