If your problem is over QQ then just use that (PPL supports exact
rationals).
On Thursday, October 23, 2014 4:38:39 AM UTC+1, Mike wrote:
>
> I'd like to be able to do linear programming to arbitrary precision. The
> documentation that I've found claims that both the glpk and PPL solvers
On Wednesday, 22 October 2014 21:38:39 UTC-6, Mike wrote:
>
> I'd like to be able to do linear programming to arbitrary precision. The
> documentation that I've found claims that both the glpk and PPL solvers
> should do this, but I haven't been able to get either to work.
>
> As an example, th
Ok, thank you all!
I was curious just because, due to the error, I did not expect a result.
On Thursday, October 23, 2014 5:28:46 PM UTC-2, kcrisman wrote:
>
> Or, in the notebook/cell server/cloud, choose "python" from the drop-down
> menu for system and just do this example in Python! Lots of
Or, in the notebook/cell server/cloud, choose "python" from the drop-down
menu for system and just do this example in Python! Lots of options.
> Or type
>
> Integer = int
>
> to make Sage integers the usual Python integers in that session.
>
> On Thu, Oct 23, 2014 at 11:54 AM, Volker Braun
Or type
Integer = int
to make Sage integers the usual Python integers in that session.
On Thu, Oct 23, 2014 at 11:54 AM, Volker Braun wrote:
> The short answer is that mathematical objects in Sage don't define addition
> by implementing __add__ and __radd__ by hand. If you want to learn about
>
The short answer is that mathematical objects in Sage don't define addition
by implementing __add__ and __radd__ by hand. If you want to learn about
them make sure to not add Sage objects (like Sage integers). E.g. int(1) +
y would work.
On Thursday, October 23, 2014 7:46:02 PM UTC+1, João Al
I am running the following Python example from the book "Learning
Python", from Mark Lutz and David Ascher, but Sage is returning a
TypeError after presenting the correct response. Can anyone explain me
why? I've found this very strange.
sage: class Commuter:
: def __init__(self, val):
...
>
>
> - towards the top of every notebook worksheet,
> there are four drop-down menus:
>
> [File...][Action...][Data...][sage]
>
> You can use the last of these menus and
> change 'sage' to 'python'.
>
>>
>>>
And you can make it so that the default for the workshe
You can define a function which takes a list or tuple as an argument,
and then you can iterate through its elements, with tests if you like.
sage: def sum_elements_whose_square_is_one(x):
: return sum(a for a in x if a^2 == 1)
Then for example:
sage: sum_elements_whose_square_is_one([1,2
Mike wrote:
>
> I'd like to be able to do linear programming to arbitrary precision. The
> documentation that I've found claims that both the glpk and PPL solvers
> should do this, but I haven't been able to get either to work.
>
> As an example, the following code prints c to high precision,
[cc-ing to sage-support, please answer on sage-support rather than
sage-devel]
You can also use one of the following tricks.
- you can make a cell python by typing
%python
in the first line of the cell.
- towards the top of every notebook worksheet,
there are four drop-dow
11 matches
Mail list logo