12.07.2015 Views

SAGE: Software for Algebra and Geometry Experimentation

SAGE: Software for Algebra and Geometry Experimentation

SAGE: Software for Algebra and Geometry Experimentation

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

What is <strong>SAGE</strong>?Technology OverviewHistory <strong>and</strong> Status Report<strong>SAGE</strong> multiplies two integers<strong>SAGE</strong> creates <strong>and</strong> multiplies two integers as follows:1 Create two integers via a direct C-level wrapping of the GMP C library,i.e., using the functions mpz_init <strong>and</strong> mpz_set...2 Multiply them using the GMP function mpz_mul.The C code gets compiled <strong>and</strong> becomes an "extension" to the Pythonlanguage. These "extensions" are potentially just as powerful as anythingwritten in the core of Python.def __mul_(Integer self, Integer other):cdef Integer xx = Integer()_sig_on # so ctrl-c always works perfectly.mpz_mul(x.value, self.value, other.value)_sig_offreturn xWilliam Stein<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong> <strong>Experimentation</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!