Re: [sage-support] Strange behavior when evaluating multivariate polynomials over integers modulo n

2021-03-08 Thread Dima Pasechnik
On Mon, Mar 8, 2021 at 12:27 PM Alex Braat wrote: > > Small update: > Replacing Integers(p^2) by QuotientRing(ZZ, p^2) seems to fix the issue. Could you open a trac ticket on this? It looks as if multivariate polynomial rings over Integers(p^2) are directly using Singular, but I don't think

Re: [sage-support] Strange behavior when evaluating multivariate polynomials over integers modulo n

2021-03-08 Thread Alex Braat
Small update: Replacing Integers(p^2) by QuotientRing(ZZ, p^2) seems to fix the issue. Op maandag 8 maart 2021 om 10:34:06 UTC+1 schreef dim...@gmail.com: > On Mon, Mar 8, 2021 at 9:25 AM Alex Braat wrote: > > > > Hello, > > > > I have encountered some strange behavior when I evaluate

Re: [sage-support] Strange behavior when evaluating multivariate polynomials over integers modulo n

2021-03-08 Thread Dima Pasechnik
On Mon, Mar 8, 2021 at 9:25 AM Alex Braat wrote: > > Hello, > > I have encountered some strange behavior when I evaluate multivariate > polynomials over the integers modulo n. For instance, > > In: > p = 3 > S = Integers(p^2) > R. = PolynomialRing(S) > f = x^2 * y^2 > print(f([S(p),S(1)]),

[sage-support] Strange behavior when evaluating multivariate polynomials over integers modulo n

2021-03-08 Thread Alex Braat
Hello, I have encountered some strange behavior when I evaluate multivariate polynomials over the integers modulo n. For instance, In: p = 3 S = Integers(p^2) R. = PolynomialRing(S) f = x^2 * y^2 print(f([S(p),S(1)]), f([S(1), S(p)])) Out: 1 0 while both evaluations should ofcourse be equal

[sage-support] Strange behavior in relabeling a graph in Sage 9.2

2021-01-08 Thread Nikos Apostolakis
Dear list, Relabeling a graph in Sage 9.2 exhibits some strange behavior. If the argument is a dictionary constructed by dictionary comprehension Sage seems to just ignore it. If the dictionary is explicitly given then everything works. Here is an example sage: bar = DiGraph([((2, 3), (1, 2),

Re: [sage-support] Strange behavior with RealField(n)

2016-02-21 Thread Thierry Dumont
Le 21/02/2016 20:40, John Cremona a écrit : Try RealField(500).pi() and similar. Yes, it works... but my small piece of code should also give correct results... thanks. t. On 21 Feb 2016 18:10, "Thierry Dumont" > wrote: I

Re: [sage-support] Strange behavior with RealField(n)

2016-02-21 Thread John Cremona
Try RealField(500).pi() and similar. On 21 Feb 2016 18:10, "Thierry Dumont" wrote: > I have students who want to compute decimals of pi...so, what can we do > with RealField(n) ? > I make the following script (pi.sage): > > > for p in [2..10]:

[sage-support] Strange behavior with RealField(n)

2016-02-21 Thread Thierry Dumont
I have students who want to compute decimals of pi...so, what can we do with RealField(n) ? I make the following script (pi.sage): for p in [2..10]: R=RealField(10^p) pii=4*atan(R(1)) print p,R,pii Then, using sage 7.0 or 7.1.beta4:

[sage-support] strange behavior with sums

2014-06-23 Thread Karl Schultheisz
I'm using Sage 6.2 on Arch Linux. I have posted before about sums being wrong https://groups.google.com/d/msg/sage-support/IgC78rcdO7c/qTWzpA9f-P8J, and I am happy to see that the community took action. Thanks! I have been seeing other errors that may or may not be related to those addressed

[sage-support] strange behavior in sage 5.0

2012-05-17 Thread Kenneth A. Ribet
Any advice here? Am I doing something wrong: sage: 1+1 2 sage: (0.8*0.15)/(0.8*0.15 + 0.2*0.85) Unhandled SIGILL: An illegal instruction occurred in Sage. This probably occurred because a *compiled* component of

Re: [sage-support] strange behavior in matrix substitution

2010-06-13 Thread Robert Bradshaw
On Jun 12, 2010, at 17:27 , Byungchul Cha wrote: Please tell me if this is a bug, or, I'm missing something obvious... sage: a = 3 # Assign a value to a variable a sage: b = a # Create a copy of a You're not really copying a, you're just making 'b' refer to the same thing that 'a' does,

Re: Sage on iPhone - Re: [sage-support] strange behavior in matrix substitution

2010-06-13 Thread calcpage
  Computer Science Baldwin Senior High School Nassau Community College -Original Message- From: William Stein wst...@gmail.com To: sage-support@googlegroups.com sage-support@googlegroups.com Sent: Sat, Jun 12, 2010 11:55 pm Subject: Sage on iPhone - Re: [sage-support] strange behavior

[sage-support] strange behavior in matrix substitution

2010-06-12 Thread Byungchul Cha
Please tell me if this is a bug, or, I'm missing something obvious... sage: a = 3 # Assign a value to a variable a sage: b = a # Create a copy of a sage: b = 2 # Change the value of b sage: b 2 sage: a # The value of a remains unchanged, as expected. 3 So far, it looks good to me. But, when I

Re: [sage-support] strange behavior in matrix substitution

2010-06-12 Thread Justin C. Walker
On Jun 12, 2010, at 17:27 , Byungchul Cha wrote: Please tell me if this is a bug, or, I'm missing something obvious... sage: a = 3 # Assign a value to a variable a sage: b = a # Create a copy of a sage: b = 2 # Change the value of b sage: b 2 sage: a # The value of a remains unchanged, as

Re: [sage-support] strange behavior in matrix substitution

2010-06-12 Thread Mike Hansen
Hello, On Sat, Jun 12, 2010 at 5:27 PM, Byungchul Cha cha3...@gmail.com wrote: Please tell me if this is a bug, or, I'm missing something obvious... sage: a = 3 # Assign a value to a variable a sage: b = a # Create a copy of a This does not create a copy of a. When you do a = 3, this

Re: [sage-support] strange behavior in matrix substitution

2010-06-12 Thread William Stein
On Saturday, June 12, 2010, Justin C. Walker jus...@mac.com wrote: On Jun 12, 2010, at 17:27 , Byungchul Cha wrote: Please tell me if this is a bug, or, I'm missing something obvious... sage: a = 3 # Assign a value to a variable a sage: b = a # Create a copy of a sage: b = 2 # Change the

Re: [sage-support] strange behavior in matrix substitution

2010-06-12 Thread Justin C. Walker
On Jun 12, 2010, at 19:07 , William Stein wrote: On Saturday, June 12, 2010, Justin C. Walker jus...@mac.com wrote: On Jun 12, 2010, at 17:27 , Byungchul Cha wrote: [snip] Shouldn't the value of v remain the same? Why does the change in u (or, a row of u) affect v? [snip] For, e.g.,

Re: [sage-support] strange behavior in matrix substitution

2010-06-12 Thread William Stein
On Saturday, June 12, 2010, Justin C. Walker jus...@mac.com wrote: On Jun 12, 2010, at 19:07 , William Stein wrote: On Saturday, June 12, 2010, Justin C. Walker jus...@mac.com wrote: On Jun 12, 2010, at 17:27 , Byungchul Cha wrote: [snip] Shouldn't the value of v remain the same? Why

Re: [sage-support] strange behavior in matrix substitution

2010-06-12 Thread Justin C. Walker
On Jun 12, 2010, at 20:30 , William Stein wrote: On Saturday, June 12, 2010, Justin C. Walker jus...@mac.com wrote: On Jun 12, 2010, at 19:07 , William Stein wrote: On Saturday, June 12, 2010, Justin C. Walker jus...@mac.com wrote: On Jun 12, 2010, at 17:27 , Byungchul Cha wrote: [snip]

Sage on iPhone - Re: [sage-support] strange behavior in matrix substitution

2010-06-12 Thread William Stein
On Saturday, June 12, 2010, Justin C. Walker jus...@mac.com wrote: On Jun 12, 2010, at 20:30 , William Stein wrote: On Saturday, June 12, 2010, Justin C. Walker jus...@mac.com wrote: On Jun 12, 2010, at 19:07 , William Stein wrote: On Saturday, June 12, 2010, Justin C. Walker

[sage-support] strange behavior on assigning string with single quotes

2010-05-12 Thread Rajeev
Hi, I am finding a very strange behavior in notebook. Evaluating a = 'hello' gives Traceback (most recent call last): File stdin, line 1, in module File _sage_input_12.py, line 4, in module print _support_.syseval(python, ur\u0027\u0027\u0027a = \u0027hello \u0027\u0027\u0027\u0027,

[sage-support] Strange behavior in timeit

2009-08-03 Thread VictorMiller
I was trying to find out how fast a calculation was (applying an isogeny of degree on an elliptic curve over a finite field). At first I noticed that when I repeated a timeit call with the same expression I was getting monotonically increasing numbers, so I decided to try something more

[sage-support] strange behavior

2009-06-13 Thread Florian Beutler
Hay I am a bit annoyed by sage... I just want to print a function two times and sage gives me an error... this is the first script #!/usr/bin/env sage -python import sys from sage.all import *

[sage-support] Strange behavior on sagenb

2009-03-26 Thread Jason Bandlow
Hi all, When I start up a clean version of sage 3.4 on my local machine and enter the following into a notebook cell: M=load('http://www.math.upenn.edu/~jbandlow/sage_data/dic_of_kst_to_G_cob_mats.sobj') # This object is a dictionary key = (1, Partition([1]),Partition([2])) print key in