HP Forums
WP 34S Modulo Bug - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: WP 34S Modulo Bug (/thread-1686.html)

Pages: 1 2 3


WP 34S Modulo Bug - Gerald H - 06-22-2014 07:02 AM

Try -4, 2, Mod

My 3.3T 3645 returns 2.


RE: WP 34S Modulo Bug - walter b - 06-22-2014 08:10 AM

That's correct IMHO. Please compare p.67 of the printed manual.

d:-)


RE: WP 34S Modulo Bug - Gerald H - 06-22-2014 08:43 AM

(06-22-2014 08:10 AM)walter b Wrote:  That's correct IMHO. Please compare p.67 of the printed manual.

d:-)

Page 58 of electronic manual, example, 2nd line, substituting my values gives

-4/2= -2 + 1/2(-0).

Do you feel confirmed in your assertion?


RE: WP 34S Modulo Bug - HP67 - 06-22-2014 09:04 AM

-4 mod 2 @ Wolfram


RE: WP 34S Modulo Bug - pito - 06-22-2014 10:44 AM

(06-22-2014 08:43 AM)Gerald H Wrote:  Page 58 of electronic manual, example, 2nd line, substituting my values gives

-4/2= -2 + 1/2(-0).

Do you feel confirmed in your assertion?

That is a formula for a division in the integer mode, not for a mod..

PS: I think -4 mod 2 shall be 0..


RE: WP 34S Modulo Bug - Gerald H - 06-22-2014 10:48 AM

(06-22-2014 10:44 AM)pito Wrote:  
(06-22-2014 08:43 AM)Gerald H Wrote:  Page 58 of electronic manual, example, 2nd line, substituting my values gives

-4/2= -2 + 1/2(-0).

Do you feel confirmed in your assertion?

That is a formula for a division in the integer mode, not for a mod..

PS: I think -4 mod 2 shall be 0..

Thank you Pito for your interest, but would you say two numbers can have a remainder of zero & non-zero modulo?


RE: WP 34S Modulo Bug - pito - 06-22-2014 10:53 AM

(06-22-2014 10:48 AM)Gerald H Wrote:  
(06-22-2014 10:44 AM)pito Wrote:  That is a formula for a division in the integer mode, not for a mod..

PS: I think -4 mod 2 shall be 0..

Thank you Pito for your interest, but would you say two numbers can have a remainder of zero & non-zero modulo?
As I wrote above, the -4 mod 2 shall be 0.
Afaik "mod function is defined as the amount by which a number exceeds the largest integer multiple of the divisor that is not greater than that number.."


RE: WP 34S Modulo Bug - Gerald H - 06-22-2014 10:54 AM

(06-22-2014 09:04 AM)HP67 Wrote:  -4 mod 2 @ Wolfram

Thank you for the reference.

But surely Walter B's contention can be confirmed(?) by a reference, as indeed he has to himself. Your ref has the doubtful advantage of not having been written by yourself.

A battle of authorities or some careful thought?


RE: WP 34S Modulo Bug - Gerald H - 06-22-2014 10:55 AM

(06-22-2014 10:53 AM)pito Wrote:  
(06-22-2014 10:48 AM)Gerald H Wrote:  Thank you Pito for your interest, but would you say two numbers can have a remainder of zero & non-zero modulo?
As I wrote above, the -4 mod 2 shall be 0.

Indeed.


RE: WP 34S Modulo Bug - Paul Dale - 06-22-2014 10:56 AM

Are you sure you shouldn't be using the RMDR operation? -4 2 RMDR gives 0.

MOD and RMDR differ in their processing of negative values. The former being added late for compatibility with the 41 series devices.


- Pauli


RE: WP 34S Modulo Bug - HP67 - 06-22-2014 11:18 AM

(06-22-2014 10:54 AM)Gerald H Wrote:  
(06-22-2014 09:04 AM)HP67 Wrote:  -4 mod 2 @ Wolfram

Thank you for the reference.

But surely Walter B's contention can be confirmed(?) by a reference, as indeed he has to himself. Your ref has the doubtful advantage of not having been written by yourself.

A battle of authorities or some careful thought?

My HP 48 and HP 50g also show a result of zero. If the answer isn't zero, then there are going to be a lot more upset people (HP and Wolfram customers) than WP 34S customers Wink


RE: WP 34S Modulo Bug - Massimo Gnerucci - 06-22-2014 11:32 AM

(06-22-2014 10:56 AM)Paul Dale Wrote:  Are you sure you shouldn't be using the RMDR operation? -4 2 RMDR gives 0.

MOD and RMDR differ in their processing of negative values. The former being added late for compatibility with the 41 series devices.


- Pauli

4 CHS ENTER^ 2 XEQ 'MOD
gives 0 on the 41


RE: WP 34S Modulo Bug - pito - 06-22-2014 11:33 AM

(06-22-2014 10:56 AM)Paul Dale Wrote:  MOD and RMDR differ in their processing of negative values.
- Pauli
That is true, however

Y mod X = 0 for any positive/negative X or Y where Y = k * X, and k is an integer.


RE: WP 34S Modulo Bug - Gerald H - 06-22-2014 12:25 PM

(06-22-2014 10:56 AM)Paul Dale Wrote:  Are you sure you shouldn't be using the RMDR operation? -4 2 RMDR gives 0.

MOD and RMDR differ in their processing of negative values. The former being added late for compatibility with the 41 series devices.


- Pauli

Very interesting.

So you propose an operating system where a zero remainder corresponds to a non-zero result modulo?


RE: WP 34S Modulo Bug - Gerald H - 06-22-2014 12:30 PM

(06-22-2014 11:33 AM)pito Wrote:  
(06-22-2014 10:56 AM)Paul Dale Wrote:  MOD and RMDR differ in their processing of negative values.
- Pauli
That is true, however

Y mod X = 0 for any positive/negative X or Y where Y = k * X, and k is an integer.

Much better, an appeal to a definition!

You may by now be wondering how proficient in arithmetic some of the correspondents are.


RE: WP 34S Modulo Bug - jebem - 06-22-2014 12:33 PM

(06-22-2014 11:18 AM)HP67 Wrote:  
(06-22-2014 10:54 AM)Gerald H Wrote:  Thank you for the reference.

But surely Walter B's contention can be confirmed(?) by a reference, as indeed he has to himself. Your ref has the doubtful advantage of not having been written by yourself.

A battle of authorities or some careful thought?

My HP 48 and HP 50g also show a result of zero. If the answer isn't zero, then there are going to be a lot more upset people (HP and Wolfram customers) than WP 34S customers Wink

My HP-PRIME returns Zero for the -4 MOD 2 expression as well.


RE: WP 34S Modulo Bug - Gerald H - 06-22-2014 12:34 PM

Meanwhile I believe the problem is in psychology.

The poor MOD function is the only function singled out in the manual as existing "unfortunately"!

Clearly Euler & Gauss preferred modulo to remainder; Newton was ambiguous, but never actually disparaging of modulo. I would rather discount Fermat's well-known antipathy to modulo as a quirk, shared by a die-hard few even today.


RE: WP 34S Modulo Bug - HP67 - 06-22-2014 12:35 PM

(06-22-2014 12:33 PM)jebem Wrote:  
(06-22-2014 11:18 AM)HP67 Wrote:  My HP 48 and HP 50g also show a result of zero. If the answer isn't zero, then there are going to be a lot more upset people (HP and Wolfram customers) than WP 34S customers Wink

My HP-PRIME returns Zero for the -4 MOD 2 expression as well.

Yes, it's certainly zero as we all know. Unfortunately those who tried to support the OP were regarded unfavorably by that very same person we sought to help.

So much for this thread Wink


RE: WP 34S Modulo Bug - Gerald H - 06-22-2014 12:36 PM

(06-22-2014 12:33 PM)jebem Wrote:  
(06-22-2014 11:18 AM)HP67 Wrote:  My HP 48 and HP 50g also show a result of zero. If the answer isn't zero, then there are going to be a lot more upset people (HP and Wolfram customers) than WP 34S customers Wink

My HP-PRIME returns Zero for the -4 MOD 2 expression as well.

Thank you for the reference.

Inability to acknowledge an overt error makes me wonder whether other bug reports have been so disparagingly treated.


RE: WP 34S Modulo Bug - Gerald H - 06-22-2014 12:38 PM

So that's it? An obvious error will be passed over & the operating system remains defect?