Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Einstein's Physics
#include <bits/stdc++.h> using namespace std; const double me = 9.10938356e-31; const double mp = 1.6726219e-27; const double e = 1.6e-19; const double h = 6.626e-34; const double c = 299792458; const double M = 1e6; const double MS = 1.989e30; const double ME = 5.972e24; const double Me = M * e; const double PI = 2 * acos(0); double beta(double g) {return sqrt(1 - 1 / (g * g));} double gamma(double v) {return 1 / sqrt(1 - v * v);} double rel(double u, double v) {return (u - v) / (1 - u * v);} double getLembda(double dL, double dE) {return (-dL + sqrt(dL*dL + 4 * dL * h * c / dE)) / 2;} double getEnergy(double L) {return h * c / L;} double getEnergyF(double f) {return h * f;} double L(double E) {return h * c / E;} double eV(double E) {return E / e;} double J(double ev) {return ev * e;} double Lc(double m) {return h / (m * c);} double shift(double Lc, double phi) {return Lc * (1 - cos(phi * PI / 180));} void solve() { // Q3 cout << getLembda(2 * Lc(me), J(44*1e3)); // Q4 double l1 = 0.1e-9; cout << shift(Lc(mp), 180) / l1; // Q5 cout << acos((1 - L(2 * me * c * c) / Lc(me))) * 180 / PI; // Q6 double phi = 45; cout << (h * c) / ((1 - cos(phi * PI/180)) * Lc(me)) / (e*1e6); // Q7 double l1 = 0.1867e-9; cout << l1 - shift(Lc(me), 163) << " " << getEnergy(l1 - shift(Lc(me), 163))/e; // Q8 double phi = acos(1 - 0.5e-12/Lc(me)); double p = sqrt(getEnergy(10.0e-12) * getEnergy(10.0e-12) + getEnergy(10.5e-12) * getEnergy(10.5e-12) - 2 * getEnergy(10.0e-12) * getEnergy(10.5e-12) * cos(phi)) / c; cout << p << "\n"; double theta = asin(getEnergy(10.5e-12)*sin(phi)/(c*p)) * 180/PI; cout << theta; // Q9 cout << getEnergy(getLembda(shift(Lc(me), 180), 50.0e3 * e)) / e; // Q10 double E1 = 100.0e3 * e; double E2 = 90.0e3 * e; cout << acos(1 - ((h*c) / Lc(me)) * ((E1 - E2) /(E1 * E2))) * 180 / PI; // Q11 double L1 = L(210.0e6 * e); double dL = 2 * Lc(me); double L2 = L1 + dL; cout << L1 << "\n"; cout << L2 << "\n"; cout << ((210.0e6 * e) - getEnergy(L2)) / (e * 1.0e6); L1 = L(210.0e6 * e); dL = 2 * Lc(mp); L2 = L1 + dL; cout << L1 << "\n"; cout << L2 << "\n"; cout << ((210.0e6 * e) - getEnergy(L2)) / (e * 1.0e6); // Q12 double dL = 7.314e-11 - 7.078e-11; cout << acos(1 - dL / Lc(me)) * 180 / PI; // Q13 double phi = 57; cout << c * (1 / 0.99 - 1.0) / (Lc(me) * (1 - cos(phi * PI/ 180))); } signed main() { solve(); return 0; }
run
|
edit
|
history
|
help
0
cons1
Hello World C++ - minimal
MINVEST
Preference List
Listas enlazadas - Generar lista con repetidos
2
Test 5(2020)
idfc
Synchro#2
lab17feb22x4B.cpp