## AngouriMath.MathS

← Back to list of namespaces

Classes within the AngouriMath.MathS namespace

• ### Boolean

Summary

Some operations on booleans are stored here
• ### Compute

Summary

Implements necessary functions for symbolic computation of limits, derivatives and integrals
• ### DecimalConst

Summary

Some non-symbolic constants
• ### Diagnostic

Summary

This class is used for diagnostic and debug of the library itself.
Usually, you do not want to use it in production code.
• ### ExperimentalFeatures

Summary

Features that might become stable
in the future, but are not guaranteed
to do anything useful or correctly
at the current moment.
• ### Hyperbolic

Summary

Represents a few hyperbolic functions
• ### Matrices

Summary

Classes and functions related to matrices are defined here

Summary

A few functions convenient to use in industrial projects
to keep the system more reliable and distribute computations
• ### Numbers

Summary

All operations for Number and its derived classes are available from here.
These methods represent the only possible way to explicitly create numeric instances.
It will automatically downcast the result for you,
so
Number.Create(1.0);
is an Integer.
To avoid it, you may temporarily disable it
using var _ = MathS.Settings.DowncastingEnabled.Set(false);
var yourNum = Number.Create(1.0);

and the result will be a Real.

Example

using System;
using System.Numerics;
using AngouriMath;
using PeterO.Numbers;
using static AngouriMath.MathS.Numbers;
using static AngouriMath.MathS;

Entity a1 = 5;
Entity a2 = "5";
Entity a3 = new Complex(5.5, 6.5);
Entity a4 = 6.5m;
Entity a5 = 6.5;
Entity a6 = 6.5f;
Entity a7 = 5.6 + 3 * i;
Entity a8 = EInteger.One;
Entity a9 = ERational.One;
Entity a10 = pi;
Console.WriteLine("---------------");
var n0 = Create(0);
var n1 = Create(0L);
var n2 = Create(new Complex(5.5, 4.75));
var n3 = Create(EInteger.One);
var n4 = CreateRational(4, 5);
var n5 = Create(ERational.One);
var n6 = Create(5.5m);
var n7 = Create(5.5);
var n8 = Create(5.5m, 6.5m);
Console.WriteLine("---------------");
float i0 = (float)FromString("1 + 5").EvalNumerical();
double i1 = (double)FromString("1 + 5").EvalNumerical();
int i2 = (int)FromString("1 + 5").EvalNumerical();
long i3 = (long)FromString("1 + 5").EvalNumerical();
short i4 = (short)FromString("1 + 5").EvalNumerical();
BigInteger i5 = (BigInteger)FromString("1 + 5").EvalNumerical();
Complex i6 = (Complex)FromString("1 + 5").EvalNumerical();
EInteger i7 = ((Entity.Number.Integer)FromString("1 + 5").EvalNumerical()).EInteger;
ERational i8 = ((Entity.Number.Rational)FromString("1 + 5").EvalNumerical()).ERational;
EDecimal i9 = ((Entity.Number.Real)FromString("1 + 5").EvalNumerical()).EDecimal;
• ### NumberTheory

Summary

Use it in order to explore further number theory
• ### Series

Summary

That is a collection of some series, expressed in a symbolic form
• ### Sets

Summary

Functions and classes related to sets defined here

Class Set defines true mathematical sets
It supports intersection, union, subtraction

Set
• ### Settings

Summary

A couple of settings allowing you to set some preferences for AM's algorithms
To use these settings the syntax is
using var _ = MathS.Settings.SomeSetting.Set(5 /* Here you set a value to the setting */);
// here you write your code normally
• ### UnsafeAndInternal

Summary

You may need it to manually manage some issues.
Although those functions might be used inside the library
only, the user may want to use them for some reason
• ### Utils

Summary

Some additional functions that would be barely
ever used by the user, but kept for "just in case" as public

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