Ask Your Question

lisbeth's profile - activity

2023-07-22 11:20:28 +0200 received badge  Teacher (source)
2023-07-21 10:29:41 +0200 answered a question How to compute nPr in sagemath

The following method avoids computing factorials explicitly, which can be computationally expensive for large values of

2023-07-21 10:21:50 +0200 answered a question How to check whether a given group contains a subgroup isomorphic to Quaternion group

You first define the quaternion group Q using the QuaternionGroup constructor. You then define the group G that you want

2020-08-03 21:12:35 +0200 received badge  Famous Question (source)
2018-11-19 04:39:48 +0200 received badge  Notable Question (source)
2018-11-18 16:10:50 +0200 asked a question SageMath and xinetd

hi all, I want to use a Sage script with xinetd daemon, but I got an error message:

Error: environment variable $HOME is not set.
Error setting environment variables by sourcing '/root/SageMath/src/bin/sage-env';
possibly contact sage-devel (see http://groups.google.com/group/sage-devel).

How I can resolve this problem? You can see my xinetd.conf file here:

service sage
{
        disable         = no
        socket_type     = stream
        protocol        = tcp
        user            = sage
        wait            = no
        bind        = 10.19.18.49
        server      = /home/sage/run.sh
        log_type    = FILE /var/log/xinetd_sage.log
        log_on_success  = HOST PID
        log_on_failure  = HOST
        type        = UNLISTED
        port        = 8301
        instances   = 100
        per_source  = 10
        rlimit_cpu  = 3
        nice        = 19
}
2018-09-20 09:01:08 +0200 received badge  Supporter (source)
2018-09-20 09:00:59 +0200 commented question Problems installing Sage 8.3 on OSX

hi all, I have the same issue, I can't mount the sage-8.3-OSX_10.13.6-x86_64.dmg in Mac os 10.13.6 and please note that: MD5 (sage-8.3-OSX_10.13.6-x86_64.dmg) = 1aea38426661b68b0bcd0ee93b6afed7 whats the problem?

2016-12-05 08:26:50 +0200 received badge  Popular Question (source)
2015-04-30 04:08:54 +0200 received badge  Nice Question (source)
2015-04-22 11:51:14 +0200 received badge  Scholar (source)
2015-04-22 11:30:44 +0200 received badge  Student (source)
2015-04-22 09:05:05 +0200 received badge  Editor (source)
2015-04-22 09:03:01 +0200 asked a question Polynomial Ring in Sage

Hello, I want to use this code in my python script, but it return error:

from sage.all import *
var('x')
R = ZZ['x']
f = 3*x**2 - 3*x**8
g = x**2 - 1
print g.degree(x)
h = f.mod(x**2 - 1)
print h.degree(x)
print f.quo_rem(g)

and error:

2
8
Traceback (most recent call last):
  File "degree.py", line 15, in <module>
    print f.quo_rem(g)
  File "sage/structure/element.pyx", line 438, in sage.structure.element.Element.__getattr__ (build/cythonized/sage/structure/element.c:4406)
  File "sage/structure/misc.pyx", line 257, in sage.structure.misc.getattr_from_other_class (build/cythonized/sage/structure/misc.c:1631)
AttributeError: 'sage.symbolic.expression.Expression' object has no attribute 'quo_rem'

What's the problem I can't use this commands in my script? And also note the the result of

h = f.mod(x**2 - 1)
is incorrect!