Ask Your Question

jonespanicker's profile - activity

2019-05-13 10:14:34 -0500 received badge  Nice Question (source)
2019-05-06 17:00:37 -0500 received badge  Student (source)
2019-05-06 16:07:42 -0500 asked a question How to print the numeric part of a symbolic expression with arbitrary precision?

How to print the numeric part of a symbolic expression with arbitrary precision?

I have a matrix Hf, it is a 3 by 3 matrix. It's a symbolic matrix, with just one variable 'E'. But on printing it, I get the as shown below. Basically what I want is to approximate the numerical part of the expression to arbitrary precision (let's say 3 decimal points), so that I can get a much cleaner expression.

sage: Hf.str()
[(𝟼.𝟢𝟿𝟢𝟻𝟸𝟼𝟺𝟼𝟻𝟿𝟺𝟺𝟿𝟽𝚎⎯𝟼)*(πšœπššπš›πš(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*πš™πš’)*πšœπš’πš—(𝟷/𝟷𝟾*πš™πš’)+πšœπššπš›πš(𝟸)*πšœπš’πš—(𝟽/𝟹𝟼*πš™πš’))/π™΄βŽ―πŸΆ.𝟢𝟢𝟢𝟸𝟷𝟽𝟼𝟷𝟹𝟾𝟸𝟻𝟷𝟢𝟢𝟢𝟢𝟼*(πšœπššπš›πš(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*πš™πš’)*πšœπš’πš—(𝟷/𝟷𝟾*πš™πš’)βŽ―πšœπššπš›πš(𝟸)*πšœπš’πš—(𝟽/𝟹𝟼*πš™πš’))/𝙴+𝟷𝟢𝟢𝟢⎯𝟢.𝟢𝟢𝟢𝟸𝟷𝟽𝟼𝟷𝟹𝟾𝟸𝟻𝟷𝟢𝟢𝟢𝟢𝟼*(πšœπššπš›πš(𝟸)*πšœπš’πš—(𝟽/𝟹𝟼*πš™πš’)*πšœπš’πš—(𝟷/𝟷𝟾*πš™πš’)+πšœπššπš›πš(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*πš™πš’))/𝙴+(𝟼.𝟢𝟿𝟢𝟻𝟸𝟼𝟺𝟼𝟻𝟿𝟺𝟺𝟿𝟽𝚎⎯𝟼)*(πšœπššπš›πš(𝟸)*πšœπš’πš—(𝟽/𝟹𝟼*πš™πš’)*πšœπš’πš—(𝟷/𝟷𝟾*πš™πš’)βŽ―πšœπššπš›πš(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*πš™πš’))/π™΄πŸΆ.𝟢𝟢𝟢𝟸𝟷𝟷𝟻𝟸𝟹𝟸𝟿𝟾𝟼𝟹𝟺𝟢𝟼𝟷*πšœπššπš›πš(𝟸)*𝚌𝚘𝚜(𝟷/𝟷𝟾*πš™πš’)/𝙴][⎯𝟢.𝟢𝟢𝟢𝟷𝟻𝟼𝟸𝟻𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢*πšœπššπš›πš(𝟸)*(πšœπššπš›πš(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*πš™πš’)*πšœπš’πš—(𝟷/𝟷𝟾*πš™πš’)βŽ―πšœπššπš›πš(𝟸)*πšœπš’πš—(𝟽/𝟹𝟼*πš™πš’))*𝚌𝚘𝚜(𝟷/𝟷𝟾*πš™πš’)/𝙴+(𝟺.𝟼𝟾𝟽𝟻𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝚎⎯𝟼)*(πšœπššπš›πš(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*πš™πš’)*πšœπš’πš—(𝟷/𝟷𝟾*πš™πš’)+πšœπššπš›πš(𝟸)*πšœπš’πš—(𝟽/𝟹𝟼*πš™πš’))*(πšœπššπš›πš(𝟸)*πšœπš’πš—(𝟽/𝟹𝟼*πš™πš’)*πšœπš’πš—(𝟷/𝟷𝟾*πš™πš’)βŽ―πšœπššπš›πš(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*πš™πš’))/π™΄βŽ―πŸΆ.𝟢𝟢𝟢𝟷𝟻𝟼𝟸𝟻𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢*πšœπššπš›πš(𝟸)*(πšœπššπš›πš(𝟸)*πšœπš’πš—(𝟽/𝟹𝟼*πš™πš’)*πšœπš’πš—(𝟷/𝟷𝟾*πš™πš’)+πšœπššπš›πš(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*πš™πš’))*𝚌𝚘𝚜(𝟷/𝟷𝟾*πš™πš’)/𝙴+(𝟺.𝟼𝟾𝟽𝟻𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝚎⎯𝟼)*(πšœπššπš›πš(𝟸)*πšœπš’πš—(𝟽/𝟹𝟼*πš™πš’)*πšœπš’πš—(𝟷/𝟷𝟾*πš™πš’)βŽ―πšœπššπš›πš(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*πš™πš’))Λ†πŸΈ/π™΄βŽ―(𝟺.𝟼𝟾𝟽𝟻𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝚎⎯𝟼)*πšœπššπš›πš(𝟸)*(πšœπššπš›πš(𝟸)*πšœπš’πš—(𝟽/𝟹𝟼*πš™πš’)*πšœπš’πš—(𝟷/𝟷𝟾*πš™πš’)βŽ―πšœπššπš›πš(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*πš™πš’))*𝚌𝚘𝚜(𝟷/𝟷𝟾*πš™πš’)/𝙴+𝟢.𝟢𝟢𝟢𝟹𝟷𝟸𝟻𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢*𝚌𝚘𝚜(𝟷/𝟷𝟾*πš™πš’)Λ†πŸΈ/𝙴][⎯𝟢.𝟢𝟢𝟢𝟷𝟻𝟼𝟸𝟻𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢*πšœπššπš›πš(𝟸)*(πšœπššπš›πš(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*πš™πš’)*πšœπš’πš—(𝟷/𝟷𝟾*πš™πš’)βŽ―πšœπššπš›πš(𝟸)*πšœπš’πš—(𝟽/𝟹𝟼*πš™πš’))*𝚌𝚘𝚜(𝟷/𝟷𝟾*πš™πš’)/𝙴+(𝟺.𝟼𝟾𝟽𝟻𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝚎⎯𝟼)*(πšœπššπš›πš(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*πš™πš’)*πšœπš’πš—(𝟷/𝟷𝟾*πš™πš’)+πšœπššπš›πš(𝟸)*πšœπš’πš—(𝟽/𝟹𝟼*πš™πš’))*(πšœπššπš›πš(𝟸)*πšœπš’πš—(𝟽/𝟹𝟼*πš™πš’)*πšœπš’πš—(𝟷/𝟷𝟾*πš™πš’)+πšœπššπš›πš(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*πš™πš’))/π™΄βŽ―πŸΆ.𝟢𝟢𝟢𝟷𝟻𝟼𝟸𝟻𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢*πšœπššπš›πš(𝟸)*(πšœπššπš›πš(𝟸)*πšœπš’πš—(𝟽/𝟹𝟼*πš™πš’)*πšœπš’πš—(𝟷/𝟷𝟾*πš™πš’)+πšœπššπš›πš(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*πš™πš’))*𝚌𝚘𝚜(𝟷/𝟷𝟾*πš™πš’)/𝙴+(𝟺.𝟼𝟾𝟽𝟻𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝚎⎯𝟼)*(πšœπššπš›πš(𝟸)*πšœπš’πš—(𝟽/𝟹𝟼*πš™πš’)*πšœπš’πš—(𝟷/𝟷𝟾*πš™πš’)+πšœπššπš›πš(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*πš™πš’))*(πšœπššπš›πš(𝟸)*πšœπš’πš—(𝟽/𝟹𝟼*πš™πš’)*πšœπš’πš—(𝟷/𝟷𝟾*πš™πš’)βŽ―πšœπššπš›πš(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*πš™πš’))/π™΄βŽ―(𝟺.𝟼𝟾𝟽𝟻𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝚎⎯𝟼)*πšœπššπš›πš(𝟸)*(πšœπššπš›πš(𝟸)*πšœπš’πš—(𝟽/𝟹𝟼*πš™πš’)*πšœπš’πš—(𝟷/𝟷𝟾*πš™πš’)+πšœπššπš›πš(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*πš™πš’))*𝚌𝚘𝚜(𝟷/𝟷𝟾*πš™πš’)/𝙴+𝟢.𝟢𝟢𝟢𝟹𝟷𝟸𝟻𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢𝟢*𝚌𝚘𝚜(𝟷/𝟷𝟾*πš™πš’)Λ†πŸΈ/𝙴]