Follow

do you have opinions about

*whispers*: negative zero

@cstanhope have you ever had to spend some time exploring this thing called "IEEE 754"?

I think that's when people start to develop opinions

@cwebber Yeah, I have, but I guess negative zero hasn't been too troubling to me in my work. NaN is usually the one that catches me off guard every now and then. "Everything was fine up to here, and then it was all NaNs after that. Oh no..." ;)

@cstanhope @cwebber my favorite bug I ever wrote favorited a dollar amount "$In,fin,ity.NaN". It made me so happy I didn't want to fix it

@cwebber I want an IEEE spec that includes all the orders of infinities, negative and positive are not good enough

also i heard on the internet the other day that trees aren't real

@joeyh more seriously: is binary real? yes or no only, please

@joeyh btw I finally read about Dec64 and I have to say it's pretty neat but also probably a thing we will never get to use crockford.com/dec64.html

@cwebber "There are 255 possible representations of zero. They are all considered to be equal."

OOOHHH YEEAAAHH

@joeyh you dawg I heard you liked two representations of zero so

@cwebber I had one thermometer that would display -0°C sometimes…

@cwebber

> When an arithmetic operation has an input with an exponent of -128, the result will be nan. Applications are free to use the coefficient as they wish when the exponent is -128, since in that case the coefficient has no arithmetic significance. One possible use is to store object pointers in the coefficient.

👀

@rysiek @cwebber i'm laughing so hard this is the worst idea i've ever heard

@marie_joseph @rysiek I suspect that comment in the document might be a joke, but who knows.

@marie_joseph @rysiek @cwebber ... This is what pretty much every JavaScript implementation does ...

@cwebber @marie_joseph @rysiek yeah, variants are implemented by boxing non numbers inside the spare bits of NaNs. You get 52 bits or something like that there?

@rysiek @cwebber @marie_joseph it's basically the One Weird Trick to high performance dynamic language implementations

You stuff your pointers into NANs or you go slow

@erincandescent @rysiek @cwebber @marie_joseph What I'm getting here is that my JS code will run faster if I make it generate more NaNs

@seachaint @erincandescent @cwebber @marie_joseph it's called "NaN mining", or "NaNing". If you're lucky you'll get some "NaN Financial Tokens", or "NFTs". 👍

@rysiek @erincandescent @cwebber @marie_joseph We all remember the landmark animation demo that pushed faster framerates than anything previously shared on the early 'net, "NaNcat"

@cwebber I guess another way to put it is: "Anything is a number if you're brave enough".

@rysiek @cwebber That reminded me Urbit’s Nock and Hoon documentation, where they construct everything from basic concepts like an atom (an arbitrarily large number) and a cell (an ordered pair).

@cwebber If minus means below zero than negative zero is meaningless

@cwebber @Gargron if you ever have a therapist that asks how IEEE specs make you feel, time to get a new therapist. 😆

@cwebber

isn't the Negative Zero the place where the Mathematician Council sends mathematicians they decide are just too evil-wizardy even for Mathematics

@cwebber do you mean the social media app? I just stumbled upon it the other day in the App Store.

Sign in to participate in the conversation
Octodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!