Skip to content

Commit

Permalink
Version 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
peteroupc committed Aug 11, 2017
1 parent 8e93179 commit 996940a
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 122 deletions.
3 changes: 1 addition & 2 deletions docs/PeterO.Numbers.EContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,7 @@ Copies this arithmetic context and sets the copy's "ClampNormalExponents" flag t

<b>Parameters:</b>

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

<b>Return Value:</b>

Expand Down
64 changes: 36 additions & 28 deletions docs/PeterO.Numbers.EDecimal.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ There are several other types of numbers that are mentioned in this class and el

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.

<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:
<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:

* Precision is 24 bits.

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

<b>Return Value:</b>

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

### FromDouble

Expand Down Expand Up @@ -1054,23 +1054,34 @@ Converts an arbitrary-precision integer to an arbitrary precision decimal.

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

<b>Exceptions:</b>

* System.ArgumentNullException:
The parameter <i>bigint</i>
is null.

### FromExtendedFloat

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

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

Not documented yet.
Converts an arbitrary-precision binary floating-point number to an arbitrary precision decimal.

<b>Parameters:</b>

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

<b>Return Value:</b>

An EDecimal object.
An arbitrary-precision decimal number.

<b>Exceptions:</b>

* System.ArgumentNullException:
The parameter <i>ef</i>
is null.

### FromInt16

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

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

<b>Return Value:</b>

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

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

<b>Parameters:</b>

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

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

<b>Return Value:</b>

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

* System.ArgumentNullException:
The parameter <i>bthis</i>
or <i>otherValue</i>
is null.

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

* System.ArgumentNullException:
The parameter <i>operand1</i>
or <i>operand2</i>
is null.

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

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

<b>Parameters:</b>

* <i>bthis</i>: The parameter <i>bthis</i>
is not documented yet.
* <i>bthis</i>: The first operand.

* <i>subtrahend</i>: The parameter <i>subtrahend</i>
is not documented yet.
* <i>subtrahend</i>: The second operand.

<b>Return Value:</b>

The difference of the two objects.
The difference of the two decimal numbers.

<b>Exceptions:</b>

* System.ArgumentNullException:
The parameter <i>bthis</i>
or <i>subtrahend</i>
is null.

### Operator `-`

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

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

<b>Parameters:</b>

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

<b>Return Value:</b>

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

public System.Decimal ToDecimal();

Not documented yet.
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.

<b>Return Value:</b>

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

### ToDouble

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

Not documented yet.
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.

<b>Parameters:</b>

* <i>ec</i>: The parameter <i>ec</i>
is not documented yet.
* <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).

<b>Return Value:</b>

An EFloat object.
an arbitrary-precision float floating-point number.

### ToEFloat

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

<b>Return Value:</b>

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.
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.

### ToString

Expand Down
52 changes: 24 additions & 28 deletions docs/PeterO.Numbers.EFloat.md
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ Creates a binary float from a 32-bit floating-point number. This method computes
<b>Parameters:</b>

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

<b>Return Value:</b>

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

Not documented yet.
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,
int, EContext)` method.

<b>Parameters:</b>

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

<b>Return Value:</b>

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

### FromString

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

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

<b>Return Value:</b>

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

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

<b>Parameters:</b>

* <i>str</i>: The parameter <i>str</i>
is a text string.
* <i>str</i>: A text string to convert to a binary float.

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

<b>Return Value:</b>

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

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

<b>Parameters:</b>

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

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

<b>Return Value:</b>

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

* System.ArgumentNullException:
The parameter <i>bthis</i>
or <i>otherValue</i>
is null.

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

Divides this object by another binary float and returns the result. When possible, the result will be exact.
Divides one binary float by another and returns the result. When possible, the result will be exact.

<b>Parameters:</b>

Expand Down Expand Up @@ -1775,15 +1774,13 @@ The parameter <i>operand1</i>
PeterO.Numbers.EFloat bthis,
PeterO.Numbers.EFloat subtrahend);

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

<b>Parameters:</b>

* <i>bthis</i>: The parameter <i>bthis</i>
is not documented yet.
* <i>bthis</i>: The first operand.

* <i>subtrahend</i>: The parameter <i>subtrahend</i>
is not documented yet.
* <i>subtrahend</i>: The second operand.

<b>Return Value:</b>

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

<b>Parameters:</b>

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

<b>Return Value:</b>

An arbitrary-precision binary float. If this value is positive zero, returns negative zero. Returns signaling NaN if this value is signaling NaN.
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.

<b>Exceptions:</b>

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

public double ToDouble();

Not documented yet.
Converts this value to a 64-bit floating-point number.

<b>Return Value:</b>

A 64-bit floating-point number.
This number, converted to a 64-bit floating-point number.

### ToEDecimal

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

<b>Return Value:</b>

An arbitrary-precision decimal number.
This number, converted to an arbitrary-precision decimal number.

### ToEInteger

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

<b>Return Value:</b>

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.
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.

### ToString

Expand Down

0 comments on commit 996940a

Please sign in to comment.