AngouriMath

Navigation

← Back to list of members

EvalNumerical​(System.​String)

 Method (no overloads)

Summary

Parses this and evals into a number by running EvalNumerical

Exception "CannotEvalException"

This thrown when the given expression is boolean, tensoric, or contains variables.
First, check whether it can be evaled: EvaluableNumerical

Returns

Collapses into one expression

Example

Integers stay exact however large they get, and a real answer is not forced where
the value is complex:
Console.WriteLine("2 ^ 100".EvalNumerical());
Console.WriteLine("sqrt(-1)".EvalNumerical());

Prints
1267650600228229401496703205376
i

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4378 pages online