Click or drag to resize
FinanceDollarfr Method
Converts a decimal price to a fractional price.

Namespace: Imsl.Finance
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax
public static double Dollarfr(
	double decimalDollar,
	int fraction
)

Parameters

decimalDollar
Type: SystemDouble
A double which specifies a decimal number.
fraction
Type: SystemInt32
A int which specifies the denominator.

Return Value

Type: Double
A double which specifies a dollar price expressed as a fraction.
Remarks
It is computed using the following:

{\it idollar} + {{{\it decimalDollar} - 
            {\it idollar}} \over {10^{\left( {{\it ifrac} + 1} \right)} / 
            {\it fraction}}}

where {\it idollar} is the integer part of the {\it decimalDollar}, and {\it ifrac} is the integer part of log({\it fraction}).

See Also