Exemplo n.º 1
0
def to_il(x, **kwargs):
    "converts any number in base ten to idoneal base\nreturns a string"
    sgn, sep = kwargs.get('sgn', '-'), kwargs.get('sep', '.')
    lst = _to_mixed(x, _idoneal, **kwargs)
    return _sup.lst_to_str(lst, sgn, sep)
Exemplo n.º 2
0
def to_oz(x, **kwargs):
    "converts any number in base ten to the ooze base\nreturns a string"
    sgn, sep = kwargs.get('sgn', '-'), kwargs.get('sep', '.')
    lst = _to_mixed(x, _ooze, **kwargs)
    return _sup.lst_to_str(lst, sgn, sep)
Exemplo n.º 3
0
def to_tm(x, **kwargs):
    "converts any number in base ten to time (up to weeks) base\nreturns a string"
    sgn, sep = kwargs.get('sgn', '-'), kwargs.get('sep', '.')
    lst = _to_mixed(x, _time, **kwargs)
    return _sup.lst_to_str(lst, sgn, sep)
Exemplo n.º 4
0
def to_pt(x, **kwargs):
    "converts any number in base ten to pentatope base\nreturns a string"
    sgn, sep = kwargs.get('sgn', '-'), kwargs.get('sep', '.')
    lst = _to_mixed(x, _simp, sgn=sgn, sep=sep, gen_args={'n': 5})
    return _sup.lst_to_str(lst, sgn, sep)
Exemplo n.º 5
0
def to_yc(x, **kwargs):
    "converts any number in base ten to the lazy caterer's base\nreturns a string"
    sgn, sep = kwargs.get('sgn', '-'), kwargs.get('sep', '.')
    lst = _to_mixed(x, _caterer, **kwargs)
    return _sup.lst_to_str(lst, sgn, sep)
Exemplo n.º 6
0
def to_lc(x, **kwargs):
    "converts any number in base ten to lucas base\nreturns a string"
    sgn, sep = kwargs.get('sgn', '-'), kwargs.get('sep', '.')
    lst = _to_mixed(x, _lucas, sgn=sgn, sep=sep)
    return _sup.lst_to_str(lst, sgn, sep)
Exemplo n.º 7
0
def to_wh(x, **kwargs):
    "converts any number in base ten to ???"  # eventually base 10
    sgn, sep = kwargs.get('sgn', '-'), kwargs.get('sep', '.')
    lst = _to_mixed(x, _whatever, **kwargs)
    return _sup.lst_to_str(lst, sgn, sep)
Exemplo n.º 8
0
def to_fbn(x, **kwargs):
    "converts any number in base ten to the nth-nacci base\nreturns a string"
    sgn, sep = kwargs.get('sgn', '-'), kwargs.get('sep', '.')
    n = kwargs.get('n', 5)
    lst = _to_mixed(x, _gfib, sgn=sgn, sep=sep, gen_args={'n': n - 2})
    return _sup.lst_to_str(lst, sgn, sep)
Exemplo n.º 9
0
def to_fb(x, **kwargs):
    "converts any number in base ten to fibonacci base\nreturns a string"
    sgn, sep = kwargs.get('sgn', '-'), kwargs.get('sep', '.')
    lst = _to_mixed(x, _gfib, **kwargs)
    return _sup.lst_to_str(lst, sgn, sep)
Exemplo n.º 10
0
def to_pm(x, **kwargs):
    "converts any number in base ten to primorial base\nreturns a string"
    sgn, sep = kwargs.get('sgn', '-'), kwargs.get('sep', '.')
    lst = _to_mixed(x, _pgen, **kwargs)
    return _sup.lst_to_str(lst, sgn, sep)
Exemplo n.º 11
0
def to_fc(x, **kwargs):
    "converts any number in base ten to factorial base\nreturns a string"
    # largest value that can be made using N digits is (N*N!)-1
    sgn, sep = kwargs.get('sgn', '-'), kwargs.get('sep', '.')
    lst = _to_mixed(x, _count, **kwargs)
    return _sup.lst_to_str(lst, sgn, sep)
Exemplo n.º 12
0
def to_tn(x, **kwargs):
    "base ten to \"mixed\" base ten - only for testing"
    sgn, sep = kwargs.get('sgn', '-'), kwargs.get('sep', '.')
    lst = _to_mixed(x, _const, sgn=sgn, sep=sep)
    return _sup.lst_to_str(lst, sgn, sep)