Ask Your Question
1

Syntax error with power function

asked 2016-09-08 20:03:31 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Hello, I'm running sage on virtual box and changed the keyboard layout to german. It works well, except the ^-function leads to a syntax error. Sage recognizes the power by setting the power number high. Can you help me? Best regard, Henning

edit retag flag offensive close merge delete

Comments

How do you use Sage? Command line? Sage Notebook? What's your browser, editor?

ndomes gravatar imagendomes ( 2016-09-08 20:26:13 +0200 )edit

Does it work if you set the keyboard back to english ?

tmonteil gravatar imagetmonteil ( 2016-09-09 14:22:57 +0200 )edit

1 Answer

Sort by » oldest newest most voted
3

answered 2016-09-09 23:18:15 +0200

slelievre gravatar image

I think you mean that when you type x^2 you obtain , as if the circumflex ^ "eats" the 2 and turns it into a "superscript two", and then when you evaluate that with Sage you get a SyntaxError.

To avoid that, type a space after typing ^, as if you were typing x^ 2.

So you would be typing x followed by ^ followed by a space followed by 2.

Then you will get x^2.

Similarly, using a French keyboard, to get x^a we have to add in a space and type x^ a, otherwise we get .

edit flag offensive delete link more

Comments

Very interesting; that would be worth adding to the wiki about the virtualbox.

kcrisman gravatar imagekcrisman ( 2016-09-11 03:46:06 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2016-09-08 20:03:31 +0200

Seen: 230 times

Last updated: Sep 09 '16