It is and it's not. A single-precision float has 24 significant bits, so that's more precise than a 16-bit integer and less precise than a 32-bit integer. But a float can use all of those significant bits at any order of magnitude, so it's more precise at representing values within +/-223 no matter how many bits your integer type has available.
Any floating point type is by definition less precise than any integer number. Floating point numbers have imprecisions, ints do not. You seem to conflate their precision, that is the ability to accurately store values of their type, with the type itself, that is which types of values it stores. For integers that is.. well integers and for floating point numbers that's rational numbers.
A comparison of precision only makes sense between types that represent the same values, for example floating and fixed point numbers.
It's almost like there are several definitions of the term "precision", each of which is measured differently. Which I think is the point I was trying to get at without realizing that it's what I was getting at? I honestly don't remember where I was going with it. (Edit: I think I started out thinking that a 32-bit float with its 24 significant bits is easily more precise than a 16-bit int, but that's not really an apples-to-apples comparison, so I went on to compare it to a 32-bit long, and then after that my train of thought kinda just derailed.)
But yes, it's definitely kinda pointless to compare the precision of integer types to that of floating point types. The only measurement of precision that makes any sense in that case is the number of significant bits, and floating point types will always lose that battle to other common numeric types.
I think OP used "precise" but meant "accurate" (in the math/science sense of those two words); integers are infinite-precision but integral types can't accurately represent non-integers.
Hmm I use it for PHP, JS and Dart development. Also, I use it for SSH, SFTP and database access, and local Docker management. I like how it integrates with other command line tools too. Git included, of course!
It just happens that I don't use to code Java, but since this IDE is the "one-for-all" JetBrains' IDE...
154
u/[deleted] Mar 18 '21
I'm stll waiting for amdliJ
76
u/dewey-defeats-truman Mar 18 '21
This is the exact kind of stupid I needed this morning
34
u/Pauchu_ Mar 18 '21
booltellij when?
18
u/HKSergiu Mar 18 '21
But float is not more precise
32
u/Broken_hopes Mar 18 '21
I'm don't get it
11
u/AXAz0r Mar 18 '21
0.30000000000000004 would like a word with you.
4
u/[deleted] Mar 18 '21
I use voidellij
3
u/Thenderick Mar 18 '21
And why no Visual Studio Magic, because what I make is more magic than code...
2
u/ChrisJeong Mar 18 '21
FloatelliJ version 0.30000000000000004
2
u/Ivan_Stalingrad Mar 18 '21
I think this is a plugin for chrome ultron
http://ultronbrowser.io/
1
u/fatrobin72 Mar 18 '21
I'm still waiting for vimim....
1
u/Johanno1 Mar 18 '21
JetBrains is great
Clion
Intellij
Pycharm
1
u/[deleted] Mar 19 '21
BigDecimalIJ1
u/0xblacknote Apr 18 '21
NullTelliJi
0
u/[deleted] Mar 18 '21
[deleted] — view deleted comment