Skip to content

Commit b9986a4

Browse files
committed
2 parents 241e234 + f27dd90 commit b9986a4

File tree

1 file changed

+29
-6
lines changed

1 file changed

+29
-6
lines changed

README.md

+29-6
Original file line numberDiff line numberDiff line change
@@ -88,22 +88,45 @@ var f = Force.FromMassAcceleration(Mass mass, double metersPerSecondSquared);
8888
Parse and Get Culture-Specific Abbreviations
8989
-------------------------------------------------
9090
```C#
91-
var us = new CultureInfo("en-US");
92-
var norwegian = new CultureInfo("nb-NO");
91+
var us = new CultureInfo("en-US");
92+
var norwegian = new CultureInfo("nb-NO");
9393

94-
Unit.Tablespoon == UnitSystem.Create(us).Parse("tbsp")
95-
Unit.Tablespoon == UnitSystem.Create(norwegian).Parse("ss")
94+
Unit.Tablespoon == UnitSystem.Create(us).Parse("tbsp");
95+
Unit.Tablespoon == UnitSystem.Create(norwegian).Parse("ss");
9696

97-
"T" == UnitSystem.GetDefaultAbbreviation(Unit.Tablespoon, us)
98-
"ss" == UnitSystem.GetDefaultAbbreviation(Unit.Tablespoon, norwegian)
97+
"T" == UnitSystem.GetDefaultAbbreviation(Unit.Tablespoon, us);
98+
"ss" == UnitSystem.GetDefaultAbbreviation(Unit.Tablespoon, norwegian);
9999
```
100100

101+
Precision
102+
=========
103+
A base unit is chosen for all classes of units, which is represented by a double value (64-bit), and all conversions go via this unit.
104+
This means there will always be a small error in both representing other units than the base unit as well as converting between units.
105+
106+
In the unit tests I accept an error less than 1E-5 for all units I've added so far. In many usecases this is sufficient, but for some usecases this is definitely not OK and something you need to be aware of.
107+
For more details, see [Precision](https://github.com/InitialForce/UnitsNet/wiki/Precision).
108+
109+
101110
What It Is Not
102111
==============
103112

104113
* It is not an equation solver.
105114
* It does not figure out the units after a calculation.
106115

116+
Frequently Asked Questions
117+
==========================
118+
Q: Why is the conversion not perfectly accurate?
119+
As an example, when converting 1 PoundForce (lbF) to KilogramForce (kgF) I expected the result to be 0.45359237 and instead I got​0.45359240790780886 using the following for the conversion:
120+
121+
```C#
122+
double kg = UnitConverter.Convert(1, Unit.PoundForce, Unit.KilogramForce);
123+
```
124+
125+
A: There are a few concerns here.
126+
* For several unit conversions there is no one perfect answer. Some units depend on constants such as the standard gravity, where different precisions are used in different contexts. Other constants depend on the environment, such as the temperature or altitude.
127+
* By design, Units.NET was not intended for high-accuracy conversions but rather convenience and simplicity. I am open to suggestions for improvements. If you want to know more, see the [Precision](https://github.com/InitialForce/UnitsNet/wiki/Precision) article.
128+
129+
107130
Work In Progress
108131
================
109132
This project is still early and many units and conversions are not yet covered. If you are missing something, please help by contributing.

0 commit comments

Comments
 (0)