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.Thu, 11 Oct 2018 08:20:46 -0500How to convert an integer to fixed length binary string in Sage?http://ask.sagemath.org/question/43916/how-to-convert-an-integer-to-fixed-length-binary-string-in-sage/ I want to get
(192,14,100)=>8bit binary of 192 || 8bit binary of 14 ||8bit binary of 100 => 110000000000111001100100 => 12586596 (equivalent decimal of the 24bits binary sting).
I have written python code to do this, but this code does not work in sage. Here is the code :
L=(192,14,100)
a=0
for i in range(3):
a=(a << 8) ^ (L[i])
print a
print bin(a)
What is the best way to do so in Sage?math.mks@yandex.comThu, 11 Oct 2018 08:20:46 -0500http://ask.sagemath.org/question/43916/How do you get a 2d version of a 3d plot?http://ask.sagemath.org/question/40917/how-do-you-get-a-2d-version-of-a-3d-plot/ I am working on Cocalc. I would like to get a nice pdf of the view I want after rotating and zooming.
Yes, taking a screenshot works, but is there a better method? Thanks !alThu, 01 Feb 2018 08:16:06 -0600http://ask.sagemath.org/question/40917/can series make mistakes?http://ask.sagemath.org/question/39909/can-series-make-mistakes/ series seems to make errors . luckily, taylor works correctly.
start with L_F=(exp(-s)-1+s)/(s^2/2) (laplace transform of the "equilibrium" uniform density)
and switch to Pollaczek laplace transform L_F /(1- epsilon * L_F);
You can check that the moments expansions t, t1 differ
var('s');n=2
L_F=(exp(-s)-1+s)/(s^2/2) #satisfies L_F(s=0)=1
L_L=L_F/(1-L_F/3)
t = L_L.series(s,2*n+2)
t1= taylor(L_L,s,0,2*n+2)
print t1florinSat, 02 Dec 2017 04:16:35 -0600http://ask.sagemath.org/question/39909/