Ask Your Question

Jennifer Dylan's profile - activity

2021-07-28 20:35:37 +0100 received badge  Popular Question (source)
2021-07-28 20:35:37 +0100 received badge  Notable Question (source)
2018-04-04 16:47:55 +0100 received badge  Popular Question (source)
2018-04-04 16:47:55 +0100 received badge  Famous Question (source)
2018-04-04 16:47:55 +0100 received badge  Notable Question (source)
2015-02-12 17:23:23 +0100 received badge  Famous Question (source)
2015-01-06 07:49:48 +0100 received badge  Good Question (source)
2015-01-06 07:48:51 +0100 received badge  Famous Question (source)
2013-05-08 13:18:31 +0100 received badge  Notable Question (source)
2013-01-13 15:05:32 +0100 received badge  Notable Question (source)
2012-10-29 13:20:51 +0100 marked best answer Can I use amsmath in notebook?

Try the following in a notebook:

from sage.misc.latex import latex_extra_preamble
latex.add_to_preamble('\\usepackage{amsmath}')
latex.add_to_preamble('\\usepackage{amsthm}')
latex.add_to_preamble('\\usepackage{amssymb}')
2012-10-26 22:25:51 +0100 received badge  Popular Question (source)
2012-09-02 14:32:08 +0100 commented question cannot evaluate symbolic expression numerically

Can you reformat your code properly?

2012-09-02 14:25:37 +0100 asked a question Can I use amsmath in notebook?

I'd like to use Sage Notebook for typing my LaTeX papers. I'd like to be able to use environments such as theorem proof etc. Is this possible via Sage Notebook? Can I use a custom preamble such as: \usepackage{amsmath, amsthm, amssymb}?

2012-05-29 18:08:58 +0100 received badge  Popular Question (source)
2011-06-28 17:14:22 +0100 received badge  Good Question (source)
2011-06-26 15:25:42 +0100 marked best answer SAGE and GPUs

Some work has been done to integrate PyCUDA and PyOpenCL into Sage. There are details on trac about how to install them: PyCUDA and PyOpenCL.

I think a lot of people would be happy if these were integrated into Sage.

2011-06-24 00:29:15 +0100 received badge  Nice Question (source)
2011-06-23 15:49:23 +0100 asked a question SAGE and GPUs

What is the status of doing SAGE computations on GPUs? Is there any work done or in progress to enable SAGE to use GPUs?

2011-06-18 04:28:35 +0100 received badge  Nice Question (source)
2011-06-17 14:59:43 +0100 marked best answer Call C/C++ Code

You can use your C/C++ code directly, using the Ctypes library, which is included in SAGE. You can find a nicely documented example on how to call your libraries on Numerical Sage documentation:

http://www.sagemath.org/doc/numerical_sage/ctypes.html

2011-06-16 01:14:22 +0100 asked a question Call C/C++ Code

Let's say, I wrote matrix.c which is a C file containing several functions. Can I call any of the functions defined in matrix.c from Sage? What special compilation do I need for matrix.c?

2010-11-08 20:18:39 +0100 received badge  Student (source)
2010-11-08 20:18:39 +0100 received badge  Supporter
2010-11-08 20:18:39 +0100 received badge  Scholar (source)
2010-10-26 22:52:40 +0100 marked best answer Is the expression (pi > 0) lazy evaluated?

You can use bool() :

sage: bool(pi > 0)
True

Sage's evaluation model is the same as Python's. The above example is not actually lazily evaluated, when you evaluate pi > 0, it immediately makes a call like the following:

sage: pi.__gt__(0)
pi > 0

Instead of returning True or False it instead returns symbolic expression representing the inequality. This is done for symbolic expressions to be consistent with things like

sage: x > 2
x > 2

Also, notice that it is specific to symbolic expressions:

sage: SR(2) == 2
2 == 2
sage: 2 == 2
True
2010-10-26 16:31:39 +0100 asked a question Is the expression (pi > 0) lazy evaluated?

[Absolute beginner here.]

The expression $pi > 0$ has the type sage.symbolic.expression.Expression. How can I force the evaluation and get the result True.

Also, as per the question title, can you please point me to a reference on the evaluation model in Sage?