What do you mean? In two’s complement, there is only one zero.
Comment on near zero
henfredemars@infosec.pub 2 years ago
In computer engineering we have positive and negative zero.
PlexSheep@infosec.pub 2 years ago
yetAnotherUser@feddit.de 2 years ago
IEEE 754 floating point numbers have a signed bit at the front, causing +0 and -0 to exist.
henfredemars@infosec.pub 2 years ago
Specifically I was referring to standard float representation which permits signed zeros. However, other comments provide some interesting examples also.
hungrybread@hexbear.net 2 years ago
sus@programming.dev 2 years ago
floats
Zerush@lemmy.ml 2 years ago
1- 0,99999…
PlexSheep@infosec.pub 2 years ago
Floating point numbers are not possible in two’s complement, besides that, what is your point? 0,99999999… is probably the same as 1.
Zerush@lemmy.ml 2 years ago
Yes, mathematically it’s the same, but in physics there’s a guy named Heisenberg who denies that 0.99999… really gets to 1. There is always this difference, for a mathematician infinite is not a problem, but for a physicist it is, plus a very big one.
HexesofVexes@lemmy.world 2 years ago
And, as a mathematician who has been coding a library to create scaled geometric graphics for his paper, I hate -0.0.
Seriously, I run every number where sign determines action through a function I call “fix_zero” just because tiny tiny rounding errors pile up in floats, even is numpy.
Gladaed@feddit.de 2 years ago
Also in Math.
marcos@lemmy.world 2 years ago
Unknowingly from the GP, that’s where CE got it from.
Gladaed@feddit.de 2 years ago
What is gp/ce?
marcos@lemmy.world 2 years ago
Grand parent / computer engineering
Leate_Wonceslace@lemmy.dbzer0.com 2 years ago
What algebra uses negative 0?
agamemnonymous@sh.itjust.works 2 years ago
When taking about limits, you can approach 0 from the positive or negative direction, which can give very different results. For example, lim cotx, x->0+ = ∞ while lim cotx, x->0- = -∞
Leate_Wonceslace@lemmy.dbzer0.com 2 years ago
Speaking as a mathematician, it’s not really accurate to call that -0.
barsoap@lemm.ee 2 years ago
IEEE 754
I mean it’s an algebra, isn’t it? And it definitely was mathematicians who came up with the thing. In the same way that artists didn’t come up with the CGI colour palette.
Leate_Wonceslace@lemmy.dbzer0.com 2 years ago
I’m not familiar with IEEE 754.
Gladaed@feddit.de 2 years ago
Math is more than just the set of all algebras.
Leate_Wonceslace@lemmy.dbzer0.com 2 years ago
I’m aware. Algebra is what I’m most interested in, and so when someone says “0” I think “additive identity of a ring” unless context makes the use obvious.