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> <vesselofstar> happy trans day of visibility y'all https://t.co/5M6jCzceZG
<egg> !wpn bofh
* Qboid gives bofh a killing guillotine
<egg> um
<whitequark> that's a weapon alright
* bofh stuffs some US senators into it
<egg> bofh: so I wonder whether there are higher-order methods that have an effect on the relative error whose derivative does not vanish except at 0
<bofh> I don't think so, why would that be the case?
<egg> bofh: well it's the case of Newton and Halley
<egg> so maybe one can craft other methods like that?
<bofh> Hmm. Point. Hm. Not sure. Still poring over the result from approximate_rootn.pdf in the hopes of trying to figure out why the magic constants are linear to a huge degree
<egg> if it's the case it means that the singular points of the relative error after iteration are at the same places as the extrema of the relative error before iterating, which makes it easy to do a γ optimization
e_14159 has quit [Ping timeout: 190 seconds]
Profound has joined #kspacademia
e_14159 has joined #kspacademia
Snoozee is now known as Majiir
<egg|cell|egg> !Wpn bofh
* Qboid gives bofh a pie squirrel
* egg|cell|egg zzz
<UmbralRaptor> !choose paperwork|research|study|other
<Qboid> UmbralRaptor: Your options are: paperwork, research, study, other. My choice: research
* UmbralRaptor chooses paperwork.
<UmbralRaptor> With physical paper, because it's somehow still the XXth century.
<Majiir> !wpn egg|cell|egg
* Qboid gives egg|cell|egg a stern resistor
<Majiir> Not a weapon, but a neat item. "You may *not* pass through here with such high voltage. Simmer down, young electron."
<UmbralRaptor> whitequark: so, I had to close a checking account. This entailed typing up a "formal statement" (no, they didn't have templates), printing it out, signing, and mailing the statement to their office. They then mailed me a check with the remaining funds.
Majiir is now known as Snoozee
UmbralRaptor has quit [Remote host closed the connection]
UmbralRaptop has joined #kspacademia
<UmbralRaptop> ;c 3500/10672
<kmath> UmbralRaptop: 0.327961019490255
<UmbralRaptop> ;c 3500/18e3
<kmath> UmbralRaptop: 0.194444444444444
<UmbralRaptop> ;c 4500/18e3
<kmath> UmbralRaptop: 0.25
<whitequark> UmbralRaptop: lol
<whitequark> I bet convincing my bank that my name and gender have changed will be "fun"
<whitequark> especially doing that cross-country
<UmbralRaptop> Yeah, that'll be Fun.
<UmbralRaptop> Bonus Fun if your name breaks assumptions about how many a person has (mine do). Also, orthography and/or unicode shenanigans?
<whitequark> oh lol no
<whitequark> I'm selecting my new name algorithmically specifically to avoid that
* UmbralRaptop imagines the new name looking like a password for some reason.
<kmath> <jccwrt> I might have found the #Tiangong1 reentry in Himawari-8 images...
StCypher has quit [Ping timeout: 182 seconds]
<egg|cell|egg> !Wpn bofh
* Qboid gives bofh a Peregrine apple-space-like metric
<egg> !u フラクタル
<Qboid> U+30D5 KATAKANA LETTER HU (フ)
<Qboid> U+30E9 KATAKANA LETTER RA (ラ)
<Qboid> U+30AF KATAKANA LETTER KU (ク)
<Qboid> U+30BF KATAKANA LETTER TA (タ)
<Qboid> U+30EB KATAKANA LETTER RU (ル)
<egg> !wpn whitequark
* Qboid gives whitequark a deuterium action with a snail attachment
Guest has joined #kspacademia
Profound has quit [Ping timeout: 383 seconds]
<kmath> <whitequark> https://t.co/jSmmXQdRfy
tawny- has quit [Ping timeout: 383 seconds]
<egg> bofh: so, ran some benchmarks, predictably the cat's cbrt (or rather the arm one which is written in C but uses the cat's polynomial) is much faster than Kahan's default approach which assumes division isn't much costlier
<egg> bofh: Kahan does mention computing rootn(y, -3), but doesn't do the error analysis for it and only suggests a 2nd order iteration
<egg> bofh: but I would guess the z * z * y would screw with any attempt at getting the last few ULPs?
<egg> yeah Halley involves a division so that's a mess
<egg> bofh: and since you need four rounds of Newton in binary64 it ends up being slower than the method with divisions, let alone the cat's polynomial
<egg> ---------------------------------------------------------
<egg> Benchmark Time CPU Iterations
<egg> ---------------------------------------------------------
<egg> BM_AtlasCbrt 24808 ns 24102 ns 27876 +1.00000000000000000e+00; ∛2 = +1.25992104989487319e+00
<egg> BM_KahanCbrt 35135 ns 32959 ns 21333 +1.00000000000000000e+00; ∛2 = +1.25992104989487319e+00
<egg> BM_KahanNoDivCbrt 41263 ns 40806 ns 17231 +1.00000000000000000e+00; ∛2 = +1.25992104989487297e+00
<egg> bofh: ^
<egg> bofh: phl tells me that back when he was writing Sqrt for Apex's Ada.Numerics the tradeoff was the same so he went with remezed polynomials (apparently he managed to find magic endpoints for his polynomials so that the error was 0,501 ULPs or so)
<egg> bofh: those tradeoffs move back and forth as the cat says https://twitter.com/stephentyrone/status/891326241663594496
<kmath> <stephentyrone> @kittenpies3 mostly went out of fashion when HW multiplication became fast. Expect them to be more widely used agai… https://t.co/aFtKyzvDAz
awang has joined #kspacademia
<egg> awang!
<egg> awang: RSS got released
APlayer has joined #kspacademia
<awang> \o
<awang> Sorry, it's been one heck of a weekend
<awang> Just worked my way through GH notifications
<awang> Going through scrollback now
<awang> Yay, a *real* optional implementation :P
<awang> Was MSVC unable to compile it earlier?
<APlayer> Hey there!
<awang> Hello!
<egg> awang: since VS2017 we have <optional> in msvc
<egg> awang: same on ubuntu bionic
<egg> awang: the curl is for mac, where there's only <experimental/optional> which is old and shitty
<egg> so we just fetch a fresh one :-p
<awang> egg: Ah, makes sense
<awang> I remember having fun with that when unwittingly switching between real Clang and Apple Clang
<awang> egg: Also, I agree on the lunar release cycle
<awang> Release EVERYTHING at once
<egg> !csharp bofhtime()
<Qboid> 2018-04-02T08:10:57,105
<egg> yay
<awang> btw, do you still need a 1.4.2 compile for Principia?
<egg> awang: oh yeah we need to upgrade that at some point yes
<egg> awang: probably still need 1.4.1 just in case (but maybe with a deprecation message), so that means yet another config
<egg> *sobbing* four release configurations
<egg> though we're working to get rid of 1.2.2 so there's that
<egg> bofh: is bofhtime() accurate
<awang> Oh boy
<awang> Maybe release 1.4.2 and get rid of 1.2.2 in the same release?
<egg> nah we want to at least have one release where we still release but with a deprecation message
<awang> Ah
<egg> (so that it says upgrade KSP rather than upgrade principia)
<awang> Fair enough
<egg> awang: not sure whether it would end up being full moons or new moons for RealWhatever
<egg> if it's full moons it would nicely leapfrog principia
<kmath> <sigfig> u ever spend a few hours calculating a quantity you know to be zero by definition just to make sure the world hasnt collapsed beneath u
<awang> egg: I vote we split RealWhatever into three parts, and release on the full moon and quarter moons too :P
tawny- has joined #kspacademia
<UmbralRaptop> full/new, and apogee/perigee
<egg> UmbralRaptop: aaaaaa
<egg> UmbralRaptop: what about the nodes,
<egg> !wpn UmbralRaptop
* Qboid gives UmbralRaptop a split sturgeon
<egg> !wpn awang
* Qboid gives awang a furious-sounding csh-compatible abstraction
<egg> !wpn ferram4
* Qboid gives ferram4 a mu tesseract
<egg> !wpn whitequark
* Qboid gives whitequark a metabotropic squirrel/king hybrid
<awang> !u ï
<Qboid> U+00EF LATIN SMALL LETTER I WITH DIAERESIS (ï)
<egg> all hail the metabotropic squirrel king
<UmbralRaptop> egg: add those once the project is split into more parts?
<egg> awang: I'm really impressed at how promptly the MSVC devs react to our bug reports
<awang> UmbralRaptop: Does that mean major releases fall on supermoons?
<egg> nah principia has no concept of major of minor releases
<awang> egg: But the other ones do
<egg> awang: hm
<egg> clearly they will lose that concept and only have lunatic releases
<UmbralRaptop> Drop version support on blood moons?
<egg> !csharp bofhtime()
<Qboid> 2018-04-02T08:51:59,607
<awang> egg: I mean, compiler weirdness is pretty important
<awang> And the reports are probably better than most of the stuff they get
<egg> awang: now it's very usable
<awang> UmbralRaptop: What should happen for blue moons?
<egg> we still have moar bug reports coming up though
<egg> we have an issue with template variables
<awang> egg: If I ever try making a compiler, I'm using Principia in the test suite :P
<egg> translate principia to whatever language and use it as the test suite*
<egg> *: language must have a Turing-complete type system
<awang> s/translate/cross-compile
<Qboid> awang meant to say: I like how Chrome asked to cross-compile that fortran file
<awang> Um
<awang> ...That was definitely not what I expected
<UmbralRaptop> egg: so, PostScript?
<egg> is that bofh's italian FORTRAN
<awang> egg: Principia in Idris
<egg> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
<awang> Yeah, I think it was the Italian Fortran
Guest has quit [Quit: ( www.nnscript.com :: NoNameScript 4.22 :: www.esnation.com )]
tawny- has quit [Ping timeout: 383 seconds]
Norgg has quit [Quit: Changing server]
<egg> !wpn awang
* Qboid gives awang a Lyman excess
<egg> !wpn bofh
* Qboid gives bofh a Maxwell-Boltzmann Laplacian
<kmath> <whitequark> https://t.co/jSmmXQdRfy
<egg> also smol cat
<egg> whitequark: do the kittens have names? or indices?
<UmbralRaptop> cat tensor?
<egg> whitequark: there seems to be something in котя's hair, did she get wounded or something?
<UmbralRaptop> GPI?
<UmbralRaptop> !acr -add:GPI Gemini Planet Imager (pronounced gee-π)
<Qboid> UmbralRaptop: I added the explanation for this acronym.
<egg> UmbralRaptop: ... how do you pronounce gee-π
<UmbralRaptop> uh
<APlayer> !see Ellied
<APlayer> !seen Ellied
<Qboid> APlayer: I haven't seen the user Ellied yet.
<Ellied> ahoy
<APlayer> Bad bot
<APlayer> Hi there, Ellied
<Ellied> hi
<APlayer> Do you have a few minutes to spare?
<Ellied> a few, yeah
<APlayer> If you are busy, I can ask later, because I have no idea how long it will take
<APlayer> Basically, I have trouble interfacing a sensor with an Arduino through I2C and no idea how to fix it
<Qboid> [#2444] title: curl: add support for a "--rootme" command line parameter | Passing this parameter will download the specified URLs and execute them via `sudo(8)` using `sh(1)`, saving countless keystrokes when installing modern software.... | https://github.com/curl/curl/issues/2444
<APlayer> It's not the Hardware, because I am certain it works, including the connections. But the sensor is not responding at all to I2C and I am not sure how to proceed looking for the error
UmbralRaptop has quit [Quit: Bye]
<APlayer> Also, I have an Oscilloscope on hand, if I can use it in any way
UmbralRaptop has joined #kspacademia
<UmbralRaptop> This is an argument against 2FA, right? https://photos.app.goo.gl/oohH8XszcNMPwuUR2
<Ellied> hrm, I haven't actually used I2C before but I have a basic understanding of how it works
<Ellied> APlayer: first thing to try would be to make sure that the clock line (SCL) is actually producing a clock and the data line (SDA) is actually showing data
<APlayer> Here is what I asked initially, because it has more information: "So, I have an Arduino Pro Mini and a GY-91 sensor (https://i.ebayimg.com/images/g/UJ4AAOSwjkVZg4DO/s-l1600.jpg). They should communicate via I2C, but they don't. In tracking down the problem, I found out that Arduino's Wire library hangs the script on calling Wire.endTransmission().
<APlayer> Inspecting the hardware, it seems to be fine, both components have lit LEDs (I guess they are powered properly and not fried, then), SCL is connected to Arduino pin A5, SDA is connected to Arduino pin A4 and both lines have a 4.7 kOhm pull-up to 5V. And that's basically where I am stuck, because I have no idea what to do next - how can I troubleshoot this? Or do you already have an idea of what might be going
<APlayer> on?"
<Ellied> what is this sensor measuring?
<APlayer> Gyroscope, Accelerometer, Magnetometer
<APlayer> But it's not only sending no data, it's not responding to any calls at its adress at all
<APlayer> Let me see with the oscilloscope (let me also see if I can use the scope at all, heh)
<APlayer> Well, dammit
<APlayer> I am stupid
<APlayer> I found an I2C scan script which would scan for all possible I2C addresses and see if they respond
<APlayer> I forgot that the sensor is powered from a pin which I have to set high first and of course it did not respond. Setting the pin to high made it find them (the same board also has a barometer on it)
<APlayer> But I can't get the scope to show anything useful
<Ellied> ah yeah sensors need power
<Ellied> generally speaking anyway
<Ellied> what kind of scope are we talking about here? brand name/model number?
UmbralRaptop has quit [Remote host closed the connection]
<Ellied> ah, very minimal
<APlayer> I can see some sort of signal when the V/div is set to 0.1V, weirdly
<Ellied> probably noise
<Ellied> brb, gotta go between buildings
<APlayer> Not even
<APlayer> The noise is smaller
<APlayer> It's a clear, occasional drop to 0 V
UmbralRaptop has joined #kspacademia
<APlayer> Voltmeter says the line is at 4V rather than 5 (as opposed to 3.5 or so V shown by the scope, if I read that correctly
<APlayer> https://i.imgur.com/Qe6qGxF.jpg ignore the current Sec/div, the signal arrived at a setting of 2 sec/div and did not scale when I changed that
<APlayer> Well, forget the scope, I can't get it to work
<APlayer> The sensor does seem to report things, though
<APlayer> Not that those things are terribly correct, but it's something
<APlayer> (I removed the communication checks from the sketch)
<APlayer> The arduino tried to read some sort of "WHO_AM_I" register and would use its value to check if the communication was good. The value was incorrect, but the communication seems to work
<rqou> Ellied are you diodelass on Twitter?
<APlayer> Yes
<bofh> 11:44:19 <@egg> bofh: but I would guess the z * z * y would screw with any attempt at getting the last few ULPs?
<bofh> you'd need to do the last iteration I think in double-double (or at least part of the expression)
<bofh> 12:39:16 <@egg> bofh: those tradeoffs move back and forth as the cat says https://twitter.com/stephentyrone/status/891326241663594496
<kmath> <stephentyrone> @kittenpies3 mostly went out of fashion when HW multiplication became fast. Expect them to be more widely used agai… https://t.co/aFtKyzvDAz
<bofh> I doubt it ever will, there's a reason I avoid using Padé Approximants unless I'm working in the neighbourhood of a pole or a critical point (i.e. the Padé Approximant of Gamma(1+x), |x| < ~0.5 is much easier to get accurate than the minimax polynomial)
<bofh> 11:41:21 <@egg> bofh: so, ran some benchmarks, predictably the cat's cbrt (or rather the arm one which is written in C but uses the cat's polynomial)
<bofh> I am curious if there was a way to combine these two approaches, so you didn't need the gigantic table of mantissa values.
<egg|cell|egg> Meow
<bofh> (Also for rootn(x, -3), I really want to see how https://en.wikipedia.org/wiki/Muller%27s_method will compare against Newton, since I think the division there goes away as well)
<egg|cell|egg> What are your 3 points
<bofh> (The division in Halley's won't go away since in Halley you're finding roots of a linear/linear Padé Approximation to the function)
<bofh> That's the annoying bit, if it used *two* points it'd be perfect since you'd use initial and one round of Newton.
<bofh> But for three it'd be too slow in the binary64 case over 4x Newton to matter.
<bofh> Hm.
<egg|cell|egg> Clearly this just means we're back to the age of remezing all the things
<egg|cell|egg> And tweaking nodes to find ones that give you moar bits
<egg|cell|egg> !Wpn -add:adj Remez
<Qboid> egg|cell|egg: Adjective added!
<egg|cell|egg> Bofh: no news from the cat?
<bofh> I'm not *yet* convinced minimax polynomials alone are optimal, but I still need to look at some things. First I really want to actually find out what the periodicity in the Approximate rootn constant order graph is.
<bofh> egg|cell|egg: nope, but given https://twitter.com/stephentyrone/status/980611396420493314 it makes sense
<kmath> <stephentyrone> Current status: cooking Riley’s lunches for the week before leaving on a business trip tomorrow. ⏎ ⏎ Respect for singl… https://t.co/lCrYcJUsif
<egg|cell|egg> Hmmm but that's the human cooking, should leave free time to the cat
tawny- has joined #kspacademia
<UmbralRaptop> Presumably one measures food in gULPs?
<egg> bofh: have you reproduced that graph?
<egg> bofh: also have you done this already https://twitter.com/Zaikarion/status/973690462036004866
<kmath> <Zaikarion> @bofh453 Why do I have the sudden urge to write code with comments in Akkadian?
<bofh> egg: my Akkadian isn't good enough for that yet, sadly. I'll have to poke Zaikarion :P
<egg> bofh: have you managed to reproduce the γ(n) graph or should I add more details to that pdf
StCypher has joined #kspacademia
<bofh> egg: haven't yet tried, attempting now
<egg> bofh: so fwiw, all of the implementations mentioned above are better than the microsoft std::cbrt (probably not a fair comparison, I'm running the Kahan stuff without branches for rescaling and denormals)
<egg> ---------------------------------------------------------
<egg> Benchmark Time CPU Iterations
<egg> ---------------------------------------------------------
<egg> BM_KahanCbrt 34741 ns 35295 ns 20364 +1.00000000000000000e+00; ∛2 = +1.25992104989487319e+00
<egg> BM_AtlasCbrt 25239 ns 24850 ns 26408 +1.00000000000000000e+00; ∛2 = +1.25992104989487319e+00
<egg> BM_KahanNoDivCbrt 40705 ns 40806 ns 17231 +1.00000000000000000e+00; ∛2 = +1.25992104989487297e+00
<egg> BM_MicrosoftCbrt 65994 ns 64523 ns 8960 +1.00000000000000000e+00; ∛2 = +1.25992104989487297e+00
<bofh> ehh, those branches will be (hopefully) marked with unlikely branch hints, so should have negligible effect. I think. Still, am not surprised, MSVCRT's libm is far from fast (or in some cases, even accurate).
<egg> yeah true
<egg> bofh: also the cat is good as Fiora has told us many times
<bofh> Indeed, not surprised.
<awang> !u Θ
<Qboid> U+0398 GREEK CAPITAL LETTER THETA (Θ)
<egg> bofh: also, those are latency benchmarks (x = cbrt(x)), for 1000 cbrt + one FP add and one integer increment
<bofh> !u ᘛ⁐̤ᕐᐷ
<Qboid> U+161B CANADIAN SYLLABICS CARRIER JA (ᘛ)
<Qboid> U+2050 CLOSE UP (⁐)
<Qboid> U+0324 COMBINING DIAERESIS BELOW (◌̤)
<Qboid> U+1550 CANADIAN SYLLABICS R (ᕐ)
<Qboid> U+1437 CANADIAN SYLLABICS CARRIER HI (ᐷ)
<bofh> egg: interesting, I wonder how y = cbrt(x) with y not having a dependency chain on x (i.e. x is for instance rand() / (double)RAND_MAX) compares.
<egg> bofh: so fwiw the 10th order Householder method for cbrt maxes out the precision and the 9th order one comes close
<egg> (on the guess using the approximate rootn thing)
<bofh> How does the 9th order method compare with 4 Newton rounds in terms of perf?
<egg> well I'd have to do common subeggspression elimination on it
<egg> also I'm afraid to ask :-p
<bofh> why? :P
<bofh> (like the eggspression is so godawfully complicated iirc that I'd be *extremely* surprised if it's faster in any capacity)
<egg> yeah it's probably going to be silly slow
<egg> bofh: also it's not 4 rounds of newton, I'm doing it for the cbrt approach not the inverse cbrt
<bofh> oh, does cbrt require *less* rounds?
<egg> bofh: well it's more that if you're doing a division anyway there's no point going through the inverse cbrt path
<bofh> what? I was simply wondering how starting Kahan guess + enough order-2 Householder iterations to get 1ULP or better (which I think will be still 4) compares perf-wise to starting Kahan guess + 1 iteration of the order-9 or order-10 Householder method.
<bofh> :P
<bofh> ...WE JUST GOT ELEVEN CENTIMETERS OF SNOW WHY ARE WE ON TORNADO WATCH
<egg> bofh: if you go the inverse cbrt path you need to do your x * x * y at the end, losing ULPs; if you're paying the price of the expensive householder you might as well do it directly
<egg> also how do I horner/estrin a polynomial in 2 variables D:
<bofh> Yuck. Wait, what 2-var polynomial?
<egg> Ideally estrin we're dealing with high degree
<egg> bofh: so you have a giant rational function
<egg> 3 15 12 9 2 6 3 3 4 5
<egg> 9 x (x - y) (5 x + 98 x y + 323 x y + 256 x y + 46 x y + y )
<egg> 18 15 12 2 9 3 6 4 3 5 6
<egg> ----------------------------------------------------------------------------
<egg> 55 x + 1452 x y + 6765 x y + 8350 x y + 2850 x y + 210 x y + y
<egg> bofh: if you're ever going to get speed out of that it's by benefiting from throughput so Horner is out
<bofh> For starters, z = x^3 and replace everywhere
<egg> (well I guess if you Horner the numerator and denominator they don't depend on each other so at least there's that)
<bofh> But otherwise I don't think this looks very nice for any sort of Horner-type scheme since it kinda looks like a binomial-ish expansion
<egg> bofh: so fwiw integer arithmetic + one Halley iterate is faster than Atlas's method
<egg> (it's also something like 5 sig. dec. obviously)
<egg> bofh: but it means that you can afford one division; the question is how much around that
<bofh> egg: I think that might suffice for single prec, actually.
<bofh> Hm.
<egg> bofh: nah it doesn't
<egg> maybe the next householder, probably the one after that
<UmbralRaptop> bofh: apparently you're getting a really weird blizzard?
<egg> bofh: okay it's better than the Kahan method with two fdivs
<egg> modern machines are weird
<egg> (it's worse than Atlas of course)
<egg> -----------------------------------------------------------------
<egg> Benchmark Time CPU Iterations
<egg> -----------------------------------------------------------------
<egg> BM_AtlasCbrt 25876 ns 23996 ns 28000 +1.00000000000000000e+00; ∛2 = +1.25992104989487319e+00
<egg> BM_OneHalleyIterateCbrt 17139 ns 16741 ns 44800 +9.99995112999074731e-01; ∛2 = +1.25994621743568636e+00
<egg> BM_HouseholderOrder10Cbrt 31353 ns 31808 ns 23579 +1.00000000000000000e+00; ∛2 = +1.25992104989487319e+00
<egg> BM_KahanCbrt 36295 ns 34494 ns 19478 +1.00000000000000000e+00; ∛2 = +1.25992104989487319e+00
<egg> BM_KahanNoDivCbrt 41837 ns 39550 ns 16593 +1.00000000000000000e+00; ∛2 = +1.25992104989487297e+00
<egg> BM_MicrosoftCbrt 65839 ns 64174 ns 11200 +1.00000000000000000e+00; ∛2 = +1.25992104989487297e+00
<Ellied> inb4 floodout?
<egg> bofh: wait I haz a miscalculation
<egg> wait no I don't
<egg> it's last-bit correct on cbrt(2)
<egg> Ellied: apparently that's not too much flooding :-p
<egg> Ellied: also how do you like my ascii art equations
<Ellied> they are difficult to follow but I'm not sure how much better they would be on paper/chalkboard
<bofh> Huh, the order 10 Householder is that fast? what the everliving fuck.
<egg> bofh: this implementation thereof at least
<egg> bofh: there is *a lot* to be gained from throughput, high degree polynomials
<bofh> sec. (will take a look at it in an hour, tutorial)
<egg> bofh: it can probably be Estrined to make it faster
<bofh> I'm perplexed, high-degree polynomials should not be this much faster than multiple iterates of lower-degree ones.
<APlayer> !wpn egg
* Qboid gives egg a graphite exception
<egg> bofh: dependencies!
<egg> bofh: four newtons has dependencies on *every operation*
<egg> so you're waiting for the latency of all of the things
<egg> bofh: like seriously, Estrin those polynomials in y and you might have a chance at beating the cat
<APlayer> Anyway, see you tomorrow folks!
<egg> bofh: fwiw those benchmarks are run on my laptop which is a skylake
<egg> Core i7-6600U
<egg> might get different results on my sandy desktop
rqou has left #kspacademia [AndroIRC]
rqou has joined #kspacademia
<egg> !wpn rqou
* Qboid gives rqou a shift/reduce diapsid
<egg> rqou: how goes the VHDL grammar
<rqou> friiggin androirc
* egg pets rqou
APlayer has quit [Ping timeout: 182 seconds]
<rqou> um... i haven't worked on that in months
* rqou meows
<egg> bofh: but in general, never underestimate the high order methods; they're a lot better than one might think (see also the integrators etc.)
<egg> bofh: it's just that people are stuck using leapfrog because everybody in the literature does that
<egg> Since Newton :-p
<egg> rqou: how do you like my notation https://github.com/eggrobin/Principia/blob/rootn/documentation/Approximate rootn.pdf
<egg> aaargh space
<rqou> my phone refuses to open that
<egg> that should just point to an actual PDF
<rqou> oh wtf
<rqou> initially i thought that was some weird mojibake
<egg> rqou: it's floating-point/fixed-point unchecked conversions :D
<egg> (well, idealized to reals, but same)
<rqou> as in, i thought the chinese characters were mojibake at first
<egg> yeah, but no, they're notation :D
<rqou> but yeah, "internationalized" math is quite unexpected
<egg> for "interpret float as fixed-point" and "interpret fixed-point as float" respectively :D
<egg> rqou: not for greek and hebrew and fancy german fonts though
<egg> so why not CJK :D
<rqou> something something imperialism
<egg> rqou: also have you seen #1787
<Qboid> [#1787] title: Just say no to romanization | | https://github.com/mockingbirdnest/principia/issues/1787
<egg> DormandالمكاوىPrince1986RKN434FM, 鈴木1990, and 吉田1990Order8D are good identifiers :D
<egg> yeah that's nice
<egg> !u مجــــــــــــ
<Qboid> egg: Too many characters! (Maximum: 10)
<egg> tatweel ftw
<egg> rqou: I mean just with the latin script you get fun stuff with the name of trigonometric and hyperbolic functions
<egg> rqou: in french, (sin x)/(cos x) = tg x
<egg> not tan
StCypher has quit [Read error: Connection reset by peer]
<egg> rqou: and the hyperbolic functions are sh ch th
<egg> rqou: also in older french texts you see things where the word is properly abbreviated, with a full stop, so "tang."
<rqou> so i used to think "eh, internationalizing stem stuff isn't _that_ useful"... and then i visited my cousin in china who was learning html+css
<rqou> css is unnecessarily inconsistent with naming things and uses far too many "complicated" words
<egg> rqou: so fwiw I learned Ada (and VB but let's not talk about that) without speaking english usefully, writing french identifiers
<egg> (and got extremely pissed off at the IDE which counted accented letters as digits and capitalized the following letter)
<egg> (running the pretty-printer fixed it though because my father did his job right)
<egg> bofh: Estrin on Householder 10 is ~as fast as the cat's method
<egg> on the one hand this makes sense, on the other hand WTF
<egg> -----------------------------------------------------------------------
<egg> Benchmark Time CPU Iterations
<egg> -----------------------------------------------------------------------
<egg> BM_AtlasCbrt 24564 ns 24554 ns 28000 +1.00000000000000000e+00; ∛2 = +1.25992104989487319e+00
<egg> BM_OneHalleyIterateCbrt 16606 ns 16392 ns 44800 +9.99995112999074731e-01; ∛2 = +1.25994621743568636e+00
<egg> BM_HouseholderOrder10EstrinCbrt 24673 ns 24554 ns 28000 +1.00000000000000000e+00; ∛2 = +1.25992104989487319e+00
<egg> BM_HouseholderOrder10Cbrt 30204 ns 29994 ns 22400 +1.00000000000000000e+00; ∛2 = +1.25992104989487319e+00
<egg> BM_KahanCbrt 34314 ns 34424 ns 21333 +1.00000000000000000e+00; ∛2 = +1.25992104989487319e+00
<egg> BM_KahanNoDivCbrt 40118 ns 38365 ns 17920 +1.00000000000000000e+00; ∛2 = +1.25992104989487297e+00
<egg> BM_MicrosoftCbrt 64221 ns 64174 ns 11200 +1.00000000000000000e+00; ∛2 = +1.25992104989487297e+00
<kmath> <SerhiyStorchaka> Empty set literal: {*()} ⏎ #python
tawny- has quit [Quit: 「Roundabout」 - To Be Continued]
tawny has joined #kspacademia
<egg> !wpn bofh
* Qboid gives bofh a Молния woomera
* egg pokes bofh with benchmarks
UmbralRaptor has joined #kspacademia
<egg> !wpn UmbralRaptop
* Qboid gives UmbralRaptop a snub woomera
<bofh> egg: yeah, I just got back, and like, I'm amazed since for me this is *un*intuitive. like, high-order integration techniques are useful, but I'm shocked high-order root finders can be as well.
<egg> bofh: high-order *everything* is good actually
<kmath> <whitequark> OH: "at which point I have to ask why [are you] evaluating 11th-order polynomials in your critical path?"
<egg> bofh: also Estrin is magic
<egg> bofh: also should I tweet those benchmark results
<egg> s/tweet/publish/ or something
<whitequark> egg: yeah, котя was outside and got a few scratches
<egg> whitequark: ow, is she OK?
<whitequark> sure
<whitequark> котя is an outside cat, I would personally be scared for whatever creature decided to attack her
UmbralRaptop has quit [Ping timeout: 190 seconds]
<egg> whitequark: :D
<bofh> 22:53:22 <@egg> bofh: high-order *everything* is good actually
<whitequark> the gray kitten isn't very smart
<whitequark> the котя-colored kitten is almost exactly like котя
<bofh> which both surprises me and goes against what my intuition used to say
<egg> whitequark: well it's a kitten, I think you've observed that they're very dumb initially?
<whitequark> but the котя-colored kitten is much smarter.
<egg> oh the котяkitten has inherited the smarts?!
<bofh> egg: and yes you prolly should post those benchmark results somewhere at some point
<egg> is there a gene that controls both the colour and the smarts
<whitequark> the latter is already eating kitten food and exploring everything
<whitequark> the former is just sucking milk and sleeping
<egg> bofh: as we said, those tradeoffs change all the time
<whitequark> also it might be related to gender
<whitequark> we originally intended to keep only the котя-colored kitten (the initial size of litter was five but no way in hell we were gonna raise five kittens)
<whitequark> but then printer decided to keep the (male) gray kitten too
<whitequark> we'll give that one away later
UmbralRaptor has quit [Quit: Bye]
UmbralRaptop has joined #kspacademia
UmbralRaptor has joined #kspacademia
<kmath> <eggleroy> Interesting ∛ benchmark results: Kahan’s 2-div method from “Computing a Real Cube Root” is soundly beaten by… https://t.co/XewMX49eX3
UmbralRaptor has quit [Client Quit]
UmbralRaptor has joined #kspacademia
UmbralRaptop has quit [Ping timeout: 182 seconds]
<bofh> egg: heh.
UmbralRaptop has joined #kspacademia
UmbralRaptop has quit [Client Quit]
UmbralRaptor has quit [Read error: -0x1: UNKNOWN ERROR CODE (0001)]
UmbralRaptop has joined #kspacademia
<egg> bofh: now optimizing γ for 10th order Householder might actually be hard
UmbralRaptor has joined #kspacademia
<egg> because its effect on the relative error will have singular points outside 0, which may become extrema of the error; you'd have to either prove that they're not global extrema or to find them (and finding them entails computing roots of high degree polynomials)
UmbralRaptop has quit [Ping timeout: 190 seconds]
<egg> I mean you can just compute those roots numerically, invert the error function to find the value, and check the error there but that seems really annoying (and doing the error analysis on that process seems even worse)
<egg> (although I guess since it's offline you can throw 100 sig. dec. at it and say that the result will be good enough :-p)
<bofh> Yeah, also I question if it matters since unoptimized γ looks to be good enough and I don't think optimizing γ will make the 9th-order one good enough.
<bofh> I'm curious what order is sufficient for single precision. I want to say 5th?
<egg> bofh: yeah it doesn't matter at all
<egg> bofh: for single precision, let me see
<bofh> sec, brb again
StCypher has joined #kspacademia
<egg> bofh: yeah 5th order will do in single precision
<egg> bofh: .... which means that if the error is decent with this method (caveat, it might not be, atlas's method is correctly rounded in binary32), that would give you a cbrtf faster than the cat's