[sage-support] Strange bug connected to GAP as a backend

2022-11-20 Thread 'Peter Mueller' via sage-support
Start with g = SymmetricGroup(3) chi = g.trivial_character() u = g.subgroup([]) Next reg = u.trivial_character().induct(g) print(chi.scalar_product(reg)) yields as expected the answer 1. Now repeat the very same two lines, but before doing so compute the representatives of conjugacy classes

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 Singu

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 multivaria

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)]), f([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 to

[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

2018-04-07 Thread Nikos Apostolakis
Graph(7) creates a graph with vertices {0 ..., 6} HTH, Nikos Sent from my iPhone > On Apr 7, 2018, at 9:16 AM, Henri Girard wrote: > > thanks, I tried david suggestion and it's correct now : > > edges = [(1,2), (1,3), (1,4), > (2,3), (2,4), (2,5), (2, 6), > (3,4), (3,5), (3,6), (3,7)

Re: [sage-support] Strange

2018-04-07 Thread Henri Girard
thanks, I tried david suggestion and it's correct now : edges = [(1,2), (1,3), (1,4),     (2,3), (2,4), (2,5), (2, 6),     (3,4), (3,5), (3,6), (3,7),     (4,6), (4,7), (5,6), (6,7)] Gamma = Graph(edges) Gamma.show() Meanwhile I made it too with networkx to compare : import networkx as nx impo

Re: [sage-support] Strange

2018-04-07 Thread Jan Groenewald
Hi On 7 April 2018 at 14:52, Henri Girard wrote: > I made this graph (meaning a fano's plane) but I have the zero outside the > graph ? > > I don't understand why ? someone could explain ? > > My adjacency_matrix is 8 but shouldn't be 7 ? > > g=Graph(7) > edges = [(1,2), (1,3), (1,4), > (2,3

Re: [sage-support] Strange

2018-04-07 Thread David Joyner
On Sat, Apr 7, 2018 at 8:52 AM, Henri Girard wrote: > I made this graph (meaning a fano's plane) but I have the zero outside the > graph ? > > I don't understand why ? someone could explain ? > I don't know but sage: edges = [(1,2), (1,3), (1,4), : (2,3), (2,4), (2,5), (2, 6), :

[sage-support] Strange

2018-04-07 Thread Henri Girard
I made this graph (meaning a fano's plane) but I have the zero outside the graph ? I don't understand why ? someone could explain ? My adjacency_matrix is 8 but shouldn't be 7 ? g=Graph(7) edges = [(1,2), (1,3), (1,4),     (2,3), (2,4), (2,5), (2, 6),     (3,4), (3,5), (3,6), (3,7),     (4,6),

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" mailto:tdum...@math.univ-lyon1.fr>> wrote: I have students who want to compu

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]: > R=RealField(10^p) >

[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 _.extension() function behavior

2015-08-28 Thread Rudy
Hullo all, Can someone explain the following behavior to me? I would like to to create an extension of the field of rational functions in one variable 'y' over the finite field of three elements by adjoining a root of unity 'Y' and an element of Carlitz torsion 'X'. I run the following comman

[sage-support] Strange error

2014-10-23 Thread João Alberto
I am running the following Python example from the book "Learning Python", from Mark Lutz and David Ascher, but Sage is returning a TypeError after presenting the correct response. Can anyone explain me why? I've found this very strange. sage: class Commuter: : def __init__(self, val): ...

[sage-support] Strange characters in sage terminal

2014-08-18 Thread Oscar Lazo
Hi! I used to see some straight lines when I started the sage command-line (the ones surrounding the header), but now I see some question marks of the kind you see when your system doesn't recognize some character. What do you think I'm missing? I have an Ubuntu system. http://i.imgur.com/NItM

[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 , 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 mpmath result in $\sum_{ n > 0} \pi^n$

2014-01-20 Thread Georgi Guninski
Perhaps someone should forward this upstream. $\sum_{ n > 0} \pi^n$ certainly diverges though mpmath claims it equals -pi/(pi-1) sage: import mpmath sage: mpmath.mp.pretty=True;mpmath.mp.dps=40 sage: r1=mpmath.nsum(lambda n: mpmath.pi**n,[ 1, mpmath.inf]) sage: r1 -1.4669422069242598599833948132

[sage-support] Strange results with subgroups of automorphism group of graphs

2014-01-09 Thread Georgi Guninski
Strange results with subgroups of automorphism group of graphs There is an element in the automorphism group of graph which is in no subgroup (though the full group is a subgroup). I suspect the problem is the usage of zero. G1=Graph(':H`ECw@HGXGAGUG`e');G=G1.automorphism_group();sg=G.subgroups(

Re: [sage-support] Strange behaviour for two similar functions

2013-06-07 Thread Christophe BAL
+1 2013/6/7 John Cremona > I think you need to read a python intro to see the difference between > mutable / immutable lists and similar. This is a python question, not > really a Sage question. > > John Cremona > > On 7 June 2013 09:24, B. Zhang wrote: > > Hi, > > > > How to explain the diff

Re: [sage-support] Strange behaviour for two similar functions

2013-06-07 Thread John Cremona
I think you need to read a python intro to see the difference between mutable / immutable lists and similar. This is a python question, not really a Sage question. John Cremona On 7 June 2013 09:24, B. Zhang wrote: > Hi, > > How to explain the difference between these two similar functions ? >

[sage-support] Strange behaviour for two similar functions

2013-06-07 Thread B. Zhang
Hi, How to explain the difference between these two similar functions ? Thansk. = Test 1 F = [1,2,3] def test1(F): F[0] = 0 F[1] = 0 F[2] = 0 print F test1(F); F [0, 0, 0] [0, 0, 0] === Test 2 === F = [1,2,3] def test2(F): F = [0,0,0] test2(F); F [0,

[sage-support] Strange behaviour when generating SVG files for (combinatorial) graphs

2012-11-27 Thread Rogério Brito
Hi there. I was just trying to get my feet wet with Sage by generating some SVG files of graphs for use with my LaTeX documents, but I noticed a problem: In the following session, with Sage 5.4.1 (actually, sage-5.4.1-linux-32bit-ubuntu_12.04.1_lts-i686-Linux) running on a Debian sid machine,

[sage-support] Strange results in DiGraph.girth()

2012-10-27 Thread Georgi Guninski
Got results with DiGraph.girth() which appear inconsistent to me. girth() returns 3 and powers of the adjacency matrix suggest there are no directed triangle cycles and couldn't s see a directed triangle cycle on the plot of the digraph. sage: GR=DiGraph('FWE@_WF@o?');M=GR.adjacency_matrix() sage:

Re: [sage-support] Strange results with multivariate resultants

2012-09-20 Thread Georgi Guninski
Thanks all for the replies. Pari devs acknowledged their bug and fixed it in trunk here: http://pari.math.u-bordeaux.fr/archives/pari-dev-1209/msg00034.html On Thu, Sep 20, 2012 at 09:45:14AM -0700, Dima Pasechnik wrote: > > > On Thursday, 20 September 2012 19:05:56 UTC+8, Georgi Guninski wro

Re: [sage-support] Strange results with multivariate resultants

2012-09-20 Thread Dima Pasechnik
On Thursday, 20 September 2012 19:05:56 UTC+8, Georgi Guninski wrote: > > pari disagrees with sage and maxima agrees with it. > > which way is it? > > maxima session: > (%i12) p1:(x2)*(x3-x4);p2:x2*(x3-2*x4); > (%i14) resultant(p1,p2,x1); > (%o14) 1 > (%i15)

Re: [sage-support] Strange results with multivariate resultants

2012-09-20 Thread luisfe
On Thursday, September 20, 2012 1:05:56 PM UTC+2, Georgi Guninski wrote: > > pari disagrees with sage and maxima agrees with it. > > which way is it? > > maxima session: > (%i12) p1:(x2)*(x3-x4);p2:x2*(x3-2*x4); > (%i14) resultant(p1,p2,x1); > (%o14) 1 > In

Re: [sage-support] Strange results with multivariate resultants

2012-09-20 Thread luisfe
On Wednesday, September 19, 2012 6:34:52 AM UTC+2, Georgi Guninski wrote: > > Hi, > > I may be missing something, but the resultant = 1 confuses me. > According to wikipedia [1] > the multivariate resultant or Macaulay's resultant of n homogeneous > polynomials in n variables is a polynomial

Re: [sage-support] Strange results with multivariate resultants

2012-09-20 Thread Julian Rüth
* Georgi Guninski [2012-09-19 07:34:46 +0300]: > According to wikipedia [1] > the multivariate resultant or Macaulay's resultant of n homogeneous > polynomials in n variables is a polynomial in their coefficients that > vanishes when they have a common non-zero solution > My pain is $1$ can't v

Re: [sage-support] Strange results with multivariate resultants

2012-09-20 Thread Georgi Guninski
pari disagrees with sage and maxima agrees with it. which way is it? maxima session: (%i12) p1:(x2)*(x3-x4);p2:x2*(x3-2*x4); (%i14) resultant(p1,p2,x1); (%o14) 1 (%i15) resultant(p1,p2,x2); (%o15) 0 On Wed, Sep 19, 2012 at 07:34:46A

Re: [sage-support] Strange results with multivariate resultants

2012-09-18 Thread Georgi Guninski
Hi, I may be missing something, but the resultant = 1 confuses me. According to wikipedia [1] the multivariate resultant or Macaulay's resultant of n homogeneous polynomials in n variables is a polynomial in their coefficients that vanishes when they have a common non-zero solution My pain is $1

Re: [sage-support] Strange results with multivariate resultants

2012-09-18 Thread Julian Rüth
Hi, I'm not sure if I understand what is counterintuitive about the results. * Georgi Guninski [2012-09-18 16:55:37 +0300]: > sage: K.=PolynomialRing(QQ) > sage: p1=(x2-1)*(x3+2) > sage: p2=(x2-1)*(x3+3) > sage: p1.resultant(p2) > 1 This is the resultant of p1 and p2 w.r.t. x1 (the first variabl

[sage-support] Strange results with multivariate resultants

2012-09-18 Thread Georgi Guninski
I had to workaround against this counterintuitive results. 5.2 and 5.3 on linux x86_64 sage: K.=PolynomialRing(QQ) sage: p1=(x2-1)*(x3+2) sage: p2=(x2-1)*(x3+3) sage: p1.resultant(p2) 1 sage: K_.=PolynomialRing(QQ) sage: p1_=K_(p1) sage: p2_=K_(p2) sage: p1_.resultant(p2_) 0 sage: gp.polresultan

[sage-support] Strange sum() result and can't be evaluated numerically

2012-09-14 Thread Renan Birck Pinheiro
The command sum( ((-1)^k*(x^(2*k+1))/factorial(2*k+1)),k,0,oo) should give sin(x) - it does in Mathematica. But in Sage it gives 1/2*sqrt(pi)*sqrt(2)*sqrt(x)*bessel_j(1/2, x) which can't be evaluated numerically: _(x=3).N() Traceback (most recent call last): File "", line 1, in File "_sage

[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

[sage-support] Strange interaction between sage and numpy

2012-01-07 Thread Vegard Lima
Hello, I was doing some computation involving finding nullspace of a matrix with only \pm 1 entries when right_kernel().basis() started giving me nullvectors... Here is a minimal example to reproduce the behaviour: import numpy as np r=10 c=76 A = 2*np.random.randint(2, size=(r,c

[sage-support] Strange behaviour in a simple function

2011-09-29 Thread Maarten Derickx
Mod(B*x, M) doesn't return an integer but an element of Integers(M) = the ring of integers modulo M. So the differences you see are because B is a normal integer so the subtractions involving B and M are just integer subtractions, but the substractions involing x and M are substractions in Inte

[sage-support] Strange behaviour in a simple function

2011-09-29 Thread m m
Hi I have written very simple function, which code I paste below. The thing is that it produces completely unexpected results. I paste them below. Please let me know if this is a bug or I just do something completely wrong. I change in tests only the modulus M. def MLCG_S(B,M,N,x0): x = x0

[sage-support] strange issue with 3d plots/Jmol

2011-08-28 Thread pong
I encountered a pretty strange issue with Jmol. In each notebook worksheet, I can have Jmol to display only two 3d plots! From the third 3d plots onwards, it just giving me black screens... It must be some problems on the installation since if I transfer the same worksheet to another server, it di

[sage-support] Strange error using R pexpect interface?

2011-06-06 Thread kcrisman
I'm using R matrices to use an R program and then do things with it in Sage. For some reason Sage doesn't get the "right" answer for matrices above a certain size. The first one is right (it gives the space that is in the returned string) while the second one makes no sense; ZZ='' is what actuall

[sage-support] strange error message when using maxima

2010-10-02 Thread Oscar Gerardo Lazo Arjona
When I use sage from the command line I get the following error message: sage: integral(x,x) 'import site' failed; use -v for traceback Traceback (most recent call last): File "/home/oscar/sage-4.5.2/local/bin/sage-cleaner", line 21, in import os, shutil, sys, time, socket File "/home/

[sage-support] Strange bug in latex rendering

2010-08-08 Thread Oscar Gerardo Lazo Arjona
Hello! I've come across this strange bug: sage: var('x y') (x, y) sage: a=x-y/x sage: a x - y/x sage: print a x - y/x sage: latex(a) x + \frac{y}{x} that last + should be a -. This also doesn't work in the notebook, using print a works, but show(a) shows the expression with a plus sign. Any

Re: [sage-support] Strange (non-)substitution of variables whose name is not equal to their representation

2010-07-07 Thread Mike Hansen
On Wed, Jul 7, 2010 at 1:49 PM, David Sanders wrote: > I now want to substitute eps=1, so I do > > a.subs(eps = 1) > > but the response is still 3*epsilon ! This is due to the way Python functions work. Basically, doing a.subs(eps=1) is the same as doing a.subs(**{'eps': 1}) When you use key

[sage-support] Strange (non-)substitution of variables whose name is not equal to their representation

2010-07-07 Thread David Sanders
Hi, I have finally managed to try out Sage seriously after a long time wanting to (and with intermediate-level Python experience). In general it's really rather amazing, thanks to all involved! I have come across what -- to me -- seems at least incongruous, when substituting variables. I am using

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

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

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

2010-06-12 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, i.e

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 wrote: > > On Jun 12, 2010, at 20:30 , William Stein wrote: > > > On Saturday, June 12, 2010, Justin C. Walker wrote: > > > On Jun 12, 2010, at 19:07 , William Stein wrote: > > > On Saturday, June 12, 2010, Justin C. Walker wrote: > > > On Jun 12, 201

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 wrote: On Jun 12, 2010, at 19:07 , William Stein wrote: On Saturday, June 12, 2010, Justin C. Walker wrote: On Jun 12, 2010, at 17:27 , Byungchul Cha wrote: [snip] [snip] I find that hard

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

2010-06-12 Thread William Stein
On Saturday, June 12, 2010, Justin C. Walker wrote: > > On Jun 12, 2010, at 19:07 , William Stein wrote: > > > On Saturday, June 12, 2010, Justin C. Walker 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

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 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., integers, "u=v" mean

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

2010-06-12 Thread William Stein
On Saturday, June 12, 2010, Justin C. Walker 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 valu

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 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 creates new obje

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 exp

[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 do

[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 "", line 1, in File "_sage_input_12.py", line 4, in print _support_.syseval(python, ur\u0027\u0027\u0027a = \u0027hello \u0027\u0027\u0027\u0027, \u0027/home/raje

Re: [sage-support] strange n()

2010-04-11 Thread Mike Hansen
On Sun, Apr 11, 2010 at 12:47 PM, bb wrote: > In an earlier posting (I am always thankful for any help!) you wrote: > One could do a little work to get Sage's interval arithmetic to do > something similar. Would be an interesting experiment. Here's a brief example sage: RIF Real Interval Field w

Re: [sage-support] strange n()

2010-04-11 Thread bb
Mike Hansen schrieb: On Sun, Apr 11, 2010 at 10:01 AM, bb wrote: Tnx for helping. I did some more experimentation. I dont want to bother you, but if you have some time and some pation I would be thankfull for one more explanation. Your tip works as expected, but if I use the method n() I sti

Re: [sage-support] strange n()

2010-04-11 Thread Mike Hansen
On Sun, Apr 11, 2010 at 10:01 AM, bb wrote: > Tnx for helping. I did some more experimentation. I dont want to bother you, > but if you have some time and some pation I would be thankfull for one more > explanation. Your tip works as expected, but if I use the method n() I still > get 53 bit of si

Re: [sage-support] strange n()

2010-04-11 Thread bb
Mike Hansen schrieb: On Sat, Apr 10, 2010 at 3:37 AM, bb wrote: sage: n(sqrt(2.), digits=40) 1.414213562373095145474621858738828450441 sage: n(sqrt(2), digits=40) 1.414213562373095048801688724209698078570 sage: If you wanted this to be more like Maxima, the appropriate thing to do wou

Re: [sage-support] strange n()

2010-04-10 Thread Mike Hansen
On Sat, Apr 10, 2010 at 3:37 AM, bb wrote: > sage: n(sqrt(2.), digits=40) > 1.414213562373095145474621858738828450441 > sage: n(sqrt(2), digits=40) > 1.414213562373095048801688724209698078570 > sage: If you wanted this to be more like Maxima, the appropriate thing to do would some something like:

Re: [sage-support] strange n()

2010-04-10 Thread bb
Mike Hansen schrieb: On Sat, Apr 10, 2010 at 1:02 AM, bb wrote: Is there any explanation? Could you be more specific in your question? Everything there looks normal to me. n(pi, 20) means to compute using 20 bits of precision. --Mike Ok, I see - the argument defines the number

Re: [sage-support] strange n()

2010-04-10 Thread Alex Ghitza
On Sat, 10 Apr 2010 01:08:12 -0700, Mike Hansen wrote: > On Sat, Apr 10, 2010 at 1:02 AM, bb wrote: > > Is there any explanation? > > Could you be more specific in your question? Everything there looks > normal to me. n(pi, 20) means to compute using 20 bits of precision. ... which you can fi

Re: [sage-support] strange n()

2010-04-10 Thread Mike Hansen
On Sat, Apr 10, 2010 at 1:02 AM, bb wrote: > Is there any explanation? Could you be more specific in your question? Everything there looks normal to me. n(pi, 20) means to compute using 20 bits of precision. --Mike -- To post to this group, send email to sage-support@googlegroups.com To unsu

[sage-support] strange n()

2010-04-10 Thread bb
Just experimenting with Sage syntax I found something strange: sage: n(pi) 3.14159265358979 sage: n(pi,20) 3.1416 sage: n(pi,29) 3.1415927 sage: n(pi,59) 3.1415926535897932 sage: n(pi,0x59) 3.1415926535897932384626434 sage: pi.n(digits=17) 3.1415926535897932 sage: Is there any explanation? Rega

[sage-support] strange 3d plot

2010-03-02 Thread ma...@mendelu.cz
Dear sage-support If I plot 3d graph using sage: plot3d(sqrt(sin(x)*sin (y)), (x,0,12),(y,0,12) ) the output looks fine. The output of sage: plot3d(sqrt(sin(x)*sin (y)), (x,0,2*pi),(y,0,2*pi) ) should be different but it is completely wrong (no graph and bounds for z from 0.0 to 0.0156

[sage-support] Strange behaviour of trig_expand

2010-02-02 Thread Nicolas
Here is some to-my-opinion strange behaviour of trig_expand : #Declare real variables var('a b c') assume([a,'real'],[b,'real'],[c,'real']) assumptions() ---> [a is real, b is real, c is real] #Case 1 sin(a+b).trig_expand() ---> sin(a)*cos(b) + sin(b)*cos(a) #Case 2 sin((a+b)/2).trig_expand() --

[sage-support] strange Permission denied problem

2009-09-26 Thread Thierry Dumont
... strange only for me I hope. (May be this problem whas solved, but I cannot access to the archive of the list since some hours in France...). 1) I have an user "sage" in group: "sage" (uid=1001,gid=1001) I launch sage and then start the notebook: notebook(open_viewer=False,address='',secure=T

[sage-support] strange lab behavior

2009-09-23 Thread michel
Hi, I'm a high school math teacher experimenting with getting students to use SAGE. I've been successful in getting my students to open their own notebook accounts. I took my classes to the computer lab one day, and during the session the kids started experiencing other names on their accounts.

[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 systemati

[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 behaviour of find_maximum_on_intervall

2009-05-23 Thread Laurent Claessens
Hello everybody -- | Sage Version 3.4.1, Release Date: 2009-04-21 | | Type notebook() for the GUI, and license() for information.|

[sage-support] strange characters in notebook

2009-05-07 Thread gyro
Hi, I am running Sage version 3.4.1 on a CentosOS5 Linux workstation. Sage is compiled from source. I am using the notebook interface through Firefox version 3.0.10 with jsMath v3.6a. In the notebook interface, when I evaluate the contents of a cell, the proper output is 'sandwiched' between sets

[sage-support] Strange construction in autogenerated Python

2009-03-26 Thread Greg Kuperberg
Hi. I see that when I make file called foo.sage, sage precompiles it into another file called foo.py. The code statement in this file is: _sage_const_2 = Integer(Integer(2)) Surely this is wrong? Maybe it does not matter if this Python code is only executed once. But still it looks strange.

[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 M.keys()

[sage-support] Strange behaviour of float()?

2009-01-29 Thread martin Campos Pinto
Hi everybody, in my Notebook (version 3.2.3) I get the following: sage: a = float(1>1) sage: a 0.0 sage: var('x') sage: b(x) = float(x>1) Traceback (most recent call last): File "", line 1, in File "/Users/campos/.sage/sage_notebook/worksheets/admin/4/code/ 204.py", line 8, in _=var

[sage-support] strange list behavior

2008-01-09 Thread benjamin antieau
Code for the worksheet attached below. There must surely be a simple answer to this problem, but I have not been able to figure it out. I loop through i,j print the list [i,j], and append the list to pts. However, once appended to points something goes wrong, and all that points sees are the cons

[sage-support] Strange behavior in Partition(x).next()

2007-12-13 Thread mekaj
I wrote a couple methods that relied on Partition(x).next() where 'x' is a list of Integers. Essentially I wanted to print out all the possible partitions of an Integer so I wrote the following functions: def get_partitions(x,y=[]): """ Gets the list of the input argument and all the

[sage-support] strange behaviour when converting a numpy matrix to a sage one.

2007-10-11 Thread adrianmatematico
sage: import numpy sage: numpy.array([[1,2,3],[4,5,6],[7,8,9]],'f') array([[ 1., 2., 3.], [ 4., 5., 6.], [ 7., 8., 9.]], dtype=float32) sage: a=numpy.array([[1,2,3],[4,5,6],[7,8,9]],'f') sage: matrix(a) [ 2.0047311 512.000122547 8192.0019722] [ 131072.0

[sage-support] Strange Error in Converting polynomials to vector

2007-10-01 Thread Ahmad
I just tried this and when the field is bigger or equal to 2^16 I got following error: 2^15: Fine! K. = GF(2^15, 'a') V = K.vector_space() z = (a+1)^13 V(z) (1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0) 2^16: Error! K. = GF(2^16, 'a') V = K.vector_space() z = (a+1)^13 V(z) Exception (cli

[sage-support] Strange behavior with multi-line input

2006-10-17 Thread Justin C. Walker
Hi, all, I'm using sage-1.4. On my MacBook Pro, with a "mercurial" sage-main install. On my dual G5 PowerMac, I have a "stock" 1.4 install (except for a slightly modified 'pari' install, aI modified "get_dlld" script). I see strange behavior on the MacBook Pro, as follows: If I type, say f