On Apr 6, 2:00 am, Robert Bradshaw
wrote:
> I would be in favor of following Python's conventions here--they at
> least seem more natural to me (after all, % is related to "floor
> division" not "round division." :)
Also, currently 2==2., 3==3., but 2%3 is 2 and 2.%3. is
-1.00,
a
On Apr 5, 11:56 pm, Eugene Goldberg wrote:
> Python 2.6.5 (r265:79063, Mar 23 2010, 04:49:54)
> >>> 6e-6 % 10e-6
>
> 6.0002e-06
> Sage Version 4.3.5, Release Date: 2010-03-28
> sage: 6e-6 % 10e-6
> -4.00e-6
>
> I'm sure sage is wrong.. :(
As William Stein said, Sage is
On Apr 5, 2010, at 9:44 PM, William Stein wrote:
On Mon, Apr 5, 2010 at 9:12 PM, Michael Welsh
wrote:
On 6/04/2010, at 3:56 PM, Eugene Goldberg wrote:
Hello!
Here is my pyhtons results:
python
Python 2.6.5 (r265:79063, Mar 23 2010, 04:49:54)
[GCC 4.4.3] on linux2
Type "help", "copyright"
On Mon, Apr 5, 2010 at 9:12 PM, Michael Welsh wrote:
>
> On 6/04/2010, at 3:56 PM, Eugene Goldberg wrote:
>
>> Hello!
>>
>> Here is my pyhtons results:
>>
>> python
>> Python 2.6.5 (r265:79063, Mar 23 2010, 04:49:54)
>> [GCC 4.4.3] on linux2
>> Type "help", "copyright", "credits" or "license" for
On 6/04/2010, at 3:56 PM, Eugene Goldberg wrote:
> Hello!
>
> Here is my pyhtons results:
>
> python
> Python 2.6.5 (r265:79063, Mar 23 2010, 04:49:54)
> [GCC 4.4.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
1+1
> 2
6e-6 % 10e-6
> 6.000
P.S. I've also got wrong result at http://sagenb.kaist.ac.kr/ server.
On Apr 6, 3:56 am, Eugene Goldberg wrote:
> Hello!
>
> Here is my pyhtons results:
>
> python
> Python 2.6.5 (r265:79063, Mar 23 2010, 04:49:54)
> [GCC 4.4.3] on linux2
> Type "help", "copyright", "credits" or "license" for mor
Hello!
Here is my pyhtons results:
python
Python 2.6.5 (r265:79063, Mar 23 2010, 04:49:54)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 1+1
2
>>> 6e-6 % 10e-6
6.0002e-06
>>>
and here is sage:
./
sage
Sage Version 4.3.5, Release Dat
On Apr 5, 10:50 am, William Stein wrote:
> I would make sure to install the openssl development packages, then
> force a rebuild from source of Python in Sage.
>
> sage -f python-2.6.4.p7
I can confirm that that works in Sage 4.3 in VirtualBox on Windows,
sage -i openssl-0.9.8d.p1
sage -f py
Actually, the best thing is to simply use ripemd from the command line
openssl:
a...@goldsmith:~$ echo -n "a" | openssl dgst -ripemd160
0bdc9d2d256b3ee9daae347be6f4dc835a467ffe
Or this can be done from within Sage by escaping to the command line.
Alasdair
On Apr 6, 12:50 am, William Stein wrot
> By the way, one has to be careful using some of the methods of U. In
> particular,
>
> sage: u1=U.list_of_elements_of_multiplicative_group()
> sage: u==u1
>True
> but
>
> sage: type(u[0])
>
> < type 'sage.rings.integer_mod.IntegerMod_int' >
>
> type(u1[0])
>
>
On Apr 5, 8:26 pm, Dana Ernst wrote:
> Wow, thanks for all the feedback. I learned a lot today!
>
> On Apr 5, 2010, at 5:31 PM, Alec Mihailovs wrote:
> > u=[n for n in U if gcd(n,40)==1]
By the way, one has to be careful using some of the methods of U. In
particular,
sage: u1=U.list_of_element
Wow, thanks for all the feedback. I learned a lot today!
On Apr 5, 2010, at 5:31 PM, Alec Mihailovs wrote:
> On Apr 5, 5:11 pm, Alec Mihailovs wrote:
>
>> u=filter(lambda n: gcd(n,40)==1, U)
>
> Also, that can be done as
>
> u=[n for n in U if gcd(n,40)==1]
>
> Alec
>
> --
> To post to th
On Mon, Apr 5, 2010 at 3:28 PM, Tru Huynh wrote:
> Hi,
>
> building doc still fails for 4.3.4 and 4.3.5 (since 4.3.2) with the same
> error message:
Does sage work? What happens if you type
./sage
then
sage: 2+2
4
William
>
> TypeError: unsupported operand parent(s) for '+': 'Univariate P
Hi,
building doc still fails for 4.3.4 and 4.3.5 (since 4.3.2) with the same error
message:
TypeError: unsupported operand parent(s) for '+': 'Univariate Polynomial Ring
in x over Algebraic Real Field' and ''
[...@liberte sage-4.3.4]$ make
cd spkg && ./install all 2>&1 | tee -a ../install.log
On Apr 5, 5:11 pm, Alec Mihailovs wrote:
> u=filter(lambda n: gcd(n,40)==1, U)
Also, that can be done as
u=[n for n in U if gcd(n,40)==1]
Alec
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
sage-support+unsubscr...@googleg
On Apr 5, 5:11 pm, Alec Mihailovs wrote:
> html.table([r]+[map(lambda j: k^j, r) for k in u], header=True)
Or even more simple,
html.table([r]+[[k^j for j in r] for k in u],header=True)
Alec
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group,
On Apr 5, 4:48 pm, Harald Schilly wrote:
> you can also format it as an html table, read the output of
> html.table? for more information ;)
That can be done as
U=Integers(40)
u=filter(lambda n: gcd(n,40)==1, U)
r=range(1,len(u))
html.table([r]+[map(lambda j: k^j, r) for k in u], header=True)
On Apr 5, 10:05 pm, Mike Hansen wrote:
> This uses a few more constructs...
based on your example, here is one that aligns the numbers visually.
"%2d" means to format the number as a number that always takes two
characters.
U = Integers(40)
for k in U:
if gcd(k,40) != 1:
continue
On Mon, Apr 5, 2010 at 12:58 PM, Dana Ernst wrote:
> This does help. BTW, above, I meant to write (swap order of k and j):
>
> for k in range(1,40):
> for j in range(16):
> if gcd(k,40) == 1:
> print (U(k))^j
>
> Is there a way to insert a character after each (U(k))^16, s
William Stein wrote:
On Mon, Apr 5, 2010 at 12:39 PM, D.C. Ernst wrote:
Great, thanks! This is the sort of thing I was trying, but I wasn't
handling the indentation correctly. Perhaps y'all can help me with a
related issue. I'd like my abstract algebra students to use Sage to
do some com
On Mon, Apr 5, 2010 at 12:39 PM, D.C. Ernst wrote:
> Great, thanks! This is the sort of thing I was trying, but I wasn't
> handling the indentation correctly. Perhaps y'all can help me with a
> related issue. I'd like my abstract algebra students to use Sage to
> do some computations involving
Great, thanks! This is the sort of thing I was trying, but I wasn't
handling the indentation correctly. Perhaps y'all can help me with a
related issue. I'd like my abstract algebra students to use Sage to
do some computations involving the group of units mod n. I've been
fiddling around myself
On Mon, Apr 5, 2010 at 12:14 PM, Dana Ernst wrote:
> I think I understand how to deal with "for" statements in Sage. For
> example:
>
> for j in range(5):
> print 3^j
>
> will output the values of 3^0, 3^1, ..., 3^5. However, how could I do this
> for all the numbers, say 1 to 100, instead o
I think I understand how to deal with "for" statements in Sage. For
example:
for j in range(5):
print 3^j
will output the values of 3^0, 3^1, ..., 3^5. However, how could I do
this for all the numbers, say 1 to 100, instead of just 3? Maybe this
is a silly example, but I'm wondering ho
Hi,
On Tue, Apr 6, 2010 at 12:34 AM, bb wrote:
> I am a simple minded user and have some questions concerning Sage functions.
> May be I misunderstand the docu at
> http://sage.math.washington.edu/home/mhansen/sage-epydoc/sage.rings.arith-module.html#primes?
Scroll down to the very end of that H
On Mon, Apr 5, 2010 at 6:01 AM, Alasdair wrote:
> I'm doing some experimentation with cryptographic hash functions, and
> I should be able to use openssl. I can load the python hashlib
> library:
>
> sage: import hashlib
> sage: hashlib.
> hashlib.md5 hashlib.sha1 hashlib.sha256 hashlib.s
I am a simple minded user and have some questions concerning Sage
functions. May be I misunderstand the docu at
http://sage.math.washington.edu/home/mhansen/sage-epydoc/sage.rings.arith-module.html#primes?
Here an excerpt:
eratosthenes(n)
Return a list of the primes $\leq n$.
prange(
I'm doing some experimentation with cryptographic hash functions, and
I should be able to use openssl. I can load the python hashlib
library:
sage: import hashlib
sage: hashlib.
hashlib.md5 hashlib.sha1hashlib.sha256 hashlib.sha512
hashlib.new hashlib.sha224 hashlib.sha384
Now, acc
Hi:
I'm posting this for Michael Somos:
...
I just ran across a slight glitch in installing
an optional valgrind SAGE package.
...
Here is my message:
> I tried to install valgrind using the command
>
> > sage -i valgrind-3.5.0.p0
>
> It fa
On Mon, 5 Apr 2010 00:39:02 -0700 (PDT)
Kwankyu wrote:
> sage: f=sqrt(pi)^-1*exp(-x^2/2); f
> e^(-1/2*x^2)/sqrt(pi)
> sage: g=integral(f,(x,0,2)); g
> 1/2*sqrt(2)*erf(sqrt(2))
> sage: n(g)
> Traceback (most recent call last):
> ...
> TypeError: cannot evaluate symbolic expression numerically
> sa
Hi All,
The following is a bug. Isn't it?
sage: f=sqrt(pi)^-1*exp(-x^2/2); f
e^(-1/2*x^2)/sqrt(pi)
sage: g=integral(f,(x,0,2)); g
1/2*sqrt(2)*erf(sqrt(2))
sage: n(g)
Traceback (most recent call last):
...
TypeError: cannot evaluate symbolic expression numerically
sage: h=1/2*sqrt(2)*erf(sqrt(2))
A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?
--
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 mo
32 matches
Mail list logo