#include #include extern "C" { #include #include } namespace Poincare { Expression::Type Undefined::type() const { return Type::Undefined; } Expression * Undefined::clone() const { return new Undefined(); } int Undefined::polynomialDegree(char symbolName) const { return -1; } template Complex * Undefined::templatedApproximate(Context& context, AngleUnit angleUnit) const { return new Complex(Complex::Undefined()); } ExpressionLayout * Undefined::createLayout(PrintFloat::Mode floatDisplayMode, int numberOfSignificantDigits) const { char buffer[16]; int numberOfChars = PrintFloat::convertFloatToText(NAN, buffer, 16, 1, floatDisplayMode); return LayoutEngine::createStringLayout(buffer, numberOfChars); } int Undefined::writeTextInBuffer(char * buffer, int bufferSize, PrintFloat::Mode floatDisplayMode, int numberOfSignificantDigits) const { if (bufferSize == 0) { return -1; } return strlcpy(buffer, "undef", bufferSize); } }