TinyMath 1.0.1

dotnet add package TinyMath --version 1.0.1
NuGet\Install-Package TinyMath -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TinyMath" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TinyMath --version 1.0.1
#r "nuget: TinyMath, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install TinyMath as a Cake Addin
#addin nuget:?package=TinyMath&version=1.0.1

// Install TinyMath as a Cake Tool
#tool nuget:?package=TinyMath&version=1.0.1

Introduction

This is TinyMath! It is a bare-bones simple and mostly pure math evaluator for C#!

TinyMath allows you to solve basic equations from string input that uses addition, subtraction, multiplication, division, powers, and modulus operators, and has full support for doubles! Currently parenthasis aren't supported, but they may be added at a later date.

How to use

Add the TinyMath nuget package (or reference a DLL from the releases tab) to your project. Then, include it in whatever file you want like so:

using TinyMath;

To solve an expression, type the following:

string ExampleExpression = "2 + 6 / 5 ^ 2 * 7";
SyntaxParser.Evaluate(ExampleExpression);

(Note here, it is assumed you followed the previous step, which is including it into the file.) And, the result should be returned as a double number! You can store it in a double for later or print it to the console.

Aditional info

All types of contributions are welcome! Feel free to open issues or submit pull requests!

TinyMath is licensed under the GPL V2 licence.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on TinyMath:

Package Downloads
PrismAPI

The PrismAPI package, can be used for many purposed in external cosmos projects. This project offers no waranty (as shown by the license) and is not garunteed to work 100% of the time. Use within your reasonale needs and give credits where due. Full API documentation: https://prism-project.net/Documentation/

GrapeGL

A powerful & lightweight graphics library based on PrismAPI

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 976 1/10/2023
1.0.0 263 1/10/2023