The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
The calculated value may actually have been more accurate
That is also my idea. But no idea based on what knowledge that time we decided for this. And more, how I can prove that the above mentioned equation was/is perhaps more precise than pow(2.0, -21.0). Not really a big Thing, but if you have an idea it will be very welcome. This especally to Keep my old brain alive
Thank you very much for your comment.
It does not solve my Problem, but it answers my question
Do you have an idea why one have the idea to calculate this in that way?
1 - You didn't want to type in all the digits by hand and maybe get them wrong.
2 - Rather than creating some magic number, the code expresses how the magic number is calculated, which must have some now lost meaning.
Now, given #2, the only thing that's missing is a comment (or having a function that returns this calculation) that actually describes the intent of this magic number!
The math I learned in school didn't really cover what I usually work with: uint and int. Most math tools are all about the Real numbers or maybe Complex numbers, so they will happily tell me that x * 2 / 2 = x. I vaguely heard about SMT solvers but they seemed hard to use.
So I made my own thing, the first versions in 2013, but I think it's useful enough now that other people may occasionally find it useful: haroldbot.nl. Completely free of course, including ad free, I wouldn't spam the lounge with my commercial products. It also works offline if you save a complete copy of the page.
There are some fun features in addition to equality checking, such as some limited simplification (for example x * 2 / 2 can be simplified to what it really is, and it isn't x), and detecting invertibility, sometimes it even finds the inverse so for example you can put in x * 5 to find out how to "un-multiply" by 5.
What you talk about here is the usage of Abstract algebra. Fields, Integral domains, Euclid's factorization method (the same as continued fraction algorithm) etc. Gauss doctoral thesis was about this subject (Disquisitiones Arithmeticae).
This way your post won't be relegated to the limbo after a few hours.
By the way, thanks. It looks pretty cool.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
I am rewiring part of my home with 10 Gigabit Ethernet and purchased a spool of CAT7 cable which is 22AWG diameter. I am having problems finding RJ45 connectors that can use 22AWG cable. I've made two ebay purchases of RJ45 connectors. Apparently these sellers are not always telling the truth and none of them are able to use 22 AWG wire.
Anyone have suggestions? I can make a standard CAT5 cable in under 2 minutes with the crimp tool but this 22AWG CAT7 cable is driving me nuts.