Skip to content

Instantly share code, notes, and snippets.

@tthsqe12
Last active May 19, 2020
Embed
What would you like to do?
output from mprint.jl
julia> include("mprint.jl")
==================================================================
old:
0
new 1d:
0
new 2d:
0
==================================================================
old:
0
new 1d:
0
new 2d:
0
==================================================================
old:
1//2*a^2-3//2
new 1d:
1//2*a^2 - 3//2
new 2d:
1 2 3
- *a - -
2 2
==================================================================
old:
(-a^2)*x^2+(-2*a^2+a)*x+(-a^2+a-1//4)
new 1d:
-a^2*x^2 + (-2*a^2 + a)*x - a^2 + a - 1//4
new 2d:
2 2 2 2 1
-a *x + (-2*a + a)*x - a + a - -
4
==================================================================
old:
a^4 - 2*a^2*b^2 + b^4
new 1d:
a^4 - 2*a^2*b^2 + b^4
new 2d:
4 2 2 4
a - 2*a *b + b
==================================================================
old:
1/2*x^2 + x*y + x + 1/2*y^2 + y + 1/2
new 1d:
1//2*x^2 + x*y + x + 1//2*y^2 + y + 1//2
new 2d:
1 2 1 2 1
- *x + x*y + x + - *y + y + -
2 2 2
==================================================================
old:
(x*z + y^2)//(y*z)
new 1d:
(x*z + y^2)//(y*z)
new 2d:
2
x*z + y
--------
y*z
==================================================================
old:
(x + y)//(z)
new 1d:
(x + y)//z
new 2d:
x + y
-----
z
==================================================================
old:
(x^2*z^2 + 2*x*y^2*z + y^4)//(y^2*z^2)
new 1d:
(x^2*z^2 + 2*x*y^2*z + y^4)//(y^2*z^2)
new 2d:
2 2 2 4
x *z + 2*x*y *z + y
---------------------
2 2
y *z
==================================================================
old:
(x^2 + 2*x*y + y^2)//(z^2)
new 1d:
(x^2 + 2*x*y + y^2)//z^2
new 2d:
2 2
x + 2*x*y + y
---------------
2
z
==================================================================
old:
a^2//(b^2)*x^2-2*x*y+(2*a^2 - 2*a*b)//(b)*x+b^2//(a^2)*y^2+(-2*a*b + 2*b^2)//(a)*y+(a^2 - 2*a*b + b^2)
new 1d:
a^2//b^2*x^2 - 2*x*y + (2*a^2 - 2*a*b)//b*x + b^2//a^2*y^2 + (-2*a*b + 2*b^2)//a*y + a^2 - 2*a*b + b^2
new 2d:
2 2 2 2
a 2 2*a - 2*a*b b 2 -2*a*b + 2*b 2 2
-- *x - 2*x*y + ------------ *x + -- *y + ------------- *y + a - 2*a*b + b
2 b 2 a
b a
==================================================================
old:
x
new 1d:
[1 0 0; 0 1 0; 0 0 1]*x
new 2d:
[1 0 0]
[0 1 0]*x
[0 0 1]
==================================================================
old:
([3 0 0]
[0 3 0]
[0 0 3])*x^10+([2 0 0]
[0 2 0]
[0 0 2])*x+([1 0 0]
[0 1 0]
[0 0 1])
new 1d:
[3 0 0; 0 3 0; 0 0 3]*x^10 + [2 0 0; 0 2 0; 0 0 2]*x + [1 0 0; 0 1 0; 0 0 1]
new 2d:
[3 0 0] 10 [2 0 0] [1 0 0]
[0 3 0]*x + [0 2 0]*x + [0 1 0]
[0 0 3] [0 0 2] [0 0 1]
==================================================================
old:
[ 1 x x^2]
[x^3 x^4 x^5]
[x^6 x^7 x^9]
new 1d:
[1 x x^2; x^3 x^4 x^5; x^6 x^7 x^9]
new 2d:
[ 2]
[1 x x ]
[ ]
[ 3 4 5]
[x x x ]
[ ]
[ 6 7 9]
[x x x ]
==================================================================
old:
[ x^8+x^4+1 x^9+x^5+x x^11+x^6+x^2]
[ x^11+x^7+x^3 x^12+x^8+x^4 x^14+x^9+x^5]
[x^15+x^10+x^6 x^16+x^11+x^7 x^18+x^12+x^8]
new 1d:
[x^8 + x^4 + 1 x^9 + x^5 + x x^11 + x^6 + x^2; x^11 + x^7 + x^3 x^12 + x^8 + x^4 x^14 + x^9 + x^5; x^15 + x^10 + x^6 x^16 + x^11 + x^7 x^18 + x^12 + x^8]
new 2d:
[ 8 4 9 5 11 6 2 ]
[x + x + 1 x + x + x x + x + x ]
[ ]
[ 11 7 3 12 8 4 14 9 5 ]
[x + x + x x + x + x x + x + x ]
[ ]
[ 15 10 6 16 11 7 18 12 8]
[x + x + x x + x + x x + x + x ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment