Converts a decimal price to a fractional price.
Namespace:
Imsl.Finance
Assembly:
ImslCS (in ImslCS.dll) Version: 6.5.0.0
Syntax
C# |
---|
public static double Dollarfr( double decimalDollar, int fraction ) |
Visual Basic (Declaration) |
---|
Public Shared Function Dollarfr ( _ decimalDollar As Double, _ fraction As Integer _ ) As Double |
Visual C++ |
---|
public: static double Dollarfr( double decimalDollar, int fraction ) |
Parameters
- decimalDollar
- Type: System..::.Double
A double which specifies a decimal number.
- fraction
- Type: System..::.Int32
A int which specifies the denominator.
Return Value
A double which specifies a dollar price expressed as a fraction.
Remarks
It is computed using the following:


where is the integer part of the
, and
is the integer part of
.