Intuitively I would think that long doubles have more decimal places than doubles and doubles have more decimal places than floats, however, if so why does std::cout print out floats, doubles, and long doubles at the same decimal precision, even when they have overloads for all primitive data types? C++ source code: #include &lt;iostream&gt;  #define PI 3.1415926535897932384626433832;  int main() {     float f = PI;     double d = PI;     long double ld = PI;      std::cout &lt;&lt; f &lt;&lt; std::endl;     std::cout &lt;&lt; d &lt;&lt; std::endl;     std::cout &lt;&lt; ld &lt;&lt; std::endl;      return 0; }  output: 3.14159 3.14159 3.14159
In my  I was printing a double using cout that got rounded when I wasn't expecting it.  How can I make cout print a double using full precision?
How do I apply a gradient across multiple objects in Illustrator? I have two separate objects that I have applied gradient fill to.  The gradient fill seems to only apply to the objects as individuals. I tried grouping the shapes, but that doesn't seem to change the gradient.    How do I get one gradient to cover all my shapes? Calling a function in main So this is what I'm trying to do in Drupal 6:  Node type A is video, node type B is a person Nodetype A has a reference field where you can enter a reference to any Node from nodetype B  how can I create a block view which will be displayed on nodes from node type b, which will show all the nodes from node type A where the current node from node type B is referenced? Evaluating $\prod_{n=1}^{\infty}\left(1+\frac{1}{2^n}\right)$ The school where I work has an S when it is an acronym (NEGS) it looks odd with an apostrophe to show ownership e.g. NEGS' tennis team...any thoughts? I am using LaTeX with the article document class. The Bibtex bibliography style that I am using is agsm, part of the Harvard family of bibliography styles.  I have two questions:  (1) If I cite an entry of type @book, then in the reference list I get publisher, address. I would like to re-arrange this order to address: publisher. Which part of agsm.bst should I modify?  (2) I would like to change single quotation marks ' ' to double quotation marks " " for setting off the title of entries of type @article. Which part of agsm.bst should I focus on? Finding Elevation Change, any method So, I think it'd be cool - for goal setting for example - if I could keep track of my elevation change.  The problem is, the local cyclocomputers I looked at seem to use barometric pressure to determine the change.  This is fine, unless some weather is moving in, which happens not infrequently in the Midwestern United States.  Or do some of them try to use an inclinometer, your speed, and some math you learn in Calculus II to keep track of your change?  That would seem more accurate!  I could try to use a GPS meter, but those things are expensive -  and based on back when I had service to my smart phone, not guaranteed to match my car's odometer for distance even - I've read from some other riders that the distance varies at least slightly from local measurement on a bike as well.   Alternatively, let's say that I ride along a known route.  Is there any good way of plotting that route for elevation change?  Thanks! Suppose that there is a trigonometric equation of the form $a\sin x + b\cos x = c$, where $a,b,c$ are real and $0 &lt; x &lt; 2\pi$. An example equation would go the following: $\sqrt{3}\sin x + \cos x = 2$ where $0&lt;x&lt;2\pi$.  How do you solve this equation without using the method that moves $b\cos x$ to the right side and squaring left and right sides of the equation?  And how does solving $\sqrt{3}\sin x + \cos x = 2$ equal to solving $\sin (x+ \frac{\pi}{6}) = 1$ Is there an easy way to log all commands executed, including command line arguments? I am trying to find how to log a specific instantiation of rrdtool to see whether the path it is receiving is incorrect.  I know I could wrap the executable in a shell script that would log the parameters, but I was wondering if there was a more kernel-specific way to monitor for that, perhaps a filesystem callback that sees when a particular /proc/pid/exe matches a given binary? A calculus problem with functions such that $f''(x) = g(x)$ and $g''(x) = f(x)$ I wonder if this is a bug, or if I missed something... When a light hits tangentially convex surfaces with "smooth shading", the shadow on this surface seems to "partially ignore" the smoothness of the surface. Here is an example with a simple cylinder :    On the left, a cylinder with "flat shading". Everything's ok. On the right, the same with "smooth". We can see an edge, bad shadowed.  With or without the "Edge split" modifier, no matters, the edge is still there. The shader is a simple white diffuse shader with no texture nor displace.  I have to add a subsurf modifier with at least 2 levels, which will insanely increase the vertex count... And I can't do that for my project.  I hope someone already saw it, and have a little tip to share. Or if someone already know it's a bug, or a limit of the current Cycles renderer ? Do electrons have shape? According to :     The electron has no known substructure. Hence, it is defined or assumed to be a point particle with a point charge and no spatial extent.   Does point particle mean the particle should not have a shape, surface area or volume?  But when I searched Google for the "electron shape" I got many results (like  and ) that says electrons are round in shape. Edit: The previous title didn't really ask the same thing as the question (sorry about that), so I've changed it. To clarify, I understand that the action isn't always a minimum. My questions are in the points 1. and 2. below.  I understand that &quot;principle of least action&quot; is somewhat of a misnomer, since we find that to determine the path taken by a system, we need only impose the condition that the action be stationary, i.e., that $\delta S$ should vanish to first order for small variations of the path, and this leads to the Euler-Lagrange equations. In The Classical Theory of Fields, Landau &amp; Lifshitz discuss the relativistic action for a free particle:  So for a free particle the action must have the form $$S = -\alpha \int_a^b ds$$ (...) It is easy to see that $\alpha$ must be a positive quantity for all particles. In fact, as we saw [earlier], $\int_a^b ds$ has its maximum value along a straight world line; by integrating along a curved world line we can make the integral arbitrarily small. Thus the integral $\int_a^b ds$ with the positive sign cannot have a minimum; with the opposite sign it clearly has a minimum, along the straight world line.  There is also a footnote, addressed a couple of paragraphs earlier, but which is relevant:  Strictly speaking, the principle of least action asserts that the integral $S$ must be a minimum only for infinitesimal lengths of the path of integration. For paths of arbitrary length we can say only that $S$ must be an extremum, not necessarily a minimum.  I have two questions regarding this:  How is the condition &quot;the action must be a minimum for infinitesimal displacements&quot; formulated? I've never heard of that outside of Landau &amp; Lifshitz's books, and in Mechanics they mention it as well but doesn't go into detail. Is this discussed a bit more somewhere?  If for the whole path the action only needs to be stationary, how can we make the argument for the negative sign? If the action had to be a minimum then it would make sense, but surely the fact that $\delta S$ = 0 isn't affected by an overall sign? Image of the union is the union of the images $$ f\left(\bigcup\limits_{\lambda \in \wedge} A_{\lambda}\right) = \bigcup\limits_{\lambda \in \wedge} f(A_\lambda)$$  Let $b \in f(\bigcup\limits_{\lambda \in \wedge} A_{\lambda})$ $\rightarrow b=f(a)$ for some $a \in (\bigcup\limits_{\lambda \in \wedge} A_{\lambda})$.  Since $a \in (\bigcup\limits_{\lambda \in \wedge} A_{\lambda}) \rightarrow a \in A_{\lambda}$ for some $\lambda \in \wedge$.  Since $b=f(a)$, then $b \in f(A_{\lambda})$ for some $\lambda \in \wedge$.  $\rightarrow b \in \bigcup\limits_{\lambda \in \wedge} f(A_\lambda)$ $\rightarrow f(\bigcup\limits_{\lambda \in \wedge} A_{\lambda}) \subset \bigcup\limits_{\lambda \in \wedge} f(A_\lambda)$.  I used a similar argument to prove $\bigcup\limits_{\lambda \in \wedge} f(A_\lambda) \subset f(\bigcup\limits_{\lambda \in \wedge} A_{\lambda})$.  Which shows $ f(\bigcup\limits_{\lambda \in \wedge} A_{\lambda}) = \bigcup\limits_{\lambda \in \wedge} f(A_\lambda)$.  Please let me know if this is valid. This is what happens when I launch the terminal  There was an error creating a child process  So I have been using the Ubuntu terminal on my Raspberry Pi 4 model B 8 GB with Ubuntu for a couple moths when Ubuntu 20.10 came out for the Pi. But now I have a problem where I launch the terminal and it gives that message. I have gone for alternatives and tried to fix it but all the solutions were outdated or they were on a different distro. Also the Ubuntu commands did not fix the issue because it only triggers upon a certain command. What is inertia of a body? I'm trying to use scrlayer-scrpage with a twosided document using the scrartcl class but somehow can't manage to format the plain pagestyle in a way that is similar to the scrheadings style. I prepared the following MWE – thanks in advance!  \documentclass[12,a4paper,twoside]{scrartcl} \usepackage[automark,headsepline,footsepline,markcase=nouppercase]{scrlayer-scrpage} \renewcommand*{\sectionmarkformat}{} \renewcommand*{\subsectionmarkformat}{} \renewcommand*{\headfont}{\normalfont} \automark[subsection]{section} \chead{\leftmark} \cfoot{\pagemark} \ihead{} \ohead{} \ifoot{} \ofoot{}  \begin{document}  \pagestyle{scrheadings}  \section{Blah.}  Blah.  \newpage  \section{Blah.}  Blah.  \newpage  \pagestyle{plain.scrheadings}   \section{Blah.}  Blah.  \newpage  \section{Blah.}  Blah.  \end{document} Is there any other way to do a clean install withot formatting /home? I think my Ubuntu is a bit broken from messing around with it.  Unfortunately during installation, I did not make a separate partition for /home. Now I need to re-install but want to keep my music and films.  Any ideas... What server control panels are available for Ubuntu Server? As a dedicated Ubuntu server or as a VPS, I am looking for a web control panel, something like cPanel which is something like a web administrator for a server.  I have not used any on Linux since I do everything through the terminal, but still want to know what I can use in the case I have to recommend Ubuntu Server with such an application installed. A 2D game called Deer Hunter has projectiles like this:    Are the projectiles 2D or 3D models? How could I implement something similar?