Archived issue #0029289
Wrong derivatives in math_TrigonometricFunctionRoots.cxx file
Description
Hallo, in OCC 7.2.0 it seems that the derivatives implemented in MyTrigoFunction::Derivative() and MyTrigoFunction::Derivatives() are wrong (see file math_TrigonometricFunctionRoots.cxx). In fact it seems that in MyTrigoFunction::Derivative() the code "D-=CC*SN+DD*CN;" should be corrected to "D+=-CC*SN+DD*CN;", while in MyTrigoFunction::Derivatives() the code "D = -AACN*SN + BB*(CN*CN+SN*SN);" should be corrected to "D = -AACN*SN + BB*(CN*CN-SN*SN);". Please, can you check?
Author
Author
Steps to reproduce
Test case
bugs modalg_7 bug29289
bugs modalg_7 bug29289
Public activity
27 archived notes
Participants are labeled by their role within this record.
I completely agree
I have attached the picture from the old repository where this code has been changed last time (20 years ago).
Dear Igor, please take care of this bug.
Besides, I have run tests with the fix applied, and observed no differences from master. It seems that this functional is almost never used.
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: ifv
Date: Thu Nov 9 17:20:10 2017 +0300
0029289: Wrong derivatives in math_TrigonometricFunctionRoots.cxx file
Class MyTrigoFunction is removed from file math_TrigonometricFunctionRoots.cxx.
New class math_TrigonometricEquationFunction with the same functionality is created to provide possibilities
for individual testing.
Expressions for derivatives are corrected.
New Draw command "intconcon" for intersection 2d conic curves is created.
Test command OCC29289 (file QABugs_20.cxx) is created for individual testing math_TrigonometricEquationFunction.
It is used in tests/bugs/modalg_7/bug29289
[revision removed]
Detailed log of new commits:
Author: ifv
Date: Thu Nov 9 17:20:10 2017 +0300
0029289: Wrong derivatives in math_TrigonometricFunctionRoots.cxx file
Class MyTrigoFunction is removed from file math_TrigonometricFunctionRoots.cxx.
New class math_TrigonometricEquationFunction with the same functionality is created to provide possibilities
for individual testing.
Expressions for derivatives are corrected.
New Draw command "intconcon" for intersection 2d conic curves is created.
Test command OCC29289 (file QABugs_20.cxx) is created for individual testing math_TrigonometricEquationFunction.
It is used in tests/bugs/modalg_7/bug29289
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branches CR29289 and CR29289_prod are ready for review.
Test results in jenkins CR29289-CR29289_prod-IFV
Test results in jenkins CR29289-CR29289_prod-IFV
Remarks:
src/GeomliteTest/GeomliteTest_API2dCommands.cxx
- 433 and others. It is unsafe to assign pointer to the address of the local variable, at this pointer having longer life cycle than the variable. It is needed to use operator new to allocate memory, and use std::auto_ptr to store the pointer.
- 490: incorrect indent and using tab character.
src/math/math_TrigonometricEquationFunction.hxx
- rename private class members like AA -> myAA.
src/GeomliteTest/GeomliteTest_API2dCommands.cxx
- 433 and others. It is unsafe to assign pointer to the address of the local variable, at this pointer having longer life cycle than the variable. It is needed to use operator new to allocate memory, and use std::auto_ptr to store the pointer.
- 490: incorrect indent and using tab character.
src/math/math_TrigonometricEquationFunction.hxx
- rename private class members like AA -> myAA.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
CR29289 is updated according to remarks
Reviewed.
Combination -
OCCT branch : [archived branch] SHA - [revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested on optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian70-64:
OCCT
Total CPU difference: 20668.26000000056 / 20769.880000000467 [-0.49%]
Products
Total CPU difference: 7860.150000000077 / 7901.260000000098 [-0.52%]
Windows-64-VC10:
OCCT
Total CPU difference: 18482.28087539841 / 18481.95327329852 [+0.00%]
Products
Total CPU difference: 7854.291547699987 / 7874.587277799976 [-0.26%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
New test case is OK
OCCT branch : [archived branch] SHA - [revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested on optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian70-64:
OCCT
Total CPU difference: 20668.26000000056 / 20769.880000000467 [-0.49%]
Products
Total CPU difference: 7860.150000000077 / 7901.260000000098 [-0.52%]
Windows-64-VC10:
OCCT
Total CPU difference: 18482.28087539841 / 18481.95327329852 [+0.00%]
Products
Total CPU difference: 7854.291547699987 / 7874.587277799976 [-0.26%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
New test case is OK
I created IR-WEEK47 for branches with status TESTED.
CR29289 rebased on all others branches caused problem of compilation on all platforms.
I removed CR29289 from IR-WEEK47.
Problems are here:
http://jenkins-test-10.nnov.opencascade.com/view/IR-WEEK47-INV/view/OCCT%20compile/job/IR-WEEK47-INV-OCCT-Windows-64-VC10-opt-compile/3/parsed_console/
CR29289 rebased on all others branches caused problem of compilation on all platforms.
I removed CR29289 from IR-WEEK47.
Problems are here:
http://jenkins-test-10.nnov.opencascade.com/view/IR-WEEK47-INV/view/OCCT%20compile/job/IR-WEEK47-INV-OCCT-Windows-64-VC10-opt-compile/3/parsed_console/
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: ifv
Date: Thu Nov 23 13:34:52 2017 +0300
Fix for compilation problems with auto_ptr
[revision removed]
Detailed log of new commits:
Author: ifv
Date: Thu Nov 23 13:34:52 2017 +0300
Fix for compilation problems with auto_ptr
CR29289 is updated to fix compilation problems
Recently we implemented support VC 2008
Fix for CR29289 caused problems of compilation on this platform.
http://jenkins-test-08.nnov.opencascade.com/view/IR-WEEK47_IR-WEEK47/view/OCCT%20compile/job/IR-WEEK47_IR-WEEK47-OCCT-Windows-32-VC9-opt-compile/2/parsed_console/
http://jenkins-test-08.nnov.opencascade.com/view/IR-WEEK47_IR-WEEK47/view/OCCT%20compile/job/IR-WEEK47_IR-WEEK47-OCCT-Windows-64-VC9-opt-compile/2/parsed_console/
Fix for CR29289 caused problems of compilation on this platform.
http://jenkins-test-08.nnov.opencascade.com/view/IR-WEEK47_IR-WEEK47/view/OCCT%20compile/job/IR-WEEK47_IR-WEEK47-OCCT-Windows-32-VC9-opt-compile/2/parsed_console/
http://jenkins-test-08.nnov.opencascade.com/view/IR-WEEK47_IR-WEEK47/view/OCCT%20compile/job/IR-WEEK47_IR-WEEK47-OCCT-Windows-64-VC9-opt-compile/2/parsed_console/
Dear Igor,
1. Please correct the code of the new command intconcon so that to put information message in console with each "return 1".
2. See the example of usage of unique_ptr in OSD_Parallel.hxx.
1. Please correct the code of the new command intconcon so that to put information message in console with each "return 1".
2. See the example of usage of unique_ptr in OSD_Parallel.hxx.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
CR29289 is updated to fix problem with unique/auto_ptr
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Problem of compilation again:
http://jenkins-test-08.nnov.opencascade.com/view/IR-WEEK48_IR-WEEK48/view/OCCT%20compile/job/IR-WEEK48_IR-WEEK48-OCCT-Windows-32-VC9-opt-compile/
http://jenkins-test-08.nnov.opencascade.com/view/IR-WEEK48_IR-WEEK48/view/OCCT%20compile/job/IR-WEEK48_IR-WEEK48-OCCT-Windows-64-VC9-opt-compile/
http://jenkins-test-08.nnov.opencascade.com/view/IR-WEEK48_IR-WEEK48/view/OCCT%20compile/job/IR-WEEK48_IR-WEEK48-OCCT-Windows-32-VC9-opt-compile/
http://jenkins-test-08.nnov.opencascade.com/view/IR-WEEK48_IR-WEEK48/view/OCCT%20compile/job/IR-WEEK48_IR-WEEK48-OCCT-Windows-64-VC9-opt-compile/
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Correct version of the branch has been restored.
Results of compilation with VC2008 are OK.
http://jenkins-test-08.nnov.opencascade.com/view/CR29289_CR29289_prod/view/OCCT%20compile/job/CR29289_CR29289_prod-OCCT-Windows-32-VC9-opt-compile/
http://jenkins-test-08.nnov.opencascade.com/view/CR29289_CR29289_prod/view/OCCT%20compile/job/CR29289_CR29289_prod-OCCT-Windows-64-VC9-opt-compile/
http://jenkins-test-08.nnov.opencascade.com/view/CR29289_CR29289_prod/view/OCCT%20compile/job/CR29289_CR29289_prod-OCCT-Windows-32-VC9-opt-compile/
http://jenkins-test-08.nnov.opencascade.com/view/CR29289_CR29289_prod/view/OCCT%20compile/job/CR29289_CR29289_prod-OCCT-Windows-64-VC9-opt-compile/
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Related records