sequence function: to-base

    description:
        to-base(ket, ket)
        convert a decimal number to the given base
        
    examples:
        to-base(|10>, |2>)
            0|1> + |2> + 0|4> + |8>

        to-base(|123454678>, |1000>)
            678|1> + 454|1000> + 123|1000000>

        push-float to-base(|123454678>, |1000>)
            |1: 678> + |1000: 454> + |1000000: 123>
            
    see also:
        is-prime, prime-factors

Home