egg|nomz|egg changed the topic of #kspacademia to: https://gist.github.com/pdn4kd/164b9b85435d87afbec0c3a7e69d3e6d | Dogs are cats. Spiders are cat interferometers. | Космизм сегодня! | Document well, for tomorrow you may get mauled by a ネコバス. | <UmbralRaptor> egg|nomz|egg: generally if your eyes are dewing over, that's not the weather. | <ferram4> I shall beat my problems to death with an engineer.
<kmath>
<TheTylest> Your Graduate Student(TM) must be placed in sleep mode between uses. Failure to do so will violate the 6-year warra… https://t.co/0QjLAuWYwI
<bofh>
UmbralRaptor: chaotic stupid is easily the most relatable of those for me, tbh
<egg|zzz|egg>
bofh: do you know of any implementation of rootn?
<bofh>
egg|zzz|egg: that isn't just equivalent to an implementation of exp(log(x)/n)? no, because how else would you do it? I guess Newton/Halley, but you lose a lot of the perf you get in those if you can't simplify the expressions a priori.
<egg|zzz|egg>
bofh: I wonder whether it's possible to make a good rootn templatized on n (so n statically known, but arbitrary)
<egg|zzz|egg>
bofh: unfortunately I think the test suite for libmcr has vanished
<bofh>
egg|zzz|egg: somewhat, I think. your starting guess is equivalent to grabbing the bit representation of your float (I'll use single prec here as I'm more familiar with it, this is all analogous for doubles), then dividing the exponent as an integer, adding the bias correction, restoring it, possibly multiplying by a correction for the fractional part of the exponent, then doing 2-5 Newton or Halley
<bofh>
iterates.
<egg|zzz|egg>
bofh: also what do you do if you want it correctly-rounded :-p
<kmath>
<FioraAeterna> @f1ac5 there's a few other possibilities! ⏎ ⏎ 1. you have a fetish for floating point ⏎ 2. you need predictable wrongnes… https://t.co/1lxO0i9PIk
<bofh>
egg|zzz|egg: would double-double on the last Newton iterate suffice for that?
<bofh>
"Halley's method can be viewed as exactly finding the roots of a linear-over-linear Padé approximation to the function" oh well that's an interesting way of looking at it.
<bofh>
this reminds me of the BFGS (Broyden-Fletcher-Goldfarb-Shanno) quasi-Newton method in optimization, except, no joke, there the method was elucidated pretty much concurrently (like, within the span of 1.5 years), independently, starting with different approaches.
<bofh>
At some point I need to write a blog post going into the details of how, it's kinda hilarious and also fascinating.
<egg|zzz|egg>
bofh: s/blog post/article in ANBO letters/
<Qboid>
egg|zzz|egg thinks bofh meant to say: At some point I need to write a article in ANBO letters going into the details of how, it's kinda hilarious and also fascinating.
<egg|zzz|egg>
(clearly we need to make ANBO letters a thing :-p)
<bofh>
rofl, not within the span of 1.5 years, all 4 papers are out within months of each other in 1970.
<bofh>
(the last one of those is hilarious, what happened is Paul Kettler wrote an article extending the DFP update and Shanno was the *referee* for the journal who while reviewing it went "wait a second, this can be simplified and dramatically improved", sent *that* article off to someone else to review, then they got published literally one after the other in the same journal rofl)
<bofh>
egg|zzz|egg: yep, lol.
Profound has joined #kspacademia
<UmbralRaptor>
!u 🔩
<Qboid>
U+1F529 NUT AND BOLT (🔩)
<UmbralRaptor>
!wpn Profound
* Qboid
gives Profound a Brand New Photoneutronic Engine
<whitequark>
!wpn egg
* Qboid
gives egg a weak quokka
<whitequark>
!wpn bofh
* Qboid
gives bofh a descriptive photoresistor
<egg|zzz|egg>
!wpn whitequark
* Qboid
gives whitequark a ſtabby smoked Laplacian/hexahexaflexagon hybrid
* Qboid
gives icefire a pronominal morphism which vaguely resembles a distribution
<icefire>
えっ?
<icefire>
oh, well thats a bug
<egg|zzz|egg>
!u えっ
<Qboid>
U+3048 HIRAGANA LETTER E (え)
<Qboid>
U+3063 HIRAGANA LETTER SMALL TU (っ)
<egg|zzz|egg>
!wpn bofh
* Qboid
gives bofh an asymmetric adjective which vaguely resembles a fibre
<egg|zzz|egg>
!wpn atlas
* Qboid
gives atlas a category which strongly resembles a tarrasque
kmath has joined #kspacademia
kmath has quit [Remote host closed the connection]
kmath has joined #kspacademia
Snoozee is now known as Majiir
<Majiir>
!wpn egg|zzz|egg
* Qboid
gives egg|zzz|egg a Kerr hyperbola
<egg|zzz|egg>
!wpn Majiir
* Qboid
gives Majiir a long-range pion/rocket hybrid
<egg|zzz|egg>
!wpn котя
* Qboid
gives котя a Bernoulli equivalence
StCypher has joined #kspacademia
<egg|zzz|egg>
!acr -add:GVFS Git Virtual File System
<Qboid>
egg|zzz|egg: I added the explanation for this acronym.
<bofh>
iximeow: so leaving outside the question of why dear gods are you working with x87, uh, fnstenv stores a *different* value for the control word than fnstcw does, if you execute both right after the other?
<kmath>
<iximeow> @willkirkby @mntmn very frustrated that fstenv/fldenv works but the control word-specific instructions seem to not.… https://t.co/VfxfT0p85T
UmbralRaptor has joined #kspacademia
<iximeow>
i'm surprised/irritated that clang and gcc both opt to do all that load/store instead of just set the rounding mode properly
<iximeow>
but then i tried to do it and it didn't work, so i'm irritated at three things now
UmbralRaptop has quit [Ping timeout: 186 seconds]
APlayer has quit [Ping timeout: 383 seconds]
<iximeow>
(also REALLY confused by gcc throwing +4 offsets in, seemingly arbitrarily, need to go figure out what's going on with that too)
<bofh>
iximeow: what are you doing that needs both x87 and rounding mode twiddling anyhow?
<iximeow>
scroll like three tweets up in that thread :P clang inserts a pile of fstp/fld to force conversion to 24-bit-mantissa floats, to implement the C code's `float` semantics
<iximeow>
and that's just uh.. nasty, imo
<iximeow>
in 2018 i know no one cares about x87 perf, but ewwwwww
<bofh>
...is it seriously doing a save-and-reset of the fp env between EVERY fadd?!?
<iximeow>
only st0!
<iximeow>
but YES
<bofh>
the whole fucking point of global state is that it's global >_>
<bofh>
fun fact: fldenv/fldcw, by necessity, will do a full x87 pipeline flush.
<egg|zzz|egg>
iximeow: amusingly, forcing rounding all the time doesn't actually give you binary32 because double rounding :D
<egg|zzz|egg>
aka you have only one actual format with x87 and that's 80-bit extended precision :-p
<iximeow>
egg|zzz|egg: i thought state for all the st* were rounded to $WHATEVER_FP_CONTROL_WORD_SAYS on every operation?
<iximeow>
what do the precision contol bits ... actually control then?
* egg|zzz|egg
forwards the question to bofh who knows better
<Qboid>
[#303] title: x87 floating point | With Intel's Quark architecture reportedly lacking SSE units, there is a possibility that an x87-based implementation of WebAssembly may be needed. This is complicated by the fact that x87 has no convenient way to deliver correctly-rounded double-precision floating point results in all cases. Both the Precision Control field, and the 64-bit store instruction,
<egg|zzz|egg>
"It can be shown (left as an exercise for the reader) that the correctly-rounded 80-bit result of fsqrt subsequently rounded to 32-bit single precision is also the correctly-rounded single-precision square root.
<egg|zzz|egg>
"
<egg|zzz|egg>
!wpn bofh
* Qboid
gives bofh a Hodge-Arakelov polynomial
<bofh>
thank
<bofh>
wait, Intel Quark lacks SSE but has x87? Talk about bass-fucking-ackwards.
<egg|zzz|egg>
bofh: I am having trouble parsing this, are you missing a hyphen?
<bofh>
egg|zzz|egg: ?
<egg|zzz|egg>
bass-fucking-ackwards
<bofh>
where would the missing hyphen go?
<bofh>
like it's a syllable swap of ass-fucking-backwards.
<egg|zzz|egg>
after the b? otherwise eliding the part between hypen yields bassackwards
<egg|zzz|egg>
oh, ok but then don't you have one hyphen too many for "ass-fucking backwards"?
<bofh>
I suppose, but it feels weird to have just one hyphen in there. <shrug>
<egg|zzz|egg>
whitequark: hm, so you can't use a high-oxygen environment to raise larger moths for your cat,
<UmbralRaptor>
Will kotya eat dragonflies?
<UmbralRaptor>
Note to self: if you miss the last bus, it's a 55 minute walk to your apartment.
<egg|zzz|egg>
UmbralRaptor: how far is it?
<UmbralRaptor>
About 3 miles?
<UmbralRaptor>
Uh, ~5 km.
<UmbralRaptor>
The above time is because I just did so.
<egg|zzz|egg>
UmbralRaptor: hm, so about same as ANBO to the next village
* egg|zzz|egg
did that last time because some @$#$#@! delivery service delivered to the florist 5 km away instead of even trying to deliver it
<egg|zzz|egg>
(yes it might be a good idea to learn to drive eventually)
<UmbralRaptor>
Also, </3 buses that end service at 17:00
<bofh>
Yep, those are hot bullshit.
<UmbralRaptor>
Wait, 5 km is a different town? o_O
<UmbralRaptor>
This was entirely within Fairfax.
<egg|zzz|egg>
UmbralRaptor: we're talking about ANBO here
<egg|zzz|egg>
that's not in a city
<egg|zzz|egg>
UmbralRaptor: tbh ANBO is maybe 1 km from the actual edge of the nearest village, and then the package got delivered to the next village over
<UmbralRaptor>
hrm
Majiir is now known as Snoozee
<egg|zzz|egg>
UmbralRaptor: smol towns
<iximeow>
egg|zzz|egg: "Both the Precision Control field, and the 64-bit store instruction, deliver results rounded differently than they would be in a straight 64-bit computation."
* iximeow
scream
<egg|zzz|egg>
iximeow: I mean 64-bit store is obvious, it's double rounding
<egg|zzz|egg>
iximeow: precision control apparently doesn't change the exponent width and other things, so that's fun?
<iximeow>
oh, yes
<egg|zzz|egg>
also doesn't appear to affect everything :D
<iximeow>
it only controls the mantissa
<egg|zzz|egg>
:-p
<iximeow>
now, not affecting everything, that's mentally hurtful
<egg|zzz|egg>
!wpn bofh
* Qboid
gives bofh a Колмогоров Spitfire
<iximeow>
!wpn bofh
* Qboid
gives bofh an insecure quolocity-like baton