help! i need to work out what n to the minus one quarter is so i can code it


I know that the rule of indecies or powers is that ap/q=q^ap

but how the hell can I work out 2*x-1/4

I cannot grasp the maths in my head no matter how many tutorials I watch, then I need to suss out how to get code to do it.

maybe I should find a maths forum, the programming doesnt have to be an issue once I know it making a function should be easy,

well nice challenge here for maths lovers.
simple:

n^-1 = 1/n
n^-(1/4)

= 1/ (n ^1/4)
hey could you annotate that?
No Idea what you mean by annotate?

n^-q = 1/n^q?
Negative power means inverse and powers are (pow er/root) eg2^2/1 is really 1root(2^2). And 2^2/2 is really sqroot(2^2) = sqroot(4) = 2
Last edited on
2^2 is sqrt(4) is 2?
If that is what you mean, I woud "tend" to say, you are not right about that ;)

negative power means just this:

n^-q = 1/n^q.

so, n^-(1/4)

= 1/(n^(1/4))
Last edited on
I was on my phone and I edited it was meant to be 2^2/2 and I know what 2^2 is as you can see earlier i said that 2 ^2 is 1root ( 2 ^ 2 )
Last edited on
yep! Typos can happen! :)
Last edited on
I know that the rule of indecies or powers is that ap/q=q^ap

That doesn't look right to me.

a^(p/q) = q_root(a^p) = (q_root(a))^p

as already mentioned, negative exponents just put it into denominator (with positive exponent)

Your example 2x^-(1/4) = [2/x^(1/4)] = 2/4root(x)
Hope that makes some sense.

@giblit
Neither of your posts make any sense to me, are you saying 2^2 is equivalent to sqrt(2^2)?

@devonrevenge
This really doesn't belong in this forum, maybe move it to the lounge?
Last edited on
Would 2^2/3 be easier to understand than 2^2/2
Last edited on
yeah, It was for a program but i realize its got no coding in it yet
Last edited on
I think the pow() function does negative and decimals (sorry I thought I posted earlier) otherwise you can do a function manually I coded one earlier..I'll try and find it and put it here shortly

EDIT: yes it does work with negative and decimals
1
2
3
4
5
6
7
8
9
#include <iostream>
#include <math.h>
int main ( void )
{
    std::cout << pow( 2 , 2 ) << std::endl;
    std::cout << pow( 2 , -2 ) << std::endl;
    std::cout << pow( 2 , .5 ) << std::endl;
    std::cout << pow( 2 , -.5 ) << std::endl;
}
4
0.25
1.41421
0.707107

Process returned 0 (0x0)   execution time : 0.184 s
Press any key to continue.
Last edited on
HA! this saves me from actually having to understand it :P
Topic archived. No new replies allowed.