Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Re: modulo question |
|---|---|
| Date: | Mon, 18 Apr 2005 12:47:01 -0700 |
I have slightly academic question about modulo. I sent this message here
because I thing there are many of gurus which working with modulo operator.
I have tried in python and in C++ following:
python C++
1%2 1 1
- -1%2 1 -1
1%-2 -1 1
- -1%-2 -1 -1
What is right?
Which is right depends upon whether you are using floored division or symmetrical (across zero) division. I was on the ANS X3J14 (Forth) standards committee, and we debated this one endlessly. In the end we adopted two different operators, one for each version, and pushed the choice of which to use to the code developer. -- Dr. Everett (Skip) Carter Phone: 831-641-0645 FAX: 831-641-0647 Taygeta Network Security Services email: skip@taygeta.net 1340 Munras Ave., Suite 314 WWW: http://www.taygeta.net/ Monterey, CA. 93940
pgpgFu98Umnr6.pgp
Description: PGP signature
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Windows Services, Alvin |
|---|---|
| Next by Date: | Re: modulo question, Scovetta Labs |
| Previous by Thread: | Re: modulo question, Michael Vergoz |
| Next by Thread: | Re: modulo question, Scovetta Labs |
| Indexes: | [Date] [Thread] [Top] [All Lists] |