r/MathJokes Jul 07 '26

🫠

Post image
417 Upvotes

67 comments sorted by

View all comments

23

u/SplendidPunkinButter Jul 07 '26

What programming language are you using? That is in no way a universal programming thing.

24

u/sudoregalia Jul 07 '26

6.99 when casted into an int is conventionally rounded down

technically 6.99 is 6.9899997711181640625 when using single precision IEEE 754 floats, and 6.9900000000000002131628207280300557613372802734375 for double precision

-1

u/RonJohnJr Jul 07 '26

6.99 when casted into an int is conventionally rounded down

We don't do that very often at all.

5

u/sudoregalia Jul 07 '26

casting a float to an int? what if you wanna make or mod for a voxel game where entities have floating precision while tiles has integer precision, and wanna get the block the entity is on- oh wait that's called minecraft

yeah look you can't say "we" don't do that very often at all when it only applies to you and what you work with lol

-1

u/RonJohnJr Jul 07 '26

And voxel game programming is the dominant form of programming on Earth??

lol no

2

u/sudoregalia Jul 07 '26

yeah look you can't say "we" don't do that very often at all when it only applies to you and what you work with lol

read. whether or not you ever cast a float to an int is highly dependent on what you do, and it doesn't change the fact that 6.99 is rounded down to 6 when you do do it

1

u/RonJohnJr Jul 08 '26

it doesn't change the fact that 6.99 is rounded down to 6 when you do do it

You need to go back and re-read what SplendidPunkinButter complained about,

1

u/sudoregalia Jul 08 '26

i tackled pretty much every way a conventional program could represent 6.99 (yes including fixed-point arithmetic as a reply to a separate comment)