ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 28 Apr 2019 08:50:23 -0500Weird behaviour/bug with pi and rational exponentshttp://ask.sagemath.org/question/46390/weird-behaviourbug-with-pi-and-rational-exponents/When I type this:
print numerical_approx((4/pi())^(2/1))
print numerical_approx((4/3.14159265358979)^(2/1))
I get
sage: 3.90303389783585e2585827972
1.62113893827741
(note the letter "e" in the 1st line)
This happens on my notebook, on the COCALC server there is a crash.
Has anyone else seen this ? What is the problem there ?kenJ0428Sun, 28 Apr 2019 08:50:23 -0500http://ask.sagemath.org/question/46390/Get the constant value of an equationhttp://ask.sagemath.org/question/39060/get-the-constant-value-of-an-equation/I have the following equation :
(x - 1)^2 - (x - 2)^2 - (y - 1)^2 + y^2 + (z - 3)^2 - (z - 4)^2 == 1.75000000000000
which I factorized to :
2*x + 2*y + 2*z - 51/4
And then I would like to extract the `-51/4` but the `.coefficient()` function doesn't work for constant so I have no idea to get the constant value.BariloSat, 07 Oct 2017 04:20:49 -0500http://ask.sagemath.org/question/39060/Get the coefficient of the constanthttp://ask.sagemath.org/question/39058/get-the-coefficient-of-the-constant/ I have the following equation :
(x - 1)^2 - (x - 2)^2 - (y - 1)^2 + y^2 + (z - 3)^2 - (z - 4)^2 == 1.75000000000000
which I factorized to :
2*x + 2*y + 2*z - 51/4
And then I would like to extract the `-51/4` but the `.coefficient()` doesn't work for constant so I have no idea to get the constant value.BariloSat, 07 Oct 2017 04:19:12 -0500http://ask.sagemath.org/question/39058/symbolic constant in clifford algebrahttp://ask.sagemath.org/question/33763/symbolic-constant-in-clifford-algebra/ Dear all,
First of all I'd like to state that I am far from a SageMath expert. Right now, I am working on Clifford algebra's and I would like to do some computations with SageMath Cloud. Unfortunately, I experience the problem that when I define a symbolic constant, Sage doesn't know how to multiply this with elements in the Clifford algebra. This is the code that I'm using.
START CODE
C = ComplexField();
sage: Q = QuadraticForm(C, 3, [0,0,1,1,0,0])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
var('e')
e*x
END CODE
I get an error for e*x: ''unsupported operand parent(s) for '*': 'Symbolic Ring' and 'The Clifford algebra of the Quadratic form in 3 variables over Complex Field with 53 bits of precision with coefficients:''
Does anyone maybe know how to work around this? Maybe I am defining the variable all wrong?
Thank you very much!
Kind regards,
David
davidvanovereemMon, 13 Jun 2016 08:01:50 -0500http://ask.sagemath.org/question/33763/How to multiply symbolic constant with element in clifford algebra?http://ask.sagemath.org/question/33764/how-to-multiply-symbolic-constant-with-element-in-clifford-algebra/Dear all,
first I would like to state that I am only a beginner at using SageMath. Currently I am working on Clifford algebra's but unfortunately I'm experiencing a problem. I cannot find a solution in the documentation so I hope maybe someone here has an idea!
I would like to define a symbolic constant in the field of complex numbers, and multiply this with an element from the clifford algebra. Unfortunately, SageMath doesn't like this! This is the code that I'm using:
START CODE
sage: Q = QuadraticForm(CC, 3, [0,0,1,1,0,0])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
var('e')
e*x
END CODE
the operation e*x now gives me an error: ''TypeError: unsupported operand parent(s) for '*': 'Symbolic Ring' and 'The Clifford algebra of the Quadratic form in 3 variables over Complex Field with 53 bits of precision with coefficients: ...''
Does anyone maybe have an idea how to work around this? Maybe I'm defing the symbolic constant all wrong?
Thank you very much! Kind regards,
David
davidvanovereemMon, 13 Jun 2016 08:07:26 -0500http://ask.sagemath.org/question/33764/Defining custom global constantshttp://ask.sagemath.org/question/8980/defining-custom-global-constants/Is it possible to define a custom constant like pi? One that is handled symbolically, one that can be used without prior definition...
For example, could it be possible to define "tau" to equal 2*pi for my Sage installation so that when I open my notebook, I can call "tau" without needing to define it in every cell?
And to take it a step further, would it be possible to replace constants? Like pi with tau/2? This isn't as important, but it would be very nice!daniel.e2718Fri, 18 May 2012 09:34:21 -0500http://ask.sagemath.org/question/8980/Any way to define variables as constant?http://ask.sagemath.org/question/7768/any-way-to-define-variables-as-constant/I want to come up with a function that will return true when I compare $(x-1)^2+C$ and $x^2-2x+C$
where $C$ is an arbitrary constant. Any way that you know can do this ?
ShuWed, 17 Nov 2010 05:39:32 -0600http://ask.sagemath.org/question/7768/