This simple program compiles without any issue and equality assertion is evaluated as true. fn main() {     let celsius_temp: f64 = 23.0;     let fahrenheit_temp: f64 = celsius_to_fahrenheit(celsius_temp);      assert_eq!(fahrenheit_temp, 73.4);     println!(&quot;Test passed!&quot;); }  fn celsius_to_fahrenheit(celsius_temp: f64) -&gt; f64 {     (celsius_temp * 1.8) + 32.0 }  However, if I use instead of f64 a data type of f32, Rust compiler panics and assertion is false. It gives me a following message: thread 'main' panicked at 'assertion failed: (left == right) left: 73.399994, right: 73.4' Why does it work with f64 and not with f32? I am not using here large numbers.
Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
I was trying to make python version 3 as a default version of Ubuntu,  I used nano ~/.bashrc and added the first line of this answer.    Then It just messed up my terminal.  Now when I am clicking on my Terminal or trying to access by ctrl+alt+t, the terminal does open/run. I can only talk to ubuntu using my terminal how could I fix this?  Please advise!  Pls, note that the terminal icon is present, but the terminal does not open when clicked on. How do I get the terminal to open and work?  Update: I deleted that line from .bashrc. However, I still have a problem opening my terminal. I also see this sign on my ubuntu as well.     saying: a problem occurred when checking for the updates ubuntu 18.04 I'm working on a python script that passes file locations to an scp subprocess. That's all fine, but I'm in a situation where I may end up concatenating a path with a filename such that there's a double '/ in the path. I know that bash doesn't care if you have multiple file separators, but I'm wondering how exactly that is rectified. Is it bash that strips extra /s or does it really not matter ever?  I ask because it will save me several lines of code to check for extra /s while concatenating. I know it's not a big deal, but I'm curious as well. I have a bash script that has the line cd //usr (instead of cd /usr), which seems to imply there might be a significance to using multiple /s in a path Disable chat migration notification if one of the users has insufficient rep? Simple request, really.  Can we add a detection for the     Please avoid extended discussions in   comments. Would you like to   automatically move this discussion to   chat?   prompt, so that if one of the users in the "extended discussion" has under 20 rep it doesn't appear?  I think a lot of the users this apply to will have low rep and it may take some back and forth to get good info out of them.  New suggestion: how about if a sufficiently high-rep user is clicking on the link, the low-rep user gets a field promotion sufficient to chat? Low-rep users are particularly prone to post questions to lead in this direction of needing to move to chat. A variation on the induced topology (subspace topology) How do I update my TeX distribution? In Bash, when to alias, when to script, and when to write a function? It's taken me almost 10 years of Linux usage to ask this question. It was all trial and error and random late-night internet surfing.  But people shouldn't need 10 years for this. If I were just starting out with Linux, I'd want to know: When to alias, when to script, and when to write a function?  Where aliases are concerned, I use aliases for very simple operations that don't take arguments.   alias houston='cd /home/username/.scripts/'   That seems obvious. But some people do this:  alias command="bash bashscriptname"   (and add it to the .bashrc file)   Is there a good reason to do that? I'm trying really hard, but I genuinely can't think of any circumstances in which I'd want to do that. So, if there is an edge case where that would make a difference, please answer below.  Because that's where I would just put something in my PATH and chmod +x it, which is another thing that came after years of Linux trial-and-error.  Which brings me to the next topic. For instance, I added a hidden folder (.scripts/) in the home directory to my PATH by just adding a line to my .bashrc (PATH=$PATH:/home/username/.scripts/), so anything executable in there automagically autocompletes.  If I needed to.  I don't really need that, though, do I? I would only use that for languages that are not the shell, like Python.  If it's the shell, I can just write a function inside the very same .bashrc:  funcname () {   somecommand -someARGS "$@" }   As I stated, I found a lot of this out through trial and error. And I only truly saw the beauty of functions when my computer died and I was forced to use the computers of the people around me when they weren't using them.   Instead of moving a whole directory of scripts from computer to computer, I ended up just replacing everyone else's .bashrc with my own, since they had never even made a single modification.  But did I miss anything?   So, what would you tell a beginning Linux user about when to alias, when to script, and when to write a function?   If it's not obvious, I'm assuming the people who answer this will make use of all three options. If you only use aliases, or only use scripts, or only use functions—or if you only use aliases and scripts or aliases and functions or scripts and functions—this question isn't really aimed at you. Why is the folder size (in properties) different from the total file/folder sizes in the folder? Here's my problem  I'm trying to do a cleanup of my hard drive, and I'm constantly seeing this scenario:  (1) Aggregate folder size: I check the folder size viewing properties right clicking the folder  (2) Individual folder/file sizes: I check the individual file/folder sizes belonging to that folder viewing properties on the individual file/folder sizes, and then adding them up (with hidden and system files shown).   These two figures are always different, sometimes by a large margin.   For instance, my C drive now, by method (1), shows a consumed space of 42.4 GB.   However, by method (2), by inspecting the respective files/folders, the total consumed space adds up only to 33.1 GB. This is a 28% discrepancy (over the smaller file size) and I have no idea where the rest of the space is going.   My hard drive is constantly in danger of being full (it's bootcamp on a mac with 50 GB of partitioned space), and there's not much I've got installed in terms of software, nor do I have large media files like movies, downloads, temp files, application temp files, torrents, etc.   Most of it's just consumed by the files in C:/Windows, but last I checked, I don't know enough to know which files to delete, and I've heard that you really can't do anything about the space boggling winsxs and system32.   Can you guys recommend a starting point to free up disk space?  Thanks!!  Baggio. I think every single one of us has experienced a dark dot in his/her sight when looking at a white surface such as a white ceiling, there's something in our eye that with a little focus we can see it, and when we move our eyes around, that thing floats around quickly in your sight. It's like a substance on eye's surface, I want to know what is it called. Hope I'm clear enough. Can a werewolf turn a muggle into another werewolf? See dashboard as non logged user in community Is it possible, as a non logged user, to see report and dashboard in community when it is open to non logged user? And  for analytic dashboards? How to create svg symbols that have modifiable fill color, stroke color and stroke width? I want to create some svg symbols for Qgis using Inkscape, those symbols must have attributes as described in the question. For the last two days, I have been experimenting as instructed by  and mimicked some symbols came bundled with qgis that have desired attributes without any success.  Finally I experimented with the simplest form of symbol: I created an svg that contains only a circle in Inkscape and tried to modify it.  The original file () have this line:  &lt;path    sodipodi:type="arc"    style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.01988637;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"   I modified it into:  &lt;path    sodipodi:type="arc"    style="fill:param(fill) #ffffff;fill-opacity:1;stroke:param(outline) #000000;stroke-width:param(stroke-width) 1.01988637;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"   Saved as  and selected it as point symbol, but Qgis couldn't change all three parameters at the same time.  What did I do wrong or should do differently?  My system: Qgis 1.8.0 on Ubuntu 12.04 64 bit, Inkscape 0.48, Gedit 3.4.1 text editor. $_SERVER["REMOTE_ADDR"] gives server IP rather than visitor IP What is the reason behind the multiple Spider-Man reboots? Spider-Man is the one franchise that is on course to a third reboot in a span of 15 years.   My question is what was the reason for these numerous reboots of Spider-Man which pretty much follow the same origin story for the Marvel superhero.  Has the comic creator or studio ever spoken out about the reasoning behind the same? vertical alignment of text in tikz node The output from the following script \documentclass{article} \usepackage{tikz} \usepackage{graphicx} \begin{document} \begin{tikzpicture}   \node(title)[text width = 0.25\textwidth, text height = 3 cm, draw]{title};   \end{tikzpicture} \end{document}  is  How can I vertically align the text in the node? Specifying the text depth as in \node(title)[text width = 0.25\textwidth, text height = 1cm, text depth = 1 cm, draw]{     title line 1\\     title line 2\\     title line 3};  Does not result in the text being vertically centred. In my document, I will write something like this (using natbib, but that shouldn't matter too much):  \citet{reference} show that .....   which would render as     Jones et al (1990) show that....   (\citet in \natbib creates an 'author-list (year)' reference style)  Of course if {reference} was a single individual, I should have written  \cite{reference} shows that ....   rendering as     Jones (1990) shows that....   Since I'm lazy and can't take the extra 5 seconds to search the reference to see if it's a single author or not, is there conceivably an automated way to do pluralization ? Or some relatively simple macro that would look like   \IfRefIsPlural{reference}{show}{shows} Lunch Meeting Probability for two person to meet in given 1 hour slot and none would wait more then 15 minute. Two friends who have unpredictable lunch hours agree to meet for lunch at their favorite restaurant whenever possible. Neither wishes to eat alone and each dislikes waiting for the other, so they agree that each will arrive at a random time between noon and 1 pm, and each will wait for the other for 15 minutes or until 1:00. What is the probability that the friends will meet for lunch on a given day? Is there a difference between "" and {} in BibTeX? Disable key when program is running How to perfectly align UV coordinates automatically? I have this setup:   The mesh is only the visible top side, with a mirror modifier for the bottom part. Now I want to unwrap it like in the picture. I want the inner circle (red) to go to the top of the UV map...  The problem is that no matter what automatic unwrapping I use, it never works as intended.  The closest I've gotten was by using "follow quads", but that skewed the UV map a lot:   I used the result from the second image and manually adjusted the vertices with a lot of scaling and "align auto", but its very far from perfect as you can see in the first image.  Here's what I want exactly:   The uv vertices should be distributed evenly (horizontally) The middle line (yellow) should be on a "natural" y height (so there's no stretching)   I hope it's clear what I want to achieve. I'm sure there must be some automatic way to perfectly align and distribute the UVs in this way.  By the way: If you look closely you can see that I already placed a uv seam (aligned with the green y axis in the screenshot) but that didn't really help. Two kinds of Duplicate closing are too confusing - suggestion for a possible fix