kcalc
knumber.cpp
Go to the documentation of this file.
151 if (precision < 0 || !QRegExp(QLatin1String("^[+-]?\\d+(\\.\\d+)*(e[+-]?\\d+)?$")).exactMatch(tmp)) {
163 QString expString = tmp.section(QLatin1Char('e'), 1, 1, QString::SectionCaseInsensitiveSeps | QString::SectionIncludeLeadingSep);
212 const unsigned long int bin_prec = static_cast<unsigned long int>(double(precision) * M_LN10 / M_LN2 + 1);
247 QString s(QLatin1String("3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117068"));
262 QString s(QLatin1String("2.7182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664274"));
281 const QRegExp float_regex(QString(QLatin1String("^([+-]?\\d*)(%1\\d*)?(e([+-]?\\d+))?$")).arg(QRegExp::escape(DecimalSeparator)));
445 } else if(detail::knumber_fraction *const p = dynamic_cast<detail::knumber_fraction *>(value_)) {
473 } else if(detail::knumber_fraction *const p = dynamic_cast<detail::knumber_fraction *>(value_)) {
621 } else if(detail::knumber_fraction *const p = dynamic_cast<detail::knumber_fraction *>(value_)) {
virtual knumber_base * tanh()=0
virtual bool is_integer() const =0
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
static void set_default_fractional_output(bool value)
Definition: knumber_fraction.cpp:43
QString & append(QChar ch)
QString toQString(int width=-1, int precision=-1) const
Definition: knumber.cpp:601
void truncate(int position)
static void set_default_fractional_input(bool value)
Definition: knumber_fraction.cpp:36
virtual knumber_base * bin(knumber_base *rhs)=0
virtual quint64 toUint64() const =0
virtual knumber_base * bitwise_or(knumber_base *rhs)=0
static void setGroupSeparator(const QString &ch)
Definition: knumber.cpp:182
QString & prepend(QChar ch)
virtual knumber_base * neg()=0
QString escape(const QString &str)
virtual knumber_base * cbrt()=0
int size() const
virtual knumber_base * add(knumber_base *rhs)=0
virtual knumber_base * mod(knumber_base *rhs)=0
virtual knumber_base * exp2()=0
virtual knumber_base * asinh()=0
Definition: knumber.h:42
virtual knumber_base * log10()=0
QString & remove(int position, int n)
virtual knumber_base * sub(knumber_base *rhs)=0
int size() const
Definition: knumber.h:44
void clear()
virtual bool is_zero() const =0
virtual knumber_base * ceil()=0
virtual knumber_base * cos()=0
static void setDefaultFloatPrecision(int precision)
Definition: knumber.cpp:210
virtual knumber_base * bitwise_shift(knumber_base *rhs)=0
Definition: knumber_base.h:38
virtual knumber_base * clone()=0
Definition: knumber_fraction.h:28
QStringList capturedTexts() const
Definition: knumber_integer.h:28
virtual knumber_base * atan()=0
virtual QString toString(int precision) const
Definition: knumber_float.cpp:818
virtual knumber_base * exp10()=0
static void setDefaultFractionalInput(bool x)
Definition: knumber.cpp:226
virtual knumber_base * sqrt()=0
static void setSplitoffIntegerForFractionOutput(bool x)
Definition: knumber.cpp:219
virtual knumber_base * abs()=0
virtual qint64 toInt64() const =0
virtual knumber_base * tgamma()=0
Definition: knumber.h:30
static void set_split_off_integer_for_fraction_output(bool value)
Definition: knumber_fraction.cpp:50
virtual knumber_base * asin()=0
virtual knumber_base * bitwise_xor(knumber_base *rhs)=0
virtual knumber_base * exp()=0
QString & replace(int position, int n, QChar after)
static void setDecimalSeparator(const QString &ch)
Definition: knumber.cpp:189
QByteArray toLatin1() const
QString mid(int position, int n) const
virtual knumber_base * floor()=0
virtual knumber_base * acos()=0
static bool default_fractional_input
Definition: knumber_fraction.h:35
Definition: knumber_float.h:28
virtual knumber_base * sinh()=0
virtual knumber_base * acosh()=0
virtual knumber_base * tan()=0
virtual QString toString(int precision) const =0
int length() const
Definition: knumber.h:43
QString section(QChar sep, int start, int end, QFlags< QString::SectionFlag > flags) const
virtual knumber_base * ln()=0
Definition: knumber_error.h:28
virtual knumber_base * pow(knumber_base *rhs)=0
virtual knumber_base * mul(knumber_base *rhs)=0
virtual knumber_base * factorial()=0
virtual knumber_base * cosh()=0
virtual knumber_base * atanh()=0
virtual knumber_base * div(knumber_base *rhs)=0
virtual knumber_base * bitwise_and(knumber_base *rhs)=0
virtual knumber_base * cmp()=0
virtual knumber_base * log2()=0
bool exactMatch(const QString &str) const
Definition: knumber.h:41
virtual knumber_base * sin()=0
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:42:28 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:42:28 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.