What do you mean? In two’s complement, there is only one zero.
Comment on near zero
henfredemars@infosec.pub 1 year ago
In computer engineering we have positive and negative zero.
PlexSheep@infosec.pub 1 year ago
yetAnotherUser@feddit.de 1 year ago
IEEE 754 floating point numbers have a signed bit at the front, causing +0 and -0 to exist.
henfredemars@infosec.pub 1 year ago
Specifically I was referring to standard float representation which permits signed zeros. However, other comments provide some interesting examples also.
hungrybread@hexbear.net 1 year ago
sus@programming.dev 1 year ago
floats
Zerush@lemmy.ml 1 year ago
1- 0,99999…
PlexSheep@infosec.pub 1 year 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 1 year 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 1 year 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 1 year ago
Also in Math.
marcos@lemmy.world 1 year ago
Unknowingly from the GP, that’s where CE got it from.
Gladaed@feddit.de 1 year ago
What is gp/ce?
marcos@lemmy.world 1 year ago
Grand parent / computer engineering
Leate_Wonceslace@lemmy.dbzer0.com 1 year ago
What algebra uses negative 0?
agamemnonymous@sh.itjust.works 1 year 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 1 year ago
Speaking as a mathematician, it’s not really accurate to call that -0.
barsoap@lemm.ee 1 year 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 1 year ago
I’m not familiar with IEEE 754.
Gladaed@feddit.de 1 year ago
Math is more than just the set of all algebras.
Leate_Wonceslace@lemmy.dbzer0.com 1 year 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.