CURRENCY_FRACTIONAL

Currency fractional

Description

Given a decimal number and a fractional unit, returns a number in the decimal fraction format.

Function signature

CURRENCY_FRACTIONAL(decimalprice: Number, unit: Number) => Number

Parameter

Description

Decimal price

The price quotation given as a decimal value

Unit

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

Examples

Formula

Return value

CURRENCY_FRACTIONAL(4.5, 4)

4.2

CURRENCY_FRACTIONAL(4.3125, 16)

4.05

CURRENCY_FRACTIONAL(4, 4)

4