AngouriMath

Navigation

← Back to list of members

MaxAbsNumeratorOrDenominatorValue

 Property

Summary

If a numerator or denominator is too large, it's suspended to better keep the real number instead of casting

Example

using System;
using AngouriMath;
using static AngouriMath.MathS;

void Method()
{
    Console.WriteLine("---------------------");
    Console.WriteLine((Entity)(100m / 169));
    Console.WriteLine((Entity)(100m / 1691));
    Console.WriteLine((Entity)(100m / 16913));
    Console.WriteLine((Entity)(100m / 169137));
}

Settings.MaxAbsNumeratorOrDenominatorValue.As(100, Method);
Settings.MaxAbsNumeratorOrDenominatorValue.As(1000, Method);
Settings.MaxAbsNumeratorOrDenominatorValue.As(10000, Method);
Settings.MaxAbsNumeratorOrDenominatorValue.As(100000, Method);
Settings.MaxAbsNumeratorOrDenominatorValue.As(1000000, Method);

Prints
0.5917159763313609467455621302
0.0591366055588409225310467179
0.0059126116005439602672500443
0.000591236689784021237221897
---------------------
100/169
0.0591366055588409225310467179
0.0059126116005439602672500443
0.000591236689784021237221897
---------------------
100/169
100/1691
0.0059126116005439602672500443
0.000591236689784021237221897
---------------------
100/169
100/1691
100/16913
0.000591236689784021237221897
---------------------
100/169
100/1691
100/16913
100/169137

























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