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() [(𝟼.𝟶𝟿𝟶𝟻𝟸𝟼𝟺𝟼𝟻𝟿𝟺𝟺𝟿𝟽𝚎⎯𝟼)*(𝚜𝚚𝚛𝚝(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*𝚙𝚒)*𝚜𝚒𝚗(𝟷/𝟷𝟾*𝚙𝚒)+𝚜𝚚𝚛𝚝(𝟸)*𝚜𝚒𝚗(𝟽/𝟹𝟼*𝚙𝚒))/𝙴⎯𝟶.𝟶𝟶𝟶𝟸𝟷𝟽𝟼𝟷𝟹𝟾𝟸𝟻𝟷𝟶𝟶𝟶𝟶𝟼*(𝚜𝚚𝚛𝚝(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*𝚙𝚒)*𝚜𝚒𝚗(𝟷/𝟷𝟾*𝚙𝚒)⎯𝚜𝚚𝚛𝚝(𝟸)*𝚜𝚒𝚗(𝟽/𝟹𝟼*𝚙𝚒))/𝙴+𝟷𝟶𝟶𝟶⎯𝟶.𝟶𝟶𝟶𝟸𝟷𝟽𝟼𝟷𝟹𝟾𝟸𝟻𝟷𝟶𝟶𝟶𝟶𝟼*(𝚜𝚚𝚛𝚝(𝟸)*𝚜𝚒𝚗(𝟽/𝟹𝟼*𝚙𝚒)*𝚜𝚒𝚗(𝟷/𝟷𝟾*𝚙𝚒)+𝚜𝚚𝚛𝚝(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*𝚙𝚒))/𝙴+(𝟼.𝟶𝟿𝟶𝟻𝟸𝟼𝟺𝟼𝟻𝟿𝟺𝟺𝟿𝟽𝚎⎯𝟼)*(𝚜𝚚𝚛𝚝(𝟸)*𝚜𝚒𝚗(𝟽/𝟹𝟼*𝚙𝚒)*𝚜𝚒𝚗(𝟷/𝟷𝟾*𝚙𝚒)⎯𝚜𝚚𝚛𝚝(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*𝚙𝚒))/𝙴𝟶.𝟶𝟶𝟶𝟸𝟷𝟷𝟻𝟸𝟹𝟸𝟿𝟾𝟼𝟹𝟺𝟶𝟼𝟷*𝚜𝚚𝚛𝚝(𝟸)*𝚌𝚘𝚜(𝟷/𝟷𝟾*𝚙𝚒)/𝙴][⎯𝟶.𝟶𝟶𝟶𝟷𝟻𝟼𝟸𝟻𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶*𝚜𝚚𝚛𝚝(𝟸)*(𝚜𝚚𝚛𝚝(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*𝚙𝚒)*𝚜𝚒𝚗(𝟷/𝟷𝟾*𝚙𝚒)⎯𝚜𝚚𝚛𝚝(𝟸)*𝚜𝚒𝚗(𝟽/𝟹𝟼*𝚙𝚒))*𝚌𝚘𝚜(𝟷/𝟷𝟾*𝚙𝚒)/𝙴+(𝟺.𝟼𝟾𝟽𝟻𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝚎⎯𝟼)*(𝚜𝚚𝚛𝚝(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*𝚙𝚒)*𝚜𝚒𝚗(𝟷/𝟷𝟾*𝚙𝚒)+𝚜𝚚𝚛𝚝(𝟸)*𝚜𝚒𝚗(𝟽/𝟹𝟼*𝚙𝚒))*(𝚜𝚚𝚛𝚝(𝟸)*𝚜𝚒𝚗(𝟽/𝟹𝟼*𝚙𝚒)*𝚜𝚒𝚗(𝟷/𝟷𝟾*𝚙𝚒)⎯𝚜𝚚𝚛𝚝(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*𝚙𝚒))/𝙴⎯𝟶.𝟶𝟶𝟶𝟷𝟻𝟼𝟸𝟻𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶*𝚜𝚚𝚛𝚝(𝟸)*(𝚜𝚚𝚛𝚝(𝟸)*𝚜𝚒𝚗(𝟽/𝟹𝟼*𝚙𝚒)*𝚜𝚒𝚗(𝟷/𝟷𝟾*𝚙𝚒)+𝚜𝚚𝚛𝚝(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*𝚙𝚒))*𝚌𝚘𝚜(𝟷/𝟷𝟾*𝚙𝚒)/𝙴+(𝟺.𝟼𝟾𝟽𝟻𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝚎⎯𝟼)*(𝚜𝚚𝚛𝚝(𝟸)*𝚜𝚒𝚗(𝟽/𝟹𝟼*𝚙𝚒)*𝚜𝚒𝚗(𝟷/𝟷𝟾*𝚙𝚒)⎯𝚜𝚚𝚛𝚝(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*𝚙𝚒))ˆ𝟸/𝙴⎯(𝟺.𝟼𝟾𝟽𝟻𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝚎⎯𝟼)*𝚜𝚚𝚛𝚝(𝟸)*(𝚜𝚚𝚛𝚝(𝟸)*𝚜𝚒𝚗(𝟽/𝟹𝟼*𝚙𝚒)*𝚜𝚒𝚗(𝟷/𝟷𝟾*𝚙𝚒)⎯𝚜𝚚𝚛𝚝(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*𝚙𝚒))*𝚌𝚘𝚜(𝟷/𝟷𝟾*𝚙𝚒)/𝙴+𝟶.𝟶𝟶𝟶𝟹𝟷𝟸𝟻𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶*𝚌𝚘𝚜(𝟷/𝟷𝟾*𝚙𝚒)ˆ𝟸/𝙴][⎯𝟶.𝟶𝟶𝟶𝟷𝟻𝟼𝟸𝟻𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶*𝚜𝚚𝚛𝚝(𝟸)*(𝚜𝚚𝚛𝚝(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*𝚙𝚒)*𝚜𝚒𝚗(𝟷/𝟷𝟾*𝚙𝚒)⎯𝚜𝚚𝚛𝚝(𝟸)*𝚜𝚒𝚗(𝟽/𝟹𝟼*𝚙𝚒))*𝚌𝚘𝚜(𝟷/𝟷𝟾*𝚙𝚒)/𝙴+(𝟺.𝟼𝟾𝟽𝟻𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝚎⎯𝟼)*(𝚜𝚚𝚛𝚝(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*𝚙𝚒)*𝚜𝚒𝚗(𝟷/𝟷𝟾*𝚙𝚒)+𝚜𝚚𝚛𝚝(𝟸)*𝚜𝚒𝚗(𝟽/𝟹𝟼*𝚙𝚒))*(𝚜𝚚𝚛𝚝(𝟸)*𝚜𝚒𝚗(𝟽/𝟹𝟼*𝚙𝚒)*𝚜𝚒𝚗(𝟷/𝟷𝟾*𝚙𝚒)+𝚜𝚚𝚛𝚝(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*𝚙𝚒))/𝙴⎯𝟶.𝟶𝟶𝟶𝟷𝟻𝟼𝟸𝟻𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶*𝚜𝚚𝚛𝚝(𝟸)*(𝚜𝚚𝚛𝚝(𝟸)*𝚜𝚒𝚗(𝟽/𝟹𝟼*𝚙𝚒)*𝚜𝚒𝚗(𝟷/𝟷𝟾*𝚙𝚒)+𝚜𝚚𝚛𝚝(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*𝚙𝚒))*𝚌𝚘𝚜(𝟷/𝟷𝟾*𝚙𝚒)/𝙴+(𝟺.𝟼𝟾𝟽𝟻𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝚎⎯𝟼)*(𝚜𝚚𝚛𝚝(𝟸)*𝚜𝚒𝚗(𝟽/𝟹𝟼*𝚙𝚒)*𝚜𝚒𝚗(𝟷/𝟷𝟾*𝚙𝚒)+𝚜𝚚𝚛𝚝(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*𝚙𝚒))*(𝚜𝚚𝚛𝚝(𝟸)*𝚜𝚒𝚗(𝟽/𝟹𝟼*𝚙𝚒)*𝚜𝚒𝚗(𝟷/𝟷𝟾*𝚙𝚒)⎯𝚜𝚚𝚛𝚝(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*𝚙𝚒))/𝙴⎯(𝟺.𝟼𝟾𝟽𝟻𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝚎⎯𝟼)*𝚜𝚚𝚛𝚝(𝟸)*(𝚜𝚚𝚛𝚝(𝟸)*𝚜𝚒𝚗(𝟽/𝟹𝟼*𝚙𝚒)*𝚜𝚒𝚗(𝟷/𝟷𝟾*𝚙𝚒)+𝚜𝚚𝚛𝚝(𝟸)*𝚌𝚘𝚜(𝟽/𝟹𝟼*𝚙𝚒))*𝚌𝚘𝚜(𝟷/𝟷𝟾*𝚙𝚒)/𝙴+𝟶.𝟶𝟶𝟶𝟹𝟷𝟸𝟻𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶𝟶*𝚌𝚘𝚜(𝟷/𝟷𝟾*𝚙𝚒)ˆ𝟸/𝙴]