Re: [sage-support] Re: Need to Express integers as 6 bit

2011-09-01 Thread Maarten Derickx
On Fri, Sep 2, 2011 at 5:25 AM, Santanu Sarkar
 wrote:
> For mozilla firefox, it is perfect. I dont known about other browsers.
>
Then it's probably not a sage issue since your chrome version is
really outdated. You say you have 5.0.375.70 but the latest stable
release is already version 13.

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] Re: Need to Express integers as 6 bit

2011-09-01 Thread Santanu Sarkar
For mozilla firefox, it is perfect. I dont known about other browsers.

On 1 September 2011 15:30, Maarten Derickx wrote:

> Maybe it's time to install a newer version of sage. 4.2 is quite old now,
> the latest stable release is now 4.7.1. Could you please, still also answer
> my question if it is only in chrome or also in other browsers you have
> installed?
>
> --
> To post to this group, send email to sage-support@googlegroups.com
> To unsubscribe from this group, send email to
> sage-support+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] Re: Need to Express integers as 6 bit

2011-09-01 Thread Maarten Derickx
Maybe it's time to install a newer version of sage. 4.2 is quite old now, the 
latest stable release is now 4.7.1. Could you please, still also answer my 
question if it is only in chrome or also in other browsers you have installed?

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] Re: Need to Express integers as 6 bit

2011-09-01 Thread Santanu Sarkar
Dear Maarten,
  Sorry for delay. Version of my Chrome is 5.0.375.70.
I have written programs in SAGE 4.2 over Linux Ubuntu 8.04 on a computer
with Dual CORE Intel(R) Pentium(R).

With regards,
Santanu


On 26 August 2011 13:46, Maarten Derickx wrote:

> Dear Santanu,
>
> I work myself with sage an google chrome to and it's working for me. See
> below for an example. Could you please tell me which version of Chrome you
> are running and on which operating system. The version of sage you are using
> (or the adress of the webserver). And could you also please tell if you
> experience the same problem in other browsers then chrome.
>
>
> 
>
>
> --
> To post to this group, send email to sage-support@googlegroups.com
> To unsubscribe from this group, send email to
> sage-support+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] Re: Need to Express integers as 6 bit

2011-08-26 Thread Maarten Derickx
Dear Santanu,

I work myself with sage an google chrome to and it's working for me. See 
below for an example. Could you please tell me which version of Chrome you 
are running and on which operating system. The version of sage you are using 
(or the adress of the webserver). And could you also please tell if you 
experience the same problem in other browsers then chrome.


 

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] Re: Need to Express integers as 6 bit

2011-08-25 Thread Santanu Sarkar
Dear Maarten,
   Thank you very much for your effort. I use Google Chrome and 'tab' key is
not working.
Thank you again.

With regards,
Santanu

On 26 August 2011 03:22, Maarten Derickx wrote:

> Dear Santanu,
>
> I noticed that you asked quite a few "easy" questions in the last few day.
> It might be usefull for you to walk trough a sage tutorial (to be found at
> http://www.sagemath.org/doc/tutorial/ as soon as the site is working
> again)  and a python tutorial (since everything you can do in python you can
> also do in sage). This might make it easier to come up with your own
> solutions.
> The solution to this question is:
>
> sage: a=4
> sage: pad_zeros(a.binary(),6)
> '000100'
>
> Note that before reading your question I didn't know the awnser either. But
> sage has a few nice features to help you discover some features.
>
> Suppose I want to do something with an integer I first do
>
> sage: a=4
>
> so a is an integer.
>
> now I do
>
> sage: a.
>
> and the pres the  key.
>
> The result is
>
> a.Na.is_idempotent
>  a.numerical_approx
> a.abs  a.is_integral  a.ord
> a.additive_order   a.is_irreducible   a.order
> a.base_extend  a.is_nilpotent a.ordinal_str
> a.base_ringa.is_norm  a.parent
> a.binary   a.is_one   a.popcount
> a.binomial a.is_perfect_power a.powermod
> a.bits a.is_power
> a.powermodm_ui
> a.cartesian_producta.is_power_of
>  a.prime_divisors
> a.category a.is_prime
> a.prime_factors
> a.ceil a.is_prime_power
> a.prime_to_m_part
> a.conjugatea.is_pseudoprime   a.quo_rem
> a.coprime_integers a.is_squarea.radical
> a.crt  a.is_squarefree
>  a.rational_reconstruction
> a.db   a.is_unit  a.real
> a.degree   a.is_zero  a.rename
> a.denominator  a.isqrta.reset_name
> a.digits   a.jacobi   a.save
> a.divide_knowing_divisible_by  a.kroneckera.sqrt
> a.divides  a.lcm  a.sqrt_approx
> a.divisors a.leading_coefficient  a.sqrtrem
> a.dump a.list
> a.squarefree_part
> a.dumpsa.log  a.str
> a.exact_loga.mod  a.subs
> a.exp  a.multifactorial   a.substitute
> a.factor   a.multiplicative_order a.support
> a.factoriala.na.test_bit
> a.floora.nbits
>  a.trailing_zero_bits
> a.gammaa.ndigits
>  a.trial_division
> a.gcd  a.next_prime   a.val_unit
> a.imag a.next_probable_prime  a.valuation
> a.inverse_mod  a.nth_root a.version
> a.inverse_of_unit  a.numeratora.xgcd
>
>
> I scan the results for something that make a into something binary and
> indeed there is a .binary method.
> Now I do
>
> sage: a.binary?
>
> to see what it does, an it almost does what I want.
>
> I do
>
> sage: l = a.binary()
>
> and see then I want it to be of length 6 so I want to pad it with zero's.
>
> I do
>
> sage: l.pad
>
> and press tab. To bad there is no such function so I try
>
> sage: pad
>
> and press tab and see that there is indeed a funtion which pads zero's.
>
>
>  --
> To post to this group, send email to sage-support@googlegroups.com
> To unsubscribe from this group, send email to
> sage-support+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: Need to Express integers as 6 bit

2011-08-25 Thread Maarten Derickx
Dear Santanu,

I noticed that you asked quite a few "easy" questions in the last few day. 
It might be usefull for you to walk trough a sage tutorial (to be found at 
http://www.sagemath.org/doc/tutorial/ as soon as the site is working again) 
 and a python tutorial (since everything you can do in python you can also 
do in sage). This might make it easier to come up with your own solutions.
The solution to this question is:

sage: a=4
sage: pad_zeros(a.binary(),6)
'000100'

Note that before reading your question I didn't know the awnser either. But 
sage has a few nice features to help you discover some features.

Suppose I want to do something with an integer I first do

sage: a=4

so a is an integer.

now I do

sage: a.

and the pres the  key.

The result is

a.Na.is_idempotent   
 a.numerical_approx
a.abs  a.is_integral  a.ord
a.additive_order   a.is_irreducible   a.order
a.base_extend  a.is_nilpotent a.ordinal_str
a.base_ringa.is_norm  a.parent
a.binary   a.is_one   a.popcount
a.binomial a.is_perfect_power a.powermod
a.bits a.is_power a.powermodm_ui
a.cartesian_producta.is_power_of 
 a.prime_divisors
a.category a.is_prime 
a.prime_factors
a.ceil a.is_prime_power   
a.prime_to_m_part
a.conjugatea.is_pseudoprime   a.quo_rem
a.coprime_integers a.is_squarea.radical
a.crt  a.is_squarefree   
 a.rational_reconstruction
a.db   a.is_unit  a.real
a.degree   a.is_zero  a.rename
a.denominator  a.isqrta.reset_name
a.digits   a.jacobi   a.save
a.divide_knowing_divisible_by  a.kroneckera.sqrt
a.divides  a.lcm  a.sqrt_approx
a.divisors a.leading_coefficient  a.sqrtrem
a.dump a.list 
a.squarefree_part
a.dumpsa.log  a.str
a.exact_loga.mod  a.subs
a.exp  a.multifactorial   a.substitute
a.factor   a.multiplicative_order a.support
a.factoriala.na.test_bit
a.floora.nbits   
 a.trailing_zero_bits
a.gammaa.ndigits 
 a.trial_division
a.gcd  a.next_prime   a.val_unit
a.imag a.next_probable_prime  a.valuation
a.inverse_mod  a.nth_root a.version
a.inverse_of_unit  a.numeratora.xgcd


I scan the results for something that make a into something binary and 
indeed there is a .binary method.
Now I do

sage: a.binary?

to see what it does, an it almost does what I want.

I do

sage: l = a.binary()

and see then I want it to be of length 6 so I want to pad it with zero's.

I do

sage: l.pad

and press tab. To bad there is no such function so I try

sage: pad

and press tab and see that there is indeed a funtion which pads zero's.


-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org