If anyone was gonna break the numbers, it was gonna be you...
If anyone's curious, numbers have a limit in games. When you go over that limit, they just loop back to the beginning. That beginning usually being a negative number.
Gray_Tower2026-01-26 08:18
"Hm, what a weird bug, wonder why that happens"
"Oh, it's dhcwsp, we now know why that happens"
IYiera2026-01-26 08:42
Integer overflow
Livid_Boysenberry_582026-01-26 08:44
There's only one type of Genshin players that know what an integer is.
And they'd rather calc in Excel than play the game.
Gray_Tower2026-01-26 08:57
>And they'd rather calc in Excel than play the game.
We're in the middle point, checking damage spreadsheets and minmaxing on Akasha
Great-Background15872026-01-26 09:01
I think many know it common games bug maybe not as used to be but still infamous one
ShiroCat2342026-01-26 09:34
I know because of doing Integer Overflow for Barret in ff7 :)
Critical_Stick78842026-01-26 10:50
Bruh, I use too much Excel (and R Studio) at work. I play games to enjoy, not relive my work.
SwappableHair2026-01-26 11:55
We need r/genshinspreadsheetmain
PetercyEz2026-01-26 12:23
And coders. I do not calc, I would rather have infinite grind... At least infinite Mora Grind... Resin Bottleneck hits hard when you do not have Mora, Exp Books, Weapon Mats, Character Mats, Talent books,...
Organic-Army-90462026-01-26 12:40
did you mean int? /hj
Puzzlehead_Lemon2026-01-26 20:01
Some of us are weird enough to write our own python scripts.
h2odragon002026-01-27 06:07
Is that even fixable in dmg testers?
IYiera2026-01-28 01:50
Can probably just set damage caps, for example Kingdom Hearts and Expedition 33 has damage caps
Skyblue17232026-01-26 09:24
If you know you know.
Ariane 5 is still sad when those numbers appear 🤡
BlandPotatoxyz2026-01-26 09:26
Why don't they use unsigned ints for stuff that is never supposed to be negative, like damage?
Livid_Boysenberry_582026-01-26 09:36
My guess is they're not using ints at all.
Either floats or doubles. And floats don't have an unsigned version.
Given that numbers get really big anyway, you're not saving space by using a 32 bit unsigned integer. You do, however, lose accuracy in calculations.
We could ask whoever made the wonderland level what they use for the DPS meter. That would shed some light on what's going on. Because this team isn't doing 2 billion DPS, and it's definitely not doing 3.4* 10^38 DPS (float limit)
Kokolemo2026-01-26 10:39
However Genshin might internally handle damage numbers, it looks like this wonderland is just tracking total damage accumulated in a signed int ("Damage") and then dividing that total by time ("DPS") and then again by number of targets ("DPS/Target").
You can see Damage just so happens to be at that -2.1 billion overflow threshold at the start of the clip.
FWIW, we know for a fact that Genshin internally does damage calculations with single-precision (32-bit) floats. This is why we had the [OOB integer cast UB bug](https://youtu.be/wprBfd1aWG4) (NOT overflow) back in v2.0, which led to the 9,999,999 damage cap being implemented. This is also why [hitting odd damage numbers above 16,777,216](https://www.reddit.com/r/Genshin_Impact/comments/1iozd3n/so_close/mcosd3x/?context=3) is impossible.
MusouTensei2026-01-26 17:30
Floats do not overflow, in floats infinity and -infinity exists, overflowing would just cause infinity. You can have precision loss, but no overflow.
Certain operations with infinity have nondeterministic result, should return NaN (Not a Number, also is a float value).
AsterJ2026-01-26 19:56
It's probably tracking it in floats but it is converting the float to an int before it is displayed. This wonderland formats the damage into triplets of XXX YYY ZZZ to make it easier to read and it has to do that with modulo arithmetic which needs integers.
Lawlette_J2026-01-26 09:40
If you understand how two's complement work and how they wraparound the unsigned integer's bit representation when they exceeded its limit, then you should know why.
Sometimes in math you would rather have a number to go negative first then only perform calculations on it as it saves steps and effort that may be needed to adjust around to ensure the value doesn't go "negative" (in terms of bitwise representations) with unsigned integers (which it will trigger wraparound).
Kokolemo2026-01-26 10:34
Could be a few reasons. Some games represent healing, including absorbing damage, as "negative damage" internally. Or, it's simpler to go "if hp minus damage is negative, then enemy dead," than to deal with "damage is greater than remaining HP." Or, -1 could be used to represent an invalid or uninitialized value.
A signed int can go over 2 billion which we are still very far away from. If you don't have a specific use case in mind for needing those 4 billion positive values, you're better off leaving the option to have negative numbers available to you.
BlandPotatoxyz2026-01-26 12:07
Fair
portevapeur2026-01-26 09:30
It is caled an integer overflow it is because the number are stored on a 32 or 64 bit number and the négative number ar writen 1xxx for a 4 bit integer x beeing either 0 or 1 and the positive 0xxx so the when the positive number is full so 0111 the computer try to add 1 witch give 1000 witch is the smalest negative number that can be stored on a 4 bit number
Livid_Boysenberry_582026-01-26 09:37
What this guy said, for all the non-razors in the thread
portevapeur2026-01-26 09:53
Im an it student thats the first thing they teatch you and no my team is just a clown team that just no sense
Ocean91422026-01-26 10:57
From what I know
We have a (sign bit) at leftmost side which is 0 for positive numbers and 1 for negative numbers
So basically 4 which is 100 will be written as (0)100
Negative numbers ,let's say a random number 101 will be written as (1)101
The biggest positive 4 bit number, ie, 1111, will become (0)1111
When any number crosses this, let's say we add one to (0)1111 it becomes (1)0000 which is the smallest negative number
K_Kingfisher2026-01-27 01:33
Small correction, most used method for signed integers is two's complement.
In it, negative 101 is not 1101, but instead 1011. That's because you do complement +1, which removes the need for comparisons when doing arithmetic. The calculation can be done directly.
e.g.: 2 - 4 = -2
0010 - 0100 = 1110
110 by itself is actually 6. 1110 would be 14 but as you described it it should be -6 and not -2. But in two's complement this method becomes 6 - 8 = -2. i.e.: 0010 is 2 -> 1101 is the complement -> 1110 is complement+1.
You can basically look at this as the first digit being negative, which also simplifies conversion from binary to decimal:
0010 = 0\*-8 + 0\*4 + 1\*2 + 0\*1 = 2
0100 = 0\*-8 + 1\*4 + 0\*2 + 0\*1 = 4
1110 = 1\*-8 + 1\*4 + 1\*2 + 1\*0 = -2
>Negative numbers ,let's say a random number 101 will be written as (1)101
So, negative 101 (5) will actually be written as 1011.
Look at u/Seflyx post you replied to. Their examples are correct.
Ocean91422026-01-27 05:33
Oh alright thanks!
Seflyx2026-01-26 11:11
Magic stone only know **ON** off levers
4 levers make up number
Add more lever to make up bigger number
Read levers from last to first
4th lever **ON** add 1
3rd lever **ON** add 2
2nd lever **ON** add 4
1st lever **ON** add -8
All levers off is 0
off - off - off - **ON** is 1
off - off - **ON** - off is 2
off - off - **ON** - **ON** is 3
off - **ON** - off - off is 4
... See pattern?
off - **ON** - **ON** - **ON** is 7
**ON** - off - off - off is -8
**ON** - off - off - **ON** is -7
**ON** - off - **ON** - off is -6
omegavolt92026-01-26 22:07
Oh, integer overflow. Guess Genshin needs to either increase the number of bits available to damage or set a hard cap to how much damage you can do in a single hit
trandanggiabao02032026-01-27 04:16
now I'm mad that the dev didn't use QWORD instead of DWORD (but if that's a language limitation then I can understand)
TsukiHana872026-01-26 07:50
I noticed something. For some reason in current stygien boss 2, Flins's main burst damage does way less than when he used his mini-burst. Couldn't help but wonder what the difference was.
Bubbly_Dirt_5392026-01-26 08:40
I'm pretty sure Flins's big burst has less scaling than his mini-burst, but CMIIW.
Lacky_Panda052026-01-26 09:06
No his big burst has higher scaling but its just that we can use the mini burst twice in a rotation so it gives the highest damage output.
Medyanka2026-01-26 09:20
Ah, that's easy. It's because the boss' shield take lunar damage as 3x times of the original damage. Flins' mini burst is a pure lunar-damage, while his standard burst is combination of normal burst damage and secondary lunar-damage. If we look only at lunar damage here, lvl 9 burst level:
standard burst deals \[442% burst damage + 227% lunar-damage\]
mini-burst deals \[298% lunar-damage\]
Lunar-damage have a strange way of calculating damage (additional modifier), it also ignores defense in the same way as "reaction damage". So add the fact that on that boss shield it also 3x times as effective, and mini-burst becomes stronger than standard burst.
Edit: wait, i thought you were talking about the dog. 2nd boss is a shock-trooper, right? Well, it's pretty much the same thing anyway, shocktrooper's shield takes increased damage from the electro-charged and lunar-charged damage, and flins standard portion of his burst damage is neither.
Santedtra2026-01-26 07:51
dhcwsp out here doing reverse cursed techniques
A_bored_browser2026-01-26 08:14
“Cursed Energy is negative energy! So you multiply that energy against itself-“
-Flins after round 1 of Rerir.
Khelthuzaad2026-01-26 09:13
"Is he high?"
-Rerir,probably
SaibaShogun2026-01-26 11:51
Incoming “Lunar Purple”.
Prismatic_Mage2026-01-26 12:20
Do You know what happens when you combine red Kuvahki and blue Kuvahki?
Hollow tech technique Lunar purple
"Colour out of space"
00110001_001100102026-01-26 16:52
If "true" Kuuvahki wasn't gold I would totally buy that this is exactly what happens
Reitsune2026-01-26 21:32
Actually, this is exactly what happens :)
You can see it in Nothing Passage quest - [https://www.youtube.com/watch?v=ItocfLgtLw0](https://www.youtube.com/watch?v=ItocfLgtLw0)
Prismatic_Mage2026-01-27 02:21
Funny thing is I considered linking the colours out of space world quest myself lel
OmegaThunder2026-01-26 22:12
What about the screenshot of a Zhongli player doing damage cap number in multiplayer before Zhongli was reworked?
String_Of_Death2026-01-26 08:22
"builds are so bad"
"dhcwsp"
Sure.
h2odragon002026-01-27 06:08
Imagine if there really are interger overflow ingame.
Enemies would start healing after a certain point.
Trebord_2026-01-26 08:32
Didn't even have to look to know who it was
r_renfield2026-01-26 08:38
Healing the enemy
CristevePeachFan2026-01-26 09:23
Snezhnaya mechanics: If you don't pull for Snezhnaya characters you will heal the enemy and get frozen
AksysCore2026-01-26 08:43
"negative damage"
*checks username*
i see.
Sent1nelTheLord2026-01-26 08:47
didnt even need to see the OP's name. i just know its dhcwsp
somedave2026-01-26 08:48
I'm surprised someone coded this in fixed point integers and not floating point numbers.
GonnaSaveEnergy2026-01-26 08:55
Are there any disadvantages to using floating point numbers? I think this integer overflow also happened in an event several years ago.
somedave2026-01-26 09:14
The maths can be a few processor cycles more with floats, but nothing compared to running the rest of the game. If you cast a large float to an integer it can give undefined behaviour but you can always clip the size to a limit first.
SugarFreeShire2026-01-26 10:10
Usually two in this case, performance and accuracy. In this case, performance isn’t a massive issue, maybe a few microseconds extra, if that. In the accuracy department, you start losing accuracy after about 16 million, so you would start seeing damage numbers that always end in 000 pretty quick.
Plus integers are just nicer to work with, none of that rounding or accuracy nonsense, just whole numbers that work remarkably well on the binary level. They could scale up to using 64-bit integers, but this is such a niche problem that I don’t ever see them refactoring their entire damage calculation system to fix it.
MusouTensei2026-01-26 17:35
Performance is somewhat no longer true.
While its true that if you compare the speed of a single addition the integer is faster than float, it is no longer true on the greater scale of things.
Floats have been heavily optimized and the CPU are able to do multiples float calculations in parallel while integers haven't changed much, so they get hogged by your usual for iterators.
Actually, floats have been so optimized that GPUs are float specialists, I've seen shader codes that were even iterating with float instead of integer!
SugarFreeShire2026-01-26 17:50
Very true, but also don’t forget that this game also runs on mobile architecture as well. I’m not super read into how different implementations of ARM architecture handles floats, but compatibility could also be a factor in their decision.
AsterJ2026-01-26 13:00
This stage displays numbers in periods of 3 so 143589 will display as 143 589. This display requires modulo arithmetic which requires an integer in MW calculation.
BlowITA2026-01-26 18:53
Using that idea, if the stage creator wants to fix it, they can use 2 (or more) counters, one for the hundreds and thousands, the other for the millions and billions (and others for the next ones). Using "shifts by 100,000" (whenever a counter goes over n x 100,000, subtract n x 100,000 from it and add n to the next counter), division and modulo arithmetic, they can keep both performance and accuracy without ever having to use floats. It almost feels like building your own CPU/ALU (arithmetic logic unit) inside the game, quite fun for geeks like myself.
AsterJ2026-01-26 20:05
Ya I think there is a "round to nearest" floating point node in MW. Using just that and tracking fractional parts you could implement it completely in floating point without any integer conversion, it's just more effort.
gohrak2026-01-26 08:56
Was that casual dmg 800k
Anru_Kitakaze2026-01-26 08:58
- Saw title
- "okay, I know who posted this"
- Click to see OP
- "Huh, as expected"
False_Baby86282026-01-26 09:04
With you im not even surprised.
Shenbinhao2026-01-26 09:29
Too much number then glitch happened and goes negative. Just like skyrim with be play with enchant, smith, achemy.
Adventurous_Sky61152026-01-26 09:34
Man, is it bad that I ask him for a donation to my account lol, want to get Bina's weapon
Ok_Might_46912026-01-26 09:42
What are those numbers???!!!!
I saw you erase like 10 Mil hp in 10 seconds.
SugarFreeShire2026-01-26 09:54
For those of you who are nerds like me and find stuff like this interesting, what you’re seeing here is what is called a signed integer overflow. It’s not too unlike how in some old arcade games, you could get a score so high that it flips back to zero and starts counting again, except instead of flipping back to zero (like unsigned integers do), it flips to the maximum negative value of the signed integer in question. In this case, it’s overflowing a 32-bit signed integer (aka, an i32), which can store values between -2,147,483,648 and 2,147,483,647 by using the last bit to say whether or not the value stored is negative (it’s “sign”).
So what happens when you try and count to 2,147,483,648 with an i32? Well, due to some binary tomfuckery, it flips to the maximum negative value and keeps counting up, which is exactly what we’re seeing here.
SorbetSuspicious19142026-01-26 10:38
What the auctual fuck-
Oh its just a dhwsp this is just another monday for him
SorbetSuspicious19142026-01-26 10:39
What does Venti do there?
ErcPeace2026-01-27 06:03
Im totally guessing here but grouping the enemies maybe.
SorbetSuspicious19142026-01-27 12:10
Only Dhwsp could use a team slot for cc and still do a shit load of damage
DonutThunderDeluxe2026-01-26 10:48
Back to the artifact mines until the overflow is a positive number again
Relienks2026-01-26 10:56
tf venti supposed to do there?
Legitimate-Hat-22052026-01-26 11:11
Wait we got a dps meter in genshin ???
ErcPeace2026-01-27 06:03
Its a dmg dummy in wonderlands
SopmodTew2026-01-26 11:32
Ah this guy
_Feyr2026-01-26 11:55
It's mean you're now supporting enemy
EbonItto2026-01-26 12:41
Warframe moment
Emotional_Good_77272026-01-26 12:42
My diluc when I'm not letting him retire after five years of carrying me.
NikolaiAlpha2026-01-26 13:03
_*The Heavenly Principles would like to know your location*_
CoolerAndCool-er2026-01-26 13:53
u/savevideo
FluffyFlareon_2026-01-26 13:54
>!How Varka will be performing unless they decide to buff him!<
HoshiAndy2026-01-26 14:27
Who’s your favorite character?
I see you all the time! And I’m wondering who is your fave?
-JPalos-2026-01-26 15:24
And then Varka just watching in the background crying
justcomment2026-01-26 16:38
Wait, did Columbina only have 10k HP? Let's watch again. Oh, OOOH
croissantkoo2026-01-26 16:39
“ oh why is it .. “ *look at tag* “ mm nvm “
FaceMcBashy2026-01-26 19:11
Everyone can do this without time limit but doing it in less than 55 seconds is something else XD
0rtmo2026-01-26 19:18
whale thing
LipeZH_2026-01-26 19:30
I waited so long for the day when a genshin gameplay could be mistaken for HI3.
TheSynthian2026-01-26 19:59
When your team is all healers.
TheJimDim2026-01-26 22:13
Bro's healing them just to slaughter them all over again
Massive_Ad73702026-01-26 23:35
i got a notification for this, and without clicking i knew the only person breaking the training dummy would be dhcwsp
Sreeto2026-01-27 00:42
I was so proud of finally hitting 1 million damage in one hit with my mavuika team, then I see you out here doing almost 19 million multiple times per second
h2odragon002026-01-27 06:03
I am amazed that you are able to break the dmg tester.
Like, you reach dmg lvls that makes the tester loop back to negative.
Commentaires
If anyone's curious, numbers have a limit in games. When you go over that limit, they just loop back to the beginning. That beginning usually being a negative number.
"Oh, it's dhcwsp, we now know why that happens"
And they'd rather calc in Excel than play the game.
We're in the middle point, checking damage spreadsheets and minmaxing on Akasha
Ariane 5 is still sad when those numbers appear 🤡
Either floats or doubles. And floats don't have an unsigned version.
Given that numbers get really big anyway, you're not saving space by using a 32 bit unsigned integer. You do, however, lose accuracy in calculations.
We could ask whoever made the wonderland level what they use for the DPS meter. That would shed some light on what's going on. Because this team isn't doing 2 billion DPS, and it's definitely not doing 3.4* 10^38 DPS (float limit)
You can see Damage just so happens to be at that -2.1 billion overflow threshold at the start of the clip.
FWIW, we know for a fact that Genshin internally does damage calculations with single-precision (32-bit) floats. This is why we had the [OOB integer cast UB bug](https://youtu.be/wprBfd1aWG4) (NOT overflow) back in v2.0, which led to the 9,999,999 damage cap being implemented. This is also why [hitting odd damage numbers above 16,777,216](https://www.reddit.com/r/Genshin_Impact/comments/1iozd3n/so_close/mcosd3x/?context=3) is impossible.
Certain operations with infinity have nondeterministic result, should return NaN (Not a Number, also is a float value).
Sometimes in math you would rather have a number to go negative first then only perform calculations on it as it saves steps and effort that may be needed to adjust around to ensure the value doesn't go "negative" (in terms of bitwise representations) with unsigned integers (which it will trigger wraparound).
A signed int can go over 2 billion which we are still very far away from. If you don't have a specific use case in mind for needing those 4 billion positive values, you're better off leaving the option to have negative numbers available to you.
We have a (sign bit) at leftmost side which is 0 for positive numbers and 1 for negative numbers
So basically 4 which is 100 will be written as (0)100
Negative numbers ,let's say a random number 101 will be written as (1)101
The biggest positive 4 bit number, ie, 1111, will become (0)1111
When any number crosses this, let's say we add one to (0)1111 it becomes (1)0000 which is the smallest negative number
In it, negative 101 is not 1101, but instead 1011. That's because you do complement +1, which removes the need for comparisons when doing arithmetic. The calculation can be done directly.
e.g.: 2 - 4 = -2
0010 - 0100 = 1110
110 by itself is actually 6. 1110 would be 14 but as you described it it should be -6 and not -2. But in two's complement this method becomes 6 - 8 = -2. i.e.: 0010 is 2 -> 1101 is the complement -> 1110 is complement+1.
You can basically look at this as the first digit being negative, which also simplifies conversion from binary to decimal:
0010 = 0\*-8 + 0\*4 + 1\*2 + 0\*1 = 2
0100 = 0\*-8 + 1\*4 + 0\*2 + 0\*1 = 4
1110 = 1\*-8 + 1\*4 + 1\*2 + 1\*0 = -2
>Negative numbers ,let's say a random number 101 will be written as (1)101
So, negative 101 (5) will actually be written as 1011.
Look at u/Seflyx post you replied to. Their examples are correct.
4 levers make up number
Add more lever to make up bigger number
Read levers from last to first
4th lever **ON** add 1
3rd lever **ON** add 2
2nd lever **ON** add 4
1st lever **ON** add -8
All levers off is 0
off - off - off - **ON** is 1
off - off - **ON** - off is 2
off - off - **ON** - **ON** is 3
off - **ON** - off - off is 4
... See pattern?
off - **ON** - **ON** - **ON** is 7
**ON** - off - off - off is -8
**ON** - off - off - **ON** is -7
**ON** - off - **ON** - off is -6
standard burst deals \[442% burst damage + 227% lunar-damage\]
mini-burst deals \[298% lunar-damage\]
Lunar-damage have a strange way of calculating damage (additional modifier), it also ignores defense in the same way as "reaction damage". So add the fact that on that boss shield it also 3x times as effective, and mini-burst becomes stronger than standard burst.
Edit: wait, i thought you were talking about the dog. 2nd boss is a shock-trooper, right? Well, it's pretty much the same thing anyway, shocktrooper's shield takes increased damage from the electro-charged and lunar-charged damage, and flins standard portion of his burst damage is neither.
-Flins after round 1 of Rerir.
-Rerir,probably
Hollow tech technique Lunar purple
"Colour out of space"
You can see it in Nothing Passage quest - [https://www.youtube.com/watch?v=ItocfLgtLw0](https://www.youtube.com/watch?v=ItocfLgtLw0)
"dhcwsp"
Sure.
Enemies would start healing after a certain point.
*checks username*
i see.
Plus integers are just nicer to work with, none of that rounding or accuracy nonsense, just whole numbers that work remarkably well on the binary level. They could scale up to using 64-bit integers, but this is such a niche problem that I don’t ever see them refactoring their entire damage calculation system to fix it.
While its true that if you compare the speed of a single addition the integer is faster than float, it is no longer true on the greater scale of things.
Floats have been heavily optimized and the CPU are able to do multiples float calculations in parallel while integers haven't changed much, so they get hogged by your usual for iterators.
Actually, floats have been so optimized that GPUs are float specialists, I've seen shader codes that were even iterating with float instead of integer!
- "okay, I know who posted this"
- Click to see OP
- "Huh, as expected"
I saw you erase like 10 Mil hp in 10 seconds.
So what happens when you try and count to 2,147,483,648 with an i32? Well, due to some binary tomfuckery, it flips to the maximum negative value and keeps counting up, which is exactly what we’re seeing here.
Oh its just a dhwsp this is just another monday for him
I see you all the time! And I’m wondering who is your fave?
Like, you reach dmg lvls that makes the tester loop back to negative.
Cant believe hes healing the enemies. /s