Atom - Æ¡ - From Factorial Base

Characters: Æ , ¡

Tags: arithmetic , math , number , array , vectorize , base

Arity: monadic

This atom is monadic, which means it takes one argument.

Functionality

Convert a number from factorial base.

Details

Starting from the right, each place value has a maximum allowed digit of 0, 1, 2, .... The place value of each digit is 0!, 1!, 2!, .... For example, if our digits are [2, 3, 1, 1, 0], this is evaluated as 2×4! + 3×3! + 1×2! + 1×1! + 0×0! = 48 + 18 + 2 + 1 = 69, so 2,3,1,1,0 Æ¡ evaluates to 69.