Configuration of your own translation

TO SUPPORT MY WORK, ORDER A COMMERCIAL LICENSE
THANK YOU!

The tutorial consists of more than 200 live examples from 50 sections. Each of the examples can be copied and run on your own environment. In addition, mXparser provides an extensive collection of over 500 built-in math functions, expressions and symbols. Familiarize yourself with the scope and the syntax. Live testing is the best way to learn. Good luck! 🙂

Tutorial Math Collection API spec Download

Below is the code for JAVA, the code for C# is almost identical. To copy the code, double-click inside the frame.

String Model generated based on String Resources

List of available options

// JAVA: import org.mariuszgromada.math.mxparser.*;
// C#: using org.mariuszgromada.math.mxparser;
// ...

// To set your own string resources
StringModel.setStringResources(StringResources stringResources);

// To set default string resources
StringModel.setDefaultStringResources();

// To get currently used string resources
StringResources StringModel.getStringResources();

// To print current model
StringModel.print();

// To print elements description
StringModel.printDescriptions();

// To print text resources
StringResources.print();

// To print initial source code
// to define text resources
StringResources.printInitSrc();

Case 1: Definition of text resources based on partial translation

// JAVA: import org.mariuszgromada.math.mxparser.*;
// C#: using org.mariuszgromada.math.mxparser;
// ...

// StringResources base class generates the
// default values for all the needed elements.
// Thanks to this it is enough to translate
// just the required elements.
class StringResourcesPL extends StringResources {
	StringResourcesPL() {
		USER_LANGUAGE = "Polish";
		NUMBER_LITERAL = "Literał liczbowy";
		NUMBER = "Liczba";
		ALL_HELP_CONTENT = "Pomoc";
		KEYWORD = "Słowo kluczowe";
		TYPE = "Typ";
		SYNTAX = "Składnia";
		SINCE = "Od";
		DESCRIPTION = "Opis";
		HELP_CONTENT_LIMITED_TO_QUERY = "Zawartość pomocy została ograniczona do kwerendy";
	}
}

// Let's see how StringModel works before the change
mXparser.consolePrintln("Before change");
mXparser.consolePrintHelp("type=Number");
// Let's apply the translation
StringResourcesPL stringResourcesPL = new StringResourcesPL();
StringModel.setStringResources(stringResourcesPL);

// Let's see how StringModel works after the change
mXparser.consolePrintln("After change");
mXparser.consolePrintHelp("type=Liczba");

// Let's return to the default string resources
StringModel.setDefaultStringResources();

// Let's see how StringModel works after return to default
mXparser.consolePrintln("Return to default");
mXparser.consolePrintHelp("type=Number");
[mXparser-v.5.2.0] Before change
[mXparser-v.5.2.0] Help content limited to query: 'type=Number'
  #  Keyword             Type                    Syntax                                        Since Description
  -  --------            ----                    ------                                        ----- -----------
  1. Number literal      <Number>                -2, 0.2, -002.1, 2.3e10, -.212, 1_2, 2_1_3, b1.111, b2.1001, h.af1,...1.0   Number literal: Integer (Since 1.0): 1, -2; Decimal (Since 1.0): 0.2, -0.3, 1.2; Leading zero (Since 4.1): 001, -002.1; Scientific notation (Since 4.2): 1.2e-10, 1.2e+10, 2.3E10; No leading zero (Since 4.2): .2, -.212; Fractions (Since 4.2): 1_2, 2_1_3, -14_3; Other numeral systems (Since 4.1): b1.111, b2.1001, b3.12021, -b16.af12, h.af1, -b.1001, o.0127;
[mXparser-v.5.2.0] After change
[mXparser-v.5.2.0] Zawartość pomocy została ograniczona do kwerendy: 'type=Liczba'
  #  Słowo kluczowe      Typ                     Składnia                                      Od    Opis
  -  --------            ----                    ------                                        ----- -----------
  1. Literał liczbowy    <Liczba>                -2, 0.2, -002.1, 2.3e10, -.212, 1_2, 2_1_3, b1.111, b2.1001, h.af1,...1.0   Literał liczbowy: Integer (Od 1.0): 1, -2; Decimal (Od 1.0): 0.2, -0.3, 1.2; Leading zero (Od 4.1): 001, -002.1; Scientific notation (Od 4.2): 1.2e-10, 1.2e+10, 2.3E10; No leading zero (Od 4.2): .2, -.212; Fractions (Od 4.2): 1_2, 2_1_3, -14_3; Other numeral systems (Od 4.1): b1.111, b2.1001, b3.12021, -b16.af12, h.af1, -b.1001, o.0127;
[mXparser-v.5.2.0] Return to default
[mXparser-v.5.2.0] Help content limited to query: 'type=Number'
  #  Keyword             Type                    Syntax                                        Since Description
  -  --------            ----                    ------                                        ----- -----------
  1. Number literal      <Number>                -2, 0.2, -002.1, 2.3e10, -.212, 1_2, 2_1_3, b1.111, b2.1001, h.af1,...1.0   Number literal: Integer (Since 1.0): 1, -2; Decimal (Since 1.0): 0.2, -0.3, 1.2; Leading zero (Since 4.1): 001, -002.1; Scientific notation (Since 4.2): 1.2e-10, 1.2e+10, 2.3E10; No leading zero (Since 4.2): .2, -.212; Fractions (Since 4.2): 1_2, 2_1_3, -14_3; Other numeral systems (Since 4.1): b1.111, b2.1001, b3.12021, -b16.af12, h.af1, -b.1001, o.0127;

Case 2: Definition of text resources based on full translation

// JAVA: import org.mariuszgromada.math.mxparser.*;
// C#: using org.mariuszgromada.math.mxparser;
// ...

// Library can generate initial source code
// that you can use and then adapt
// according tyo your needs
StringResources stringResources = StringModel.getStringResources();

mXparser.consolePrintln("Printing the list of variables that can be translated:");
stringResources.printInitSrc();
[mXparser-v.5.2.0] Printing the list of variables that can be translated:
USER_LANGUAGE = "English";
// -------------------------------------------------
STARTING_SYNTAX_CHECK = "Starting syntax check...";
NO_ERRORS_DETECTED = "No errors detected.";
NO_ERRORS_DETECTED_IN_ARGUMENT_DEFINITION = "No errors detected in argument definition.";
NO_ERRORS_DETECTED_IN_RECURSIVE_ARGUMENT_DEFINITION = "No errors detected in recursive argument definition.";
NO_ERRORS_DETECTED_IN_FUNCTION_DEFINITION = "No errors detected in function definition.";
NO_ERRORS_DETECTED_IN_CONSTANT_DEFINITION = "No errors detected in function definition.";
LEXICAL_ERROR_HAS_BEEN_FOUND = "A lexical error has been found.";
ERRORS_HAVE_BEEN_FOUND = "Errors have been found.";
ALREADY_CHECKED_NO_ERRORS = "The syntax has already been checked - no errors detected.";
SYNTAX_STATUS_UNKNOWN = "The syntax status is unknown.";
PROBLEM_WITH_EXPRESSION_SYNTAX = "There is a problem with expression syntax.";
// -------------------------------------------------
ENCOUNTERED = "Encountered";
AT_INDEX = "at index";
WAS_EXPECTING = "Was expecting";
WAS_EXPECTING_ONE_OF = "Was expecting one of";
UNEXPECTED_EXCEPTION_WAS_ENCOUNTERED = "An unexpected exception was encountered. Probably a parser error - please report it.";
UNEXPECTED_TOKEN_MANAGER_ERROR_WAS_ENCOUNTERED = "An unexpected token manager error was encountered. Probably a parser error - please report it.";
// -------------------------------------------------
EXPRESSION_STRING_IS_EMPTY = "The expression string is empty.";
EXPRESSION_DOES_NOT_CONTAIN_ANY_TOKENS = "The expression does not contain any tokens.";
DUPLICATED_KEYWORD = "Duplicated keywords were found. Check user-defined items. Consider using option to override built-in tokens.";
ELEMENT = "Element";
ERROR = "Error";
EXCEPTION = "Exception";
TOKEN = "Token";
INDEX = "index";
INVALID_TOKEN = "Invalid token.";
INVALID_TOKEN_POSSIBLY_MISSING_MULTIPLICATION_OPERATOR = "Invalid token. Possibly missing multiplication operator - try implied multiplication mode.";
EXPRESSION_TOKENS = "Expression tokens";
NULL_TOKENS_LIST = "NULL tokens list";
// -------------------------------------------------
FUNCTION_WITH_EXTENDED_BODY_NO_ERRORS = "User-defined function with extended body - no errors by assumption.";
ARGUMENT_WITH_EXTENDED_BODY_NO_ERRORS = "User-defined argument with extended body - no errors by assumption.";
PROVIDED_EXTENSION_IS_NULL = "Provided extension is null.";
PROVIDED_STRING_IS_NULL = "Provided string is null.";
PROVIDED_ELEMENTS_ARE_NULL = "Provided elements are null.";
MULTIPLICATION_OPERATOR_MISSING_TRY_IMPLIED_MULTIPLICATION_MODE = "Possibly missing multiplication operator - try implied multiplication mode.";
// -------------------------------------------------
STARTING_SYNTAX_CHECK_DEPENDENT_ARGUMENT = "Starting syntax check of the dependent user-defined argument.";
STARTING_SYNTAX_CHECK_RECURSIVE_ARGUMENT = "Starting syntax check of the user-defined recursive argument.";
STARTING_SYNTAX_CHECK_USER_DEFINED_FUNCTION = "Starting syntax check of the user-defined function.";
STARTING_SYNTAX_CHECK_VARIADIC_USER_DEFINED_FUNCTION = "Starting syntax check of the variadic user-defined function.";
// -------------------------------------------------
ARGUMENT_WAS_EXPECTED = "User-defined argument was expected.";
RECURSIVE_ARGUMENT_EXPECTING_1_PARAMETER = "A recursive user-defined argument requires one parameter.";
// -------------------------------------------------
INCORRECT_NUMBER_OF_PARAMETERS_IN_USER_DEFINED_FUNCTION = "Incorrect number of parameters in user-defined function.";
// -------------------------------------------------
INCORRECT_NUMBER_OF_FUNCTION_PARAMETERS = "Incorrect number of function parameters.";
EXPECTED = "Expected";
PROVIDED = "provided";
USER_DEFINED_FUNCTION_EXPECTING_AT_LEAST_ONE_ARGUMENT = "Incorrect number of parameters in user-defined function - at least one argument is expected.";
EXPECTED_EVEN_NUMBER_OF_ARGUMENTS = "Even number of arguments was expected.";
// -------------------------------------------------
INVALID_FUNCTION_NAME = "Invalid function name.";
INVALID_ARGUMENT_NAME = "Invalid argument name.";
INVALID_CONSTANT_NAME = "Invalid constant name.";
INVALID_FUNCTION_DEFINITION = "Invalid function definition.";
INVALID_ARGUMENT_DEFINITION = "Invalid argument definition.";
INVALID_CONSTANT_DEFINITION = "Invalid constant definition.";
PATTERN_DOES_NOT_MATCH = "Pattern does not match.";
PATTERN_EXAMPLES = "Pattern examples";
// -------------------------------------------------
CONSTANT_WAS_EXPECTED = "Constant value was expected.";
USER_CONSTANT_WAS_EXPECTED = "User-defined constant was expected.";
// -------------------------------------------------
UNARY_FUNCTION_EXPECTS_1_PARAMETER = "A unary function expects 1 parameter.";
BINARY_FUNCTION_EXPECTS_2_PARAMETERS = "A binary function expects 2 parameters.";
TERNARY_FUNCTION_EXPECTS_3_PARAMETERS = "A ternary function expects 3 parameters.";
// -------------------------------------------------
DERIVATIVE_OPERATOR_EXPECTS_2_OR_3_OR_4_OR_5_CALCULUS_PARAMETERS = "A derivative operator expects 2 or 3 or 4 or 5 calculus parameters.";
ARGUMENT_WAS_EXPECTED_IN_A_DERIVATIVE_OPERATOR_INVOCATION = "An argument was expected in a derivative operator invocation.";
DUPLICATED_KEYWORDS_WERE_FOUND_IN_THE_CALCULUS_OPERATOR_INVOCATION = "Duplicated keywords were found in the calculus operator invocation, check calculus parameters.";
ONE_TOKEN_WAS_EXPECTED_IN_THE_CALCULUS_OPERATOR_INVOCATION = "One token (argument or unknown) was expected in the calculus operator invocation.";
NTH_ORDER_DERIVATIVE_OPERATOR_EXPECTS_3_OR_5_CALCULUS_PARAMETERS = "N-th order derivative operator expects 3 or 5 calculus parameters.";
INTEGRAL_SOLVE_OPERATOR_EXPECTS_4_CALCULUS_PARAMETERS = "The integral / solve operator expects 4 calculus parameters.";
ITERATED_OPERATOR_EXPECTS_4_OR_5_CALCULUS_PARAMETERS = "The iterated operator expects 4 or 5 calculus parameters.";
FORWARD_BACKWARD_DIFFERENCE_EXPECTS_2_OR_3_PARAMETERS = "The forward / backward difference operator expects 2 or 3 calculus parameters.";
FORWARD_BACKWARD_DIFFERENCE_ARGUMENT_WAS_EXPECTED = "An argument was expected in the forward / backward difference operator invocation.";
AT_LEAST_ONE_ARGUMENT_WAS_EXPECTED = "At least one argument was expected.";
// -------------------------------------------------
ERROR_WHILE_EXECUTING_THE_CALCULATE = "Error while executing the calculate.";
RECURSION_CALLS_COUNTER_EXCEEDED = "Recursion calls counter exceeded maximum calls allowed.";
RECURSION_CALLS_COUNTER = "Recursion calls counter";
STARTING_CALCULATION_LOOP = "Starting calculation loop.";
CANCEL_REQUEST_FINISHING = "Cancel request encountered - finishing.";
INTERNAL_ERROR_STRANGE_TOKEN_LEVEL_FINISHING = "Internal error / strange token level - finishing. Probably a parser error - please report it.";
FATAL_ERROR_DO_NOT_KNOW_WHAT_TO_DO_WITH_THE_ENCOUNTERED_TOKEN = "Fatal error, do not know what to do with the encountered token. Probably a parser error - please report it.";
MAXIMUM_ERROR_MESSAGE_LENGTH_EXCEEDED = "The maximum error message length has been exceeded.";
// -------------------------------------------------
STARTING = "Starting...";
PARSING = "Parsing";
CALCULATED_VALUE = "Calculated value";
EXITING = "Exiting.";
DONE = "done.";
// -------------------------------------------------
KEYWORD = "Keyword";
SYNTAX = "Syntax";
NUMBER = "Number";
NUMBER_LITERAL = "Number literal";
TYPE = "Type";
SINCE = "Since";
DESCRIPTION = "Description";
// -------------------------------------------------
CALC_STEPS_REGISTER_IS_EMPTY = "CalcStepsRegister is empty";
CALC_STEPS_REGISTER_FOR = "CalcStepsRegister for";
ARGUMENT = "Argument";
FUNCTION = "Function";
EXPRESSION = "Expression";
RESULT = "result";
COMPUTING_TIME = "Computing time";
GROUP_SHORT = "gr";
NUMBER_SHORT = "nr";
FIRST = "first";
LAST = "last";
DESCRIPTION_SHORT = "descr";
STEP = "step";
// -------------------------------------------------
SERIALIZATION_PERFORMED = "Serialization has been performed:";
DESERIALIZATION_PERFORMED = "Deserialization has been performed:";
NULL_OBJECT_PROVIDED = "Null object passed in the parameter.";
NULL_FILE_PATH_PROVIDED = "Null file passed in the parameter.";
FILE_PATH_ZERO_LENGTH_PROVIDED = "The file path does not contain any characters.";
FILE_PATH_IS_NOT_A_FILE = "The file path is not a file:";
FILE_PATH_NOT_EXISTS = "The file path does not exist:";
NULL_DATA_PROVIDED = "Null data passed in the parameter.";
BINARY_SERIALIZATION_ENABLED = "Binary serialization is enabled. Use it only in a conscious and limited way.";
BINARY_SERIALIZATION_DISABLED = "Binary serialization is disabled. You can enable it if you are aware of security risks.";
// -------------------------------------------------
USER_DEFINED_EXPRESSION = "User defined expression";
USER_DEFINED_ARGUMENT = "User defined argument";
USER_DEFINED_CONSTANT = "User defined constant";
USER_DEFINED_FUNCTION = "User defined function";
USER_DEFINED_RECURSIVE_ARGUMENT = "User defined recursive argument";
// -------------------------------------------------
HELP_CONTENT_LIMITED_TO_QUERY = "Help content limited to query";
ALL_HELP_CONTENT = "All help content.";
CAPTION = "Caption";
// -------------------------------------------------
WARNING_BINARY_SERIALIZATION_SECURITY_RISKS = "SECURITY WARNING:\n"
+ "Deserializing data from an untrusted source can introduce security vulnerabilities\n"
+ "to your application. Depending on the settings used during deserialization,\n"
+ "untrusted data may be able to execute arbitrary code or cause a denial of service\n"
+ "attack. Untrusted data can come from over the network from an untrusted source\n"
+ "(e.g. any network client), or it can be manipulated/tampered by an intermediary while\n"
+ "in transit over an unauthenticated connection, or from local storage where it may\n"
+ "have been compromised/tampered, or from many other sources. MathParser.org-mXparser\n"
+ "does not provide any means to authenticate data or secure it from tampering. Use an\n"
+ "appropriate data authentication method before deserializing. Be very mindful of these\n"
+ "attack scenarios; many projects and companies and users of serialization libraries in\n"
+ "general have been bitten by untrusted deserialization of user data in the past.";
// -------------------------------------------------
BINARY_RELATION = "Binary relation";
BITWISE_OPERATOR = "Bitwise operator";
BOOLEAN_OPERATOR = "Boolean operator";
CALCULUS_OPERATOR = "Calculus operator";
CONSTANT_VALUE = "Constant value";
FUNCTION_1_ARG = "Unary function";
FUNCTION_2_ARG = "Binary function";
FUNCTION_3_ARG = "Ternary function";
FUNCTION_VARIADIC = "Variadic function";
OPERATOR = "Operator";
PARSER_SYMBOL = "Parser symbol";
RANDOM_VARIABLE = "Random variable";
UNIT = "Unit";
DIMENSIONLESS_UNIT = "Dimensionless unit";
ITERATED_OPERATOR = "Iterated operator";
// -------------------------------------------------
RATIO_FRACTION = "Ratio / Fraction";
METRIC_PREFIX = "Metric prefix";
UNIT_OF_LENGTH = "Unit of length";
UNIT_OF_AREA = "Unit of area";
UNIT_OF_VOLUME = "Unit of volume";
UNIT_OF_TIME = "Unit of time";
UNIT_OF_MASS = "Unit of mass";
UNIT_OF_INFORMATION = "Unit of information";
UNIT_OF_ENERGY = "Unit of energy";
UNIT_OF_SPEED = "Unit of speed";
UNIT_OF_ACCELERATION = "Unit of acceleration";
UNIT_OF_ANGLE = "Unit of angle";
// -------------------------------------------------
PHYSICAL_CONSTANT = "Physical constant";
ASTRONOMICAL_CONSTANT = "Astronomical constant";
MATHEMATICAL_CONSTANT = "Mathematical constant";
// -------------------------------------------------
PROBABILITY_DISTRIBUTION_FUNCTION = "Probability distribution function";
CUMULATIVE_DISTRIBUTION_FUNCTION = "Cumulative distribution function";
QUANTILE_FUNCTION = "Quantile function (inverse cumulative distribution function)";
// -------------------------------------------------
STUDENTS_T_DISTRIBUTION = "Student's t-distribution";
CHI_SQUARED_DISTRIBUTION = "Chi-squared distribution";
SNEDECORS_F_DISTRIBUTION = "Snedecor's F distribution (F-distribution or F-ratio, also known as Fisher–Snedecor distribution)";
UNIFORM_CONTINUOUS_DISTRIBUTION = "Uniform continuous distribution";
UNIFORM_DISCRETE_DISTRIBUTION = "Uniform discrete distribution";
NORMAL_DISTRIBUTION = "Normal distribution";
// -------------------------------------------------
RANDOM_INTEGER = "Random integer";
RANDOM_NATURAL_NUMBER = "Random natural number";
RANDOM_NATURAL_NUMBER_INCLUDING_0 = "Random natural number including 0";
// -------------------------------------------------
SPECIAL_FUNCTION = "Special function";
// -------------------------------------------------
SEMI_MAJOR_AXIS = "Semi major axis";
// -------------------------------------------------
BINARY_RELATION_EQ = "Equality";
BINARY_RELATION_NEQ = "Inequation";
BINARY_RELATION_LT = "Lower than";
BINARY_RELATION_GT = "Greater than";
BINARY_RELATION_LEQ = "Lower or equal";
BINARY_RELATION_GEQ = "Greater or equal";
// -------------------------------------------------
BITWISE_OPERATOR_COMPL = "Bitwise unary complement";
BITWISE_OPERATOR_AND = "Bitwise and";
BITWISE_OPERATOR_XOR = "Bitwise exclusive or";
BITWISE_OPERATOR_OR = "Bitwise inclusive or";
BITWISE_OPERATOR_LEFT_SHIFT = "Signed left shift";
BITWISE_OPERATOR_RIGHT_SHIFT = "Signed right shift";
// -------------------------------------------------
BOOLEAN_OPERATOR_AND = "Logical conjunction";
BOOLEAN_OPERATOR_OR = "Logical disjunction";
BOOLEAN_OPERATOR_NEG = "Negation";
BOOLEAN_OPERATOR_NAND = "Sheffer stroke";
BOOLEAN_OPERATOR_NOR = "Logical not or (joint denial)";
BOOLEAN_OPERATOR_XOR = "Exclusive or";
BOOLEAN_OPERATOR_IMP = "Implication";
BOOLEAN_OPERATOR_CIMP = "Converse implication";
BOOLEAN_OPERATOR_NIMP = "Material nonimplication";
BOOLEAN_OPERATOR_CNIMP = "Converse nonimplication";
BOOLEAN_OPERATOR_EQV = "Logical biconditional";
// -------------------------------------------------
CALCULUS_OPERATOR_SUM = "Summation SIGMA";
CALCULUS_OPERATOR_PROD = "Product PI";
CALCULUS_OPERATOR_INT = "Definite integral";
CALCULUS_OPERATOR_DER = "Derivative";
CALCULUS_OPERATOR_DER_LEFT = "Left derivative";
CALCULUS_OPERATOR_DER_RIGHT = "Right derivative";
CALCULUS_OPERATOR_DERN = "n-th derivative";
CALCULUS_OPERATOR_FORW_DIFF = "Forward difference";
CALCULUS_OPERATOR_BACKW_DIFF = "Backward difference";
CALCULUS_OPERATOR_AVG = "Average";
CALCULUS_OPERATOR_VAR = "Bias-corrected sample variance";
CALCULUS_OPERATOR_STD = "Bias-corrected sample standard deviation";
CALCULUS_OPERATOR_MIN = "Minimum value";
CALCULUS_OPERATOR_MAX = "Maximum value";
CALCULUS_OPERATOR_SOLVE = "Equation solving (root finding)";
// -------------------------------------------------
CONSTANT_VALUE_PI = "Pi, Archimedes' or Ludolph's number";
CONSTANT_VALUE_EULER = "Napier's or Euler's number (base of Natural logarithm)";
CONSTANT_VALUE_EULER_MASCHERONI = "Euler-Mascheroni constant";
CONSTANT_VALUE_GOLDEN_RATIO = "Golden ratio";
CONSTANT_VALUE_PLASTIC = "Plastic constant";
CONSTANT_VALUE_EMBREE_TREFETHEN = "Embree-Trefethen constant";
CONSTANT_VALUE_FEIGENBAUM_DELTA = "Feigenbaum delta constant";
CONSTANT_VALUE_FEIGENBAUM_ALPHA = "Feigenbaum alpha constant";
CONSTANT_VALUE_TWIN_PRIME = "Twin prime constant";
CONSTANT_VALUE_MEISSEL_MERTEENS = "Meissel-Mertens constant";
CONSTANT_VALUE_BRAUN_TWIN_PRIME = "Brun's constant for twin primes";
CONSTANT_VALUE_BRAUN_PRIME_QUADR = "Brun's constant for prime quadruplets";
CONSTANT_VALUE_BRUIJN_NEWMAN = "de Bruijn-Newman constant";
CONSTANT_VALUE_CATALAN = "Catalan's constant";
CONSTANT_VALUE_LANDAU_RAMANUJAN = "Landau-Ramanujan constant";
CONSTANT_VALUE_VISWANATH = "Viswanath's constant";
CONSTANT_VALUE_LEGENDRE = "Legendre's constant";
CONSTANT_VALUE_RAMANUJAN_SOLDNER = "Ramanujan-Soldner constant";
CONSTANT_VALUE_ERDOS_BORWEIN = "Erdos-Borwein constant";
CONSTANT_VALUE_BERNSTEIN = "Bernstein's constant";
CONSTANT_VALUE_GAUSS_KUZMIN_WIRSING = "Gauss-Kuzmin-Wirsing constant";
CONSTANT_VALUE_HAFNER_SARNAK_MCCURLEY = "Hafner-Sarnak-McCurley constant";
CONSTANT_VALUE_GOLOMB_DICKMAN = "Golomb-Dickman constant";
CONSTANT_VALUE_CAHEN = "Cahen's constant";
CONSTANT_VALUE_LAPLACE_LIMIT = "Laplace limit constant";
CONSTANT_VALUE_ALLADI_GRINSTEAD = "Alladi-Grinstead constant";
CONSTANT_VALUE_LENGYEL = "Lengyel's constant";
CONSTANT_VALUE_LEVY = "Levy's constant";
CONSTANT_VALUE_APERY = "Apery's constant";
CONSTANT_VALUE_MILLS = "Mills' constant";
CONSTANT_VALUE_BACKHOUSE = "Backhouse's constant";
CONSTANT_VALUE_PORTER = "Porter's constant";
CONSTANT_VALUE_LIEB_QUARE_ICE = "Lieb's square ice constant";
CONSTANT_VALUE_NIVEN = "Niven's constant";
CONSTANT_VALUE_SIERPINSKI = "Sierpinski's constant";
CONSTANT_VALUE_KHINCHIN = "Khinchin's constant";
CONSTANT_VALUE_FRANSEN_ROBINSON = "Fransen-Robinson constant";
CONSTANT_VALUE_LANDAU = "Landau's constant";
CONSTANT_VALUE_PARABOLIC = "Parabolic constant";
CONSTANT_VALUE_OMEGA = "Omega constant";
CONSTANT_VALUE_MRB = "MRB constant";
CONSTANT_VALUE_LI2 = "Logarithmic integral at point 2";
CONSTANT_VALUE_GOMPERTZ = "Gompertz constant";
CONSTANT_VALUE_LIGHT_SPEED = "Light speed in vacuum";
CONSTANT_VALUE_GRAVITATIONAL_CONSTANT = "Gravitational constant";
CONSTANT_VALUE_GRAVIT_ACC_EARTH = "Gravitational acceleration on Earth";
CONSTANT_VALUE_PLANCK_CONSTANT = "Planck constant";
CONSTANT_VALUE_PLANCK_CONSTANT_REDUCED = "Reduced Planck constant (Dirac constant)";
CONSTANT_VALUE_PLANCK_LENGTH = "Planck length";
CONSTANT_VALUE_PLANCK_MASS = "Planck mass";
CONSTANT_VALUE_PLANCK_TIME = "Planck time";
CONSTANT_VALUE_LIGHT_YEAR = "Light year";
CONSTANT_VALUE_ASTRONOMICAL_UNIT = "Astronomical unit";
CONSTANT_VALUE_PARSEC = "Parsec";
CONSTANT_VALUE_KILOPARSEC = "Kiloparsec";
CONSTANT_VALUE_EARTH_RADIUS_EQUATORIAL = "Earth equatorial radius";
CONSTANT_VALUE_EARTH_RADIUS_POLAR = "Earth polar radius";
CONSTANT_VALUE_EARTH_RADIUS_MEAN = "Earth mean radius";
CONSTANT_VALUE_EARTH_MASS = "Earth mass";
CONSTANT_VALUE_EARTH_SEMI_MAJOR_AXIS = "Earth-Sun distance";
CONSTANT_VALUE_MOON_RADIUS_MEAN = "Moon mean radius";
CONSTANT_VALUE_MOON_MASS = "Moon mass";
CONSTANT_VALUE_MONN_SEMI_MAJOR_AXIS = "Moon-Earth distance";
CONSTANT_VALUE_SOLAR_RADIUS = "Solar mean radius";
CONSTANT_VALUE_SOLAR_MASS = "Solar mass";
CONSTANT_VALUE_MERCURY_RADIUS_MEAN = "Mercury mean radius";
CONSTANT_VALUE_MERCURY_MASS = "Mercury mass";
CONSTANT_VALUE_MERCURY_SEMI_MAJOR_AXIS = "Mercury-Sun distance";
CONSTANT_VALUE_VENUS_RADIUS_MEAN = "Venus mean radius";
CONSTANT_VALUE_VENUS_MASS = "Venus mass";
CONSTANT_VALUE_VENUS_SEMI_MAJOR_AXIS = "Venus-Sun distance";
CONSTANT_VALUE_MARS_RADIUS_MEAN = "Mars mean radius";
CONSTANT_VALUE_MARS_MASS = "Mars mass";
CONSTANT_VALUE_MARS_SEMI_MAJOR_AXIS = "Mars-Sun distance";
CONSTANT_VALUE_JUPITER_RADIUS_MEAN = "Jupiter mean radius";
CONSTANT_VALUE_JUPITER_MASS = "Jupiter mass";
CONSTANT_VALUE_JUPITER_SEMI_MAJOR_AXIS = "Jupiter-Sun distance";
CONSTANT_VALUE_SATURN_RADIUS_MEAN = "Saturn mean radius";
CONSTANT_VALUE_SATURN_MASS = "Saturn mass";
CONSTANT_VALUE_SATURN_SEMI_MAJOR_AXIS = "Saturn-Sun distance";
CONSTANT_VALUE_URANUS_RADIUS_MEAN = "Uranus mean radius";
CONSTANT_VALUE_URANUS_MASS = "Uranus mass";
CONSTANT_VALUE_URANUS_SEMI_MAJOR_AXIS = "Uranus-Sun distance";
CONSTANT_VALUE_NEPTUNE_RADIUS_MEAN = "Neptune mean radius";
CONSTANT_VALUE_NEPTUNE_MASS = "Neptune mass";
CONSTANT_VALUE_NEPTUNE_SEMI_MAJOR_AXIS = "Neptune-Sun distance";
CONSTANT_VALUE_TRUE = "Boolean True represented as 1";
CONSTANT_VALUE_FALSE = "Boolean False represented as 0";
CONSTANT_VALUE_NPAR = "Automatically generated constant for user defined functions, returns number of given function parameters";
CONSTANT_VALUE_NAN = "Not-a-Number";
// -------------------------------------------------
FUNCTION_1_ARG_SIN = "Trigonometric sine";
FUNCTION_1_ARG_COS = "Trigonometric cosine";
FUNCTION_1_ARG_TAN = "Trigonometric tangent";
FUNCTION_1_ARG_CTAN = "Trigonometric cotangent";
FUNCTION_1_ARG_SEC = "Trigonometric secant";
FUNCTION_1_ARG_COSEC = "Trigonometric cosecant";
FUNCTION_1_ARG_ASIN = "Inverse trigonometric sine";
FUNCTION_1_ARG_ACOS = "Inverse trigonometric cosine";
FUNCTION_1_ARG_ATAN = "Inverse trigonometric tangent";
FUNCTION_1_ARG_ACTAN = "Inverse trigonometric cotangent";
FUNCTION_1_ARG_LN = "Natural logarithm (base e)";
FUNCTION_1_ARG_LOG2 = "Binary logarithm (base 2)";
FUNCTION_1_ARG_LOG10 = "Common logarithm (base 10)";
FUNCTION_1_ARG_RAD = "Degrees to radians";
FUNCTION_1_ARG_EXP = "Exponential";
FUNCTION_1_ARG_SQRT = "Squre root";
FUNCTION_1_ARG_SINH = "Hyperbolic sine";
FUNCTION_1_ARG_COSH = "Hyperbolic cosine";
FUNCTION_1_ARG_TANH = "Hyperbolic tangent";
FUNCTION_1_ARG_COTH = "Hyperbolic cotangent";
FUNCTION_1_ARG_SECH = "Hyperbolic secant";
FUNCTION_1_ARG_CSCH = "Hyperbolic cosecant";
FUNCTION_1_ARG_DEG = "Radians to degrees";
FUNCTION_1_ARG_ABS = "Absolut value";
FUNCTION_1_ARG_SGN = "Signum";
FUNCTION_1_ARG_FLOOR = "Floor";
FUNCTION_1_ARG_CEIL = "Ceiling";
FUNCTION_1_ARG_NOT = "Negation";
FUNCTION_1_ARG_ARSINH = "Inverse hyperbolic sine";
FUNCTION_1_ARG_ARCOSH = "Inverse hyperbolic cosine";
FUNCTION_1_ARG_ARTANH = "Inverse hyperbolic tangent";
FUNCTION_1_ARG_ARCOTH = "Inverse hyperbolic cotangent";
FUNCTION_1_ARG_ARSECH = "Inverse hyperbolic secant";
FUNCTION_1_ARG_ARCSCH = "Inverse hyperbolic cosecant";
FUNCTION_1_ARG_SA = "Sinc (normalized)";
FUNCTION_1_ARG_SINC = "Sinc (unnormalized)";
FUNCTION_1_ARG_BELL_NUMBER = "Bell number";
FUNCTION_1_ARG_LUCAS_NUMBER = "Lucas number";
FUNCTION_1_ARG_FIBONACCI_NUMBER = "Fibonacci number";
FUNCTION_1_ARG_HARMONIC_NUMBER = "Harmonic number";
FUNCTION_1_ARG_IS_PRIME = "Prime number test (is number a prime?)";
FUNCTION_1_ARG_PRIME_COUNT = "Prime-counting";
FUNCTION_1_ARG_EXP_INT = "Exponential integral";
FUNCTION_1_ARG_LOG_INT = "Logarithmic integral";
FUNCTION_1_ARG_OFF_LOG_INT = "Offset logarithmic integral";
FUNCTION_1_ARG_GAUSS_ERF = "Gauss error";
FUNCTION_1_ARG_GAUSS_ERFC = "Gauss complementary error";
FUNCTION_1_ARG_GAUSS_ERF_INV = "Inverse Gauss error";
FUNCTION_1_ARG_GAUSS_ERFC_INV = "Inverse Gauss complementary error";
FUNCTION_1_ARG_ULP = "Unit in The Last Place";
FUNCTION_1_ARG_ISNAN = "Returns true if value is a Not-a-Number (NaN), false otherwise";
FUNCTION_1_ARG_NDIG10 = "Number of digits in numeral system with base 10";
FUNCTION_1_ARG_NFACT = "Prime decomposition - number of distinct prime factors";
FUNCTION_1_ARG_ARCSEC = "Inverse trigonometric secant";
FUNCTION_1_ARG_ARCCSC = "Inverse trigonometric cosecant";
FUNCTION_1_ARG_GAMMA = "Gamma";
FUNCTION_1_ARG_LAMBERT_W0 = "Lambert-W, principal branch 0, also called the omega or product logarithm";
FUNCTION_1_ARG_LAMBERT_W1 = "Lambert-W, branch -1, also called the omega or product logarithm";
FUNCTION_1_ARG_SGN_GAMMA = "Signum of Gamma";
FUNCTION_1_ARG_LOG_GAMMA = "Log Gamma";
FUNCTION_1_ARG_DI_GAMMA = "Digamma as the logarithmic derivative of the Gamma";
FUNCTION_1_ARG_PARAM = "Automatically generated function for user defined functions, returns function parameter value at index 'i'";
// -------------------------------------------------
FUNCTION_2_ARG_LOG = "Logarithm";
FUNCTION_2_ARG_MOD = "Modulo";
FUNCTION_2_ARG_BINOM_COEFF = "Binomial coefficient, number of k-combinations that can be drawn from n-elements set";
FUNCTION_2_ARG_BERNOULLI_NUMBER = "Bernoulli numbers";
FUNCTION_2_ARG_STIRLING1_NUMBER = "Stirling numbers of the first kind";
FUNCTION_2_ARG_STIRLING2_NUMBER = "Stirling numbers of the second kind";
FUNCTION_2_ARG_WORPITZKY_NUMBER = "Worpitzky number";
FUNCTION_2_ARG_EULER_NUMBER = "Euler number";
FUNCTION_2_ARG_KRONECKER_DELTA = "Kronecker delta";
FUNCTION_2_ARG_EULER_POLYNOMIAL = "Euler polynomial";
FUNCTION_2_ARG_HARMONIC_NUMBER = "Harmonic number";
FUNCTION_2_ARG_ROUND = "Half-up rounding";
FUNCTION_2_ARG_NDIG = "Number of digits representing the number in numeral system with given base";
FUNCTION_2_ARG_DIGIT10 = "Digit at position 1 ... n (left -> right) or 0 ... -(n-1) (right -> left) - base 10 numeral system";
FUNCTION_2_ARG_FACTVAL = "Prime decomposition - factor value at position between 1 ... nfact(n) - ascending order by factor value";
FUNCTION_2_ARG_FACTEXP = "Prime decomposition - factor exponent / multiplicity at position between 1 ... nfact(n) - ascending order by factor value";
FUNCTION_2_ARG_ROOT = "N-th order root of a number";
FUNCTION_2_ARG_INC_GAMMA_LOWER = "Lower incomplete gamma";
FUNCTION_2_ARG_INC_GAMMA_UPPER = "Upper incomplete Gamma";
FUNCTION_2_ARG_REG_GAMMA_LOWER = "Lower regularized P gamma";
FUNCTION_2_ARG_REG_GAMMA_UPPER = "Upper regularized Q Gamma";
FUNCTION_2_ARG_PERMUTATIONS = "Number of k-permutations that can be drawn from n-elements set";
FUNCTION_2_ARG_BETA = "The Beta, also called the Euler integral of the first kind";
FUNCTION_2_ARG_LOG_BETA = "The Log Beta, also called the Log Euler integral of the first kind";
// -------------------------------------------------
FUNCTION_3_ARG_IF = "If";
FUNCTION_3_ARG_CHI = "Characteristic function for x in (a,b)";
FUNCTION_3_ARG_CHI_LR = "Characteristic function for x in [a,b]";
FUNCTION_3_ARG_CHI_L = "Characteristic function for x in [a,b)";
FUNCTION_3_ARG_CHI_R = "Characteristic function for x in (a,b]";
FUNCTION_3_ARG_DIGIT = "Digit at position 1 ... n (left -> right) or 0 ... -(n-1) (right -> left) - numeral system with given base";
FUNCTION_3_ARG_INC_BETA = "The incomplete Beta, also called the incomplete Euler integral of the first kind";
FUNCTION_3_ARG_REG_BETA = "The regularized incomplete Beta (or regularized beta), also called the regularized incomplete Euler integral of the first kind";
// -------------------------------------------------
FUNCTION_VARIADIC_IFF = "If function";
FUNCTION_VARIADIC_MIN = "Minimum";
FUNCTION_VARIADIC_MAX = "Maximum";
FUNCTION_VARIADIC_CONT_FRAC = "Continued fraction";
FUNCTION_VARIADIC_CONT_POL = "Continued polynomial";
FUNCTION_VARIADIC_GCD = "Greatest common divisor";
FUNCTION_VARIADIC_LCM = "Least common multiple";
FUNCTION_VARIADIC_SUM = "Summation";
FUNCTION_VARIADIC_PROD = "Multiplication";
FUNCTION_VARIADIC_AVG = "Mean / average value";
FUNCTION_VARIADIC_VAR = "Bias-corrected sample variance";
FUNCTION_VARIADIC_STD = "Bias-corrected sample standard deviation";
FUNCTION_VARIADIC_RND_LIST = "Random number from a given list of numbers";
FUNCTION_VARIADIC_COALESCE = "Returns the first non-NaN value";
FUNCTION_VARIADIC_OR = "Logical disjunction (OR) - variadic";
FUNCTION_VARIADIC_AND = "Logical conjunction (AND) - variadic";
FUNCTION_VARIADIC_XOR = "Exclusive or (XOR) - variadic";
FUNCTION_VARIADIC_ARGMIN = "Arguments / indices of the minima";
FUNCTION_VARIADIC_ARGMAX = "Arguments / indices of the maxima";
FUNCTION_VARIADIC_MEDIAN = "The sample median";
FUNCTION_VARIADIC_MODE = "Mode - the value that appears most often";
FUNCTION_VARIADIC_BASE = "Returns number in given numeral system base represented by list of digits";
FUNCTION_VARIADIC_NDIST = "Number of distinct values";
// -------------------------------------------------
OPERATOR_PLUS = "Addition";
OPERATOR_MINUS = "Subtraction";
OPERATOR_MULTIPLY = "Multiplication";
OPERATOR_DIVIDE = "Division";
OPERATOR_POWER = "Exponentiation";
OPERATOR_FACT = "Factorial";
OPERATOR_MOD = "Modulo";
OPERATOR_PERC = "Percentage";
OPERATOR_TETRATION = "Tetration (hyper-4, power tower, exponential tower)";
OPERATOR_SQUARE_ROOT = "Square root";
OPERATOR_CUBE_ROOT = "Cube root";
OPERATOR_FOURTH_ROOT = "Fourth root";
// -------------------------------------------------
PARSER_SYMBOL_LEFT_PARENTHESES = "Left parentheses";
PARSER_SYMBOL_RIGHT_PARENTHESES = "Right parentheses";
PARSER_SYMBOL_COMMA = "Comma (function parameters)";
PARSER_SYMBOL_SEMI = "Semicolon (function parameters)";
PARSER_SYMBOL_BLANK = "Blank (whitespace) character";
PARSER_SYMBOL_NUMBER_INTEGER = "Integer";
PARSER_SYMBOL_NUMBER_DECIMAL = "Decimal";
PARSER_SYMBOL_NUMBER_LEADING_ZERO = "Leading zero";
PARSER_SYMBOL_NUMBER_SCI_NOTATION = "Scientific notation";
PARSER_SYMBOL_NUMBER_NO_LEADING_ZERO = "No leading zero";
PARSER_SYMBOL_NUMBER_FRACTIONS = "Fractions";
PARSER_SYMBOL_NUMBER_OTHER_NUMERAL_SYSTEMS = "Other numeral systems";
PARSER_SYMBOL_UNICODE_MATH = " - Unicode math symbol";
// -------------------------------------------------
DIMENSIONLESS_UNIT_PERC = "Percentage";
DIMENSIONLESS_UNIT_PROMIL = "Promil, Per mille";
DIMENSIONLESS_UNIT_YOTTA = "Septillion / Yotta";
DIMENSIONLESS_UNIT_ZETTA = "Sextillion / Zetta";
DIMENSIONLESS_UNIT_EXA = "Quintillion / Exa";
DIMENSIONLESS_UNIT_PETA = "Quadrillion / Peta";
DIMENSIONLESS_UNIT_TERA = "Trillion / Tera";
DIMENSIONLESS_UNIT_GIGA = "Billion / Giga";
DIMENSIONLESS_UNIT_MEGA = "Million / Mega";
DIMENSIONLESS_UNIT_KILO = "Thousand / Kilo";
DIMENSIONLESS_UNIT_HECTO = "Hundred / Hecto";
DIMENSIONLESS_UNIT_DECA = "Ten / Deca";
DIMENSIONLESS_UNIT_DECI = "Tenth / Deci";
DIMENSIONLESS_UNIT_CENTI = "Hundredth / Centi";
DIMENSIONLESS_UNIT_MILLI = "Thousandth / Milli";
DIMENSIONLESS_UNIT_MICRO = "Millionth / Micro";
DIMENSIONLESS_UNIT_NANO = "Billionth / Nano";
DIMENSIONLESS_UNIT_PICO = "Trillionth / Pico";
DIMENSIONLESS_UNIT_FEMTO = "Quadrillionth / Femto";
DIMENSIONLESS_UNIT_ATTO = "Quintillionth / Atoo";
DIMENSIONLESS_UNIT_ZEPTO = "Sextillionth / Zepto";
DIMENSIONLESS_UNIT_YOCTO = "Septillionth / Yocto";
// -------------------------------------------------
UNIT_METRE = "Meter";
UNIT_KILOMETRE = "Kilometer";
UNIT_CENTIMETRE = "Centimeter";
UNIT_MILLIMETRE = "Millimeter";
UNIT_INCH = "Inch";
UNIT_YARD = "Yard";
UNIT_FEET = "Feet";
UNIT_MILE = "Mile";
UNIT_NAUTICAL_MILE = "Nautical mile";
UNIT_METRE2 = "Square meter";
UNIT_CENTIMETRE2 = "Square centimeter";
UNIT_MILLIMETRE2 = "Square millimeter";
UNIT_ARE = "Are";
UNIT_HECTARE = "Hectare";
UNIT_ACRE = "Acre";
UNIT_KILOMETRE2 = "Square kilometer";
UNIT_MILLIMETRE3 = "Cubic millimeter";
UNIT_CENTIMETRE3 = "Cubic centimeter";
UNIT_METRE3 = "Cubic meter";
UNIT_KILOMETRE3 = "Cubic kilometer";
UNIT_MILLILITRE = "Milliliter";
UNIT_LITRE = "Liter";
UNIT_GALLON = "Gallon";
UNIT_PINT = "Pint";
UNIT_SECOND = "Second";
UNIT_MILLISECOND = "Millisecond";
UNIT_MINUTE = "Minute";
UNIT_HOUR = "Hour";
UNIT_DAY = "Day";
UNIT_WEEK = "Week";
UNIT_JULIAN_YEAR = "Julian year = 365.25 days";
UNIT_KILOGRAM = "Kilogram";
UNIT_GRAM = "Gram";
UNIT_MILLIGRAM = "Milligram";
UNIT_DECAGRAM = "Decagram";
UNIT_TONNE = "Tonne";
UNIT_OUNCE = "Ounce";
UNIT_POUND = "Pound";
UNIT_BIT = "Bit";
UNIT_KILOBIT = "Kilobit";
UNIT_MEGABIT = "Megabit";
UNIT_GIGABIT = "Gigabit";
UNIT_TERABIT = "Terabit";
UNIT_PETABIT = "Petabit";
UNIT_EXABIT = "Exabit";
UNIT_ZETTABIT = "Zettabit";
UNIT_YOTTABIT = "Yottabit";
UNIT_BYTE = "Byte";
UNIT_KILOBYTE = "Kilobyte";
UNIT_MEGABYTE = "Megabyte";
UNIT_GIGABYTE = "Gigabyte";
UNIT_TERABYTE = "Terabyte";
UNIT_PETABYTE = "Petabyte";
UNIT_EXABYTE = "Exabyte";
UNIT_ZETTABYTE = "Zettabyte";
UNIT_YOTTABYTE = "Yottabyte";
UNIT_JOULE = "Joule";
UNIT_ELECTRONO_VOLT = "Electronovolt";
UNIT_KILO_ELECTRONO_VOLT = "Kiloelectronovolt";
UNIT_MEGA_ELECTRONO_VOLT = "Megaelectronovolt";
UNIT_GIGA_ELECTRONO_VOLT = "Gigaelectronovolt";
UNIT_TERA_ELECTRONO_VOLT = "Teraelectronovolt";
UNIT_METRE_PER_SECOND = "Meter per second";
UNIT_KILOMETRE_PER_HOUR = "Kilometer per hour";
UNIT_MILE_PER_HOUR = "Mile per hour";
UNIT_KNOT = "Knot";
UNIT_METRE_PER_SECOND2 = "Meter per square second";
UNIT_KILOMETRE_PER_HOUR2 = "Kilometer per square hour";
UNIT_MILE_PER_HOUR2 = "Mile per square hour";
UNIT_RADIAN_ARC = "Radian";
UNIT_DEGREE_ARC = "Degree of arc";
UNIT_MINUTE_ARC = "Minute of arc";
UNIT_SECOND_ARC = "Second of arc";
Nuget – Package Manager

Install-Package MathParser.org-mXparser -Version 5.2.1

Nuget – .NET CLI

dotnet add package MathParser.org-mXparser --version 5.2.1

Nuget – Package Reference

<PackageReference Include="MathParser.org-mXparser" Version="5.2.1"/>

Maven – Dependency

<dependency>
<groupid>
org.mariuszgromada.math</groupid>
<artifactid>
MathParser.org-mXparser</artifactid>
<version>
5.2.1</version>
</dependency>

Maven – Gradle

implementation 'org.mariuszgromada.math:MathParser.org-mXparser:5.2.1'

Maven – Gradle (Kotlin)

implementation("org.mariuszgromada.math:MathParser.org-mXparser:5.2.1")

GitHub

git clone https://github.com/mariuszgromada/MathParser.org-mXparser

OTHER DOWNLOAD OPTIONS

Download latest release – v.5.2.1 Orion: .NET bin onlyDownload latest release – v.5.2.1 Orion: JAVA bin onlyDownload latest release – v.5.2.1 Orion: bin + doc

NEWS FROM MATHPARSER.ORG
SOURCE CODE

Source code .zipSource code .tar.gz
View on GitHubMathSpace.pl

My other creative spaces

DONATION
Did you find the software useful?
Please consider donation 🙂
DONATE