VOOZH about

URL: https://www.nuget.org/packages/CoreCLR-NCalc/

⇱ NuGet Gallery | CoreCLR-NCalc 3.1.253




👁 Image
CoreCLR-NCalc 3.1.253

Suggested Alternatives

ncalc

Additional Details

projects were merged

dotnet add package CoreCLR-NCalc --version 3.1.253
 
 
NuGet\Install-Package CoreCLR-NCalc -Version 3.1.253
 
 
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="CoreCLR-NCalc" Version="3.1.253" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CoreCLR-NCalc" Version="3.1.253" />
 
Directory.Packages.props
<PackageReference Include="CoreCLR-NCalc" />
 
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 CoreCLR-NCalc --version 3.1.253
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CoreCLR-NCalc, 3.1.253"
 
 
#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 CoreCLR-NCalc@3.1.253
 
 
#: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=CoreCLR-NCalc&version=3.1.253
 
Install as a Cake Addin
#tool nuget:?package=CoreCLR-NCalc&version=3.1.253
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

NCalc

👁 Build status
👁 NuGet
👁 NuGet

⚠️ This repository is currently only passively maintained. If there are fully fledged PRs, I will occasional merge those in and publish new versions. If you would like to become a maintainer and work on some of the open issues, please reply here https://github.com/sklose/NCalc2/issues/61

A clone of NCalc from http://ncalc.codeplex.com/ with the following changes:

  • added support for .NET Standard 2.0+
  • added compilation of expressions to actual CLR lambdas

Installation

Simply install the package via NuGet

PM> Install-Package CoreCLR-NCalc

Creating Lambdas

Simple Expressions

var expr = new Expression("1 + 2");
Func<int> f = expr.ToLambda<int>();
Console.WriteLine(f()); // will print 3

Expressions with Functions and Parameters

class ExpressionContext
{
 public int Param1 { get; set; }
 public string Param2 { get; set; }
 
 public int Foo(int a, int b)
 {
 return a + b;
 }
}

var expr = new Expression("Foo([Param1], 2) = 4 && [Param2] = 'test'");
Func<ExpressionContext, bool> f = expr.ToLambda<ExpressionContext, bool>();

var context = new ExpressionContext { Param1 = 2, Param2 = "test" };
Console.WriteLine(f(context)); // will print True

Performance Comparison

The measurements were done during CI runs on AppVeyor and fluctuate a lot in between runs, but the speedup is consistently in the thousands of percent range. The speedup measured on actual hardware was even higher (between 10,000% and 35,000%).

Formula Description Expression Evaluations / sec Lambda Evaluations / sec Speedup
(4 * 12 / 7) + ((9 * 2) % 8) Simple Arithmetics 474,247.87 32,691,490.41 6,793.33%
5 * 2 = 2 * 5 && (1 / 3.0) * 3 = 1 Simple Arithmetics 276,226.31 93,222,709.05 33,648.67%
[Param1] * 7 + [Param2] Constant Values 707,493.27 21,766,101.47 2,976.51%
[Param1] * 7 + [Param2] Dynamic Values 582,832.10 21,400,445.13 3,571.80%
Foo([Param1] * 7, [Param2]) Dynamic Values and Function Call 594,259.69 17,209,334.34 2,795.93%
Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 is compatible.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 was computed. 
.NET Framework net45 net45 is compatible.  net451 net451 was computed.  net452 net452 was computed.  net46 net46 was computed.  net461 net461 was computed.  net462 net462 was computed.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (30)

Showing the top 5 NuGet packages that depend on CoreCLR-NCalc:

Package Downloads
DTF.Common

DTF common models and functions

DTF.Common.V2

Digital Tax Free basic models and abstractions.

CA_DataUploaderLib

Allow you to interface with digital IO hardware, and a large number of sensors. Including features to upload to web chart

DatabaseConverter.Core

Convert or translate database objects and data between SqlServer, MySql, Oracle and Postgres.

Rpd.DataAbstractionLevel.Low

Code for working with Horizon RPD systems

GitHub repositories (4)

Showing the top 4 popular GitHub repositories that depend on CoreCLR-NCalc:

Repository Stars
Pulsar4xDevs/Pulsar4x
A Fan work recreation of Aurora4x in C#
victor-wiki/DatabaseManager
Database management tool for: SqlServer, MySql, Oracle, Postgres and SQLite
marcussacana/StringReloads
A tool to inject strings into a game using low level code
TombEngine/Tomb-Editor
A level editor for classic Tomb Raider engines and custom engines such as Tomb Engine, TRX and TRNG
Version Downloads Last Updated
3.1.253 905,010 6/14/2024 3.1.253 is deprecated because it is no longer maintained.
3.1.251 21,834 5/29/2024
3.1.246 28,254 5/13/2024
3.1.244 777 5/13/2024
3.1.241 2,412 5/2/2024
3.1.239 6,692 4/24/2024
3.1.237 31,128 4/10/2024
3.1.233 1,680 4/8/2024
3.0.230 12,446 4/6/2024
3.0.225 14,893 3/26/2024
3.0.219 974 3/25/2024
3.0.213 25,486 3/22/2024
3.0.209 994 3/21/2024
3.0.203 1,890 3/21/2024
3.0.202 1,015 3/21/2024
3.0.169 8,605 3/13/2024
3.0.163 1,772 3/13/2024
3.0.145 21,164 2/24/2024
3.0.144 77,858 2/15/2024
3.0.142 785 2/15/2024
Loading failed