CasualDev.Numerics
1.0.1
dotnet add package CasualDev.Numerics --version 1.0.1
NuGet\Install-Package CasualDev.Numerics -Version 1.0.1
<PackageReference Include="CasualDev.Numerics" Version="1.0.1" />
<PackageVersion Include="CasualDev.Numerics" Version="1.0.1" />
<PackageReference Include="CasualDev.Numerics" />
paket add CasualDev.Numerics --version 1.0.1
#r "nuget: CasualDev.Numerics, 1.0.1"
#:package CasualDev.Numerics@1.0.1
#addin nuget:?package=CasualDev.Numerics&version=1.0.1
#tool nuget:?package=CasualDev.Numerics&version=1.0.1
CasualDev.Numerics
Adds a "real" type (real number) to represent a floating point number with unlimited decimal precision.
Overview
CasualDev.Numerics is a library for C# developed on the .NET 8.0 framework. It utilizes a custom type of "real" (derived from "real number") which is a floating point number with unlimited decimal precision. This type can be used for complex mathematical equations that require extreme precision.
Along with this type the library includes a Mathf class with a built in PI "real", this "Mathf.PI" is PI to 9877 decimal places, which is approximately 32,768 bits of data. In the future, more Mathf functions to allow "real" values to be used in sin, cos, tan, cot, log, abs, mod (etc.) equations.
Syntax
"real" values are written as strings, and then is converted into a floating point number when preforming arithmetic calculations. The correct syntax when declaring a variable of type "real" is:
// real {variableName} = "{valueAsString}";
Performing calculations on two "real" numbers together is the same as performing calculations two regular integers or floating point numbers.
real num1 = "2.1858589201998582819549952";
real num2 = "9.2857572717898958209889018985887683992";
Console.WriteLine(num1 + num2);
// Output: 11.4716161919897541029438970985887683992
Console.WriteLine(num1 * num2);
// Output: 20.29735536335264364117034643091156638827948900859439437034768384
Variables of type "real" can be concatenated and interpolated with normal strings.
Mathf
Mathf is a custom Math class that is integrated to work with "real" variables. In later versions of this library, more methods that allow features like Mathf.Sin(), Mathf.Cos(), Mathf.Tan(), Mathf.Cot(), Mathf.Abs(), Mathf.Mod() and Mathf.Pow() will be added.
Mathf.PI is a constant real type variable, this variable contains the digits of pi to 9877 decimal places. This can be used for extremely complicated equations that require insane amounts of precision.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|