41
you are viewing a single comment's thread
view the rest of the comments
[-] bluGill@kbin.social -2 points 2 years ago

Those programs are wrong already. you can insert lots of checks and slow down correct code, but that results are still wrong as the code has a bug.

[-] SorteKanin@feddit.dk 3 points 2 years ago

What do you mean wrong "already"?

[-] bluGill@kbin.social -2 points 2 years ago

what is the usecase for going beyond maxint? Sure I can make it defined, but your program will have a bug if you do it. Defined just means platforms with a different behavior have to insert checks all over for something that rarely haypens

[-] lysdexic@programming.dev 2 points 2 years ago

what is the usecase for going beyond maxint?

There are many examples of applications that leverage integer overflow, either wrapping around or saturating values.

load more comments (1 replies)
load more comments (6 replies)
load more comments (6 replies)
this post was submitted on 24 Dec 2023
41 points (86.0% liked)

Rust

7743 readers
1 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS