Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: casaucao on October 28, 2008, 07:16:42 pm

Title: What about exponent x^4?
Post by: casaucao on October 28, 2008, 07:16:42 pm
Hi, first off, I'm really newbie using C::B ON LINUX (ubuntu)

I have a problem when I wanna type something like this: x^4

The result (on screen) is (what I see on my screen): x

But when I type x^3 (also x^2, x^1) I have no problem. In the code text area I see "x^3" (what I type)

Anybody knows where is the problem?

I think the problem is concerning to Ubuntu,...

Best regards
Title: Re: What about exponent x^4?
Post by: MortenMacFly on October 28, 2008, 07:22:15 pm
I think the problem is concerning to Ubuntu,...
Seems so... at least I cannot reproduce on Windows. Any other (Ubuntu) Linux users here?!
Title: Re: What about exponent x^4?
Post by: casaucao on October 28, 2008, 07:25:55 pm
I have no problem on Windows.

No doubt, the problem is using Ubuntu. I can't type "x^4" on google. I'm going to looking for something :S
Title: Re: What about exponent x^4?
Post by: Ganbito on October 29, 2008, 01:37:11 am
Well, I'm on Trisquel (Ubuntu based) and I have no problem.

The only thing I can see is that I can type x1, x2, x3 but not x4 directly on the screen introducing x^n. I don't know if you refer to this, because for seeing on the screen x^1, x^2, x^3, x^4, x^n, I have no problem.
Title: Re: What about exponent x^4?
Post by: casaucao on October 29, 2008, 10:04:28 am
Exactly! I can't see x4 introducing x^n. I see only x1, x2 and x3.

Furthemore, when I type x^2, for example, (consencuently, I see x2 on my screen) I get an error when I compile.

When I type x^5 (by pressing two times shift+^) I get another error: "invalid operartor logic, operator^" (something like this)

I'm not able to find the solution  :cry: :cry: :cry:

Thank you for your replies
Title: Re: What about exponent x^4?
Post by: dje on October 29, 2008, 10:41:14 am
pow (http://www.cplusplus.com/reference/clibrary/cmath/pow.html)
Title: Re: What about exponent x^4?
Post by: casaucao on October 29, 2008, 10:45:23 am
pow (http://www.cplusplus.com/reference/clibrary/cmath/pow.html)

May be... But I'm not sure this is what I looking for :S Thank you anyway
Title: Re: What about exponent x^4?
Post by: dje on October 29, 2008, 11:04:35 am
I know you are talking about display with ^, but you focus on ^ with an exponent in your subject whereas ^ is the Bitwise Exclusive OR Operator (http://msdn.microsoft.com/fr-fr/library/3akey979.aspx)

Dje
Title: Re: What about exponent x^4?
Post by: casaucao on October 29, 2008, 11:08:52 am
Yes, I know. I will use pow function then...

Thank YOU again