[sage-support] jsmath directory confusion.

2008-11-26 Thread Gary Church

Hello all,

I've noticed that sage has two separate, but somewhat unequal, jsmath  
subdirectories.

One is rooted at: sage/data/extcode/javascript/
The other is at: sage/data/extcode/notebook/javascript/

Why two jsmath directories and if I want to upgrade the jsmath used in  
sage, where do I install the updated jsmath folder?

Thanks much,
Gary

Gary Church
[EMAIL PROTECTED]




--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: parametric_plot3d with texture

2008-11-26 Thread Marshall Hampton

I don't think so but I could be wrong.  It should be possible using
Tachyon, but I've had trouble using my own textures with tachyon in
sage.  The tachyon interface needs a little love; at the moment that
is down towards the bottom of my to-do list but I hope to get to it
somewhat soon.

-M. Hampton

On Nov 27, 5:50 pm, "Dorian Raymer" <[EMAIL PROTECTED]> wrote:
> Hi,
> Is there a way to render 3d-parametric plots with a texture (from an
> image/bitmap file)?
>
> Thanks,
> -Dorian
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] parametric_plot3d with texture

2008-11-26 Thread Dorian Raymer
Hi,
Is there a way to render 3d-parametric plots with a texture (from an
image/bitmap file)?

Thanks,
-Dorian

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: using the solutions of an equation

2008-11-26 Thread Eli

Thanks to Robert Bradshaw and Jason Grout !
the problem is solved.

Eli

On Nov 26, 3:28 pm, Robert Bradshaw <[EMAIL PROTECTED]>
wrote:
> On Nov 26, 2008, at 12:21 PM, Jason Grout wrote:
>
>
>
> > Eli wrote:
> >> Hello,
> >> In the sage tutorial, I found how to solve equations:
>
> >> sage: x, b, c = var('x b c')
> >> sage: solve([x^2 + b*x + c == 0],x)
> >> [x == (-sqrt(b^2 - 4*c) - b)/2, x == (sqrt(b^2 - 4*c) - b)/2]
>
> >> However, I could not find how to assign the solution to some  
> >> variable.
> >> That is, something that will do:
> >> assign the value  (-sqrt(b^2 - 4*c) - b)/2 (first solution of the
> >> equation) to the variable X
> >> assign the value  (sqrt(b^2 - 4*c) - b)/2 (second solution of the
> >> equation) to the variable Y
>
> >> How can this  be done ?
>
> > Here is a session showing one way to accomplish that.  The key is the
> > solution_dict argument.
>
> > sage: f=x^2+b*x+c == 0
> > sage: soln = f.solve(x,solution_dict=True)
> > sage: soln
> > [{x: (-sqrt(b^2 - 4*c) - b)/2}, {x: (sqrt(b^2 - 4*c) - b)/2}]
> > sage: soln[0][x]
> > (-sqrt(b^2 - 4*c) - b)/2
> > sage: soln[1][x]
> > (sqrt(b^2 - 4*c) - b)/2
> > sage: X=soln[0][x]
> > sage: Y=soln[1][x]
> > sage: X
> > (-sqrt(b^2 - 4*c) - b)/2
> > sage: Y
> > (sqrt(b^2 - 4*c) - b)/2
>
> You can also use the fact that it's a list of equations, which have  
> rhs() and lhs() methods.
>
> sage: sage: solve([x^2 + b*x + c == 0],x)
> [x == (-sqrt(b^2 - 4*c) - b)/2, x == (sqrt(b^2 - 4*c) - b)/2]
> sage: all = solve([x^2 + b*x + c == 0],x)
> sage: all[0]
> x == (-sqrt(b^2 - 4*c) - b)/2
> sage: all[0].rhs()
> (-sqrt(b^2 - 4*c) - b)/2
>
> - Robert
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: QQbar bug

2008-11-26 Thread Robert Bradshaw


On Nov 26, 2008, at 3:30 AM, Simon King wrote:

>
> Dear Michael,
>
> On Nov 26, 11:34 am, mabshoff <[EMAIL PROTECTED]
> dortmund.de> wrote:
>> please open a ticket. I would guess as you did that those two  
>> related.
>
> Done, it is # 4621.
>
> By the way, the above problem appears even more directly:
>  sage: F.= NumberField(x^2-2)
>  sage: 2 in QQbar
>  True
>  sage: F(2) in QQbar
>  False
>
> Although F has no canonical embedding into QQbar, my understanding is
> that there is a hopefully unique maximal subfield of F that does have
> a canonical embedding into QQbar.

Into the mathematical \bar{Q}, yet. Sage's QQbar is \bar{Q} with a  
choice of embedding into \C, and as F does not have a (chosen)  
embedding into \C it doesn't have a chosen embedding into QQbar.

> If this is correct, there could be a
> method F.max_subfield_coercing_into(QQbar), and since F(2) is in that
> subfield, one has a reason to expect `F(2) in QQbar` to be True.


One *does* expect F(2) to be in QQbar, the same that one expects the  
rational number 4/2 to be in ZZ, so I agree that the above is a bug.

- Robert


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: using the solutions of an equation

2008-11-26 Thread Robert Bradshaw

On Nov 26, 2008, at 12:21 PM, Jason Grout wrote:

> Eli wrote:
>> Hello,
>> In the sage tutorial, I found how to solve equations:
>>
>> sage: x, b, c = var('x b c')
>> sage: solve([x^2 + b*x + c == 0],x)
>> [x == (-sqrt(b^2 - 4*c) - b)/2, x == (sqrt(b^2 - 4*c) - b)/2]
>>
>> However, I could not find how to assign the solution to some  
>> variable.
>> That is, something that will do:
>> assign the value  (-sqrt(b^2 - 4*c) - b)/2 (first solution of the
>> equation) to the variable X
>> assign the value  (sqrt(b^2 - 4*c) - b)/2 (second solution of the
>> equation) to the variable Y
>>
>> How can this  be done ?
>>
>
> Here is a session showing one way to accomplish that.  The key is the
> solution_dict argument.
>
>
> sage: f=x^2+b*x+c == 0
> sage: soln = f.solve(x,solution_dict=True)
> sage: soln
> [{x: (-sqrt(b^2 - 4*c) - b)/2}, {x: (sqrt(b^2 - 4*c) - b)/2}]
> sage: soln[0][x]
> (-sqrt(b^2 - 4*c) - b)/2
> sage: soln[1][x]
> (sqrt(b^2 - 4*c) - b)/2
> sage: X=soln[0][x]
> sage: Y=soln[1][x]
> sage: X
> (-sqrt(b^2 - 4*c) - b)/2
> sage: Y
> (sqrt(b^2 - 4*c) - b)/2

You can also use the fact that it's a list of equations, which have  
rhs() and lhs() methods.

sage: sage: solve([x^2 + b*x + c == 0],x)
[x == (-sqrt(b^2 - 4*c) - b)/2, x == (sqrt(b^2 - 4*c) - b)/2]
sage: all = solve([x^2 + b*x + c == 0],x)
sage: all[0]
x == (-sqrt(b^2 - 4*c) - b)/2
sage: all[0].rhs()
(-sqrt(b^2 - 4*c) - b)/2

- Robert



--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Open Source webMathematica?

2008-11-26 Thread Robert Bradshaw

On Nov 26, 2008, at 9:10 AM, Jason Grout wrote:

> heebie wrote:
>> Hi,
>>
>> Thanks a lot for your help. I just have a few questions, if you
>> wouldn't mind.
>>
>> 1) Can I just send the http requests to sagenb.org, or will I have to
>> host the notebook myself?
>
> I don't know; I haven't used that http protocol myself.  You could try
> it, though.

Yes, you could. If you're actually going to run a server, it would  
probably be good to set up your own, as sagenb.org is more for people  
to try out Sage.

http://sagenb.org/simple/login?username=yourName&password=

which will return something like

{ "session": "3ef9514f4c872d92b287b8489d82fdfe" } ___S_A_G_E___

 From then on you use session to authenticate. To run a computation, do

http://sagenb.org/simple/compute? 
session=3ef9514f4c872d92b287b8489d82fdfe&code=2*2

which returns

{ "status": "done", "files": [], "cell_id": 2 } ___S_A_G_E___ 4

Note that the code in the needs to be escaped, i.e. if I wrote "2+2"  
the + gets interpreted as a space, and sage would get "2 2" which is  
a syntax error.

http://sagenb.org/simple/compute? 
session=3ef9514f4c872d92b287b8489d82fdfe&code= factor(2^125-1)

{ "status": "done", "files": [], "cell_id": 3 } ___S_A_G_E___ 31 *  
601 * 1801 * 269089806001 * 4710883168879506001

One can then do

http://sagenb.org/simple/compute? 
session=3ef9514f4c872d92b287b8489d82fdfe&code=plot(sin(x),%20-2,%202)

{ "status": "done", "files": ["sage0.png"], "cell_id": 4 } ___S_A_G_E___

and get the image via

http://sagenb.org/simple/file? 
session=3ef9514f4c872d92b287b8489d82fdfe&file=sage0.png&cell=4

Note that if the computation takes more than a second or two, it will  
return immediately with a "computing" status. One can then query for  
the result later, or set timeout parameters, etc. For more examples,  
see the top of http://hg.sagemath.org/sage-main/file/8b1d19463fc4/ 
sage/server/simple/twist.py

>> 2) What exactly are the security implications, and are they for the
>> site hosting the notebook or the site sending the http requests? I
>> note that in that most recent link you gave me to another discussion,
>> some guy said that he closed his calculator down after security
>> concerns (a discussion which, by the way, I don't really understand)
>
>
> Basically, anyone that can run an arbitrary Sage command can also  
> access
> a command line on the system as the user running Sage.  This means  
> that
> unless you've somehow locked down that account (the account that is
> executing the Sage command), you are basically granting every user a
> normal account on your computer.
>
> Currently some ways to deal with this are setting up a virtual server
> (so the system-wide access is contained inside the virtual machine),
> setting up very restricted user accounts (but you need to know what  
> you
> are doing in Linux to do that).  Another thing you can do is parse the
> command that the user enters so that "bad" commands are never  
> executed.
>   This can be tricky, though.  The other thread currently going on in
> the sage-devel mailing list that I pointed out talks about doing this
> this way.  I think this is how webMathematica works; it makes sure  
> that
> the only commands executed are from a specific list of "safe"  
> commands.

Letting the user execute commands, and trying to make sure they're  
safe, is fraught with security issues. Letting the user specify  
input, and then *you* acting on that input (as the author of the  
iterative we page) via a fixed number of commands, is a much easier  
task. (One also needs to make sure that there aren't security  
problems in parsing the input).

Hosting it all in a virtual server is a bug plus too.

>> 3) Will I need to learn Python?
>
> Sage is based on python, which means whenever you are doing  
> anything in
> Sage, you are doing things in Python.  It's really easy to pick up
> Python and will make you much more effective in Sage if you understand
> Python better.

If you want improve the Sage side of things, then yes, but to use it  
it's not a necessity (though not too hard and a rather good idea  
anyways).

- Robert


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: sage notebook %latex cells fail to work properly; please help.

2008-11-26 Thread [EMAIL PROTECTED]



On 26 Lis, 01:26, Gary Church <[EMAIL PROTECTED]> wrote:
>
> %latex
> $\iiint_E y e^{-xy}\;dV$


works fine on sagenb.com

>
> 
> sh: line 1:  6005 Trace/BPT trap          dvipng -q -T bbox -D 130  
> sage19.dvi > /dev/null 2> /dev/null
> An error occured.

TeX seems to compile fine into dvi. But the error seem to be caused by
dvipng. Do you have dvipng installed?

Robert
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: using the solutions of an equation

2008-11-26 Thread Jason Grout

Eli wrote:
> Hello,
> In the sage tutorial, I found how to solve equations:
> 
> sage: x, b, c = var('x b c')
> sage: solve([x^2 + b*x + c == 0],x)
> [x == (-sqrt(b^2 - 4*c) - b)/2, x == (sqrt(b^2 - 4*c) - b)/2]
> 
> However, I could not find how to assign the solution to some variable.
> That is, something that will do:
> assign the value  (-sqrt(b^2 - 4*c) - b)/2 (first solution of the
> equation) to the variable X
> assign the value  (sqrt(b^2 - 4*c) - b)/2 (second solution of the
> equation) to the variable Y
> 
> How can this  be done ?
> 

Here is a session showing one way to accomplish that.  The key is the 
solution_dict argument.


sage: f=x^2+b*x+c == 0
sage: soln = f.solve(x,solution_dict=True)
sage: soln
[{x: (-sqrt(b^2 - 4*c) - b)/2}, {x: (sqrt(b^2 - 4*c) - b)/2}]
sage: soln[0][x]
(-sqrt(b^2 - 4*c) - b)/2
sage: soln[1][x]
(sqrt(b^2 - 4*c) - b)/2
sage: X=soln[0][x]
sage: Y=soln[1][x]
sage: X
(-sqrt(b^2 - 4*c) - b)/2
sage: Y
(sqrt(b^2 - 4*c) - b)/2


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] using the solutions of an equation

2008-11-26 Thread Eli

Hello,
In the sage tutorial, I found how to solve equations:

sage: x, b, c = var('x b c')
sage: solve([x^2 + b*x + c == 0],x)
[x == (-sqrt(b^2 - 4*c) - b)/2, x == (sqrt(b^2 - 4*c) - b)/2]

However, I could not find how to assign the solution to some variable.
That is, something that will do:
assign the value  (-sqrt(b^2 - 4*c) - b)/2 (first solution of the
equation) to the variable X
assign the value  (sqrt(b^2 - 4*c) - b)/2 (second solution of the
equation) to the variable Y

How can this  be done ?

Thanks,

Eli


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Open Source webMathematica?

2008-11-26 Thread Jason Grout

heebie wrote:
> Hi,
> 
> Thanks a lot for your help. I just have a few questions, if you
> wouldn't mind.
> 
> 1) Can I just send the http requests to sagenb.org, or will I have to
> host the notebook myself?

I don't know; I haven't used that http protocol myself.  You could try 
it, though.



> 2) What exactly are the security implications, and are they for the
> site hosting the notebook or the site sending the http requests? I
> note that in that most recent link you gave me to another discussion,
> some guy said that he closed his calculator down after security
> concerns (a discussion which, by the way, I don't really understand)


Basically, anyone that can run an arbitrary Sage command can also access 
a command line on the system as the user running Sage.  This means that 
unless you've somehow locked down that account (the account that is 
executing the Sage command), you are basically granting every user a 
normal account on your computer.

Currently some ways to deal with this are setting up a virtual server 
(so the system-wide access is contained inside the virtual machine), 
setting up very restricted user accounts (but you need to know what you 
are doing in Linux to do that).  Another thing you can do is parse the 
command that the user enters so that "bad" commands are never executed. 
  This can be tricky, though.  The other thread currently going on in 
the sage-devel mailing list that I pointed out talks about doing this 
this way.  I think this is how webMathematica works; it makes sure that 
the only commands executed are from a specific list of "safe" commands.



> 3) Will I need to learn Python?
> 

Sage is based on python, which means whenever you are doing anything in 
Sage, you are doing things in Python.  It's really easy to pick up 
Python and will make you much more effective in Sage if you understand 
Python better.

Thanks,

Jason


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: variety() bug?

2008-11-26 Thread Simon King

Dear Michael,

On Nov 26, 12:03 pm, mabshoff <[EMAIL PROTECTED]
dortmund.de> wrote:
> > Shall one open a ticket then?
>
> Yes, please do. And please make sure to ping either singular-team or
> Hans directly. I know Singular 3-1 is coming, so maybe we are lucky
> and it is either fixed there or will be :)

It is #4622, and I forwarded it to Hans.

Cheers
Simon
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Open Source webMathematica?

2008-11-26 Thread heebie

Hi,

Thanks a lot for your help. I just have a few questions, if you
wouldn't mind.

1) Can I just send the http requests to sagenb.org, or will I have to
host the notebook myself?
2) What exactly are the security implications, and are they for the
site hosting the notebook or the site sending the http requests? I
note that in that most recent link you gave me to another discussion,
some guy said that he closed his calculator down after security
concerns (a discussion which, by the way, I don't really understand)
3) Will I need to learn Python?

Thanks again for your time and patience.

Regards,

heebie.

On Nov 25, 8:12 pm, Jason Grout <[EMAIL PROTECTED]> wrote:
> heebie wrote:
> > Thanks. That link looks good. I want the interface to be simple, so
> > unfortunately the notebook won't do. I don't have much experience with
> > json or http requests: could you provide an example of how I would go
> > about using that protocol, please - or a link to a general tutorial?
>
> Understanding how json and http requests work is probably the first
> thing to learn.  There are some examples of using the protocol given in
> the top of the file (see the link from the other email).  The examples
> start with "sage: ".
>
> Again, please make sure you understand about the (sometimes subtle)
> security issues before hosting a calculation engineopento the world.
>
> There is also a discussion you might be interested in going on the sage
> development mailing list right now.  
> Seehttp://groups.google.com/group/sage-devel/browse_thread/thread/a1afaf...
>
> Thanks,
>
> Jason
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: problem with installing packages

2008-11-26 Thread Marshall Hampton

I installed sage-3.2 from source on an Ubuntu machine, and when I do
$./sage -optional

I get the error below.  I can download directly (using a browser for
example) and install the downloaded packages.  This is on my home
network where I have never had a problem using macs.  Changing the
SAGE_SERVER variable doesn't help.  Anyway here is the error:

Using SAGE Server http://www.sagemath.org//packages
http://www.sagemath.org//packages/optional/list --> /home/pmc/m/
sage-3.2/tmp/list
[Errno socket error] (-2, 'Name or service not known')



Error contacting http://www.sagemath.org//packages/optional/list. Try
using an alternative server.
For example, from the bash prompt try typing

   export SAGE_SERVER=http://sage.scipy.org/sage/

then try again.









On Nov 27, 12:19 am, mabshoff <[EMAIL PROTECTED]
dortmund.de> wrote:
> On Nov 25, 7:31 pm, Marshall Hampton <[EMAIL PROTECTED]> wrote:
>
> > I'm having this problem on a computer I don't usually use, a laptop
> > running Ubuntu 7.10.  Doing "sudo ./sage -optional" doesn't fix the
> > problem.  Any ideas?
>
> > -M. Hampton
>
> What exactly is the problem? We can't debug problems by intuition what
> might be wrong :)
>
> Cheers,
>
> Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] [EMAIL PROTECTED]: A simple interval challenge]

2008-11-26 Thread Paul Zimmermann

   Hi,

a committee is currently being formed to propose a standard for interval
arithmetic. This standard will be IEEE P1788, as IEEE P754 for floating-point
computations.

Current discussions are on the <[EMAIL PROTECTED]> mailing list.
It is possible to join that list for people interested, and/or to join the
formal committee.

The following challenge was proposed by Arnold Neumaier on the 1788 list.
Since it might interest some of the Sage developers or users, I forward it
to sage-support.

A naive evaluation gives:

sage: R=RealIntervalField(53)
sage: a=R((7,9))
sage: b=R((-1,1))
sage: c=R((-1,1))
sage: w=R((-0.9,-0.6))
sage: x=R((-0.1,0.2))
sage: y=R((0.3,0.7))
sage: z=R((-0.2,0.1))
sage: f=(a*(w^2+x^2-y^2-z^2)+2*b*(x*y-w*z)+2*c*(x*z+w*y))/(w^2+x^2+y^2+z^2)
sage: f.lower()
-8.65853658536587
sage: f.upper()
21.6097560975610

Paul Zimmermann

--- Start of forwarded message ---
Date: Wed, 26 Nov 2008 11:24:17 +0100
From: Arnold Neumaier <[EMAIL PROTECTED]>
Organization: University of Vienna
MIME-Version: 1.0
To: interval <[EMAIL PROTECTED]>,
1788 <[EMAIL PROTECTED]>
Subject: A simple interval challenge
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
List-Owner: 

In discussions with Nate Hayes, he mentioned the following test problem
(arising from a problem in computer vision) as an example for the
potential efficiency of modal interval arithmetic. With his permission,
I make the problem public, adding performance evaluation criteria
for a public contest.

Please send results directly to me at <[EMAIL PROTECTED]>; 
I'll post summaries when something interesting happens.


Arnold Neumaier



Challenge:
- -
Find a cheap and good enclosure for

f := (a(w^2+x^2-y^2-z^2)+2b(xy-wz)+2c(xz+wy))/(w^2+x^2+y^2+z^2)

given the following bounds on the variables a,b,c,w,x,y,z:

a in [7,9]
b in [-1,1]
c in [-1,1]
w in [-0.9,-0.6]
x in [-0.1,0.2]
y in [0.3,0.7]
z in [-0.2,0.1]

The computation together with general theoretical results must
constitute a proof that the result is a rigorously valid enclosure
of the range. (Thus, the relevant cost is that of checking that
some data provided are a certificate for the range enclosure found.)


The operation count (= cost) is in terms of effective interval
operations, defined for simplicity (and in view of potential
hardware realizations) as follows:
- - Any unary or binary operation involving an (ordinary or modal)
   interval, including taking the hull or the intersection of two
   intervals, is counted as an interval operation.
- - A purely real operation and a real compare (used in a branching
   statement) are counted each as half an interval operation.
- - Switches of rounding modes are not counted at present.

A suitable cumulative criterion to be minimized could be
 excesscost:=(width/rangewidth-1)^(dof-1)*cost,
  where dof=7 is the number of degrees of freedom and rangewidth
(approx. 10.965) is the width of the range (must perhaps be computed
to higher accuracy). This formula comes from the asymptotic
behavior of a very simple branch and bound scheme using simple
interval evaluation.



I think this is an ideal test problem for good students - please try
it out!

I'd be interested in being informed (preferably until December 3, 2008)
of resulting bounds and operation counts, together with an indication
of the techniques used, and/or a complete algorithm realizing the
enclosure (preferably in Intlab). For the sake of simplicity, you may
at present ignore rounding error issues.



Background information:
- --

The range to 4 significant digits is [-2.956,8.009].

Simple interval evaluation gives the poor enclosure [-7.4889,19.2889]
(244% of optimal width) with 21 interval operations, using savings
due to precomputing u = w^2+x^2 and v = y^2+z^2 and evaluating
f = (a*(u-v)+2*(b*(x*y-w*z)+c*(x*z+w*y)))/(u+v).
(excesscost = 1.89e+2)

Nate Hayes has a confidential algorithm which computes
the bounds [-3.2555,9.1556] (113% of optimal width) with 67.5
effective interval operations, using modal intervals.
(excesscost = 3.55e-4)

I get the slightly inferior bounds [-3.2697,9.]  (114% of
optimal width) with 62 effective interval operations, using
monotonicity arguments and term rearrangements.
(excesscost = 4.49e-4)


Can anyone do significantly better, either in terms of speed
(then with comparable accuracy), or in terms of accuracy (then
with comparable speed), or in terms of excesscost?
--- End of forwarded message ---

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: QQbar bug

2008-11-26 Thread Simon King

Dear Michael,

On Nov 26, 11:34 am, mabshoff <[EMAIL PROTECTED]
dortmund.de> wrote:
> please open a ticket. I would guess as you did that those two related.

Done, it is # 4621.

By the way, the above problem appears even more directly:
 sage: F.= NumberField(x^2-2)
 sage: 2 in QQbar
 True
 sage: F(2) in QQbar
 False

Although F has no canonical embedding into QQbar, my understanding is
that there is a hopefully unique maximal subfield of F that does have
a canonical embedding into QQbar. If this is correct, there could be a
method F.max_subfield_coercing_into(QQbar), and since F(2) is in that
subfield, one has a reason to expect `F(2) in QQbar` to be True.

Best regards,
 Simon

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: variety() bug?

2008-11-26 Thread mabshoff



On Nov 26, 3:00 am, Simon King <[EMAIL PROTECTED]> wrote:
> Dear Michael,
>
> On Nov 26, 7:22 am, mabshoff <[EMAIL PROTECTED]
>
> dortmund.de> wrote:
> > Is this reproducible for you every time?
>
> For me, it is reproducible.



> triangLfak is the function that was called by Sage. All previous lines
> seem to happen inside the Singular library triang.lib, and it seems
> that at one point things went wrong.
>
> Shall one open a ticket then?

Yes, please do. And please make sure to ping either singular-team or
Hans directly. I know Singular 3-1 is coming, so maybe we are lucky
and it is either fixed there or will be :)

> Cheers,
>      Simon

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: variety() bug?

2008-11-26 Thread Simon King

Dear Michael,

On Nov 26, 7:22 am, mabshoff <[EMAIL PROTECTED]
dortmund.de> wrote:

> Is this reproducible for you every time?

For me, it is reproducible.

> It might be an issue inside Singular, a pexpect synchronization issue or just 
> a plain old bug in
> Sage.

Looking at the error message, it looks like it is a bug in Singular.
If I repeat the loop, the Traceback contains the line
   TypeError: Singular error:
   // ** redefining zerlegt
   ...
So, it seems that Singular defines some name "zerlegt" without
properly killing it afterwards. This is not yet a bug, it is just not
nice.

Continuing:
  ? wrong range[2] in ideal/module(1)
   ? error occurred in triang.lib::Erw_ggt_oT line 509: `parameter
poly f; parameter  poly g; parameter  int v; parameter  ideal T;  `
   ? wrong type declaration. type 'help poly;'

That error message means that the arguments of the function Erw_ggt_oT
are not properly defined. However, the problem seems to be on the side
of Singular and not of Sage, because the Traceback ends with:
 ? leaving triang.lib::Erw_ggt_oT
   ? `f` is undefined
   ? error occurred in triang.lib::Erw_ggt_oT line 511: `poly p1 =
f;`
   ? expected poly-expression. type 'help poly;'
   ? leaving triang.lib::Erw_ggt_oT
   skipping text from `;` error at token `)`
   ? leaving triang.lib::invertieren_oT
   ? leaving triang.lib::normieren_oT
   ? leaving triang.lib::Erw_ggt_oT
   ? leaving triang.lib::invertieren_oT
   ? leaving triang.lib::invertieren
   ? leaving triang.lib::triangLbas
   ? leaving triang.lib::triangLfak

triangLfak is the function that was called by Sage. All previous lines
seem to happen inside the Singular library triang.lib, and it seems
that at one point things went wrong.

Shall one open a ticket then?

Cheers,
 Simon
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: QQbar bug

2008-11-26 Thread Robert Bradshaw

On Nov 26, 2008, at 2:30 AM, Simon King wrote:

> Hi!
>
> On Nov 26, 1:51 am, Alex Raichev <[EMAIL PROTECTED]> wrote:
>> sage: F.= NumberField(x^2-2)
>> sage: a^2
>> 2
>> sage: a^2 in QQ
>> True
>> sage: a^2 in QQbar
>> False
>> sage: 2 in QQbar
>> True
>
> A related observation:
>  sage: F.=NumberField(x^2-2)
>  sage: QQ.is_subring(F)
>  True
>  sage: F.is_subring(QQbar)
>  False

This one should be false as QQbar comes with an embedding into CC,  
but F does not (in other words, there is no canonical embedding of F  
into QQbar). The a^2 in QQbar is a bug though.

- Robert


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: QQbar bug

2008-11-26 Thread mabshoff



On Nov 26, 2:30 am, Simon King <[EMAIL PROTECTED]> wrote:
> Hi!
>
> On Nov 26, 1:51 am, Alex Raichev <[EMAIL PROTECTED]> wrote:
>
> > sage: F.= NumberField(x^2-2)
> > sage: a^2
> > 2
> > sage: a^2 in QQ
> > True
> > sage: a^2 in QQbar
> > False
> > sage: 2 in QQbar
> > True
>
> A related observation:
>  sage: F.=NumberField(x^2-2)
>  sage: QQ.is_subring(F)
>  True
>  sage: F.is_subring(QQbar)
>  False
>
> Cheers,
>     Simon

Simon,

please open a ticket. I would guess as you did that those two related.

Hopefully Carl will have some insight what is going on there.

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: QQbar bug

2008-11-26 Thread Simon King

Hi!

On Nov 26, 1:51 am, Alex Raichev <[EMAIL PROTECTED]> wrote:
> sage: F.= NumberField(x^2-2)
> sage: a^2
> 2
> sage: a^2 in QQ
> True
> sage: a^2 in QQbar
> False
> sage: 2 in QQbar
> True

A related observation:
 sage: F.=NumberField(x^2-2)
 sage: QQ.is_subring(F)
 True
 sage: F.is_subring(QQbar)
 False

Cheers,
Simon

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---