uCalcSoftware 5.7.0-preview.1

This is a prerelease version of uCalcSoftware.
dotnet add package uCalcSoftware --version 5.7.0-preview.1
                    
NuGet\Install-Package uCalcSoftware -Version 5.7.0-preview.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="uCalcSoftware" Version="5.7.0-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="uCalcSoftware" Version="5.7.0-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="uCalcSoftware" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add uCalcSoftware --version 5.7.0-preview.1
                    
#r "nuget: uCalcSoftware, 5.7.0-preview.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.
#:package uCalcSoftware@5.7.0-preview.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=uCalcSoftware&version=5.7.0-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=uCalcSoftware&version=5.7.0-preview.1&prerelease
                    
Install as a Cake Tool

uCalc: The High-Performance Math Expression Evaluator and Token-Aware Text Transformation Engine

NuGet Version Documentation License Platforms Sponsor

Homepage | Documentation | Online interactive examples | What's New | Release Notes | License

uCalc Engine

uCalc API Preview Release Notice: This preview documentation describes the intended behavior of the API. It is not fully accurate or complete. The current preview build contains incomplete features, unoptimized performance, and is subject to breaking changes. Use of the preview version in your production code is not recommended.

uCalc is more than just a calculator—it is a complete, sandboxed language environment and text transformation engine that you can customize on the fly. Designed for C#, VB.NET, and C++ developers, across various platforms including Windows (x86, x64, ARM64), Linux (x64, ARM64), macOS (osx-64, osx-ARM64 Apple Silicon), uCalc allows you to parse and evaluate mathematical, logical, and string-based expressions provided as plain text at runtime.

Whether you need to safely evaluate user-defined formulas, build a custom Domain-Specific Language (DSL), or safely refactor code, uCalc provides a unified, high-performance engine that bridges the gap between simple eval() functions and heavyweight compiler tools like ANTLR.

Key Features & Capabilities:

  • Token-Aware Text Transformation: Stop relying on brittle Regular Expressions. uCalc’s Transformer can understand structural context (like strings, nested brackets, and user-defined comment structures), allowing you to perform safe, structural find-and-replace operations without accidentally corrupting your data.

  • Parse-Once, Evaluate-Many: Achieve near-native execution speeds. uCalc separates parsing from evaluation, allowing you to compile a string expression into a highly optimized object that can be evaluated repeatedly inside loops at maximum speed.

  • Dynamic Runtime Syntax: Unlike static parser generators that require recompilation, uCalc allows you to invent new operators, custom keywords, and literal formats dynamically at runtime.

  • Secure Sandboxing: Safely execute user-provided formulas without the severe code-injection risks associated with standard scripting eval() functions. Expressions can only access the variables and functions you explicitly define.

  • Advanced Native Callbacks: Seamlessly bind expressions to your compiled C++, C# or VB.NET code. Go beyond basic value passing with Lazy Evaluation (ByExpr for building custom short-circuiting loops) and Metaprogramming (ByHandle for runtime argument introspection).

  • Smart String Library: Chain fluent, token-aware string operations using a mutable, highly efficient string builder designed specifically for parsing and transformation tasks.

  • Perfect for building: Spreadsheet calculation engines, dynamic report generators, robust static analysis/refactoring tools, game scripting environments, and custom DSLs.

Full documentation can be found at https://www.uCalc.com/documentation

Quick Start

using uCalcSoftware;

var uc = new uCalc();
// 1. Expression Parser: Evaluate a simple math or string expression
Console.WriteLine(uc.Eval("(100 - 50) / 2"));
Console.WriteLine(uc.EvalStr("UCase('hello') + ', world!'"));

// 2. Evaluate an expression faster in a loop
var myVar = uc.DefineVariable("x");
var expr = uc.Parse("x * 2");

for (var i = 1; i <= 5; i++) {
   myVar.Value(i);
   Console.WriteLine($"When x is {i}, result is: {expr.Evaluate()}");
}

// 3. Transformer: Perform a basic find-and-replace
using (var t = new uCalc.Transformer()) {
   t.FromTo("Hello", "Hi");
   Console.WriteLine($"Transformer Result: {t.Transform("Hello World")}");
}

// 4. String Library: Use a fluent, chainable operation
using (var s = new uCalc.String("The value is: important")) {
   s.After(":").ToUpper();
   Console.WriteLine($"String Library Result: {s}");
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.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
5.7.0-preview.1 29 7/30/2026