LongCalc Arbitrary Precision Float and Complex Number Library
Addressed a problem in which some functions returned values to a precision less than requested. Examples: x.Tan for x near 0; x.Log for x near 1 (other people's software seems to have this same problem). The x.Log inaccuracy had an impact on several other functions. x.Zeta function should now agree with bf.Zeta(...) and both should be accurate to the Precision place, except possibly x.Zeta when x has a very large imaginary part.
New bf variables created from string inputs now have their implicitly or explicitly requested Precisions padded to an extra Math.Ceiling(Math.Log10(Precision)) + 4 digits.
Corrected a problem in which some complex-valued functions did not return the generally-accepted Principal Value for the function.
Corrected a problem in which an error like 'Attempt to write to protected memory' occurred when performing calculations with precision setting in excess of a few million decimal digits.
Corrected a problem in which the .toString functions did not always properly round output to the requested Precision decimal place. Added new functions x.Round(uint _base, long Precision) which round x away from zero (half or more) at the Precision place when using output base _base.
Outputs of public functions in which a Precision setting is either implicitly or explicitly required now are .Truncate'd to the Precision place. The output will have Precision + 1 decimal digits to allow for rounding to the Precision place.
Added and implemented a bf Factorial(ulong N) function which returns a bf variable equal to N! a bit faster than the corresponding Mpir.Net function.
Revised the x.Gamma functions such that if the Precision setting requested is less than or equal 2000 new Spouge constants are calculated rather than overwriting any Spouge constants cached in a previous x.Gamma calculation with precision > 2000. This allows for overall faster calculations when performing repeated x.Gamma calculations at the same Precision > 2000.
Checks for arithmetic overflow or underflow are again compiler-included in this release.
- Mpir.NET (>= 0.4.0)