I am writing a parser where I need to parse numbers.  Numbers are in the JSON format, i.e. simplified, something like:  [+|-] integral [. fractional] [e|E exponent]   So these are the 3 parts of the number I have. Each part is an integer.  For example:  0.4 Integral = 0 Fractional = 4 Exponent = 0  2.84e+6 Integral = 2 Fractional = 84 Exponent = 6   I know how to compute the number in Java in a very crude manner. Something like this:  long integral; long fractional; int exp;  double decimal = fractional; while (decimal &gt;= 1.0) {   decimal *= 0.1; }  var n = (integral + decimal) * Math.pow(10, exp);   But this has terrible properties like losing precision completely, overflowing etc. specially for very large numbers (e.g. 10e99, 2.7e-23).  Is there a way to create a number in Java from its constituent parts such that the number keeps the properties as close as possible to the floating point literal?  My current idea is to try to create the exact bits in memory that would represent the floating point number using the IEEE 754 representation Java (and many languages) uses.   helped me understand the floating point representation, but I am still kind of stuck.  My current try to do that uses a ByteBuffer which can do:  ByteBuffer buffer = ByteBuffer.allocate(8); buffer.put(&lt;bits representing the number exactly in floating point&gt;);  buffer.flip(); double n = buffer.getDouble();   The "only" problem being, figuring out the right bits, which is not trivial (if someone knows a method to do that , please do share).  EDIT: Performance is important, so I am trying to avoid creating a String then throwing it at Double.parseDouble(str)... as that feels pretty expensive compared to writing the bits into memory... but I might be wrong and this is indeed the most "efficient" option? Really don't know at this point, hopefully I can benchmark when I have a few options.
Of course most languages have library functions for this, but suppose I want to do it myself.  Suppose that the float is given like in a C or Java program (except for the 'f' or 'd' suffix), for example "4.2e1", ".42e2" or simply "42". In general, we have the "integer part" before the decimal point, the "fractional part" after the decimal point, and the "exponent". All three are integers.  It is easy to find and process the individual digits, but how do you compose them into a value of type float or double without losing precision?  I'm thinking of multiplying the integer part with 10^n, where n is the number of digits in the fractional part, and then adding the fractional part to the integer part and subtracting n from the exponent. This effectively turns 4.2e1 into 42e0, for example. Then I could use the pow function to compute 10^exponent and multiply the result with the new integer part. The question is, does this method guarantee maximum precision throughout?  Any thoughts on this?
File: \boot\bcd Status: 0xc00000e9 windows 8 I am having this error for quite a few months. When the problem occurs, my windows freezes at boot time with black screen. After few reset attempts, sometimes it shows the entitled error. after few attempts, the windows starts but everything become slow. If I again restart, it works well. But at a point windows never starts and I have to reinstall it. I have already reinstalled 3/4 times in the past 2/3 months. I checked for any HDD errors with EASEUS Partition Master Home Edition with surface test, chkdisk at boot time etc for my C drive and F drive but no errors found. Startup repair also fails to solve the problem.  Windows Boot Manager   Windows failed to start. A recent hardware or software change might be the cause.   To fix the problem:  &nbsp;&nbsp;1. Insert your Windows installation disc and restart your computer.  &nbsp;&nbsp;2. Choose your language settings, and then click "Next." &nbsp;&nbsp;3. Click "repair your computer."  If you don't have this disc, contact your system administrator or computer manufacturer for assistance.   &nbsp;&nbsp;File: \Boot\BCD  &nbsp;&nbsp;Status: 0xc00000e9  My laptop's info:  Model: Dell n5110 corei5 OS: Windows 8 PRO 64 bit Anti-virus:  Avast Home edition  Additional info: My Program Files, Program Files (x86) and Users directory is located at F drive and linked with symbolic link (mklink). Also I have changed these basic locations from regedit. I also use eclipse android intelx86 emulator, virtualbox and Genymotion emulator most often. Is there any decent speech recognition software for Linux? The short version of the question: I am looking for a speech recognition software that runs on Linux and has decent accuracy and usability. Any license and price is fine. It should not be restricted to voice commands, as I want to be able to dictate text.  More details: I have unsatisfyingly tried the following:       (e.g., )  (used to run  on Linux but was discontinued years ago)      (built on the Kaldi speech recognition toolkit)    +  +  +   : only accepts voice commands  All the above-mentioned native Linux solutions have both poor accuracy and usability (or some don't allow free-text dictation but only voice commands). By poor accuracy, I mean an accuracy significantly below the one the speech recognition software I mentioned below for other platforms have. As for Wine + Dragon NaturallySpeaking, in my experience it keeps crashing, and I don't seem to be the only one to have such issues unfortunately. On Microsoft Windows I use Dragon NaturallySpeaking, on Apple Mac OS X I use Apple Dictation and DragonDictate, on Android I use Google speech recognition, and on iOS I use the built-in Apple speech recognition. Baidu Research released  the  for its speech recognition library using  implemented with Torch. Benchmarks from  are encouraging as shown in the table below, but I am not aware of any good wrapper around to make it usable without quite some coding (and a large training data set):      System Clean (94) Noisy (82) Combined (176)     Apple Dictation 14.24 43.76 26.73   Bing Speech 11.73 36.12 22.05   Google API 6.64 30.47 16.72   wit.ai 7.94 35.06 19.41   Deep Speech 6.56 19.06 11.85     Table 4: Results (%WER) for 3 systems evaluated on the original audio. All systems are scored only on the utterances with predictions given by all systems. The number in the parentheses next to each dataset, e.g. Clean (94), is the number of utterances scored.  There exist some very alpha open-source projects:   (part of Mozilla's Vaani project:   ())  Vox, a system to control a Linux system using Dragon NaturallySpeaking:  +     (to be released by Google, mentioned at Interspeech 2018)  I am also aware of this  as well as this .  I am aware of  , which allows speech recognition via Dragonfly on one computer to send events to another, but it has some latency cost:  I am also aware of these two talks exploring Linux option for speech recognition:   (David Williams-King)  (Tavis Rudd) Following discussion , what constitutes a weapon damage die?  Is it any damage die dealt by the weapon? For example, consider a  longsword.     While the sword is ablaze, it deals an extra 2d6 fire damage to any target it hits.   What are the weapon damage dice? Just the 1d8 from the longsword? Or do the 2d6 Fire damage also count? How does the wording "for each" work? Some cards in magic has something happen for each {something}. For instance:  makes you gain 2 life for each creature you control. Tapping  adds one green mana to your mana pool, and you gain 1 life for each non-land card revealed.  How is this life gained: all at once or "one bit" at a time? Say I tap Selvala and 1 land, and 2 non-lands are revealed: do I gain 2 life, or do I gain 1 life two times? Would  have one or two +1/+1 counters placed on it if I had it in play at that point? I'm close to maxing out my character and I want to beat Ganon solely for the TRUE ending, but I'm too scared of losing some of my personal favorites from the Guardian Spear++ to fighting those damned Guardians (it was so fun).  So, after beating Ganon    Do monsters disappear? - Including the corrupted Guardians, but also the blood moons, I don't want to just face off against the Yiga Clan... Am I gonna run out of resources? - As a survival game Zelda BOTW has some emphasis on the survival genre but to me it is a survival-esque action-adventure game. Are special weapons still available when you max out? - Like the Savage Lynel Spears or Swords) Starting a new online business I have just started to work on an online business mode website. My dream is to make it live and bring revenue from the website. However, the project is in Incubator phase.   In this situation, can i register it as a Business, Open a Business Bank Account and start making the Purchases such as Servers, Software's etc.  Whether i have to pay Tax for my start up business ?  Location : New Jersey, US How to close aberrant tooltips in Windows So, here I am, trying to watch The Cleveland Show (TM).      And, as happens from time to time, some program or another has left a modal tooltip.  I don't know which program; how can I lose the tooltip, short of logoff/reboot?  Currently happening on Windows 10, but I have seen it on other versions. Loopback to forwarded Public IP address from local network - Hairpin NAT This is a  about Hairpin NAT (Loopback NAT).   The generic form of this question is:  We have a network with clients, a server, and a NAT Router. There is port forwarding on the router to the server so some of it's services are available externally. We have DNS pointing to the external IP. Local network clients fail to connect, but external work.   Why does this fail? How can I create a unified naming scheme (DNS names which work both locally and externally)?   This question has answeres merged from multiple other questions. They originally referenced FreeBSD, D-Link, Microtik, and other equipment. They're all trying to solve the same problem however. A Good Book for Mathematical Probability Theory My homework has this problem:     Prove that there exist irrational numbers $x$ and $y$ such that $x +  y$ is rational.   There is an easy solution that I found on mathbitsnotebook.com:     \begin{align} \left(2+6\sqrt{7}\right) + \left(-6\sqrt{7}\right) = 2.\end{align}   Can we prove the same without using subtraction? On which Stack Exchange site should I post subjective questions? What will Sony do if someone uses my account as primary on another ps4 without my knowledge? What will Sony do if someone uses my account as primary on another ps4 without my knowledge? Will the account be banned? Or will the other guy that has my account as primary be banned? After how long? I have no credit card on my account so I don't care too much but I want to know.   He uses my account on his ps4 as a primary account. I think to use my digital games as free (Sharing, but without my knowledge). Why does Vader live on Mustafar? In Rogue One, we get our first glimpse of Darth Vader's primary residence - a castle on Mustafar.  Given the freedom to choose any planet in the galaxy as their new home, I don't think many people would pick the place where they had three limbs chopped off, fell into a lava flow, and were burned alive, but this appears to be what Vader did.   Why does Vader live on Mustafar of all places? What is the best way to check whether a given object is of a given type? How about checking whether the object inherits from a given type?  Let's say I have an object o. How do I check whether it's a str? How do you performance test JavaScript code? CPU Cycles, Memory Usage, Execution Time, etc.?  Added: Is there a quantitative way of testing performance in JavaScript besides just perception of how fast the code runs? What are sentences like "the longer X, the more Y" called and can they be used in formal written English? What is the type of sentence exemplified below called? Is it appropriate to use it in a scientific paper and formal written English in general?     1. The more pronounced the variation, the   more the waste.      2. The more you give, the more you get.      3. The longer I live, the more I realize the impact of attitude on life. How to check if windows has automatic updates waiting from the command line? If a Windows server (2k3/2k8) is set to "download but not install" updates, is there a way to check from the command line.. perhaps a log file or something I can check with powershell, to see if there are any updates actually waiting to be installed? I'm trying to prevent having to manually log on to each server to check, even though they want the "trigger" pulled manually. We have an automation system in place I can use (CA Autosys) - just not sure what to have it look for. I have answered 'No' to Siri initial prompt, but I can still see it in my process list. I've tried to kill it, but it loads again immediately. How can I unload and remove Siri from my Mac? Let $U$ be an open set in $\mathbb R$. Then $U$ is a countable union of disjoint intervals.    This question has probably been asked. However, I am not interested in just getting the answer to it. Rather, I am interested in collecting as many different proofs of it which are as diverse as possible. A professor told me that there are many. So, I invite everyone who has seen proofs of this fact to share them with the community. I think it is a result worth knowing how to prove in many different ways and having a post that combines as many of them as possible will, no doubt, be quite useful. After two days, I will place a bounty on this question to attract as many people as possible. Of course, any comments, corrections, suggestions, links to papers/notes etc. are more than welcome. Why is $1$ not a prime number? Why is $1$ not considered a prime number?  Or, why is the definition of prime numbers given for integers greater than $1$?