
Content Count
47 
Joined

Last visited
Content Type
Profiles
Forums
Blogs
Calendar
Gallery
Downloads
Store Home
Everything posted by Matsozetex

I am writing a program to approximate pi using different methods, I am on my first method, Basel problem which comes in the following notation: pi2/6 = 1/1 + 1/4 + 1/9 + 1/16 + 1/25 My code is a function: import math percision = float(input("Enter the percision for the calculation: ")) def basel(percision): basel_result = 0 basel_total = math.sqrt(basel_result * 6) basel_term = 0 for basel_term in range(1, basel_term): if math.sqrt(6* basel_result) < math.pi(percision): #loop keeps adding until the result is within the accuracy value of pi basel_term = basel_term + 1 basel_result = basel_result + 1/basel_term**2 return(basel_total, basel_term) print(basel(percision)) However, every time I enter the percision value (say 0.1) it returns the output (0.0, 0). What am I doing wrong?

Oh, I already know about the code for input validation. But as you said, since I know there is no input validation, and I will be the one using it, there is no need. Heck, if it doesn't run I'll exactly know why, because my stupid self had fat finger syndrome. Update: I got all four things working: from math import pi from math import sqrt percision = float(input("Enter the percision for the calculation: ")) def basel(percision): basel_result = 0 basel_term = 0 basel_total = 0 base_list = [] while basel_total <= (pi  percision): basel_term = basel_term + 1 basel_result = (1/(basel_term**2)) base_list.append(basel_result) basel_total = sqrt((sum(base_list)) * 6) return(basel_total, basel_term) print(basel(percision)) def wallis(percision): wallis_result = 1 wallis_total = 0 wallis_term = 0 while wallis_total <= (pi  percision): wallis_term = wallis_term + 1 wallis_result = wallis_result *((2 * wallis_term) * (2 * wallis_term)) / ((2 * wallis_term  1) * (2 * wallis_term + 1)) wallis_total = wallis_result * 2 return (wallis_total, wallis_term) #print(wallis(percision)) def taylor(percision): taylor_result = 0 taylor_total = 0 taylor_term = 0 if taylor_total * 4 != (pipercision): while True: taylor_term += 1 print(taylor_term) taylor_result = taylor_result + ((1)**(taylor_term + 1)) * (1/(2*taylor_term1)) print(taylor_result) taylor_total = taylor_result * 4 if taylor_term != 1 and round(pi  taylor_total, (len(str(percision).replace('.',''))) 1) == 1 * percision: #take the length of str(percision), remove the decimal point and 1 to remove counting the 0 break #required as the first erm of taylor algorithim total would be 4 and would instantly end the function return(taylor_total,taylor_term) #print(taylor(percision)) def spigot(percision): spigot_result = 0 spigot_total = 0 spigot_term = 0 spigot_past = 1 spig_count = 1 nat_list = [] fib_list = [1, 1] result_list = [] while spigot_total * 2 <= (pi  percision): nat_list.append(spigot_term+1) #creates list of natural numbers, including 0 fib_list.append(fib_list[spigot_term]+fib_list[spigot_term+1]) #creates list of fibonnaci squence spigot_result = spigot_past * (fib_list[spigot_term]) / ((nat_list[spigot_term]* 2 1)) result_list.append(spigot_result) spigot_term +=1 spigot_past = spigot_result spigot_total = sum(result_list) if round(pi  spigot_total *2, (len(str(percision).replace('.','')))  1) == 1 * percision: break return(spigot_total * 2, spigot_term + 1) #print(spigot(percision)) The last one was a PITA, the numerator is a Fibonacci sequence and the denominator is a list of natural numbers.

import math pi = float(math.pi) percision = float(input("Enter the percision for the calculation: ")) base_list = [] def basel(percision): basel_result = 0 basel_term = 0 basel_total = 0 while basel_total <= (math.pi  percision): basel_term = basel_term + 1 basel_result = (1/(basel_term**2)) base_list.append(basel_result) basel_total = math.sqrt((sum(base_list)) * 6) return(basel_total, basel_term) print(basel(percision)) This is what I have made, and it works, flawlessly. If it looks good then good, if my code looks like spaghetti is there any tips/conventions that you can offer me. Also I will insert comments after I finish my other 3 approximations (internal sadface).

Would it be a wise move to use a "while" loop with the conditions of the "if" statement instead of the for loop. As the output of the function has to be the number of terms to approximate pi. For example, if the input is the precision of (0.1) then it should output (approximation to such precision, basel_terms).

AMD Radeon VII Benchmark/Launch Mega Thread
Matsozetex replied to Taf the Ghost's topic in Tech News
Indeed. 
AMD Radeon VII Benchmark/Launch Mega Thread
Matsozetex replied to Taf the Ghost's topic in Tech News
Yeah for some reason AMD software allows for power target to be pushed to 150% vs 120% from NVidia. It kinda sucks for AMD because a lot of the hysteria surrounding Vega power draw was when overclocking with 150% PT benchmarks where shown, their own act to make to increase liberties in their software led to (I am assuming here) lower sales due to rumors or misinformation. 
AMD Radeon VII Benchmark/Launch Mega Thread
Matsozetex replied to Taf the Ghost's topic in Tech News
I know this may be unrelated, but the Seasonic Focus Plus series of the PSU had an issue with V56/64 cards, I guess not anymore. Gosh, its so ridiculous to look at the Vega peak draw compared to its competitors. 
Not 6+2 but 8 to 2x8 pin converters.

I've been trying to understand how OCP works, I've read through JG's articles and Toms PSUs 101 but still have trouble grasping the logic of it. For example, the Corsair CX650M has 54A on its single 12v rail but wouldn't the OCP trip at 20A (240VA at 12v) or does OCP trigger when someone is trying to pull more power than a cable is specified to handle (i.e An 8 pin from the PSU to a splitter in a 1080ti). Do single rail PSUs even need OCP? Help. I am confused, complicated and detailed answers are welcome.

No its just a hypothetical as I have seen a lot of people say if the wattage of the power supply can support the graphics card, then using splitters is alright. Realizing that now and a bit of googling the 8pin has a 150W max while the 6pin has a 75W max. I've seen his comments, fair to say that he has convinced the entire internet to not buy it. I knew about the OTP and cross load but since I wasn't sure about OCP, I wasn't sure about its OCP issue.

So this is why the S12/M12 is shunned.

So say if some 'smart person' tried to power a Vega 64 with a single 8 pin using splitters the wires would melt/be damaged and the power supply wouldn't to jack?

The logic behind how it operates, triggers and some example scenarios please.

Yeah I've dabbled back into modded minecraft, too bad my bud is a Minecraft purist (Basically hates all tech/techmagic mods except for old industrial craft). Also hates SkyBlock

When I was young I used to play modded Minecraft on my old laptop. The laptop was having issues playing the game, I googled for an hour and realised the model of laptop has only 2GB of RAM. I asked my father, who works in IT to upgrade the memory, he put in a 4GB SD card. Placebo effect worked for 60 seconds and resorted to playing AoE2. Good times.

What are some things a high quality PSU can give me?
Matsozetex replied to BlockedTheShot's topic in Cases and Power Supplies
Better ripple means that you can have a stable overclock at a lower voltage. So if you are on a voltage wall/edge of the safe voltage for X processor then it may give higher clocks in that round about way. 
laptop cord fell in a rockstar drink, should it be ok if dried out?
Matsozetex replied to moonedyou's topic in Cases and Power Supplies
To the tune of Louis Rossman, you don't dry your ass when you take a shit, you clean it. You don't dry your tech when it gets wet, you clean it. 
I have three emails for this basic purpose: A shitty email used for shitty things, including scripts to delete the constant spam it gets (hasn't been leaked). An email used for video gaming services (the one that was leaked). An email for serious stuff.

Will my evga 450 bv handle a 470 8gb?
Matsozetex replied to Playfulmean's topic in Cases and Power Supplies
No they get the peak wattage of every component, and add anywhere from 5075% more. There is a difference between overestimating and heavily overestimating to get more money via affiliate links. Some of its peak values are also ridiculous, with HDDs being attributed 24W peak, when they really are between 910W. So if they depict a unrealistic scenario and the likely consumption is going to be lower, why add further unecessary headroom...money. 
Will my evga 450 bv handle a 470 8gb?
Matsozetex replied to Playfulmean's topic in Cases and Power Supplies
By definition it does. They over estimate is to convince unwitting and unknowing consumers to buy more expensive units as they have a monetary incentive to do so (via affiliate links). If a PSU calculator is not accurate, than it is just a PSU advertising website more than a calculator. 
Corsair RM850i PSU for AMD Threadripper 1950x is the power supply sufficient?
Matsozetex replied to ISUther's topic in Cases and Power Supplies
The power supply doesnt "throttle", parts will draw power with the perception that the power supply is capable of supply it. Tripping over power protection will result in a hard shut down. 
AMD Introduces 4 new Ryzen CPU's (benchmark results of one of them). Not a single laptop on IFA with AMD cpu
Matsozetex replied to RobbinM's topic in Tech News
If it is a single CCX for the 2300/2500X, would that mean high speed RAM would not be necessary as infinity fabric is basically redundant? 
Need spare Fractal Design Define R6 Hdd Trays
Matsozetex replied to Trojandan's topic in Cases and Power Supplies
Something like this: https://www.fractaldesignshop.de/DefineR6HDDTrayBlack 
Remember anything connected to the 16x/8x PCIe slots, the raid card (I think) and GPU will use PCIe lanes from the CPU. Anything using motherboard connectors, including NVMe drives and PCIe 4x slots will use HSIO lanes from the chipset, realistically he is using around 3640 lanes from the CPU.

You probably don't even have to, most power supplies set their OPP 20% above rated wattage. And if you are EVGA a dangerous 40%.