0

algorithm and logic

FYI: For any integer value X except.x=0: pow(x,3) / pow(x,2) /.power(x,1) = 1; and pow(x,3) / pow(x,2) - x = 0. Thank you very much.

7th Mar 2022, 4:31 AM
Oliver Pasaribu
Oliver Pasaribu - avatar
8 odpowiedzi
+ 2
Does X ^ 3 refer to X raised to the power of 3, or X (bitwise)XOR 3?
7th Mar 2022, 6:30 AM
Ipang
+ 1
Power or exponential, pow(int x, int y), pow(x,3);
7th Mar 2022, 6:45 AM
Oliver Pasaribu
Oliver Pasaribu - avatar
+ 1
And you were looking forward to check whether a given <x> qualifies the two condition? or is it something else? I tried it in a code checking range 1 ~ 100 and each number passed both of the conditions. But I'm not sure that was what you meant to do ...
7th Mar 2022, 7:50 AM
Ipang
0
Yes, discrete math. Number theory of exponentiality.
7th Mar 2022, 8:18 AM
Oliver Pasaribu
Oliver Pasaribu - avatar
0
Not sure what you are asking??? Pow(x, 3) / pow(x, 2) / pow(x, 1) == pow(x, 3) / pow(x, 3) == 1 forall integer except 0. (can't divide by 0) Pow(x, 3) / pow(x, 2) - x == (pow(x, 3) - x*pow(x, 2)) / pow(x, 2) But x * pow(x, 2) == pow(x, 3) Therefore, (pow(x, 3) - x*pow(x, 2)) / pow(x, 2) == (pow(x, 3) - pow(x, 3)) / pow(x, 2) == 0 / pow(x, 2) == 0, thus true forall integer except 0 If this mathematical proof is what you are after. Perhaps you should review some algebra as it is essential for discrete maths and number theory.
7th Mar 2022, 9:35 AM
Adam McGregor
0
Yes Adam McGregor. You right. I made a mistake this afternoon. This can be extended; not just only for non-negative but it acceptable to any integer value (both positive and negative ) except x=0.
7th Mar 2022, 10:25 AM
Oliver Pasaribu
Oliver Pasaribu - avatar
0
Sololearn should revise their problem. For some positive integers values less than 25? No no no no. For each integer value from -infinity to +infinity except 0.
7th Mar 2022, 10:27 AM
Oliver Pasaribu
Oliver Pasaribu - avatar
- 1
Hello friend
7th Mar 2022, 9:51 PM
Fallou Dieng