Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extended KotD #25, #26, and #27: INTEGER DIVISION, CINT, and CLNG
#19
@SMcNeill:
This stream has already achieved one major goal: to raise awareness of the unexpected results we may get when using Integers

Your final short snippet sums up everything (at least, for me)!

value < 0.5 rounds down.
value = 0.5 rounds to the nearest even integer.
value > 0.5 rounds up.

X.49999999999999 rounds down.
x.50000000000001 rounds up.

If that's what happens in every case - pos or neg - then the world is sweet!
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, Western Australia.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
Reply


Messages In This Thread
RE: Extended KotD #25, #26, and #27: INTEGER DIVISION, CINT, and CLNG - by PhilOfPerth - 05-04-2025, 10:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Extended KotD #23 and #24: _MIN and _MAX SMcNeill 0 597 01-16-2025, 09:51 AM
Last Post: SMcNeill
  Extended KotD #22: _MOUSEHIDDEN SMcNeill 0 599 01-14-2025, 12:29 AM
Last Post: SMcNeill
  Extended KotD #20: _NOTIFYPOPUP SMcNeill 4 1,309 12-05-2024, 01:55 AM
Last Post: Pete
  Extended KotD #21: _MIDISOUNDBANK a740g 8 2,725 08-30-2024, 07:32 PM
Last Post: Steffan-68
  Extended KotD #19: _UCHARPOS SMcNeill 1 877 06-26-2024, 12:54 AM
Last Post: SMcNeill

Forum Jump:


Users browsing this thread: 1 Guest(s)