Recent content by wle

  1. W

    I EPR and Non-Locality - For and Against

    I think this pretty succinctly hits the nail on the head: "local" by itself is a word that people learn by association from other people, seeing examples of things called "local" and others "nonlocal". So arguing about which box quantum physics should be put into is not interesting by itself...
  2. W

    Python IDLE and print function...

    More precisely, print() prints the default "display" or "aesthetic" string representation of its argument, as returned by calling str() on it. By contrast, Python's interactive interpreter evaluates the expression you give it and tries to display it in source form, as returned by the repr()...
  3. W

    LaTeX Wide equation in Revtex 4.2 is overlapping with other content

    Okay, that makes sense. I don't know for sure, but it may just have been a problem with RevTeX. Personally I usually avoid using RevTeX when I can since it seems to have trouble with placement of things not unlike what you've seen, particularly when using the pra/prb/etc. options. RevTeX with...
  4. W

    LaTeX Wide equation in Revtex 4.2 is overlapping with other content

    Is there a reason you don't just reformat the equation so it fits in a single column, e.g., $$\begin{align} f(x) =& \frac{1}{4} + \frac{2}{\pi}\left(-\frac{\cos{x}}{2} + \frac{\cos{3x}}{6} - \frac{\cos{5x}}{10} + \dotsb \right) \nonumber \\ & {} + \frac{2}{\pi}\left(\frac{\sin{x}}{2} -...
  5. W

    Trying to decide which programming language I want to learn

    C++ has a lot of feature duplication. It often provides two or more different ways of achieving substantially the same thing. This is something you need to accept up front and be ready to deal with if you've made the decision to learn C++. Much of the feature duplication comes from C++ defining...
  6. W

    Trying to decide which programming language I want to learn

    As has been mentioned, most programming languages support writing and printing integers in different bases (decimal, hex, and octal are the ones usually supported). You're meant to just use whichever one is most natural for what you're doing. So typically you'd use hexadecimal for low-level...
  7. W

    Trying to decide which programming language I want to learn

    These are all procedural programming languages that are very similar to each other though. I think there are broadly two reasons to learn a new programming language. The first is that you want to get into or learn more about some specific kind of programming, e.g. systems programming, video...
  8. W

    Courses Should I enroll in a python course or java? (I’m studying physics)

    I'd go with Python, personally. You are much more likely to use it. Java is one of the most important programming languages in the corporate world but as far as I know there's hardly anyone using it in physics, while there are quite a lot of people using Python. Other responders here have...
  9. W

    Comp Sci Recursion double function

    You're assigning to the address of an uninitialised pointer: Why is s a pointer here?
  10. W

    B Solve 3 7 12 18 25 series

    More generally it's easy to check by induction that $$\sum_{n=1}^{a} n (n + 1) (n + 2) \dotsm (n + p - 1) = \frac{a (a + 1) \dotsm (a + p)}{p + 1} \,.$$ The relation can be be seen as the discrete analogue of $$\int_{0}^{a} \mathrm{d}x \, x^{p} = \frac{a^{p+1}}{p + 1}$$ and it can be used to...
  11. W

    I A (probably) simple question about Bell's paper

    You don't need to do any calculus. You're averaging ##\text{sign} \, \boldsymbol{\lambda} \cdot \boldsymbol{a}'## over vectors ##\boldsymbol{\lambda}## that satisfy ##\boldsymbol{\lambda} \cdot \boldsymbol{p} > 0## for some given vectors ##\boldsymbol{a}'## and ##\boldsymbol{p}##. ##\text{sign}...
  12. W

    Second programming language to get under the belt: python vs C

    Why not learn both? It's not like it would necessarily take all that much of your time. Python is among the easiest programming languages to pick up and start using and has lots of libraries available for getting things done. C is much lower level, so less practical for many purposes, but (as...
  13. W

    C/++/# Best resources to learn C++ (free)

    Herbert Schildt's books have a bad reputation among people knowledgeable about C and C++. The 'bullshildt' is named after him. You can find negative expert reviews of Schildt's books on the ACCU (Association of C and C++ Users) website. The USENET alt.comp.lang.learn.c-c++ FAQ (scroll down to...
  14. W

    When Calculators lie will anyone notice?

    Emacs also includes an RPN calculator (calc) in its standard distribution. I haven't really used it but the feature list seems quite impressive for a package included in what is ostensibly a text editor.
  15. W

    When Calculators lie will anyone notice?

    I don't think you're limited for choice if you want to use RPN on a computer. The dc calculator (one of the traditional Unix command-line utilities) and Forth programming language are both stack-based and use RPN notation. I am not sure this is so useful in a programming language though. RPN to...