plancklib 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
plancklib/__init__.py
ADDED
plancklib/plancks.py
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
from decimal import Decimal, getcontext
|
|
2
|
+
from math import factorial
|
|
3
|
+
import asyncio
|
|
4
|
+
|
|
5
|
+
async def _make_pi_arith(prec=500):
|
|
6
|
+
getcontext().prec = int(prec*1.3) + 1
|
|
7
|
+
numerator_pi = 426880 * Decimal(10005).sqrt()
|
|
8
|
+
total_denom = Decimal(0)
|
|
9
|
+
|
|
10
|
+
for k in range((prec // 14) + 3):
|
|
11
|
+
numer_term = Decimal(((-1)**k)*factorial(6*k)*(13591409+545140134*k))
|
|
12
|
+
denom_term = factorial(3*k)*(factorial(k)**3)*(640320**(3*k))
|
|
13
|
+
total_denom += numer_term / denom_term
|
|
14
|
+
await asyncio.sleep(0)
|
|
15
|
+
|
|
16
|
+
pi = numerator_pi / total_denom
|
|
17
|
+
getcontext().prec = prec
|
|
18
|
+
return +pi
|
|
19
|
+
|
|
20
|
+
async def _make_pi(prec=500):
|
|
21
|
+
try:
|
|
22
|
+
pi = await asyncio.wait_for(_make_pi_arith(prec), timeout=10)
|
|
23
|
+
except TimeoutError:
|
|
24
|
+
pi = "Timeout."
|
|
25
|
+
|
|
26
|
+
return pi
|
|
27
|
+
|
|
28
|
+
def make_pi(prec=500):
|
|
29
|
+
return asyncio.run(_make_pi(prec))
|
|
30
|
+
|
|
31
|
+
precision=input("What precision do you want everything to be? (in a number) ")
|
|
32
|
+
|
|
33
|
+
PI = make_pi(int(precision))
|
|
34
|
+
|
|
35
|
+
ħ = (Decimal("6.62607015") * Decimal(10)**(-34))/(2*PI)
|
|
36
|
+
h_bar = ħ
|
|
37
|
+
c = 299792458
|
|
38
|
+
G = Decimal('6.67430') * Decimal(10)**(-11)
|
|
39
|
+
kB = Decimal('1.380649') * Decimal(10)**(-23)
|
|
40
|
+
boltzmann = kB
|
|
41
|
+
ε0 = Decimal('8.8541878188') * Decimal(10)**(-12)
|
|
42
|
+
epsilon_naught = ε0
|
|
43
|
+
|
|
44
|
+
Planck_length = ((ℏ*G)/(c**3)).sqrt()
|
|
45
|
+
Planck_mass = ((ℏ*c)/G).sqrt()
|
|
46
|
+
Planck_time = ((ℏ*G)/(c**5)).sqrt()
|
|
47
|
+
Planck_temperature = ((ℏ*(c**5))/(G*(kB**2))).sqrt()
|
|
48
|
+
Planck_energy = ((ℏ*(c**5))/G).sqrt()
|
|
49
|
+
Planck_momentum = ((ℏ*(c**3))/G).sqrt()
|
|
50
|
+
Planck_force = (c**4)/G
|
|
51
|
+
Planck_power = (c**5)/G
|
|
52
|
+
Planck_density = (c**5)/(ℏ*(G**2))
|
|
53
|
+
Planck_area = (ℏ*G)/(c**3)
|
|
54
|
+
Planck_charge = (4*PI*ε0*ħ*c).sqrt()
|
|
55
|
+
Planck_acceleration = ((c**7)/(ħ*G)).sqrt()
|
|
56
|
+
Planck_velocity = c
|
|
57
|
+
Planck_action = ħ
|
|
58
|
+
Planck_angular_momentum = ħ
|
|
59
|
+
Planck_volume = Planck_length*Planck_area
|
|
60
|
+
Planck_wavenumber = 1/Planck_length
|
|
61
|
+
Planck_frequency = 1/Planck_time
|
|
62
|
+
Planck_angular_frequency = 2*PI*Planck_frequency
|
|
63
|
+
Planck_current = Planck_charge/Planck_time
|
|
64
|
+
Planck_voltage = Planck_energy/Planck_charge
|
|
65
|
+
Planck_electric_field = Planck_voltage/Planck_length
|
|
66
|
+
Planck_magnetic_field = Planck_electric_field/c
|
|
67
|
+
Planck_resistance = Planck_voltage/Planck_current
|
|
68
|
+
Planck_conductance = 1/Planck_resistance
|
|
69
|
+
Planck_capacitance = Planck_charge/Planck_voltage
|
|
70
|
+
Planck_inductance = (Planck_voltage*Planck_time)/Planck_current
|
|
71
|
+
Planck_entropy = kB
|
|
72
|
+
Planck_heat_capacity = kB
|
|
73
|
+
|
|
74
|
+
__constants__ = ["make_pi", "PI", "ħ", "h_bar", "c", "G", "kB", "boltzmann",
|
|
75
|
+
"ε0", "epsilon_naught"]
|
|
76
|
+
|
|
77
|
+
__planck_primary__ = ["Planck_length", "Planck_mass", "Planck_time",
|
|
78
|
+
"Planck_temperature", "Planck_energy"]
|
|
79
|
+
|
|
80
|
+
__planck_energy__ = ["Planck_momentum", "Planck_force", "Planck_power",
|
|
81
|
+
"Planck_acceleration", "Planck_velocity",
|
|
82
|
+
"Planck_action", "Planck_angular_momentum"]
|
|
83
|
+
|
|
84
|
+
__planck_geometry__ = ["Planck_area", "Planck_volume", "Planck_density",
|
|
85
|
+
"Planck_wavenumber", "Planck_frequency",
|
|
86
|
+
"Planck_angular_frequency"]
|
|
87
|
+
|
|
88
|
+
__planck_electricity__ = ["Planck_charge", "Planck_current", "Planck_voltage",
|
|
89
|
+
"Planck_electric_field", "Planck_magnetic_field",
|
|
90
|
+
"Planck_resistance", "Planck_conductance",
|
|
91
|
+
"Planck_capacitance", "Planck_inductance"]
|
|
92
|
+
|
|
93
|
+
__planck_temperature__ = ["Planck_temperature", "Planck_entropy",
|
|
94
|
+
"Planck_heat_capacity"]
|
|
95
|
+
|
|
96
|
+
__all__ = __constants__ + __planck_primary__ + __planck_energy__ +\
|
|
97
|
+
__planck_geometry__ + __planck_electricity__ + __planck_temperature__
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: plancklib
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A platform where all the Planck units live.
|
|
5
|
+
Author: TheUltimateGenius4999
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Keywords: physics,planck,planck-units,science,ultra-precision,constants,physical-constants,decimal,interesting
|
|
8
|
+
Requires-Python: >=3.8
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
|
|
11
|
+
Hello everyone!
|
|
12
|
+
|
|
13
|
+
-- Time capsule --
|
|
14
|
+
|
|
15
|
+
This is my 2nd creation. This version might not be final, but it has a high
|
|
16
|
+
chance of being the final version already. This was first released on 19
|
|
17
|
+
September 2026, UTC+7, near 6:20PM.
|
|
18
|
+
|
|
19
|
+
-- What this is all about --
|
|
20
|
+
|
|
21
|
+
This is about the Planck units and some fundamental physics constants. These
|
|
22
|
+
were made with striking care and verification. All it is waiting for is for
|
|
23
|
+
you to download it and see what it is all about.
|
|
24
|
+
|
|
25
|
+
Thank you for even caring to read this!
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
plancklib/__init__.py,sha256=ZwOpAtMXonqnOA4Rpl2zIoTYaezm-Omx10BPz0RNpGk,102
|
|
2
|
+
plancklib/plancks.py,sha256=v_tRA1gjkpT3ATsSIjAc_548ljXapyPtpqoswsQ_9VM,3612
|
|
3
|
+
plancklib-1.0.0.dist-info/METADATA,sha256=1yAHgxVXdcGiv3Df9S635Sz5UJTNGWGuzBgaX4VuuyQ,857
|
|
4
|
+
plancklib-1.0.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
5
|
+
plancklib-1.0.0.dist-info/top_level.txt,sha256=ywrntQIbXLkvlryVJ_7YRzJVX9myV7pPSjelvYWv9Us,10
|
|
6
|
+
plancklib-1.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
plancklib
|