Method push
push()
Pushes a 0 (zero) value onto the stack.
Declaration
public void push()
push(BigRational)
Pushes the supplied BigRational value onto the stack.
Declaration
public void push(BigRational v)
Parameters
Type | Name | Description |
---|---|---|
BigRational | v | The value to push. |
push(Int32)
Pushes the supplied System.Int32 value onto the stack.
Declaration
public void push(int v)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | v | The value to push. |
push(Int32, Int32)
Pushes n copies of the supplied System.Int32 value onto the stack.
Declaration
public void push(int v, int n)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | v | The value to push. |
System.Int32 | n | The number of copies to push. |
push(UInt32)
Pushes the supplied System.UInt32 value onto the stack.
Declaration
public void push(uint v)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | v | The value to push. |
push(Int64)
Pushes the supplied System.Int64 value onto the stack.
Declaration
public void push(long v)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | v | The value to push. |
push(UInt64)
Pushes the supplied System.UInt64 value onto the stack.
Declaration
public void push(ulong v)
Parameters
Type | Name | Description |
---|---|---|
System.UInt64 | v | The value to push. |
push(Single)
Pushes the supplied System.Single value onto the stack.
Declaration
public void push(float v)
Parameters
Type | Name | Description |
---|---|---|
System.Single | v | The value to push. |
Remarks
Rounds the value implicit to 7 digits as the System.Single format has
only 7 digits of precision.
see: BigRational(Single)
push(Double)
Pushes the supplied System.Double value onto the stack.
Declaration
public void push(double v)
Parameters
Type | Name | Description |
---|---|---|
System.Double | v | The value to push. |
Remarks
Rounds the value implicit to 15 digits as the System.Double format has
only 15 digits of precision.
see: BigRational(Double)
push(Double, Boolean)
Pushes the supplied System.Double value onto the stack using a bit-exact conversion without rounding.
Declaration
public void push(double v, bool exact)
Parameters
Type | Name | Description |
---|---|---|
System.Double | v | The value to push. |
System.Boolean | exact | Should be true. |
Remarks
see: BigRational(Double)
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Value id NaN. |
push(Decimal)
Pushes the supplied System.Decimal value onto the stack.
Declaration
public void push(Decimal v)
Parameters
Type | Name | Description |
---|---|---|
System.Decimal | v | The value to push. |
push(BigInteger)
Pushes the supplied System.Numerics.BigInteger value onto the stack.
Declaration
public void push(BigInteger v)
Parameters
Type | Name | Description |
---|---|---|
System.Numerics.BigInteger | v | The value to push. |
push(ReadOnlySpan<UInt32>)
Pushes the supplied value onto the stack.
Declaration
public void push(ReadOnlySpan<uint> v)
Parameters
Type | Name | Description |
---|---|---|
System.ReadOnlySpan<System.UInt32> | v |
Remarks
Note: The Span must contain valid data based on the specification:
https://c-ohle.github.io/RationalNumerics/#data-layout
(exception: it does not have to be a normalized fraction.)
For performance reasons, there are no validation checks at this layer.
Together with gets(UInt32) the operation represent a fast low level interface for direct access in form of the internal data representation.
This is intended to allow:
- custom algorithms working on bitlevel
- custom binary serialization
- custom types like vectors with own storage managemend.