/dpt/ - Daily Programming Thread

doc.rust-lang.org/std/primitive.u128.html

I don't want to use rust.

You should try it, it's very good. Otherwise, just use gcc.gnu.org/onlinedocs/gcc/_005f_005fint128.html .

I also don't want to use gcc. I just want to understand how this shit is supposed to work.

Attached: brainletinu.jpg (811x1082, 180K)

What is so hard to understand about it?

It's just fucking simple primary school arithmetic, jesus christ.

I'm working on my hobby OS, but I've been frustrated lately. I'm taking a break for a few days.
I've been reading through TempleOS and the compiler that comes with it. This code is pretty terrible, isn't it? Terry Davis really likes to redundantly iterate over arrays.

when you multiply two numbers the resulting value can be higher than you can fit in the same number of bits. 2^64 * 2^64 = 2^128

so when you do it, it'll return a wrapped-around value right? or maybe it'll clamp it, I don't even know what will happen, but I don't see how I can get the upper 64 bits back. or how it'll work with signs.

the CPU just places the upper 64 bit in a seperate 64 bit register if you ask it to do that

well he was schizophrenic