r/sagemath • • Jun 16 '20

Polynomials and its types šŸ“— https://youtu.be/oq4XOqN2ENI

Post image
0 Upvotes

r/sagemath • • Jun 09 '13

A longer, more detailed, introduction to Sage

Thumbnail
youtube.com
1 Upvotes

r/sagemath • • Dec 06 '15

Modulus Arithmetic

1 Upvotes

I need to play with RSA for my crypto assignment and so I'm trying to use modulo arithmetic.

So I want to do the exponentiation C = M**e modulo n. I declared M as being modulo M with M = mod(M, n), then I entered the formula and it does seem to have worked. But C < n returns false and C > n returns true. How is it possible if C is smaller than n?

For reference, C = 4591586560273222728916947306261384215808016637703909471639644600881030639124665702026680825365700525011500600647403385726588426698490404705584930279737483536814981544617263756268053288827928418967523624205816945538498147495688891602271887520049425640291551887036453665968408056135717741711709060423067

and n = 4624031699108736159848785029909800431959978280972332657007133044906925012505055854251098270914182851133408896287977682094713220425149743169427364962140159448592671246558604786740111716438120991916078794515293987250198913327124184238545453517224212396720966253712072835733750652647271947896168057589503


r/sagemath • • Nov 24 '21

HELP WITH SAGE PROGRAM

1 Upvotes

Hi I'm a telecomunications engineer and I need help with a proyect that has to be made with an extension of sage called "notebook sage" and I have no idea of doing it. ItĀ“s about encryption.A monetary reward is offered. The work literally says ā€œ Write an encryption and decryption protocol using hash functions, public-key cryptography and private-key cryptography, in which all cases are clearly specified. and private key cryptography, in which all cases are clearly specifiedā€. We have used cases like vignere, cesar..and so on.


r/sagemath • • Jun 13 '15

PolyBoRi is dead, it needs your help

Thumbnail
martinralbrecht.wordpress.com
1 Upvotes

r/sagemath • • May 28 '13

Sage announces three GSoC Projects

Thumbnail groups.google.com
3 Upvotes

r/sagemath • • Apr 17 '13

Sage Accepted for Google Summer of Code 2013 - Check it out!

Thumbnail google-melange.com
3 Upvotes

r/sagemath • • May 03 '13

Sage 5.9 released [30 April 2013]

Thumbnail groups.google.com
4 Upvotes

r/sagemath • • Sep 01 '14

Sage math and cygwin

4 Upvotes

Are any of you guys expert Cygwin users? I'm having difficulty installing Sage.

I dont want to run the virtual machine as it is far easier for me to just boot into linux and run it from there. But I would (on the rare occasion that I'm in windows) like to be able to quickly open up Sage without rebooting


r/sagemath • • Aug 10 '18

Okay, I’ll be that guy: how does Sage compare to Mathematica?

7 Upvotes

I have a friend in college who actually shelled out for Mathematica and loves it. Not just for math, but also because it’s a great all-purpose language, and really concise for things like Project Euler problems.

I tend to suspect Sage probably isn’t quite adept at general coding, and surely lacks Mathematica’s outrageous number of unusually specific and often very poweful default functions, like analyzing an image to determine if it is of a goat. (Yes, really. It can also parse sentences.)

However, I would love to hear some general thought on how the two compare, both for math work and as all-purpose languages.


r/sagemath • • Nov 20 '21

Writing a proof in Sage Math

8 Upvotes

I’d like to write proofs in a math programming language as a way of processing them, making sure I understand them, harnessing the power of computers to ensure the proof is valid, and studying the proof in more detail by having automatic functions for examining some of the relevant objects in the proof.

Is this a common use of Sage, to write proofs?


r/sagemath • • Jun 08 '20

My SageMath setup, using vim-Jupyter plugin for interaction.

Post image
12 Upvotes

r/sagemath • • Aug 13 '26

Why SageMath isn't natively working on Windows?

7 Upvotes

So I managed to install 10.7 on the Linux subsystem and it works more or less. I've also found an installation of the 9.3 version on my PC (from years ago), which, if I remember correctly, was an officially supported Windows native installation.

This got me wondering, why is SageMath not supported natively on Windows anymore? Is there a good reason why they discontinued, despite the majority of people using Windows? If I understand correctly, you can compile the source yourself for windows, but this or installing on a Linux subsystem is complicated and doesn't favour widespread adoption.


r/sagemath • • May 26 '20

How to work with polynomials?

4 Upvotes

Stupid question but I'm struggling to find a polynomial structure which allows me to:

  • Evaluate the degree

  • List all (irreducible) factors, so I can iterate over them

  • Extract certain coefficients. Ex, I want the coefficient of xs in p(x)

  • Take an expression involving multiple polynomials, and test if this is identically 0

At the moment I'm using

x = QQ['x'].0;
p = 2*x^2 - 1

This approach seams to meet all requirements, but the coefficients part is somewhat annoying. Compared to

var('x');
p(x) = 2*x^2 - 1

For which p(x).coefficient (x, 2) returns 2 as expected, but now I can't get the factors in list form.


r/sagemath • • Jun 22 '20

Multiple ecuations with complex numbers.

4 Upvotes

Hello. I am quite new to sage. I've been using it to solve multiple ecuations at the same time, as I get easily confused with signs and basic operations. It has been really helpfull for my electric circuit anaylisis course; however, I've reached a point in which I have to deal with complex numbers. I've read somewhere that to input a complex number on sage you just use *I (like 3+2*I). As an experiment I tried this code in the SageMathCell:

sage: var('Ic Ib Z')

(Ic, Ib, Z)

sage: eq1 = -25 + 3*I*[Ic-5*I] + 1*[Ic-5*I] + Z*[Ic-Ib] == 0

sage: eq2 = -2*I*[5*I]+[5*I-Ib]*[-5*I]+[1+3*I]*[5*I-Ic] == 0

sage: eq3 = -5*I*[Ib-5*I] + Ib*[-3*I] + 4*[Ib] + Z*[Ib-Ic] == 0

sage: solve([eq1,eq2,eq3],Ic,Ib,Z)

I just included *I as a normal number, thinking it would work, but a long error code appeared, which ended in: " TypeError: Unable to coerce 3*I to an integer ".

As I said, I'm really new using sage and in programming in general; so I don't really know what else to do. Is there even a way to do this?


r/sagemath • • Jun 04 '20

Minimum code wrods in linear codes.

2 Upvotes

Dear all,

I know how to create a linear code and calculate the minimum distance:

# result is just a list of list with the rows of the generating matrix

m = matrix(GF(2),result)    
L = codes.LinearCode(m)

But, how can I get the ALL words of the linear code with minimal Hamming weight? do I have to programme this myself?


r/sagemath • • Jun 07 '20

Can I configure Jupyter QTConsole to work with sage math, I dont use notebook and Even when using with Terminal the plots are displayed on the Browser can I change that nonetheless ?

2 Upvotes

r/sagemath • • Dec 04 '21

Happy Cakeday, r/sagemath! Today you're 10

8 Upvotes

r/sagemath • • Dec 01 '21

HELP DEV/ADMIN - Windows SageMath Launch Error

3 Upvotes

error shown in the console is as following (when launching):

sage math Error: Could not fork child process: Resource temporarily unavailable (-1). DLL rebasing may be required; see 'rebaseall / rebase --help'.

looking this error up appears to provide no solutions, am I missing something?

I should mention this has never worked, even when removing and re-installing. Am I missing a prerequisite?


r/sagemath • • Dec 16 '21

Trouble with sage

6 Upvotes

Hi guys, can anyone help me?

I've never worked with sage, but I decided to use it to get some simple results in my research.

The problem is the following: I end up with a equation which depends on variable 'a' and 't', what I need is to isolate variable 'a' so I will get a(t), I've tried using solve command but it didn't work. Does anyone know how to do it?


r/sagemath • • Dec 30 '21

How to implement a ternary algebra in Sage?

4 Upvotes

I am relatively new to Sage but after reading the documentation I am unsure what's the best way to proceed when defining new algebraic structures. Is there a direct way in which I could define something like a ternary magma (i.e. a set T with a ternary operation ( , , ) : T x T x T -> T) from scratch in Sage? I am interested in studying different axioms like associativity, semiheaps, etc. and checking long calculations symbolically with the aid of Sage.


r/sagemath • • Aug 08 '16

"Rational" input issue for graphs.CompleteGraph

3 Upvotes

Why does graphs.CompleteGraph( 6/2 ) not produce the same result as graphs.CompleteGraph( 3 )? Should a cast to Integer be added in the source code?


r/sagemath • • Nov 20 '17

How can I make a new package

1 Upvotes

I have a program in python that I want to use as a package on sage, but I can not find anywhere a tutorial that show me how to struc it in a way that sage can understand it and how to tell sage to look at that program as a package.

Thanks for the help.


r/sagemath • • Jul 04 '17

Midpoint method algorithm in Sage.(x-post from r/cheatatmathhomework)

2 Upvotes

Hello, im trying to put Midpoint method algorithm in sage for a school project. I don't know how to use sage and i would be delighted if someone could help me out and tell me what im doing wrong. Here is what is mustered up:

def midpoint_metoda(fcn,a,b,h,l):

(fun-function a,b borders h step l approximation y(0)) - those are under comments

y=l

while a!=b-h:

y2=y+hf(a+h/2,y+(h/2)*f(a,y))
y2=y
a=a+h

return y2

example-in comments

f(t,y)=te3t-2y

a=0; b=1; g=0.5; l=0;

thats what we did in class and i tried to used that.

print midpoint_metoda(f(t,y),a,b,h,l);

Im getting some errors at start even...

Error in lines 1-1 Traceback (most recent call last): File "/projects/sage/sage-7.6/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 995, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "<string>", line 1 def midpoint_metoda(fcn,a,b,h,l): ^ SyntaxError: unexpected EOF while parsing *** WARNING: Code contains non-ascii characters ***


r/sagemath • • Jan 26 '17

Question about slope fields

1 Upvotes

Hi r/SageMath, I have recently been using SageMath for my Differential Equations class and I had a question about slop fields. Maybe I'm just an idiot and I'm missing something, but here's my question in command line form:

y = var('y'); p=plot_slope_field(x, (x,0,5),(y,0,5), color='blue') p.show()

When I do this I always get a slope field that looks like a solution to an exponential function. Why is this?