Skip to content

Commit 996940a

Browse files
committed
Version 1.0
1 parent 8e93179 commit 996940a

5 files changed

+123
-122
lines changed

docs/PeterO.Numbers.EContext.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,7 @@ Copies this arithmetic context and sets the copy's "ClampNormalExponents" flag t
457457

458458
<b>Parameters:</b>
459459

460-
* <i>clamp</i>: The parameter <i>clamp</i>
461-
is not documented yet.
460+
* <i>clamp</i>: The desired value of the "ClampNormalExponents" flag.
462461

463462
<b>Return Value:</b>
464463

docs/PeterO.Numbers.EDecimal.md

+36-28
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ There are several other types of numbers that are mentioned in this class and el
9494

9595
The elements described above are in the same order as the order of each bit of each element, that is, either most significant first or least significant first.
9696

97-
<b>32-bit floating-point number</b>: A 32-bit binary number hich is stored similarly to a <i>64-bit floating-point number</i>, except that:
97+
<b>32-bit binary floating-point number</b>: A 32-bit binary number hich is stored similarly to a <i>64-bit floating-point number</i>, except that:
9898

9999
* Precision is 24 bits.
100100

@@ -999,7 +999,7 @@ Converts a `decimal` under the Common Language Infrastructure (see[&#x22;Forms
999999

10001000
<b>Return Value:</b>
10011001

1002-
An EDecimal object.
1002+
an arbitrary-precision decimal floating-point number.
10031003

10041004
### FromDouble
10051005

@@ -1054,23 +1054,34 @@ Converts an arbitrary-precision integer to an arbitrary precision decimal.
10541054

10551055
An arbitrary-precision decimal number with the exponent set to 0.
10561056

1057+
<b>Exceptions:</b>
1058+
1059+
* System.ArgumentNullException:
1060+
The parameter <i>bigint</i>
1061+
is null.
1062+
10571063
### FromExtendedFloat
10581064

10591065
public static PeterO.Numbers.EDecimal FromExtendedFloat(
10601066
PeterO.Numbers.EFloat ef);
10611067

10621068
<b>Deprecated.</b> Renamed to FromEFloat.
10631069

1064-
Not documented yet.
1070+
Converts an arbitrary-precision binary floating-point number to an arbitrary precision decimal.
10651071

10661072
<b>Parameters:</b>
10671073

1068-
* <i>ef</i>: The parameter <i>ef</i>
1069-
is not documented yet.
1074+
* <i>ef</i>: An arbitrary-precision binary floating-point number.
10701075

10711076
<b>Return Value:</b>
10721077

1073-
An EDecimal object.
1078+
An arbitrary-precision decimal number.
1079+
1080+
<b>Exceptions:</b>
1081+
1082+
* System.ArgumentNullException:
1083+
The parameter <i>ef</i>
1084+
is null.
10741085

10751086
### FromInt16
10761087

@@ -1144,7 +1155,7 @@ Creates a decimal number from a 32-bit binary floating-point number. This method
11441155
<b>Parameters:</b>
11451156

11461157
* <i>flt</i>: The parameter <i>flt</i>
1147-
is a 32-bit floating-point number.
1158+
is a 32-bit binary floating-point number.
11481159

11491160
<b>Return Value:</b>
11501161

@@ -1917,15 +1928,13 @@ Returns the next value that is closer to the other object' s value than this obj
19171928
PeterO.Numbers.EDecimal bthis,
19181929
PeterO.Numbers.EDecimal otherValue);
19191930

1920-
Adds this object and another decimal number and returns the result.
1931+
Adds two arbitrary-precision decimal floating-point numbers and returns the result.
19211932

19221933
<b>Parameters:</b>
19231934

1924-
* <i>bthis</i>: The parameter <i>bthis</i>
1925-
is not documented yet.
1935+
* <i>bthis</i>: The first arbitrary-precision decimal floating-point number.
19261936

1927-
* <i>otherValue</i>: The parameter <i>otherValue</i>
1928-
is not documented yet.
1937+
* <i>otherValue</i>: The second decimal binary floating-point number.
19291938

19301939
<b>Return Value:</b>
19311940

@@ -1935,6 +1944,7 @@ The sum of the two objects.
19351944

19361945
* System.ArgumentNullException:
19371946
The parameter <i>bthis</i>
1947+
or <i>otherValue</i>
19381948
is null.
19391949

19401950
### Operator `/`
@@ -2007,6 +2017,7 @@ The product of the two decimal numbers.
20072017

20082018
* System.ArgumentNullException:
20092019
The parameter <i>operand1</i>
2020+
or <i>operand2</i>
20102021
is null.
20112022

20122023
### Operator `-`
@@ -2015,37 +2026,35 @@ The parameter <i>operand1</i>
20152026
PeterO.Numbers.EDecimal bthis,
20162027
PeterO.Numbers.EDecimal subtrahend);
20172028

2018-
Subtracts an arbitrary-precision decimal number from this instance and returns the result.
2029+
Subtracts one arbitrary-precision decimal number from another and returns the result.
20192030

20202031
<b>Parameters:</b>
20212032

2022-
* <i>bthis</i>: The parameter <i>bthis</i>
2023-
is not documented yet.
2033+
* <i>bthis</i>: The first operand.
20242034

2025-
* <i>subtrahend</i>: The parameter <i>subtrahend</i>
2026-
is not documented yet.
2035+
* <i>subtrahend</i>: The second operand.
20272036

20282037
<b>Return Value:</b>
20292038

2030-
The difference of the two objects.
2039+
The difference of the two decimal numbers.
20312040

20322041
<b>Exceptions:</b>
20332042

20342043
* System.ArgumentNullException:
20352044
The parameter <i>bthis</i>
2045+
or <i>subtrahend</i>
20362046
is null.
20372047

20382048
### Operator `-`
20392049

20402050
public static PeterO.Numbers.EDecimal operator -(
20412051
PeterO.Numbers.EDecimal bigValue);
20422052

2043-
Gets an object with the same value as this one, but with the sign reversed.
2053+
Gets an arbitrary-precision decimal number with the same value as the given one, but with the sign reversed.
20442054

20452055
<b>Parameters:</b>
20462056

2047-
* <i>bigValue</i>: The parameter <i>bigValue</i>
2048-
is not documented yet.
2057+
* <i>bigValue</i>: An arbitrary-precision decimal number to negate.
20492058

20502059
<b>Return Value:</b>
20512060

@@ -2759,11 +2768,11 @@ This number, converted to a byte (from 0 to 255). Returns 0 if this value is inf
27592768

27602769
public System.Decimal ToDecimal();
27612770

2762-
Not documented yet.
2771+
Converts this value to a `decimal` under the Common Language Infrastructure (see[&#x22;Forms of numbers&#x22;](PeterO.Numbers.EDecimal.md) ), using the half-even rounding mode.
27632772

27642773
<b>Return Value:</b>
27652774

2766-
The return value is not documented yet.
2775+
A `decimal` under the Common Language Infrastructure (usually a .NET Framework decimal).
27672776

27682777
### ToDouble
27692778

@@ -2780,16 +2789,15 @@ The closest 64-bit floating-point number to this value. The return value can be
27802789
public PeterO.Numbers.EFloat ToEFloat(
27812790
PeterO.Numbers.EContext ec);
27822791

2783-
Not documented yet.
2792+
Creates a binary floating-point number from this object's value. Note that if the binary floating-point number contains a negative exponent, the resulting value might not be exact, in which case the resulting binary float will be an approximation of this decimal number's value.
27842793

27852794
<b>Parameters:</b>
27862795

2787-
* <i>ec</i>: The parameter <i>ec</i>
2788-
is not documented yet.
2796+
* <i>ec</i>: An arithmetic context to control precision, rounding, and exponent range of the result. If `HasFlags` of the context is true, will also store the flags resulting from the operation (the flags are in addition to the pre-existing flags).
27892797

27902798
<b>Return Value:</b>
27912799

2792-
An EFloat object.
2800+
an arbitrary-precision float floating-point number.
27932801

27942802
### ToEFloat
27952803

@@ -3054,7 +3062,7 @@ Converts this value to its closest equivalent as a 32-bit floating-point number.
30543062

30553063
<b>Return Value:</b>
30563064

3057-
The closest 32-bit floating-point number to this value. The return value can be positive infinity or negative infinity if this value exceeds the range of a 32-bit floating point number.
3065+
The closest 32-bit binary floating-point number to this value. The return value can be positive infinity or negative infinity if this value exceeds the range of a 32-bit floating point number.
30583066

30593067
### ToString
30603068

docs/PeterO.Numbers.EFloat.md

+24-28
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ Creates a binary float from a 32-bit floating-point number. This method computes
905905
<b>Parameters:</b>
906906

907907
* <i>flt</i>: The parameter <i>flt</i>
908-
is a 32-bit floating-point number.
908+
is a 32-bit binary floating-point number.
909909

910910
<b>Return Value:</b>
911911

@@ -917,16 +917,16 @@ A binary float with the same value as <i>flt</i>
917917
public static PeterO.Numbers.EFloat FromString(
918918
string str);
919919

920-
Not documented yet.
920+
Creates a binary float from a text string that represents a number, using an unlimited precision context. For more information, see the `FromString(String, int,
921+
int, EContext)` method.
921922

922923
<b>Parameters:</b>
923924

924-
* <i>str</i>: The parameter <i>str</i>
925-
is not documented yet.
925+
* <i>str</i>: A text string to convert to a binary float.
926926

927927
<b>Return Value:</b>
928928

929-
An EFloat object.
929+
The parsed number, converted to arbitrary-precision binary float.
930930

931931
### FromString
932932

@@ -1001,7 +1001,7 @@ All characters mentioned above are the corresponding characters in the Basic Lat
10011001
(but not more than <i>str</i>
10021002
's length).
10031003

1004-
* <i>ctx</i>: An EContext object specifying the precision, rounding, and exponent range (in bits) to apply to the parsed number. Can be null.
1004+
* <i>ctx</i>: A precision context specifying the precision, rounding, and exponent range (in bits) to apply to the parsed number. Can be null.
10051005

10061006
<b>Return Value:</b>
10071007

@@ -1028,14 +1028,14 @@ Either <i>offset</i>
10281028
string str,
10291029
PeterO.Numbers.EContext ctx);
10301030

1031-
Creates a binary float from a text string that represents a number. For more information, see the FromString(String, int, int, EContext) method.
1031+
Creates a binary float from a text string that represents a number. For more information, see the `FromString(String, int,
1032+
int, EContext)` method.
10321033

10331034
<b>Parameters:</b>
10341035

1035-
* <i>str</i>: The parameter <i>str</i>
1036-
is a text string.
1036+
* <i>str</i>: A text string to convert to a binary float.
10371037

1038-
* <i>ctx</i>: An EContext object specifying the precision, rounding, and exponent range to apply to the parsed number. Can be null.
1038+
* <i>ctx</i>: A precision context specifying the precision, rounding, and exponent range to apply to the parsed number. Can be null.
10391039

10401040
<b>Return Value:</b>
10411041

@@ -1677,15 +1677,13 @@ Returns the next value that is closer to the other object' s value than this obj
16771677
PeterO.Numbers.EFloat bthis,
16781678
PeterO.Numbers.EFloat otherValue);
16791679

1680-
Adds this object and another binary float and returns the result.
1680+
Adds two arbitrary-precision binary floating-point numbers and returns the result.
16811681

16821682
<b>Parameters:</b>
16831683

1684-
* <i>bthis</i>: The parameter <i>bthis</i>
1685-
is not documented yet.
1684+
* <i>bthis</i>: The first arbitrary-precision binary floating-point number.
16861685

1687-
* <i>otherValue</i>: The parameter <i>otherValue</i>
1688-
is not documented yet.
1686+
* <i>otherValue</i>: The second arbitrary-precision binary floating-point number.
16891687

16901688
<b>Return Value:</b>
16911689

@@ -1695,6 +1693,7 @@ The sum of the two objects.
16951693

16961694
* System.ArgumentNullException:
16971695
The parameter <i>bthis</i>
1696+
or <i>otherValue</i>
16981697
is null.
16991698

17001699
### Operator `/`
@@ -1703,7 +1702,7 @@ The parameter <i>bthis</i>
17031702
PeterO.Numbers.EFloat dividend,
17041703
PeterO.Numbers.EFloat divisor);
17051704

1706-
Divides this object by another binary float and returns the result. When possible, the result will be exact.
1705+
Divides one binary float by another and returns the result. When possible, the result will be exact.
17071706

17081707
<b>Parameters:</b>
17091708

@@ -1775,15 +1774,13 @@ The parameter <i>operand1</i>
17751774
PeterO.Numbers.EFloat bthis,
17761775
PeterO.Numbers.EFloat subtrahend);
17771776

1778-
Subtracts an arbitrary-precision binary float from this instance and returns the result.
1777+
Subtracts one arbitrary-precision binary float from another.
17791778

17801779
<b>Parameters:</b>
17811780

1782-
* <i>bthis</i>: The parameter <i>bthis</i>
1783-
is not documented yet.
1781+
* <i>bthis</i>: The first operand.
17841782

1785-
* <i>subtrahend</i>: The parameter <i>subtrahend</i>
1786-
is not documented yet.
1783+
* <i>subtrahend</i>: The second operand.
17871784

17881785
<b>Return Value:</b>
17891786

@@ -1804,12 +1801,11 @@ Gets an object with the same value as this one, but with the sign reversed.
18041801

18051802
<b>Parameters:</b>
18061803

1807-
* <i>bigValue</i>: The parameter <i>bigValue</i>
1808-
is not documented yet.
1804+
* <i>bigValue</i>: An arbitrary-precision binary float.
18091805

18101806
<b>Return Value:</b>
18111807

1812-
An arbitrary-precision binary float. If this value is positive zero, returns negative zero. Returns signaling NaN if this value is signaling NaN.
1808+
The negated form of the given number. If the given number is positive zero, returns negative zero. Returns signaling NaN if this value is signaling NaN.
18131809

18141810
<b>Exceptions:</b>
18151811

@@ -2438,11 +2434,11 @@ This number, converted to a byte (from 0 to 255). Returns 0 if this value is inf
24382434

24392435
public double ToDouble();
24402436

2441-
Not documented yet.
2437+
Converts this value to a 64-bit floating-point number.
24422438

24432439
<b>Return Value:</b>
24442440

2445-
A 64-bit floating-point number.
2441+
This number, converted to a 64-bit floating-point number.
24462442

24472443
### ToEDecimal
24482444

@@ -2452,7 +2448,7 @@ Converts this value to an arbitrary-precision decimal number.
24522448

24532449
<b>Return Value:</b>
24542450

2455-
An arbitrary-precision decimal number.
2451+
This number, converted to an arbitrary-precision decimal number.
24562452

24572453
### ToEInteger
24582454

@@ -2722,7 +2718,7 @@ Converts this value to its closest equivalent as 32-bit floating-point number. T
27222718

27232719
<b>Return Value:</b>
27242720

2725-
The closest 32-bit floating-point number to this value. The return value can be positive infinity or negative infinity if this value exceeds the range of a 32-bit floating point number.
2721+
The closest 32-bit binary floating-point number to this value. The return value can be positive infinity or negative infinity if this value exceeds the range of a 32-bit floating point number.
27262722

27272723
### ToString
27282724

0 commit comments

Comments
 (0)