- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I've been saying this or things like it for yonks and yonks and yonks and YONKS.
Admin
Arithmetic and mathematics are not the same thing. The inability to do arithmetic accurately is not an indication that you can't do (or teach) calculus - or vice versa.
Admin
Considering the last four digits as number is not necessarily wrong: when the user inputs "0000" it's read as number 0, and comparing it with a stored number 0 should work as expected. The details depend of course on what they actually do with the data.
Admin
The last 4 digits of the card are 0. It's technically correct.
Admin
People with math degrees are well known for not being able to do basic arithmetic.
Admin
Just wait until the last for digits are 0009 and you get a "bad octal conversion" error. :)
Admin
Not necessarily. It depends on whether you scanf it as %i or %d.
Admin
This is because "basic arithmetic" is actually quite scary when you start to do advanced maths and run across things like Godel's incompleteness theorem and such fun things as 1 - 1/2 + 1/3 - 1/4 + 1/5 .... can be take any value you feel like (and there's plenty more infinite series like that).
Admin
One possibility: The denominators were summed correctly but displayed incorrectly. That 0.75/0.75 was meant to be 0.75/2, but they put the numerator twice.
My mum once had a list of credit card numbers in a spreadsheet. Excel thought 15 significant figures is enough for any ordinary number, so it dropped the last digit. Fortunately credit card numbers have one redundant digit and I quickly had a script to restore them.
Admin
Odd coincidence. I received a replacement credit card in the mail yesterday. It ends in "0000".
I'm old and have had umpteen dozen credit cards over the decades. None ending in "0000". I wonder what amazing WTF's I'll be sending in soon?
Admin
Speaking about exact math...
How funny. It only happens to one cord out of 30 or 40. Or maybe even more seldom! ;-)