2025/11/21

Newest at the top

2025-11-21 05:44:30 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-21 05:40:47 +0100 <EvanR> exact real numbers, yes
2025-11-21 05:40:33 +0100 <EvanR> chromoblob, this is false for floats, and is the correct thing to do in some cases
2025-11-21 05:40:13 +0100 <EvanR> attempting to use math on a computer is a source of errors in programs. avoidance recommended
2025-11-21 05:40:04 +0100 <chromoblob> you should never test "real" numbers for equality, it's not meaningful in computers
2025-11-21 05:40:02 +0100 <jreicher> That's really interesting. I object to it on mathematically purist grounds, which I'm only half-serious about, but that actually looks like it matters.
2025-11-21 05:38:53 +0100 <fgarcia> a source of errors in programs, if software developers do not take into account that while the two zero representations behave as equal under numeric comparisons, they yield different results in some operations."
2025-11-21 05:38:51 +0100 <fgarcia> "It is claimed that the inclusion of signed zero in IEEE 754 makes it much easier to achieve numerical accuracy in some critical problems, in particular when computing with complex elementary functions. On the other hand, the concept of signed zero runs contrary to the usual assumption made in mathematics that negative zero is the same value as zero. Representations that allow negative zero can be
2025-11-21 05:38:26 +0100 <fgarcia> i think wikipedia has some writing about this
2025-11-21 05:38:09 +0100 <geekosaur> losing the "negative" switches which quadrant you're in
2025-11-21 05:38:05 +0100Pseudonym(~Pseudonym@194-223-46-47.tpgi.com.au) Pseudonym
2025-11-21 05:37:55 +0100 <EvanR> by the same logic negative NaN accomplishes the same thing
2025-11-21 05:37:54 +0100 <geekosaur> fgarcia, yes, and it happens when you're working with trig functions in a plane
2025-11-21 05:37:11 +0100 <EvanR> so you end up with partial information
2025-11-21 05:37:11 +0100 <geekosaur> as apparently has libtommath which was my first idea (then found something pointing to bsdnt instead)
2025-11-21 05:37:05 +0100werneta(~werneta@71.83.160.242) (Quit: Lost terminal)
2025-11-21 05:36:42 +0100 <EvanR> a negative zero happens when a computation would be negative but too small to represent
2025-11-21 05:36:40 +0100 <geekosaur> actually it was bsdnt, which seems to have disappeared
2025-11-21 05:34:59 +0100 <fgarcia> i am not smart. would they have thought it would be somehow useful for limits approaching from >0 and <0 ?
2025-11-21 05:34:50 +0100 <EvanR> whatever you need to do do it in the range 1 <= x < 2
2025-11-21 05:33:52 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds)
2025-11-21 05:33:47 +0100 <EvanR> or any kind of zero for that matter
2025-11-21 05:33:40 +0100 <EvanR> for numbers of the form mantissa times 2^e signed zero isn't a thing xD
2025-11-21 05:32:45 +0100 <EvanR> lol
2025-11-21 05:32:40 +0100 <jreicher> Signed zero in the first place should not be a thing. :(
2025-11-21 05:32:09 +0100Shark8(~Shark8@c-174-56-102-109.hsd1.nm.comcast.net) (Ping timeout: 244 seconds)
2025-11-21 05:31:57 +0100marlino(~marlino@96-8-193-95.block0.gvtc.com) (Quit: WeeChat 4.7.1)
2025-11-21 05:31:50 +0100 <EvanR> they should have made a signed NaN in case you divide negative zero by zero
2025-11-21 05:31:18 +0100 <EvanR> that be the realm of float "logic"
2025-11-21 05:31:04 +0100 <jreicher> But it is a number. You just don't know which one. :p
2025-11-21 05:30:51 +0100 <fgarcia> oh, somewhere i have written 0.0 / 0.0 because i wanted Not a Number as a result
2025-11-21 05:30:27 +0100 <EvanR> lol
2025-11-21 05:30:22 +0100 <chromoblob> <s>0.5</s>
2025-11-21 05:30:17 +0100 <EvanR> it should clearly be 7 because this one time that would make sense
2025-11-21 05:30:06 +0100 <geekosaur> haven't really had time to work on it though
2025-11-21 05:29:57 +0100 <jreicher> EvanR what should it be? (I'm not saying it should be 0; I'm just curious what you think)
2025-11-21 05:29:39 +0100 <geekosaur> Zemyla, I actually started work on that (adding bsdmp as a backend), but decided it would be easier to port its multiplication optimizations than to work around its violation of ghc bignum invariants
2025-11-21 05:29:33 +0100 <EvanR> 0 / 0 = 0
2025-11-21 05:29:28 +0100 <jreicher> EvanR what's the nonsense result?
2025-11-21 05:29:25 +0100 <EvanR> if you are going to make it total make it total really and define all behavior
2025-11-21 05:29:14 +0100Dhark8(~Shark8@c-174-56-102-109.hsd1.nm.comcast.net)
2025-11-21 05:29:01 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-21 05:28:59 +0100 <EvanR> it is "interesting" that you would mix a nonsense result on one hand with undefined behavior on the other
2025-11-21 05:28:52 +0100 <haskellbridge> <Zemyla> x / 0 should be 0 if division is total, because 0 is the pseudoinverse of zero. The pseudoinverse of x is y such that xyx = x and yxy = y.
2025-11-21 05:27:47 +0100 <chromoblob> i mean, in integer division
2025-11-21 05:27:29 +0100 <chromoblob> AArch64 gives you 0 as result of division by zero. i also wanted to make it like this in my language (because dividing 0 by anything gives 0, so 0 / 0 should be 0 too, and since x / 0 for x ≠ 0 is undefined, might as well just check for dividend = 0, regarding other cases as UB)
2025-11-21 05:24:01 +0100 <fgarcia> :D
2025-11-21 05:22:39 +0100 <EvanR> Divide by zero -- You can't divide by zero on a computer. Some kind of math thing. Don't worry too much about understanding why. Just don't do it. (EXAPUNKS zine 1 page 12)
2025-11-21 05:20:45 +0100Googulator96(~Googulato@2a01-036d-0106-0231-4475-80b4-5cdc-43d6.pool6.digikabel.hu) (Quit: Client closed)
2025-11-21 05:20:44 +0100Googulator46(~Googulato@2a01-036d-0106-0231-4475-80b4-5cdc-43d6.pool6.digikabel.hu)