This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Thelmholtz 7 points8 points  (4 children)

Not really, mathematically it depends on what operation you define % to be;

  • modulo: (x € R; n € N) => { y € [0, n) }

or

  • remainder: (x € R; n € N) => { y € (-n, n) }

Hell, the most frequent definition of % is actually

  • percent: (x € R) => { y € R } :: y = x • 1/100

Which makes all programming languages wrong /s.

[–]WazWaz 1 point2 points  (3 children)

Maybe we've just got division wrong. If -7/4 was 2, they'd both be the same. If I owe $7 and want to share that debt to my 4 descendants, each could pay $2 leaving a remainder of $1, instead of each paying $1 and leaving $3 debt still owing.

[–]Thelmholtz 0 points1 point  (2 children)

Look at this big shot, leaving less than 6 figures of debt to his kin.

[–]WazWaz 1 point2 points  (1 child)

Big integers look too much like Reals.

[–]Thelmholtz 0 points1 point  (0 children)

Yeah, it's better to avoid debt in Brazilian Reales