MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000902Community[OCCT] OCCT:Foundation Classespublic2002-10-25 11:242011-12-15 17:54
Reporteremo 
Assigned Tovtn 
PrioritynormalSeveritytrivial 
StatusclosedResolutionfixed 
PlatformOSAllOS Version
Product Version 
Target VersionFixed in Version[OCCT] 5.1.0 
Summary0000902: bad derivative
DescriptionThis bug has been added by Jacques Leroy at
http://www.opencascade.org/forumorg/bug.php?bug_id=88&f=8 [^] .

in ~/src/Expr/Expr_Exponential.cxx

the Derivative() method:

Handle(Expr_GeneralExpression) Expr_Exponential::Derivative (const Handle
(Expr_NamedUnknown)& X) const
{
  if (!Contains(X)) {
    return new Expr_NumericValue(0.0);
  }
  Handle(Expr_GeneralExpression) myexp = Operand();
  Handle(Expr_GeneralExpression) myder = myexp->Derivative(X);
  Handle(Expr_Product) resu = Expr::CopyShare(myexp) * myder;
  return resu->ShallowSimplified();
}

is wrong. (Indeed Exponential(X).Derivative(X) gives X !!)

It should be: (see BUG FIX)

Handle(Expr_GeneralExpression) Expr_Exponential::Derivative (const Handle
(Expr_NamedUnknown)& X) const
{
  if (!Contains(X)) {
    return new Expr_NumericValue(0.0);
  }
  Handle(Expr_GeneralExpression) myexp = Operand();
  Handle(Expr_GeneralExpression) myder = myexp->Derivative(X);
  Handle(Expr_Product) resu = Expr::CopyShare(this) * myder; // BUG FIX !!
  return resu->ShallowSimplified();
}
TagsNo tags attached.
Test case number
Attached Fileszip file icon Expr.zip (1,011 bytes) 2003-04-29 13:11

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2002-10-25 11:26 bugmaster Assigned To bugmaster => vtn
2002-10-25 11:26 bugmaster Status new => assigned
2003-04-29 17:11 vtn Status assigned => resolved
2003-04-30 11:40 apv CC => apv
2003-04-30 12:03 apv CC => aki
2003-06-02 12:46 bugmaster Status resolved => closed
2003-06-02 12:46 bugmaster Resolution @0@ => fixed
2011-08-02 11:23 bugmaster Category OCCT:FDC => OCCT:Foundation Classes
2011-12-15 17:54 bugmaster Project Open CASCADE => Community


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker