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.
<egg|zzz|egg>
bofh: so I guess their cbrt is the one from the arm directory? that's all there is in the opensource libm release (well there's the powerpc one but it looks like kahan-but-worse)
<kmath>
<volatile_void> @stephentyrone @UINT_MIN @mediaptera Once you've decided to compute with twice the precision bits, interval arithme… https://t.co/PlMRnkVzBc
<egg|zzz|egg>
bofh: unrelated: principia has an issue where large saves make things slow, presumably because KSP parses them shittily
<egg|zzz|egg>
bofh: so we might do some compression, but there's another thing: we currently store the principia data in hex
<egg|zzz|egg>
bofh: presumably the slowness is from a shitty parser in C# rather than reading the file (it's not that big a file)
<egg|zzz|egg>
bofh: so this means we should encode the save data in base32768
<egg|zzz|egg>
bofh: this will not confuse users in the slightest,
<UmbralRaptop>
aaaaaaa
<bofh>
egg|zzz|egg: just do base85. or not bother at all and save as raw binary?
<egg|zzz|egg>
bofh: because it goes into a KSP cfg file
<bofh>
yes but it's *save* data, not config data. presumably you can convert that as-needed instead of upon saving?
<egg|zzz|egg>
bofh: and base85 is not very dense UTF-16, which is where the slowness likely occurs (in KSP's shitty parsing)
<egg|zzz|egg>
bofh: the KSP save is a cfg file, in KSP's ConfigNode format
<egg|zzz|egg>
bofh: I mean tbh we could also pick brotly
<egg|zzz|egg>
s/ly/li
<Qboid>
egg|zzz|egg meant to say: bofh: I mean tbh we could also pick brotli
<egg|zzz|egg>
but then there's a parameter to tune and that's more work :-p
<bofh>
I mean I was going for gzip b/c zlib is easy, common as hell and the format is widely supported
<egg|zzz|egg>
bofh: so like we're encoding our protos and passing that through base32768 so widely supported doesn't help much
<egg|zzz|egg>
bofh: and since we're on windows building one of those things is not harder than the other tbh
<egg|zzz|egg>
bofh: might as well go with the one whose code style resembles ours :-p
<bofh>
I... suppose.
<egg|zzz|egg>
bofh: also they have cute names
<egg|zzz|egg>
bofh: if you want deflate + cute name (and slow) there's zopfli
<egg|zzz|egg>
bofh: also TIL there's a JPEG thing called guetzli
<bofh>
rofl
<egg|zzz|egg>
bofh: yes the people who develop those are in switzerland, what gave it away :-p
* UmbralRaptor
copies 2/3 of a TiB via USB 2.0 for backup porpoises.
<bofh>
egg|zzz|egg: "It is named after the Swiss German expression for Biscuits" ahh
<bofh>
"While Google's zopfli implementation of the deflate compression algorithm is named after a Swiss German word for a braided sweet bread and literally means "little plait", brotli is a Swiss German word for a bread roll and literally means "small bread"."
<kmath>
<stephentyrone> @bofh453 Zopfli is data compression software that encodes data into DEFLATE, gzip and zlib formats. ⏎ ⏎ fuuuuuuuuck.
<bofh>
b/c Zopfli is (and I agree) nowhere near novel or interesting enough to deserve its own ENTIRE WIKIPEDIA PAGE. maybe a few mentions on the page for DEFLATE, not more.
<egg|zzz|egg>
yeah, there are wikipedia pages for weird things tho
UmbralRaptop has joined #kspacademia
UmbralRaptor has quit [Ping timeout: 383 seconds]
<egg|zzz|egg>
bofh: it took me a while to realize that Zopf actually means braid, not just the braided bread, and that the Zopfgruppe are not actually swiss-bread groups
<egg|zzz|egg>
bofh: although I still think we should call the identity the n-baguette :-p
<egg|zzz|egg>
bofh: fwiw the german convention for ASCIIifying umlauts is appending an e, so "zopfli" and "brotli" would look extremely weird if they were german words; this is a bit muddled by the fact that Swiss german has vowel umlaut + e which is not a thing in high german
<egg|zzz|egg>
bofh: e.g. Üetliberg
<egg|zzz|egg>
that doesn't get transliterated to ueetliberg because that would be too silly
<egg|zzz|egg>
bofh: [ˈyə̯tliˌb̥ɛːrɡ̊], the umlaut gives you the [y] rather than [u] and the next e is a separate vowel
<bofh>
01:38:14 <@egg|zzz|egg> bofh: it took me a while to realize that Zopf actually means braid, not just the braided bread, and that the Zopfgruppe are not actually swiss-bread groups
<bofh>
ROFL
<bofh>
Yeah that makes sense, since umlaut is a vowel phonological shift, but that doesn't prevent another vowel from following it :P
<egg|zzz|egg>
bofh: yeah, but then ueetliberg is silly :-p
<egg|zzz|egg>
UEEE-tliberg
<bofh>
LOL
<egg|zzz|egg>
!wpn whitequark, котя, and the котяchrome kitten
* Qboid
gives whitequark, котя, and the котяchrome kitten a walrus
egg|laptop|egg has joined #kspacademia
<egg|laptop|egg>
bofh: okay I have a proof that my method does not round correctly :-p
<egg|laptop|egg>
bofh: on 1 000 000 random values, one rounded incorrectly
<egg|laptop|egg>
0.50004 ULPs
<egg|laptop|egg>
bofh: now that I think of it maybe I should compute more than 5 sig. dec. on the number of ULPs, perhaps I'm missing some misroundings that way
<bofh>
*one*? what value, if you know?
<egg|laptop|egg>
bofh: on second thought there may be more than one, it's just that for all others the number of ULPs was below 0.500005; lemme fetch the value
xShadowx|2 has joined #kspacademia
<egg|laptop|egg>
bofh: 4078731956257/549755813888
tawny- has joined #kspacademia
<egg|laptop|egg>
bofh: my method computes 4391857331832067/2251799813685248 for it
<egg|laptop|egg>
bofh: yes but I'm not patching my soft-float package to not print exponents just for that, this code is already weird
<egg|laptop|egg>
bofh: remember that you have 1/3 bits on the guess, so 2/3 of the bits of the correction term are in the actual result; this nearly exhausts the remaining precision
<bofh>
Yeah, I see.
<egg|laptop|egg>
bofh: but it's highly unlikely, so if you had a way to detect that you are near something like that you could go for something slower and get a correctly-rounded method
<rqou>
random question: does anybody here know off the top of their head a "good" algorithm to compute solutions to riccati differential equations?
<rqou>
hopefully one that can run on a potato-quality microcontroller
<rqou>
use case is for LQR obviously
<egg|laptop|egg>
bofh: okay, further inspection (10 sig. dec. on the number of ULPs) reveals that there are actually 9 incorrect roundings out of this million evaluations
<egg|laptop|egg>
bofh: the errors range from 0.5000026649 ULPs with the input 7762370939317/1099511627776 to 0.5000369176 ULPs with the one above
<rqou>
hrm, i know some of those words... oh wait i don't :P
* rqou
googles
<bofh>
rqou: SGEQRF (tho you prolly want SGEQR2 directly on a microcontroller).
<rqou>
also, random numerics question: are there sin/cos functions that don't use double (float64) in any of the steps and uses only float32? the one i looked at from musl does
<rqou>
*does need float64
<whitequark>
rqou: hmmm I think yes
<rqou>
bofh: wtf is that some random fortran routine?
<bofh>
(mine uses k_cos/k_sinf but replaces k_rem_pio2f.c with a much faster reimplementation of Payne-Hanek, but I can't find where I put it, might not have it on my office machine)
<rqou>
hmm, so that k_cosf.c that you linked seems to be identical to the code musl uses
<rqou>
that requires float64
<egg|phone|egg>
It's the usual sun thing
<bofh>
rqou: oh wtf
<bofh>
rqou: literally just %s/double/float/ on that
<rqou>
are you sure?
<bofh>
yes. your error will be no more than 1ULP on [0,\pi/2]. I tested this.
<egg|phone|egg>
Bofh: but what incorrectness rate
<bofh>
now I hope they do sane arg reduction and don't just force the double path on that always, b/c if they do I need to find a saner old impl of that.
<bofh>
egg|phone|egg: high in the immediate nbhd of \pi/4 and \pi/2, nonexistent otherwise.
<egg|phone|egg>
Huh neat
<rqou>
ok, i will probably be asking for some more help with numerics soonish
<egg|phone|egg>
It's nice to have an FP type where you can try all the values :-p
<bofh>
egg|phone|egg: so like it's cos. one of those is a root, the other very close to 1.
<bofh>
and yeah I love it :D
<egg|phone|egg>
Binary128ftw
<egg|phone|egg>
(Why are we stuck with double doubles in this day and age)
<rqou>
ibm?
<whitequark>
double trouble
* egg|phone|egg
wants quads
<rqou>
to protect the world from devastation :P
<bofh>
you *must* bite both sandwiches at the same time.
<egg|phone|egg>
:D
<rqou>
anyways, I'm using a potato that only has float16/float32
<egg|phone|egg>
Bofh: can vectorisation help double double
<bofh>
egg|phone|egg: not really, vectorization is completely orthogonal to double-double.
<bofh>
rqou: yeah I've done that before. float32 is enough for a lot of purposes tbh.
<rqou>
i heard rumors that you can't reach the moon with only float32?
<egg|phone|egg>
Astronomical screams
<bofh>
yeah so like I would not want to do orbital calc with only float32, jfc.
<rqou>
so my Arduino can't reach the moon? :P
<whitequark>
pretty sure it can
<whitequark>
just simulate Apollo Guidance Computer ont i
<whitequark>
should be fast enough
<rqou>
lolol
<rqou>
btw it's amazing how much more comprehensible agc assembly is (at least to me) once you replace the extremely archaic mnemonics with "modern" "arm/intel-like" ones
<kmath>
<astarasikov> @CopperheadOS Nexus 5X has an extremely thin PCB which is not sturdy and overheating or just twisting the phone sli… https://t.co/i1yqyNYMBL
<UmbralRaptop>
Well, replacement 5X. The first one got replaced despite being out of warranty because bootloop of death.
APlayer has joined #kspacademia
rqou has quit [Ping timeout: 182 seconds]
rqou has joined #kspacademia
awang has quit [Ping timeout: 198 seconds]
tawny- has quit [Ping timeout: 182 seconds]
<egg|zzz|egg>
!wpn whitequark
* Qboid
gives whitequark an unitary otter
<egg|zzz|egg>
!wpn rqou
* Qboid
gives rqou a Stern-Gerlach int category with an atom attachment
awang has joined #kspacademia
rqou has quit [Ping timeout: 186 seconds]
rqou has joined #kspacademia
egg|phone|egg has quit [Remote host closed the connection]
<UmbralRaptop>
!wpn egg|zzz|egg
* Qboid
gives egg|zzz|egg a feathered quartz sheep
<egg|zzz|egg>
!wpn UmbralRaptop
* Qboid
gives UmbralRaptop a continental icosahedron
<kmath>
<✔NWSLincolnIL> Winter has to end sometime, but it won't be this weekend. Snow accumulations likely again Sunday night. #ILwx https://t.co/fztIa95f4E
<egg|zzz|egg>
bofh: how would you compute the error (in fractional ULPs) of a cube root quickly? I've been doing this with Mathematica but for more than a million values it takes an eternity
<egg|zzz|egg>
admittedly at this point I should just try to do a proper error analysis
<kmath>
<stephentyrone> @griotspeak "Structured Programming with go to Statements"
<bofh>
egg|zzz|egg: good question, I actually don't know. also on that note, let me translate that assembly by hand now.
<egg|zzz|egg>
bofh: I managed to semiautomatically translate it to MASM
<egg|zzz|egg>
bofh: but it's a cbrtf so I can't really do much with it
<egg|zzz|egg>
I mean I could benchmark a cbrtf against a cbrt, but comparing the roundings isn't going to be helpful (it's correctly-rounded as a cbrtf)
<bofh>
Well yeah, also a cbrtf is much simpler to compute tbh due to the decreased mantissa precision.
<egg|zzz|egg>
bofh: so I'm not sure what to do with this cbrtf in the end
<egg|zzz|egg>
bofh: it seems the only cbrt remotely involving atlas that I can find in the arm one with his table and polynomial
<bofh>
yeah I'm a bit confused, I think it might actually be someone else extending his single prec. methodology
<egg|zzz|egg>
bofh: I can find no other cbrt so I guess that's the one they have though?
<egg|zzz|egg>
bofh: also if his polynomials make a decent cbrt, aren't they overkill for even a correctly-rounded cbrtf?
<bofh>
almost certainly, yeah.
UmbralRaptop has quit [Quit: Bye]
UmbralRaptop has joined #kspacademia
<APlayer>
What does a star in mathematical notation mean? Context: q⁽⁻¹⁾ = q* / ||q|| where q is a Quaternion
<SnoopJeDi>
being able to mix/match contexts for different parts of the document and refer to them in a reactive programming sort of way is kinda neat, but yea overall it sounds like way too steep a learning curve rn
<egg|zzz|egg>
bofh: why is there no FORTRAN in godbolt
<bofh>
egg|zzz|egg: good question
<bofh>
"Given the strong NII emission, we infer roughly solar metallicity for my butt, ruling out an origin due to infall of primordial gas." *snicker*
<bofh>
"My Butt spans ∼10′×3′ (25×7.5 kpc) in size and has no stellar counterpart;" #SirMixALot
<egg|zzz|egg>
bofh: I wonder whether it would be feasible to compute the x^3-y in x87 extended precision, which would allow clobbering fewer than 36 bits and thus improve roundings
<bofh>
egg|zzz|egg: yes, but at immense perf cost
<egg|zzz|egg>
ah
<bofh>
(you have to move domains from XMM to the fp stack, and x87 is pretty slow on modern Intel due to lack of caring about it)
<bofh>
(well, slow relative to single/double XMM)
<egg|zzz|egg>
argh
<egg|zzz|egg>
OK so detection of iffy cases and then multiprecision of sorts is the way to go then
<egg|zzz|egg>
also I need to actually do the error analysis
<egg|zzz|egg>
bofh: or maybe to trick you into doing an error analysis because I'm not sure how to do that decently
<bofh>
I'd start with the error analysis, and it's somewhat tricky in this case; I'd honestly ask Atlas for pointers since I'd have to do the same myself, it's been awhile.
APlayer has quit [Ping timeout: 182 seconds]
<bofh>
argh I wish I had less of a clusterfuck in my research right now and/or more free time (or reliable functioning below 3-4hrs of sleep/night). Sigh. :(
* egg|zzz|egg
waves a black hole near bofh's research
<kmath>
<bofh453> (a small exotic ℝ⁴ is a space that is homeomorphic to, but not diffeomorphic to Euclidean ℝ⁴ *that can nevertheless… https://t.co/QFjesljgPB
<kmath>
<✔tmobileat> @c_pellegrino @PWTooStrong @Telekom_hilft Hello Claudia! The customer service agents see the first four characters… https://t.co/ptOIRbZRIT
<kmath>
<SketchesbyBoze> I have eaten the pomegranate seeds ⏎ that I found on a stone ⏎ and which you were probably using ⏎ to imprison me in the… https://t.co/fyHMX3X5ln
awang has quit [Ping timeout: 186 seconds]
* UmbralRaptor
chooses to believe that whitequark found an FPGA made with components from wickedlasers.