octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #55238] Modulo [mod(X, Y)] of larger values s


From: anonymous
Subject: [Octave-bug-tracker] [bug #55238] Modulo [mod(X, Y)] of larger values seems to fail silently to output 0
Date: Mon, 17 Dec 2018 21:10:05 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0

Follow-up Comment #1, bug #55238 (project octave):

Just a followup to the workaround, even larger numbers for the modulo command
can be used by breaking it up into even more terms. For example, mod(24^23,55)
can be solved with three iterations inside a wrap:  
mod((mod(24^10,55)*mod(24^10,55))*mod(24^3,55),55) 
[ = 19 ]

So, it looks like this is just a really-large-number issue after all. Not sure
if this constitutes a bug, but in the meantime, hopefully people searching
around will find this helpful. It appears that the exponent should be kept to
10 or less for each term, given a base of two digits at least.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55238>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]