Recent content by SlowThinker

  1. SlowThinker

    A Black Hole TON618 - Wavelength Spectrum

    Sorry to resurrect this thread but my question was actually answered by it. I'm wondering, is 391.3 supposed to be the location of the (wide) peak in this image? https://ned.ipac.caltech.edu/spc1/2000/2000ApJS..126..133W/FBQS_J122824.9+312837:S:w2000_sp.png (from...
  2. SlowThinker

    Python Numerical Integration in Python

    Interesting. For me, the G(1,1,0) call returned 0.333 but multiplying by 3!/(3-1)! changed it to 2.00 . BTW my computer is i7 @ 2.3GHz. RAM or number of cores don't really matter here.
  3. SlowThinker

    Python Numerical Integration in Python

    Unfortunately I don't have it here, I did it at work. But I rewrote your Python program pretty much 1:1. I guess it doesn't help that you carry around all the parameters. It would be better to declare K, M, dx, dy as constants as you did in Python (using #define). I remember I added a test at...
  4. SlowThinker

    Python Numerical Integration in Python

    I've rewritten your code to C. It took like 20 seconds to run with 0.001 . I'm not all that good with statistics but it seems the sort function is somehow missing in the other version. Are you sure that the first formula in #29 is correct?
  5. SlowThinker

    Python Numerical Integration in Python

    As the saying goes, you'll find the helping hand at the end of your arm. After 5 minutes of debugging, it seems that you need to reset ux to x_prev_lim inside the uy-loop rather than before it. Now I'm getting 1.999329 with the code you posted, or 1.999993 with dx & dy=0.001. Are you using K=3...
  6. SlowThinker

    Python Numerical Integration in Python

    In the first formula, is it missing ##f_Y(y_2)## somewhere? Where do the ##z_i## come from? Where does the x/y in the second formula come from? What result do you get, and how it changes if you use smaller dx & dy? Do you know if the MC simulation is correct? But seriously, if you want to make...
  7. SlowThinker

    Python Numerical Integration in Python

    I meant something like this res = 0 u = h/2 #prev_lim while u <= max(prev_lim, h-prev_lim): res += G(max(prev_lim, h-prev_lim), m+1, u)*f(u)*du res += G(max(prev_lim, h-prev_lim), m+1, h-u)*f(h-u)*du u += du but now it doesn't seem...
  8. SlowThinker

    Python Numerical Integration in Python

    The last sample needs to have weight 1 as well. So it's 1, 4, 2, 4, 2, ..., 2, 4, 1. Also make sure that the number of samples is even (perhaps by tweaking du a bit before the loop, or starting at u=h/2 and going both ways at once).
  9. SlowThinker

    Python Numerical Integration in Python

    You may first want to let it run with small du to make sure that it works now, before optimizing. You can play with du a bit but it will always be a trade between speed and accuracy. Then you can try Simpson's rule, that's reasonably simple and improves accuracy even with bigger du. Requires...
  10. SlowThinker

    I Can Schrodinger's cat apply to things other than alive/dead?

    Here on PF I often read that the Schrödinger's cat doesn't work, but never understood why. Is the objection only that the box is usually not perfect? It is obviously assumed that the box is perfect, otherwise there's no point in having a box in the first place. If we could measure something that...
  11. SlowThinker

    Python Numerical Integration in Python

    Uh huh. In that case it might be actually easier to use debugging prints (with a large du of course).
  12. SlowThinker

    I How Does Special Relativity Challenge Our Understanding of Absolute Time?

    Different observers won't agree on simultaneity, precisely because it does not affect anything. It's only a viewpoint. My neural state is defined by neuron charges and dendrite weights. These are the same whether viewed by myself or some fast alien. If someone says that I saw something, they'll...
  13. SlowThinker

    I How Does Special Relativity Challenge Our Understanding of Absolute Time?

    A claim that I didn't see a purple elefant is perfectly true. A claim that I did is false. I still fail to see what is your question.
  14. SlowThinker

    I How Does Special Relativity Challenge Our Understanding of Absolute Time?

    No, false claims are not as valid as true claims. What we discussed on the first 4 or 5 pages was all true claims.
  15. SlowThinker

    I How Does Special Relativity Challenge Our Understanding of Absolute Time?

    Maybe one of them saw what's behind me, and neither I nor the other observer saw it. If the two observers are somewhat intelligent, they'll undestand that they only view some part of the full truth. So do I. But their view may be more complete and more correct than mine.
Back
Top