this post was submitted on 09 Jan 2024
104 points (93.3% liked)

Linux

48178 readers
816 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 57 points 10 months ago (3 children)

Floating point error? Yeaahhh no. No. Just... no. That is NEVER as big as 0.01 unless the number is also insanely massive.

The error is relative in scale. It's not magically significant fractions off.

[–] [email protected] 4 points 10 months ago (1 children)

TBF the error can become that big if you do a bunch of unstable operations (i.e. operations that continue to increase the relative error), though that's probably not what is happening here.

[–] [email protected] 3 points 10 months ago (1 children)

To get to 0.01 error, you'd need to add up trillions of trillions of floating point errors. It will not happen solely because of floating point unless you're doing such crazy math that you shouldn't be using primitives in the first place.

[–] [email protected] 2 points 10 months ago

That's why I said unstable operations. Addition is considered a stable operation (for values with the same sign)

[–] [email protected] 1 points 10 months ago* (last edited 10 months ago)

As the answer in the link explains, it's adjustment of your scaling factor to the nearest whole pixel, plus a loss of precision rounding to/from single/double floating point values.

So I'm not really sure of the point of this post. It's not a question, as the link quite effectively answers it. It's more just "here's why your scaling factor looks weird in your gnome config file", and it's primarily the first reason - rounding to whole pixels.

[–] [email protected] 1 points 10 months ago

0.001, but still