Python Forum
I found a problem with Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I found a problem with Python
#1
So I read that Python no longer uses long conversions and all are longs with an "int" format

I found an odd problem reading these forums, it's as goes:

find if A is == to e**0.2:

a = 27
b = 84
c = 110
d = 133
e = (int(a**5 + b**5 + c**5 + d**5))
Z = (int(e**0.2))

#####print(e, a ,b)##### avoid due to it incrementing stacks

if Z == a**5:
print("yes")
print(a**5) #for checking the value anyway

if Z != a**5:
print("no")
print(a**5)
print(Z)
print(e)

This will print NO because the SUMMATION of e in Z becomes rounded to 144 SHORT. But we can still see that by printing A**5 it converts it into a long.
I think this is because when the values of e are exchanged to Z it forces it into a short.

I would convert to a long but those are not available. I tried Int Z, tried adding 000000000000000000 to first of e(dumb probably).

Just tried: if e**0.2 == a**5: and it is still no. This telling me it comes from the problem e**0.2 converting it into short most likely.

plz fix
Reply
#2
I don't get what you are trying to show. Why would a**5 == e**0.2? When does 14,348,907 (a**5) equal 144 (e**0.2)?
Reply
#3
If a = 27, and Z = e**0.2, even I, a complete non-mathematician, can see that a**5 will never equal Z! What are you thinking?

Look here for Python number types.

Maybe you want something like this. Try each line in your Python shell:

import math

euler = math.e
type(euler)
Z = euler**0.2
print('e**0.2 =', Z)
mylist = [27, 84, 110, 133]
for m in range(0, len(mylist) - 1):    
    num = mylist[m+1] / mylist[m]
    print('numerator is', mylist[m+1], 'divisor is', mylist[m], 'result of division is', num )
    if int(num) == int(Z):
        print('The integer of e**0.2 is equal to the integer of', num)
Reply
#4
Alright noobs well become a mathematician first.

a = 27^5 (14348907)
e = 27^5 + 84^5 + 110^5 + 133^5 (61917364224)
therefor what is 1/5th of 61917364224 = 12383472844.8
But e is 61917364224^1/5th it's number

it's checking to see if a (14348907) is 1/5th of e
-- "Incrementum Vitae Ex Animo" - Lucifer Daddy
Reply
#5
Pro tip 1^1 is is 1x1 = 1
1 ^ 0.2 is = 0.2
-- "Incrementum Vitae Ex Animo" - Lucifer Daddy
Reply
#6
ps google is wrong
-- "Incrementum Vitae Ex Animo" - Lucifer Daddy
Reply
#7
1**0.2 also shows up as 1 kek. seems it's rounding to the nearest whole number that is not 0.

Which brings me to the the concept of 144 not being anywhere close to e**0.2 I'm fairly sure what's happening is e is actually zero as it's pulled
so it just pulls a**5 instead and so e just = a and a**0.2 turns into a decimal and rounds to 144 instead of 14348907

just a thought.

Also I don't know anything about power amplification but do you guys think this chart would be good for power amps?

27^5 + 84^5 + 110^5 + 133^5x^0.2

which is like P(Power)==Wattage^Resistance

(kek im a wizard)
-- "Incrementum Vitae Ex Animo" - Lucifer Daddy
Reply
#8
Also P vs NP solution is false

Suduko has 1 - 10 which is a set amount of numbers to search through

Normal exponents have to search for infinite amounts of numbers, the longer the slower.

So while the actual method of times is essentially the same, though exponents take larger steps than polynomials, there is no way to guess evidence that is not there quicker.

The reason the solution solving the problem faster is because if I'm going A-Z and I know Z I can acommodate every other letter to add up to Z
but if I don't have Z I have no idea what I'm looking for and the answer is always going to be random if I'm adding random numbers. kek

In other words They are the same, but the problem proposed in P vs NP is false. You will not find info that is not there based on mathematics.
Sorry chumps but the Syntax has to be correct or you will not have a real problem. Therefor you will never become infinitely intelligent noob. (I know that's what you want)
-- "Incrementum Vitae Ex Animo" - Lucifer Daddy
Reply
#9
Also if you set X^5 + B^5 + C^5x^anything but one it will full loop and become infinite.
-- "Incrementum Vitae Ex Animo" - Lucifer Daddy
Reply
#10
Ah, pick another letter, not e for Euler's number!

Is this what you expect?

mylist = [27, 84, 110, 133]
e = 0
for num in mylist:
    e = e + num**5
    print('e is', e)
    print('e**0.2 is', e**0.2)
    Z = e**0.2
    print('Z is', Z)
    if Z == e**0.2:
        print('e**0.2 and Z are the same!')
Output:
e is 14348907 e**0.2 is 27.000000000000004 Z is 27.000000000000004 e**0.2 and Z are the same! e is 4196468331 e**0.2 is 84.05756207758672 Z is 84.05756207758672 e**0.2 and Z are the same! e is 20301568331 e**0.2 is 115.2141759184629 Z is 115.2141759184629 e**0.2 and Z are the same! e is 61917364224 e**0.2 is 144.00000000000003 Z is 144.00000000000003 e**0.2 and Z are the same!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How can I found how many numbers are there in a Collatz Sequence that I found? cananb 2 2,559 Nov-23-2020, 05:15 PM
Last Post: cananb
  Js2Py module not found problem Charliedactyl1 5 7,948 Jun-14-2020, 07:39 PM
Last Post: buran
  Package installed through Anaconda "not found" by Python zonova 0 2,317 May-08-2020, 11:50 PM
Last Post: zonova
  Python 36-32 problem encoding module not found mkgrtn 0 2,451 Apr-14-2020, 09:57 PM
Last Post: mkgrtn
  uising python zero with IDLE I get an error of 'module not found' Brian123 1 3,923 Apr-24-2019, 09:21 PM
Last Post: Yoriz
  How to fix error code 2 in python, “directory not found”? dav3javu 1 7,048 Apr-03-2019, 04:55 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020