mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-21 06:40:37 +01:00
[poincare] Create a a flag on Expression that is set when the
approximation encouters a complex value All approximation methods take the complex format into account.
This commit is contained in:
@@ -48,7 +48,7 @@ Expression ComplexArgument::shallowReduce(Context & context, Preferences::Comple
|
||||
#endif
|
||||
bool real = c.isReal(context);
|
||||
if (real) {
|
||||
float app = c.approximateToScalar<float>(context, angleUnit);
|
||||
float app = c.node()->approximate(float(), context, angleUnit).toScalar();
|
||||
if (!std::isnan(app) && app >= Expression::epsilon<float>()) {
|
||||
// arg(x) = 0 if x > 0
|
||||
Expression result = Rational(0);
|
||||
|
||||
Reference in New Issue
Block a user