Re: [sympy] Convert between numeral systems

2017-06-29 Thread Robert Pollak
Am 2017-06-29 um 21:11 schrieb Chris Smith: > Most of what you would need to convert strings to fractions in a given > base is already part of Python and an example is given here > Thank you, but I

Re: [sympy] Convert between numeral systems

2017-06-29 Thread Chris Smith
Most of what you would need to convert strings to fractions in a given base is already part of Python and an example is given here On Tuesday, September 1, 2015 at 11:26:48 AM UTC-5, Robert Pollak

Re: [sympy] Convert between numeral systems

2015-09-01 Thread Robert Pollak
On Friday, July 17, 2015 at 11:20:15 PM UTC+2, Chris Smith wrote: > > Is this what you are looking for? > > >>> from sympy.ntheory.factor_ import digits > >>> digits(1234,20) > [20, 3, 1, 14] > Thank you! So there really was something hidden in SymPy :) Unfortunately, as this is part of

Re: [sympy] Convert between numeral systems

2015-07-17 Thread Chris Smith
Is this what you are looking for? from sympy.ntheory.factor_ import digits digits(1234,20) [20, 3, 1, 14] help(digits) Help on function digits in module sympy.ntheory.factor_: digits(n, b=10) Return a list of the digits of n in base b. The first element in the list is b (or -b if n

Re: [sympy] Convert between numeral systems

2015-07-07 Thread Robert Pollak
Am 2015-07-06 um 20:23 schrieb Aaron Meurer: I think mpmath has some support, although it may be low-level. Look at https://github.com/fredrik-johansson/mpmath/blob/master/demo/pidigits.py, which uses mpmath to compute the digits of pi in any base. Thank you - that looks promising. -- You

Re: [sympy] Convert between numeral systems

2015-07-06 Thread Robert Pollak
On Friday, July 3, 2015 at 7:43:44 PM UTC+2, Joachim Durchholz wrote: Am 03.07.2015 um 14:48 schrieb Robert Pollak: I have got a newbie question: Does SymPy provide a way to deal with numbers in different numeral systems and e.g. to convert them between different systems? Or do I

Re: [sympy] Convert between numeral systems

2015-07-06 Thread Aaron Meurer
I think mpmath has some support, although it may be low-level. Look at https://github.com/fredrik-johansson/mpmath/blob/master/demo/pidigits.py, which uses mpmath to compute the digits of pi in any base. Aaron Meurer On Mon, Jul 6, 2015 at 4:35 AM, Robert Pollak robert.pol...@mykolab.com wrote:

[sympy] Convert between numeral systems

2015-07-03 Thread Robert Pollak
Hello, I have got a newbie question: Does SymPy provide a way to deal with numbers in different numeral systems and e.g. to convert them between different systems? Or do I have to tell my students that they have to program this by theirselves :) ? Best Regards, Robert -- You received this

Re: [sympy] Convert between numeral systems

2015-07-03 Thread Oscar Benjamin
On 3 July 2015 at 13:48, Robert Pollak robert.pol...@mykolab.com wrote: Hello, I have got a newbie question: Does SymPy provide a way to deal with numbers in different numeral systems and e.g. to convert them between different systems? Or do I have to tell my students that they have to

Re: [sympy] Convert between numeral systems

2015-07-03 Thread Joachim Durchholz
Am 03.07.2015 um 14:48 schrieb Robert Pollak: Hello, I have got a newbie question: Does SymPy provide a way to deal with numbers in different numeral systems and e.g. to convert them between different systems? Or do I have to tell my students that they have to program this by theirselves :) ?