Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
VikingofRock
Aug 24, 2008




my friends have you heard the good news about our lord and savior posits?

Adbot
ADBOT LOVES YOU

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



rjmccall posted:

cross-posting from the buttcoin thread:

respect to the Thorne toe

BobHoward
Feb 13, 2012

The only thing white people deserve is a bullet to their empty skull

VikingofRock posted:

my friends have you heard the good news about our lord and savior posits?

oh is that dude still trying to push his bullshit?

Cybernetic Vermin
Apr 18, 2005

it is a good time for being on some bullshit in the area, as the ieee-754 hegemony is a fair bit weaker than it has been in a number of decades.

tef
May 30, 2004

-> some l-system crap ->

redleader posted:

floating point is a mistake and anyone who says otherwise is gaslighting you

floating point is great, actually

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

DELETE CASCADE posted:

good for video games tho

Video games would have been fine with massively parallel fixed point coprocessors. The thing that matters for games is pushing lots of operations, not the specifics of float which are frequently inconvenient.

BobHoward
Feb 13, 2012

The only thing white people deserve is a bullet to their empty skull

Cybernetic Vermin posted:

it is a good time for being on some bullshit in the area, as the ieee-754 hegemony is a fair bit weaker than it has been in a number of decades.

in what way is it weaker? the most popular "non-ieee" format i've heard of is bfloat16, and i put scarequotes on that because it's literally 32-bit ieee-754 with fewer mantissa and exponent bits

the only real non-754 motion i'm aware of (and by "real" i mean actually generating hardware implementations) is that some ML applications want 8-bit (or even smaller) floats and 754-style floats have problems scaling down to so few bits

i don't think that's going to scale back up and take anything over though, it's just ML folks being willing to live with a very tailored and limited numeric format which doesn't make much sense outside their problem domain

the unum / posit guy is a crank who's intensely jealous of william kahan, the guy who led the ieee-754 effort. unfortunately for his crusade to discredit kahan and put himself on the floating point throne, posits are shite

BobHoward fucked around with this message at 00:06 on Oct 23, 2023

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

BobHoward posted:

in what way is it weaker? the most popular "non-ieee" format i've heard of is bfloat16, and i put scarequotes on that because it's literally 32-bit ieee-754 with fewer mantissa and exponent bits

just fewer mantissa bits, the whole point is it’s a much less precise float and has the same exponent range

redleader
Aug 18, 2005

Engage according to operational parameters
implement arbitrary precision math in silicon or get the hell out of my fab

pseudorandom name
May 6, 2007

redleader posted:

implement arbitrary precision math in silicon or get the hell out of my fab

god gave you ADC and SBB

Zlodo
Nov 25, 2006

leper khan posted:

Video games would have been fine with massively parallel fixed point coprocessors. The thing that matters for games is pushing lots of operations, not the specifics of float which are frequently inconvenient.

Urgh no thanks i worked on playstation 1 and nintendo ds games and fixed point was a pita

I prefer floats, pitfalls warts and all

Ralith
Jan 12, 2011

I see a ship in the harbor
I can and shall obey
But if it wasn't for your misfortune
I'd be a heavenly person today
Yeah, the only folks who think simulating a game world with fixed point makes anything easier are those who haven't tried. Not needing to separately reason about the useful range and potentially need to adjust the representation of every single intermediate result is actually amazing.

tef
May 30, 2004

-> some l-system crap ->
see, like, that's the thing about floating point, it's better than what people try to replace it with

for ex:

people get mad about negative zero, but that's because they think of floating point as "exact numbers" over "approximate numbers after rounding". in reality, -0 is "a very small negative number that's effectively zero" much in the same way +0 is "a very small number that's effectively zero", and that's why they're different. sign preservation is useful

people get mad about NaN, and i am sympathetic, but there is a real use. if you're doing a big rear end calculation, you don't want to do error checking after every operation. it makes it hard to do pipelining or superscalar stuff or whatever the kids are into these days, but in more practical terms: error checking after every arithmetic op greatly inflates the size of your program and sabotages the speed. therefore, floating point has an error value, NaN, and just to ensure that "f(x) == f(y)" doesn't accidentally do the right thing, let's make it so one error can never equal another.

then comes subnormal and gradual underflow. if you ask me, this is the neatest trick that floating point handles. when you're storing a number as a float, you could represent the same number in different ways, like 10 as 100 ** -1 or 10 ** 1, and so floating point specifies that all numbers have a singular standard form. floating point then goes onto say "actually, here are some not normal ones, just so we can extend the range of precision". it's wringing out all the last drops of precision and it's ingenious

if there's any real improvement to be made for floating point, it's to have a decimal coded mantissa. not for any real accuracy or precision, but because it'll be a little more humane when 0.1+0.2 == 0.3

tef
May 30, 2004

-> some l-system crap ->
numbers are just cursed, floating point's just a little bit more obviously so

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
i remember java3d had this notion of arbitary-precision origins that let you just use regular floats associated with that origin and retain as much resolution as you liked to because you could provision an origin whereever you wanted one, and you only paid a big price on operations when you had to do math with objects in different origin spaces and that always seemed like it'd be a good solution for somebodies problem.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
idk if that was a common solution to things or what but it always seemed neat to me.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Ralith posted:

Yeah, the only folks who think simulating a game world with fixed point makes anything easier are those who haven't tried. Not needing to separately reason about the useful range and potentially need to adjust the representation of every single intermediate result is actually amazing.

Depends what problems you're solving for.

BobHoward
Feb 13, 2012

The only thing white people deserve is a bullet to their empty skull

tef posted:

if there's any real improvement to be made for floating point, it's to have a decimal coded mantissa. not for any real accuracy or precision, but because it'll be a little more humane when 0.1+0.2 == 0.3

herman hollerith's gang has your back, they got a standard for decimal floating point into ieee 754-2008

you have to buy ibm mainframe hardware and operating systems to actually use it, but it's out there

Doom Mathematic
Sep 2, 2008
Adding a second sign bit so I can do complex arithmetic more easily. Four zeroes :cool:

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

DB/2 does has a decimal type that uses the POWER instructions where available, and IBM had the Rexx guy (Mike Cowlishaw, I think) trying to jam decimal math into JavaScript for more than a decade, IIRC. they really like their decimal over there

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
decimal, from the roots deci- meaning "base 10" and -mal meaning "bad" or "wrong"

VikingofRock
Aug 24, 2008




I just wish floats were associative, and that it was a little easier to do stuff like summing products without losing precision. For all that I was joking about posits earlier, I actually do think the general goals of unums / posits are pretty admirable.

I don't really have strong opinions on floating infinities, subnormals, NaN, or negative zero, although I do wish some of the comparison operators involving them were a little less tricky.

I once had a hell of a bug involving negative zero though, where a serialization library assumed that if a == b (and they were both floats), then their serializations would also be equal. But it serialized negative zero differently than positive zero (thus violating its own internal assumptions), and it had some very weird behavior because of that.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

NaNs are great because they let you smuggle data in floating point values, and that is a very fun thing to do

necrotic
Aug 2, 2005
I owe my brother big time for this!
NaN packing blew my mind when I first learned about it.

redleader
Aug 18, 2005

Engage according to operational parameters
i just think floating point should be one of those things you opt into, instead of being e.g. the only number type available in the world's most popular plang (bigint doesn't count)

Athas
Aug 6, 2007

fuck that joker
What should the default number type be?

Armitag3
Mar 15, 2020

Forget it Jake, it's cybertown.


Athas posted:

What should the default number type be?

going up

necrotic
Aug 2, 2005
I owe my brother big time for this!

redleader posted:

i just think floating point should be one of those things you opt into, instead of being e.g. the only number type available in the world's most popular plang (bigint doesn't count)

plenty of languages let you pick your number type. even ruby of all languages has separate Integer and Float types and even eventually gained a Decimal type to use instead of Float if you want.

does bigint not count since it’s only integers?

tef
May 30, 2004

-> some l-system crap ->

rotor posted:

decimal, from the roots deci- meaning "base 10" and -mal meaning "bad" or "wrong"

there's like one, maybe two good usecases for decimal outside of just "humans expect math to work this way" like money

one of them is "with binary coded decimal, it's way easier to translate game scores into tile offsets", at least on dmg era gameboys

and the other is pretty much the same deal, like facebook found that itoa was taking up a disproportionate amount of time in logging

akadajet
Sep 14, 2003


"int NOT NULL AUTO_INCREMENT" it is, then!

Doom Mathematic
Sep 2, 2008

Athas posted:

What should the default number type be?

bool.

tef
May 30, 2004

-> some l-system crap ->
there's this long post about posits being a scam

https://marc-b-reynolds.github.io/math/2019/02/06/Posit1.html

anyway somewhere halfway through it, there's this graph of relative error and posits do not look great

i'd attach it but i'm too lazy to resize a screenshot to make it upload

Zlodo
Nov 25, 2006

redleader posted:

i just think floating point should be one of those things you opt into, instead of being e.g. the only number type available in the world's most popular plang (bigint doesn't count)

you can opt out of using a lovely plang

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
no i can't, it runs on every loving webpage i visit

ynohtna
Feb 16, 2007

backwoods compatible
Illegal Hen

Athas posted:

What should the default number type be?

s-expression

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Athas posted:

What should the default number type be?

string imo

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
binary coded decimal :getin:

mystes
May 31, 2006

Athas posted:

What should the default number type be?
enum where the possible values are 0 through 9

VikingofRock
Aug 24, 2008




Athas posted:

What should the default number type be?

a symbolic expression, which is then computed to arbitrary precision when it's time to output the results

Adbot
ADBOT LOVES YOU

necrotic
Aug 2, 2005
I owe my brother big time for this!

DELETE CASCADE posted:

no i can't, it runs on every loving webpage i visit

you can disable javascript if it really bothers you

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply