chakravala / Reduce.jl
 1 global rs = nothing 2 @info "Precompiling extra Reduce methods (set `ENV[\"REDPRE\"]=\"0\"` to disable)" 3 0 Reduce.Load(); atexit(() -> kill(rs)) 4 5 rcall(:((1+pi)^2)) == convert(Expr,RExpr(rcall("(1+pi)**2"))) 6 try; "1/0" |> rcall; false; catch; true; end 7 RExpr("(x+i)^3") 8 Reduce._syme(Reduce.r_to_jl) 9 R"x+2" == R"2+x-1+1" 10 :((x+1+π)^2; int(1/(1+x^3),x)) |> RExpr |> Reduce.parse 11 string(R"x+1") 12 RExpr(:x) == R"x" 13 Algebra.:*(RExpr(:x),R"x") == R"x^2" 14 convert(RExpr,R"x").str == convert(Array{String,1},R"x") 15 load_package([:rlfi]) == load_package(:rlfi,:rlfi) 16 rcall(:(x^2+2x+1),off=[:factor]) 17 rcall("x + 1","factor") 18 Expr(:function,:(fun(z)),:(return begin; x = 700; y = x; end)) |> RExpr |> Reduce.parse 19 Expr(:for,:(i=2:34),:(product(i))) |> rcall 20 try; Expr(:type,false,:x) |> RExpr; false; catch; true; end 21 try; :(@time f(x)) |> RExpr; false; catch; true; end 22 Expr(:function,:(fun(a,b)),:(return y=a^3+3*a^2*b+3*a*b^2+b^3)) |> factor |> expand 23 try; Expr(:for,:(i=2:34),:(product(i))) |> RExpr |> parse; false; catch; true; end 24 R"begin; 1:2; end" |> Reduce.parse |> RExpr |> string 25 latex(:(x+1)) 26 #Algebra.length(:(x+y)) 27 Algebra.log(:(ℯ^x)) 28 #Algebra.nextprime(100) 29 #Algebra.ceiling(1.2) 30 Algebra.impart(:(1+2*im)) 31 #Algebra.impart(2+1.7im) 32 #Algebra.bernoulli(2) 33 Sys.islinux() && Reduce.RSymReplace("!#03a9; *x**2 + !#03a9;") 34 Algebra.int(:(x^2+y),:x) |> RExpr == Algebra.int("x^2+y","x") |> RExpr 35 R"/(2,begin 2; +(7,4); return +(4,*(2,7))+9 end)" |> Reduce.parse 36 Algebra.df(Expr(:function,:(fun(z,c)),:(return begin; zn = z^2+c; nz = z^3-1; end))|>RExpr,:z) 37 :([1 2; 3 4]) |> RExpr |> Reduce.parse |> RExpr == [1 2; 3 4] |> RExpr 38 39 Algebra.nextprime("3") 40 expand("(x-2)^2") |> RExpr == R"(x-2)^2" 41 nat("x+1") 42 Algebra.:^(:x,2) == :(x^2) 43 Algebra.://(NaN,NaN) 44 join(split(R"x+1;x+2")) 45 Algebra.sub(:x=>7,Algebra.:+(:x,7)) == Algebra.sub([:x=>7,:z=>21],Algebra.:-(:z,:x)) 46 #squash(Expr(:function,:(fun(x)),:(z=3;z+=:x))).args[2] == squash(:(y=:x;y+=3)) 47 squash(:(sqrt(x)^2)) 48 Expr(:block,:(x+1)) |> RExpr == R"1+x" 49 Algebra.limit(Algebra.:^(Algebra.:-(1,Algebra.:/(1,:n)),Algebra.:-(:n)),:n,Inf) 50 Algebra.log(Algebra.exp(:pi)) 51 Algebra.://(2,Inf) 52 Algebra.://(Inf,2) 53 54 rcall("x") 55 Algebra.operator(:x); Algebra.clear(:x); 56 #try Algebra.det([:x :y]) catch; true end 57 join([R"1",R"1"]) == R"1;1" 58 list([R"1",R"x"]) == list((1,:x)) 59 Reduce.lister(:x) == R"x" 60 !latex(false) 61 @rounded @factor x^2-2x+1 62 @rounded @off_factor @rcall x^2 63 Algebra.det([:a :b; :c :d]) 64 Algebra.tp([:a;:b]) == [:a :b;] 65 transpose(:x) 66 adjoint(:x) 67 Algebra.operator(:cbrt) 68 Algebra.rlet(:(cbrt(~x))=>:(x^(1/3))) 69 Algebra.rlet([:(cbrt(~x))=>:(x^(1/3))]) 70 Algebra.rlet(Dict(:(cbrt(~x))=>:(x^(1/3)))) 71 Algebra.clear(:cbrt) 72 Algebra.:+(1,R"x") 73 Algebra.inv([:a :b; :c :d]) 74 Algebra.inv(1) 75 Algebra.:\([1],[2]) 76 #Algebra.://(1.0,1.0) 77 Algebra.:/([:a :b; :c :d],2) 78 Algebra.:+([:a :b; :c :d],1) == Algebra.:+(1,[:a :b; :c :d]) 79 Algebra.:+([:x],1) == Algebra.:+(1,[:x]) 80 Algebra.:+([:x,:y]',1) == Algebra.:+(1,[:x,:y]') 81 Algebra.solve(:(x-1),:x) == Algebra.solve((:(x-1),),:x) 82 Algebra.order(nothing); Algebra.korder(nothing)

Read our documentation on viewing source code .