ProgrammerHumor

okSureButWithAdditionalSteps

okSureButWithAdditionalSteps
https://i.redd.it/dmvr7fy308df1.jpeg
Reddit

Discussion

yo_wayyyy

bro is colossal

1 day ago
bassguyseabass
:cp:

Bro exceeds INT32_MAX

1 day ago
goatanuss

He’s so obese the recursive function calculating his mass resulted in a stack overflow

12 hours ago
Longjumping_Try4676

Bro is about to overflow for the second time

10 hours ago
Katniss218

Bro so thicc the stack overflow wrapped around the memory array and wrapped back into the valid memory addresses lol

9 hours ago
IbaJinx

Bro that’s DJ Khaled

1 day ago
frosty7even

Suffering from overflow

1 day ago
yo_wayyyy

i refuse to believe 

1 day ago
thinog

looks like "Gordão da XJ", a brazilian influencer

13 hours ago
SjettepetJR

As the British would day;

Big, in't?

20 hours ago
Jugales

Legends foretold the coming of Huge Endian

1 day ago
4n0nh4x0r
:js::p::cs::cp::bash:

just store the numbers as binary string uwu

no need to care about cpu architecture ever again.
need a 6827891 bit number? sure, just set up your string and get working

1 day ago
Traditional-Board-68

And what about mathemetical operations like add and subtract, do string operations on them?

1 day ago
4n0nh4x0r
:js::p::cs::cp::bash:

i mean, this is somewhat how bigInt works, just that it works with decimals instead of binary.
but yea, you make a class, define an add and subtract method, then then does an index by index addition/subtraction, and then returns the value in the end or updates the value in the object directly.

it obviously isnt as efficient as working with normal ints and so on, but it gets the job done in situations where you need extremely large numbers as you arent bound to 32 or 64 bit anymore.
added bonus, it works on every platform.

1 day ago
Traditional-Board-68

I know how bigint works, but you don't use it everywhere , because each operation requires karatsuba and fft. While using computer architecture to solve arithmetic operations is better for integer because each bit operation is done together. Hence we work on integers not on bigint unless necessary.

1 day ago
4n0nh4x0r
:js::p::cs::cp::bash:

well yea, they are very inefficient, as such their usage is pretty limited.

One such use case would be RSA for example, with the MASSIVE exponents that you use to generate keypairs.

1 day ago
Ronin-s_Spirit
:js:

No bigfloat yet, even though it's extremely easy if we're willing to make the same math operations tradeoff.

1 day ago
4n0nh4x0r
:js::p::cs::cp::bash:

i would go as far as to say, the main use case for bigInts is when you are doing RSA for example, calculating with massive exponents and so on.
as for floats/doubles, i suppose those just arenr as useful to make them a default thing.
but yea, functionality wise, they would work the same way

1 day ago
Malazin

Just concatenate the operation into the string.

1 day ago
oshaboy
:py:

Store it as a decimal digit string like Cobol. You can even save memory by using only 2 digits for the year.

1 day ago
4n0nh4x0r
:js::p::cs::cp::bash:

yes, but binary is fun uwu

6 hours ago
GreatScottGatsby

Why would in do that when add and adc is significantly faster?

16 hours ago
4n0nh4x0r
:js::p::cs::cp::bash:

for some operations you need massive numbers, for example when calculating the public and private keys for RSA
there you work with exponents that are like 256 or more bits long, that is bigger than any cpu i am aware of is capable of working with out of the box, meaning you need such an intermediate structure.
that is also one of the reasons why you woudnt encrypt a file with RSA.
you would encrypt the file with a symetrical method such as AES for example, and then use RSA merely to encrypt the key for the semetrical algorithm

5 hours ago
an_0w1
:asm::cp::rust:

I was writing some assembly not too long ago where I needed to do 64bit adds in 32bit code. This is where I leaned that x86 has instructions for arbitrary precision arithmetic.

1 day ago
oshaboy
:py:

It has add carry and extending multiplication. arm also has those.

1 day ago
lbp22yt
:cp::lua::gd:

processor explodes

1 day ago
Rhoihessewoi

Some years ago I needed/wanted 64 bit variables at a 8 bit PIC microcontroller...

I had to use another compiler for that, but then it worked.

1 day ago
IdealBlueMan

Use BCD and you can work with numbers almost as big as yo momma

18 hours ago