nanoFramework.System.Math
1.4.4-preview.8
Prefix Reserved
See the version list below for details.
dotnet add package nanoFramework.System.Math --version 1.4.4-preview.8
NuGet\Install-Package nanoFramework.System.Math -Version 1.4.4-preview.8
<PackageReference Include="nanoFramework.System.Math" Version="1.4.4-preview.8" />
paket add nanoFramework.System.Math --version 1.4.4-preview.8
#r "nuget: nanoFramework.System.Math, 1.4.4-preview.8"
// Install nanoFramework.System.Math as a Cake Addin #addin nuget:?package=nanoFramework.System.Math&version=1.4.4-preview.8&prerelease // Install nanoFramework.System.Math as a Cake Tool #tool nuget:?package=nanoFramework.System.Math&version=1.4.4-preview.8&prerelease
Welcome to the .NET nanoFramework System.Math Class Library repository
Build status
Component | Build Status | NuGet Package |
---|---|---|
nanoFramework.System.Math | ||
nanoFramework.System.Math (preview) |
Available APIs and floating-point implementations
The .NET System.Math APIs are available with double
parameters. No sweat for the CPUs where the code usually runs.
When we move to embedded systems that's a totally different story.
A few more details to properly set context:
double
type: represents a double-precision 64-bit number with values ranging from negative 1.79769313486232e308 to positive 1.79769313486232e308. Precision ~15-17 digits. Size 8 bytes.float
type: represents a single-precision 32-bit number with values ranging from negative 3.402823e38 to positive 3.402823e38. Precision ~6-9 digits. Size 4 bytes.- Comparison of floating-point numeric types.
There are all sorts of variants and combinations on how to deal with FP and DP in the embedded world. From hardware support on the CPU to libraries that perform those calculations at the expense of more code and execution speed. .NET nanoFramework targets 32-bit MCUs, therefore support for 64-bits calculations requires extra code and processing.
Adding to the above, the extra precision provided by the double
type is seldom required on typical embedded application use cases.
Considering all this and the ongoing quest to save flash space, despite System.Math API offering double
type parameters, the type handling at the native code will depend on build options of the firmware. The default implementation works with float
under the hood. There is a build option (DP_FLOATINGPOINT
) to build the image with DP floating point, which should be used when 'that' extra precision is required.
In case this is relevant, the capability of dealing with double floating point is exposed through this property SystemInfo.FloatingPointSupport
.
Feedback and documentation
For documentation, providing feedback, issues and finding out how to contribute please refer to the Home repo.
Join our Discord community here.
Credits
The list of contributors to this project can be found at CONTRIBUTORS.
License
The nanoFramework Class Libraries are licensed under the MIT license.
Code of Conduct
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behaviour in our community. For more information see the .NET Foundation Code of Conduct.
.NET Foundation
This project is supported by the .NET Foundation.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net is compatible. |
-
- nanoFramework.CoreLibrary (>= 1.12.0-preview.5)
NuGet packages (76)
Showing the top 5 NuGet packages that depend on nanoFramework.System.Math:
Package | Downloads |
---|---|
nanoFramework.System.Numerics
This package includes the .NET System.Numerics namespace for .NET nanoFramework C# projects. |
|
UnitsNet.nanoFramework.Frequency
Adds Frequency units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. |
|
nanoFramework.Iot.Device.Mpu6886
This package includes the .NET IoT Core binding Iot.Device.Mpu6886 for .NET nanoFramework C# projects. |
|
UnitsNet.nanoFramework.Pressure
Adds Pressure units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. |
|
nanoFramework.Iot.Device.Buzzer
This package includes the .NET IoT Core binding Iot.Device.Buzzer for .NET nanoFramework C# projects. |
GitHub repositories (5)
Showing the top 5 popular GitHub repositories that depend on nanoFramework.System.Math:
Repository | Stars |
---|---|
dotnet/samples
Sample code referenced by the .NET documentation
|
|
angularsen/UnitsNet
Makes life working with units of measurement just a little bit better.
|
|
Azure/amqpnetlite
AMQP 1.0 .NET Library
|
|
nanoframework/Samples
🍬 Code samples from the nanoFramework team used in testing, proof of concepts and other explorational endeavours
|
|
nanoframework/nanoFramework.IoT.Device
📦 This repo includes .NET nanoFramework implementations for various sensors, chips, displays, hats and drivers
|
Version | Downloads | Last updated |
---|---|---|
1.5.43 | 50,466 | 11/9/2023 |
1.5.29 | 120,794 | 1/2/2023 |
1.5.25 | 8,778 | 12/22/2022 |
1.5.18 | 29,333 | 10/31/2022 |
1.5.15 | 10,550 | 10/26/2022 |
1.5.12 | 17,182 | 10/24/2022 |
1.5.10 | 1,798 | 10/23/2022 |
1.5.8 | 12,182 | 10/22/2022 |
1.4.4 | 443,301 | 3/28/2022 |
1.4.4-preview.25 | 145 | 3/28/2022 |
1.4.4-preview.22 | 3,725 | 3/17/2022 |
1.4.4-preview.19 | 345 | 3/14/2022 |
1.4.4-preview.15 | 887 | 2/17/2022 |
1.4.4-preview.13 | 412 | 2/4/2022 |
1.4.4-preview.11 | 446 | 1/28/2022 |
1.4.4-preview.10 | 226 | 1/28/2022 |
1.4.4-preview.8 | 180 | 1/28/2022 |
1.4.4-preview.5 | 388 | 1/21/2022 |
1.4.3 | 22,194 | 12/2/2021 |
1.4.3-preview.20 | 177 | 12/2/2021 |
1.4.3-preview.18 | 173 | 12/2/2021 |
1.4.3-preview.15 | 189 | 12/1/2021 |
1.4.3-preview.7 | 281 | 11/12/2021 |
1.4.3-preview.5 | 164 | 11/12/2021 |
1.4.3-preview.3 | 182 | 11/12/2021 |
1.4.3-preview.1 | 191 | 11/11/2021 |
1.4.1 | 30,664 | 7/15/2021 |
1.4.1-preview.12 | 212 | 7/14/2021 |
1.4.1-preview.10 | 610 | 7/6/2021 |
1.4.1-preview.7 | 1,400 | 6/19/2021 |
1.4.1-preview.5 | 308 | 6/7/2021 |
1.4.1-preview.3 | 232 | 6/3/2021 |
1.4.1-preview.1 | 206 | 6/1/2021 |
1.4.0-preview.9 | 654 | 5/24/2021 |
1.4.0-preview.7 | 898 | 5/20/2021 |
1.4.0-preview.5 | 590 | 5/19/2021 |
1.4.0-preview.3 | 223 | 5/13/2021 |
1.4.0-preview.1 | 365 | 5/13/2021 |
1.3.1-preview.37 | 193 | 5/11/2021 |
1.3.1-preview.31 | 581 | 3/21/2021 |
1.3.1-preview.29 | 753 | 3/2/2021 |
1.3.1-preview.24 | 601 | 1/6/2021 |
1.3.1-preview.22 | 784 | 12/29/2020 |
1.3.1-preview.17 | 269 | 12/7/2020 |
1.3.1-preview.14 | 294 | 10/21/2020 |
1.3.1-preview.12 | 278 | 10/20/2020 |
1.3.1-preview.10 | 534 | 10/1/2020 |
1.3.1-preview.3 | 303 | 9/19/2020 |
1.3.1-preview.2 | 473 | 6/17/2020 |
1.3.0 | 832 | 6/17/2020 |
1.2.0 | 543 | 6/11/2020 |
1.2.0-preview.19 | 330 | 6/11/2020 |
1.2.0-preview.17 | 316 | 6/4/2020 |
1.2.0-preview.16 | 434 | 5/8/2020 |
1.2.0-preview.15 | 293 | 5/8/2020 |
1.2.0-preview.14 | 279 | 4/27/2020 |
1.2.0-preview.13 | 308 | 4/16/2020 |
1.2.0-preview.12 | 266 | 4/14/2020 |
1.2.0-preview.11 | 293 | 3/10/2020 |
1.2.0-preview.10 | 266 | 3/9/2020 |
1.2.0-preview.9 | 299 | 3/9/2020 |
1.2.0-preview.7 | 378 | 11/14/2019 |
1.2.0-preview.6 | 288 | 11/7/2019 |
1.2.0-preview.5 | 285 | 11/4/2019 |
1.2.0-preview.4 | 283 | 10/23/2019 |
1.2.0-preview.3 | 297 | 10/18/2019 |
1.1.0 | 1,177 | 10/17/2019 |
1.1.0-preview.3 | 303 | 10/16/2019 |
1.0.6 | 1,051 | 10/15/2019 |
1.0.6-preview.23 | 314 | 10/15/2019 |
1.0.6-preview.18 | 354 | 7/18/2019 |
1.0.6-preview.15 | 392 | 6/23/2019 |
1.0.6-preview.10 | 338 | 6/20/2019 |
1.0.6-preview.6 | 390 | 6/18/2019 |
1.0.6-preview.2 | 357 | 6/12/2019 |
1.0.5-preview-001 | 1,092 | 4/23/2019 |
1.0.4 | 1,353 | 1/21/2019 |
1.0.3-preview-012 | 563 | 4/23/2019 |
1.0.2 | 1,000 | 12/15/2018 |
1.0.2-preview-015 | 1,149 | 12/5/2018 |
1.0.2-preview-010 | 659 | 11/21/2018 |