Please try either version (or both) and let us know what you think! The Windows 8 app users are also welcome to post reviews, ratings, etc. from within the Big Integer Calculator app directly - that way your suggestions will be more visible to other Windows 8 users. Many thanks for stopping by!
http://www.javascripter.net/math/calculators/100digitbigintcalculator.htm
ReplyDeletefails:
X=1426739679421649871276372148235116557686994643116557644771
Y=127
prime? true
MR(x,y) ? false
The calculator uses 30 rounds of the Miller-Rabin test to determine probable primality. Since the test's result is either "guaranteed composite" or "probable prime", there are (very rare) cases when a composite is misreported as prime. The number X in Joe's example above is one such rare case. The number X is of course composite: X=595240280838049939*24404851514360047459*98214646338278239771.
ReplyDeleteHowever, the first 30 prime bases in Miller-Rabin test do not reveal the compositeness of X. These 30 bases (2,3,5,7,...,113) are "liar" bases for this X. The first prime "witness" is 127. Here you can learn more about the Miller-Rabin test.
I am still looking for a big calculator with floating point because
ReplyDeleteI need it with my big integer division analysis of quotient reminders where the
mod function is no help. My old virtual calculator did but is not supported in 8.1
It would be nice to add floating point as an added feature.
Dan
On large integers like rsa2048 (2048 bit length) it returns the wrong division product.
ReplyDeleteThis thing needs a lot more work!
Thanks Dan for using the calculator. The division issue, I believe, is already fixed in the online version of the calculator available here:
ReplyDeletehttp://www.javascripter.net/math/calculators/100digitbigintcalculator.htm
I am accumulating fixes to roll into an update in Windows Store. If you still have (rare) cases with wrong division results, can you please post an example right here (or send me an email if you prefer)? Thank you!
Is there a way to embed all of the functions of the Big Integer Calculator into Python and call up and graph the answers?
ReplyDeleteThank you Ray for your question!
ReplyDeletePython already has built-in arbitrary precision arythmetic capabilities. Let me quote some relevant info from
http://http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic
Python: the built-in int (3.x) / long (2.x) integer type is of arbitrary precision. The Decimal class in the standard library module decimal has user definable precision and limited mathematical operations (exponentiation, square root, etc. but no trigonometric functions).
Therefore I think it would be counterintuitive to implement Python-to-JavaScript calls and graph the results. Instead, a more natural way to achieve the same result would be just using Python's native capabilities and porting to Python any code that is not yet readily available. The necessary algorithms can be found, e.g., in the Handbook for Applied Cryptography available here:
http://cacr.uwaterloo.ca/hac/
Thank you very much Alex! I now understand your comments as big integers are built into Python. Also thanks for the suggestion for the Handbook for Applied Cryptography.
DeleteAll the best,
Ray