Balatro Wiki

Naneinf is the score displayed when a player achieves a score greater than ~1.80e308. It also appears as the target score in Ante 39 as "nan," since 4.8e309 overflows to Naneinf. For this reason it is not possible to progress past this Ante.

'nan' means Not a Number, 'e' is the scientific notation for the exponent, specifically where the game is multiplying a number by 10 raised to a power, and 'inf' is an abbreviation for Infinity.

Naneinf

Naneinf score display

Mathematics of Naneinf[]

Balatro uses the IEEE-754 double-precision floating point format which has a finite amount of space to store uncountably infinite values. In practice any value over ~1.80e308 is just called ā€œInfinityā€.

1.80e308 ā‰ˆ 2^1024(1 āˆ’ 2^-53) which is the largest representable 64-bit floating point number.

The game code has to figure out how to display extremely high numbers in the score counter. First it checks if the number is less than 1e11. Since ā€œInfinityā€ is indeed greater than 1e11, it must be displayed in scientific notation.

Then the game checks what the base 10 logarithm of the number is, rounded down - this is the number after the exponent ā€œeā€. For 5.4e12, this is 12. For 1e24 it is 24. IEEE-754 says that log10(Infinity) = Infinity, which rounds down to Infinity, or 'inf' for short.

The final step is to get the mantissa, which is obtained by dividing the original score by 10 to the power of the rounded down exponent: 5.4e12/(10^12) is 5.4, and Infinity/(10^Infinity) = Infinity/Infinity which is illogical. IEEE-754 says this is an invalid operation, and declares that the result is Not A Number: 'NaN'.

The game turns these outputs into text strings — ā€œnanā€ and ā€œinfā€ — and displays them with the scientific notation ā€œeā€ (the exponent, meaning times 10 to the power of) in the middle to get ā€œnaneinfā€ in the score counter.

All mathematical comparisons are considered false when comparing to nan. This is why Mr. Bones does not prevent death on Ante 39: the player's score is compared to 25% of nan, which is nan, and therefore it is determined the player did not score enough to be saved by Mr. Bones.

Achieving Naneinf[]

Achieving naneinf is usually done by using a Baron and Mime setup. See Guide: naneinf for a full guide.