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.Wed, 15 Jan 2020 03:59:29 -0600matrix base ring changes by a complex multiplicationhttp://ask.sagemath.org/question/49557/matrix-base-ring-changes-by-a-complex-multiplication/The complex multiplication of matrix changes the base ring.
A = matrix(CDF,[[1,2],[3,4]]); print(A)
B = 2*A
C = I*A
print(type(A))
print(type(B))
print(type(C))
The result is
[1.0 2.0]
[3.0 4.0]
<class 'sage.matrix.matrix_complex_double_dense.Matrix_complex_double_dense'>
<class 'sage.matrix.matrix_complex_double_dense.Matrix_complex_double_dense'>
<class 'sage.matrix.matrix_symbolic_dense.Matrix_symbolic_dense'>
So the multiplication by an imaginary number breaks the CDF property.
This is very inconvenient for numerical calculations, because the symbolic computation is very slow.cxrjddWed, 15 Jan 2020 03:59:29 -0600http://ask.sagemath.org/question/49557/integer digits range problem (see sage error below) Thanks!!!http://ask.sagemath.org/question/46782/integer-digits-range-problem-see-sage-error-below-thanks/.
sage: for i in [9,10,11]:
....: i.digits(base=3)
....:
[0, 0, 1]
[1, 0, 1]
[2, 0, 1]
sage: for i in range(9,12):
....: i.digits(base=3)
....:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-2-e5aab74726b7> in <module>()
1 for i in range(Integer(9),Integer(12)):
----> 2 i.digits(base=Integer(3))
3
AttributeError: 'int' object has no attribute 'digits'
sage: [9,10,11]==range(9,12)
TrueNewtonMon, 03 Jun 2019 20:07:14 -0500http://ask.sagemath.org/question/46782/How converting some number of different base to 10 to base 10?http://ask.sagemath.org/question/38979/how-converting-some-number-of-different-base-to-10-to-base-10/Hello, how can I convert some number into different base at 10, to the base 10 in Sage?
For example: convert ( EAEI in base 36 ) = 666666 into base 10.
In advance thank you very much for your help.
Best regardsBruceTRTue, 26 Sep 2017 15:55:16 -0500http://ask.sagemath.org/question/38979/How do I deal with large, hex numbers in Sage?http://ask.sagemath.org/question/26061/how-do-i-deal-with-large-hex-numbers-in-sage/ How do I deal with large, hex numbers in Sage (say ones with 256 or 512 bytes)? How would I import them from a CSV file?
(cf. [this related answer](http://ask.sagemath.org/question/24708/how-to-enter-very-large-numbers/?answer=24710#post-id-24710))GeremiaSat, 07 Mar 2015 10:47:47 -0600http://ask.sagemath.org/question/26061/Is there a routine to find a integer base?http://ask.sagemath.org/question/8511/is-there-a-routine-to-find-a-integer-base/Hi, Sage fans. Probably a simple Sage routine does the job, but I tried hard to find it but yet without successÂ…
My problem. Consider two rows (in QQ):
aa=[0,-1,1/5,-1/19,1/15,-35/57,7/5]
bb=[1,0,-6/5,20/19,-7/5,56/19,-12/5]
How to find (x,y) such that [(x*aa[i]+y*bb[i]) for i in xrange(7)] yields the row [3, -3, -3, 3, -4, 7, -3] with the smallest set integers?
For the above example (x,y)=(3,3) does the job, but is there a general routine to find the optimal (x,y)?
Many thanks in advance for your suggestions!
Roland
rolandSat, 26 Nov 2011 05:59:56 -0600http://ask.sagemath.org/question/8511/