CURRENCY_DECIMAL

Currency decimal

Description

Given a decimal fraction representation of a number and the fractional unit used, returns a regular decimal number.

For example, 213.03 might mean 213 and 3/8 or 213 and 3/32, depending on the source data.

Function signature

CURRENCY_DECIMAL(fractionalprice: Number, unit: Number) => Number

Parameter

Description

Fractional price

The price quotation given using fractional decimal conventions.

Unit

The units of the fraction, e.g. 8 for 1/8ths or 32 for 1/32nds

Examples

Formula

Return value

CURRENCY_DECIMAL(4.2, 4)

4.5

CURRENCY_DECIMAL(4.05, 16)

4.3125

CURRENCY_DECIMAL(4, 4)

4