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