-
Posts
7927 -
Joined
-
Last visited
-
Days Won
26
Content Type
Profiles
Forums
Events
Everything posted by Sensei
-
In Swansont's blog there is information about muons. Muons and positrons were discovered by Carl David Anderson in Cloud Chamber in 1932 & 1936. http://en.wikipedia.org/wiki/Carl_David_Anderson I just wanted OP to be aware of such device as Cloud Chamber.
-
The simplest particle detector is Cloud Chamber. Here you have instruction how to build one: http://www.ultimate-theory.com/en/2014/6/8/how-to-build-cloud-chamber-particle-detector It costs something between 20-50 usd. Example result (radioactive isotope is decaying and highly accelerated new particles are ionizing medium they are passing) Setup to double slit is even cheaper. I have two 0.03 mm and 0.05 mm. Bought for $6. Of course you also need laser. Couple photos taken by me with 405 nm wavelength laser:
-
Sources of electron-positron field in QFT
Sensei replied to Quetzalcoatl's topic in Modern and Theoretical Physics
Being pedantic is benefit for scientist. -
Sources of electron-positron field in QFT
Sensei replied to Quetzalcoatl's topic in Modern and Theoretical Physics
Reverse. Data from experimental observations showed conservation of charge, so any developed by human field theory must obey it (otherwise they would be immediately rejected because of disagreement with experimental data).. -
Is there an existing theory that describes...
Sensei replied to GuitarPat's topic in Modern and Theoretical Physics
There is no evidence of that. But IMHO if it would be the case, our billion years could be f.e. 1 pico second of their time.. -
Another option is different types of spaces. In Unicode we have quite a few space characters: https://www.cs.tut.fi/~jkorpela/chars/spaces.html Most of them user won't see difference. But program/script that is searching just for 0x20 (32) ASCII using if( chr == ' ' ) will fail on them..
-
Two spaces at the beginning (we have syntax error): [math] +1[/math] [ math] +1[ /math] Single space at the beginning (no error): [math] +1[/math] [ math] +1[ /math] No spaces at the beginning (no error): [math]+1[/math] [ math]+1[ /math]
-
Does the Dark Matter Increasing?
Sensei replied to Future JPL Space Engineer's topic in Astronomy and Cosmology
73+4+29= 106, no? -
I am having trouble finding information of this subject
Sensei replied to icapture's topic in Computer Science
OCR = Optical Character Recognition. http://en.wikipedia.org/wiki/Optical_character_recognition -
Again, wrong. OP means Original Poster in the first place. http://acronyms.thefreedictionary.com/OP In this context = author of this thread. So all of his replies are equally valid, to understand his intentions. Yet another websites will explain you what OP means: http://www.urbandictionary.com/define.php?term=op http://www.webopedia.com/TERM/O/op_original_poster.html
-
Wrong. BEQ for instance is Branch if EQual. When Z flag status register is set to 1, there is jump, otherwise no jump. That's what programmer see from outside. But it's doing AND operation between Z flag status register and parameter (relative offset). Then result of this AND operation is added to PC (Program Counter) register. Simple math operation on one of CPU registers! So actually BEQ instruction is equivalent to: PC += relative offset & Z flag; // (extend in mind single Z bit to whole word/long word) Z flag is 0 -> to PC there will be added 0, and nothing will happen. Because it was cleared by AND operation. Z flag is 1 -> to PC there will be added relative offset. In BNE (Branch if Not Equal), Z flag will be passed through NOT gate, prior AND (or simply NAND). PC += relative offset & ~Z flag; And that's it. Bitwise AND operation, then adding operation, one by one.. Do you want me to also explain you how ADD operation looks like from point of view of logic gates? Have you bother reading thread you're replying? In post #5 he clearly thinks his solution is speeding up program..
-
"Good"/Interesting Speculations?
Sensei replied to elfmotat's topic in Suggestions, Comments and Support
Respectable journals rejected Fermi's theories (beta decay, neutrinos).. "When he submitted his paper to the British journal Nature, that journal's editor turned it down because it contained speculations which were "too remote from physical reality to be of interest to readers"" Source: http://en.wikipedia.org/wiki/Enrico_Fermi -
Hydrogen H2 requires first to split to two separate H, it's taking approximately 4.52 eV to do so. Then each H requires 13.6 eV to ionize. So overall you have to spend 4.52 eV + 2*13.6 eV = 31.72 eV per H2 molecule. At the same time Helium needs 24.58 eV to ionize to He1+ Argon needs 15.76 eV to ionize to Ar1+ Xenon needs 12.13 eV to ionize to Xe1+ Decrease pressure of gases in tube. It should help. Be careful with Hydrogen. One my tube with Hydrogen that I have made exploded after 3rd ignition by 40+ kV Cockcroft-Walton generator. It was not hermetic and little Oxygen from air get to inside. Good that it didn't destroy anything in room (50 centimeters from LED monitors). Search eBay for "discharge tube". There is plenty of them. f.e. http://www.ebay.com/itm/Spectrum-Analysis-Gas-Spectrum-Tube-set-of-6-Discharge-Tubes-Xenon-Krypton-etc-/301365429384?pt=LH_DefaultDomain_0&hash=item462ac78488 6 tubes with different gases inside, for 80 usd is pretty good price.
-
My too. Sounds like bot which is searching for e-mails in content. "YOUTUBE HITLER WMAP 21 Oct 2014 - 16:34" If I can make you happy, so be it.. So they are not openly saying what they're really thinking, right? Afraid of getting negatives.. I wish Swansont came with some speculative idea or theory, to discuss, some day..
-
Hello! In other thread author suggested using jump-table with sub-routines as a method of optimizing complex if() { } else if() { } statement. I have other, alternative suggestion. Hand-made binary-tree for complex if() statement.. Suppose so we have following code: if( state == 0 ) { } else if( state == 1 ) { } else if( state == 2 ) { } else if( state == 14 ) { [... code executed for 14...] } else if( state == 15 ) { [... code executed for 15...] } In the best case, it'll find appropriate code after 1 comparison, in the worst scenario it'll have to compare all 16 cases. Such code we can rearrange to: if( state >= 8 ) // 50% of cases { if( state >= 12 ) // 25% of cases { if( state >= 14 ) // 12.5% of cases { if( state == 15 ) // 6.25% of cases { [... code executed for 15...] } else { [... code executed for 14...] } } else // states 12-13 { [...] } } else // states between 8 and 11 { [...] } } else // states smaller than 8 { [...] } Now any case is found after just 4 executions of if(). max.400% speedup. [math]\log_2(16)=4[/math] If we would have 256 cases in normal if() else if(), this method would reduce them to just 8 executions of if(). max.3200% speedup. [math]\log_2(256)=8[/math] Using it has sense when cases have approximately the same probability of being executed. It shouldn't be hard to make program generating such code with empty {} to fill them, taking as argument quantity of cases.. Best Regards!
-
Does matter emit or produce radiation?
Sensei replied to vitality00's topic in Modern and Theoretical Physics
There is no such thing as "mass of the charge". There is however "mass of particle", and "charge of particle". Mass is independent property, charge is independent property. -
You misunderstood. I gave writing EMULATOR of CPU as example of where jumping-table can be useful (instead of handling banking account). Using JIT would be even worser off topic. JIT is not portable. So it's better to have first make interpreter code. And then add JIT for specific target CPU. And user will pick up whether he wants JIT or normal emulation in options. Post #5.
-
Now you're talking about CPUs internals implemented in transistors. Even more nothing to do with programming side of them.. Of course 8 bit CPU have 8 bit wide instructions. 1 byte per instruction (plus additional optional 1-2 bytes parameters). Take f.e. Motorola 6502,6510 as example. Of course 16 bit CPU can have 16 bit wide instruction. 2 bytes per instruction (plus additional optional 2,4,6,8 bytes parameters). Take f.e. Motorola 680x0 as example. Each instruction has at least 2 bytes. It doesn't mean there is 64 k instructions. But emulator has to read whole word and use as index to jump-table. Some fields will be causing exception. If 16 bit CPU would have 8 bit wide instruction-1 byte, it would be often reading from not word aligned address! Which would cause problem with CPU cache, if one half of instruction is in cache, and other byte outside in physical memory. Intel is different as its instruction set grew up with time? See http://www.eventhelix.com/realtimemantra/ByteAlignmentAndOrdering.htm#.VE4UWle198E "Most 16-bit and 32-bit processors do not allow words and long words to be stored at any offset. For example, the Motorola 68000 does not allow a 16 bit word to be stored at an odd address. Attempting to write a 16 bit number at an odd address results in an exception." Nonsense. Purpose is to have faster working program. Why to bother so much to have slower working code? Jumping to sub-routine is time expensive! Add to list cheap GPUs.. Are you up to date with modern GPUs? You can program pixel and vertex shaders. They're programs, developed by programmers, compiled for their GPUs.. Executed by GPUs at demand of programmer.
-
But there must be very few conditions and/or functions must be repeatable and table filled automatically at initialization. In presented by OP example there is needed 40 thousands unique sub-routines! With bank accounts up to 1 mln, 10^12 entries. Example place where there could be used jump-table is interpreter of language with up to 8 bit commands, emulator of 8 bit cpu. They would have array of size 256 entries to sub-routines called to process single instruction. For 16 bit wide instructions it would stop making sense (65536 entries), and for 32 bit wide instructions (4 bln) even not possible. Out of memory for table (16 GB on 32 bit machine, and 32 GB on 64 bit machine). Reminds me what Maria Antonia said... I showed it's implemented by the most basic CPUs. JSR/BSR - Jump Sub-Routine - can be not implemented. Early graphics card GPUs often didn't have it. And they couldn't have recursion, nor didn't have cpu stack. However even the simplest CPUs/GPUs have conditional jumps Bxx (xx - condition). Conditional/absolute branch instruction in CPU are superior to jumping to sub-routine. Every action must have purpose, sense. OP said "Is memory more important than execution time?" But his code won't be faster, it will be actually slower, than code with if().. That's why I told him to benchmark both codes, to compare and see it on eyes.
- 73 replies
-
-1
-
Are you programming on daily basis? I don't think so, if you're considering jump-table as viable alternative option for if() for presented case.. Below code is simply jumping to sub-routine! While if() is jumping to relative address omitting what if contains in { }. 200 states * 200 deposit amount = 40000 sub-routines needed. For 1 mln states and 1 mln deposits = 10^12 sub-routines needed. Jump to subroutine is *slow*. Requires putting all registers on stack. Return address is put on stack. Then subroutine also does initializations at beginning and cleaning up on ending. Then stored registers are restored from CPU stack. It's much more expensive than simple comparison of values.. It's very relevant. I'm showing that if() handling is at CPU machine code level implemented.. You should make example code and run it f.e. 1 mln/bln execution times and compare times, to check your statement whether it's faster or slower.. Typically we can do it by f.e.: clock_t t0 = clock(); [..code...] clock_t t = clock() - t0; printf( "Clock %d seconds\n", t / CLOCKS_PER_SEC ); or use time() instead of clock()
-
You must have a lot of free time, to waste it asking such questions.. In Motorola assembler we had: BRA - branch (jump) to relative address, without checking conditional flags BEQ - branch if equal BNE - branch if not equal BPL - branch if plus BMI - branch if minus In your case: if( balance >= n ) CPU has to subtract in memory (not stored result, just flags changed) balance = balance - n and set flags if flag is negative after subtraction, jump to omit part of code. It's built-in very deeply, inside of processor.. Branch and status flags are essential instructions for CPUs. You can have no multiplication function (it's often missing in cheap 8 bit cpus used in electronics, have to be simulated by hand (shifts and adding)), but must have branches/flags. Some if() could be avoided and changed to single line f.e. if( x > y ) x = y; could be replaced by: x = ( x > y ) ? y : x; or x = min( x, y );
- 73 replies
-
-3
-
I don't think so expansion is required to solve Olbers' paradox. First of all we have large distances between stars (we can hypothesize that neutral gases were created where they're now) Photons illuminating surface obey inverse-square law, so the larger distance, the smaller quantity of photons per area unit arriving. [math]P=\frac{P_0}{4 \pi r^2}[/math] Now repeat it for the all stars in the galaxy and universe, and sum powers together. [math]\sum_{i=0}^{i<j}\frac{P_0(i)}{4 \pi r(i)^2}[/math] The one that has the smallest distance (our Sun in our current location), has the largest influence on result from this equation. Which is 3.661*10^21 photons with average 532 nm per second per m^2 of Earth at noon. 960000 light years from the Sun it'll be average 1 photon per m^2 per second. (Notice that this easy equation also gives maximum limit of stars emitting light in radius of 1 mln ly from us. If there would be 3.661*10^21 stars (with power equivalent to the Sun) at distance 1 mln ly from us, they would sum to the current max power of the Sun, and we would have day all day long) Secondly, stars don't exist forever. They're forming, living and dying, typically running out of fuel to fuse further (so I should rather say "not emitting light anymore", than dying) Something that Olbers didn't realize. Thirdly, stars don't exist at the same time. Only fraction of gas existing in the Universe is emitting photons from fusion. It must collapse enough to form new star. We can hypothesize that free protons and free electrons (violating current conservation theories obviously, which also does BB) are appearing from nowhere everywhere in space between existing galaxies. Before they would become new star it would take billions of years in the meantime. Before that we wouldn't even know about their existence. Star equivalent to the Sun would need 5.761*10^56 Hydrogen and 4.907*10^55 Helium-4 at the beginning. If rate of production would be 1 bln per second, it would take 1.82*10^31 billion years to make such amount of "fresh neutral Hydrogen gas".
-
Search google for "Muon pair production by electron-positron annihilation" (relativistic) http://link.springer.com/article/10.1007%2FBF02725718 (this is not the only article about it)