MonkeyF0cker
Mean People Suck
- Since
- Jan 27, 2010
- Messages
- 11,529
- Score
- 21
- Tokens
- 0
Doesn't work very well for large numbers.
Put the following into an Excel spreadsheet:
A1: 1533939
A2: 178365
A3: 16215
A4: 1081
A5: 47
If you try performing LCM(A1:A5) to find the least common multiple, its output is: 273,600,851,370.
The actual LCM is 7,669,695 which can make a pretty significant difference when you're approaching data type constraints as you code. If you surpass the threshold of a data type (depending on whether the data type is signed or unsigned), it will flip like Frogger or Super Mario Bros. (either to 0 or a negative constraint) which may be fine (or desirable) when you're playing a video game, but not so much when you're dealing with dependent variables as part of larger calculations.
Put the following into an Excel spreadsheet:
A1: 1533939
A2: 178365
A3: 16215
A4: 1081
A5: 47
If you try performing LCM(A1:A5) to find the least common multiple, its output is: 273,600,851,370.
The actual LCM is 7,669,695 which can make a pretty significant difference when you're approaching data type constraints as you code. If you surpass the threshold of a data type (depending on whether the data type is signed or unsigned), it will flip like Frogger or Super Mario Bros. (either to 0 or a negative constraint) which may be fine (or desirable) when you're playing a video game, but not so much when you're dealing with dependent variables as part of larger calculations.