[poincare] Add scopes in ArcSine, ArcCosine...

This commit is contained in:
Léa Saviot
2018-08-31 14:55:51 +02:00
parent 132223606a
commit 61e75ac1a3
3 changed files with 15 additions and 9 deletions

View File

@@ -36,9 +36,11 @@ Complex<T> ArcCosineNode::computeOnComplex(const std::complex<T> c, Preferences:
}
Expression ArcCosine::shallowReduce(Context & context, Preferences::AngleUnit angleUnit) {
Expression e = Expression::defaultShallowReduce(context, angleUnit);
if (e.isUndefinedOrAllocationFailure()) {
return e;
{
Expression e = Expression::defaultShallowReduce(context, angleUnit);
if (e.isUndefinedOrAllocationFailure()) {
return e;
}
}
#if MATRIX_EXACT_REDUCING
if (childAtIndex(0).type() == Type::Matrix) {

View File

@@ -36,9 +36,11 @@ Complex<T> ArcSineNode::computeOnComplex(const std::complex<T> c, Preferences::A
}
Expression ArcSine::shallowReduce(Context & context, Preferences::AngleUnit angleUnit) {
Expression e = Expression::defaultShallowReduce(context, angleUnit);
if (e.isUndefinedOrAllocationFailure()) {
return e;
{
Expression e = Expression::defaultShallowReduce(context, angleUnit);
if (e.isUndefinedOrAllocationFailure()) {
return e;
}
}
#if MATRIX_EXACT_REDUCING
if (childAtIndex(0).type() == Type::Matrix) {

View File

@@ -36,9 +36,11 @@ Expression ArcTangentNode::shallowReduce(Context & context, Preferences::AngleUn
}
Expression ArcTangent::shallowReduce(Context & context, Preferences::AngleUnit angleUnit) {
Expression e = Expression::defaultShallowReduce(context, angleUnit);
if (e.isUndefinedOrAllocationFailure()) {
return e;
{
Expression e = Expression::defaultShallowReduce(context, angleUnit);
if (e.isUndefinedOrAllocationFailure()) {
return e;
}
}
#if MATRIX_EXACT_REDUCING
if (childAtIndex(0).type() == ExpressionNode::Type::Matrix) {