mersenneforum.org James H's http://mersenne-aries.sili.net utility site.
 Register FAQ Search Today's Posts Mark Forums Read

 2011-11-02, 01:24 #1 Uncwilly 6809 > 6502     """"""""""""""""""" Aug 2003 101×103 Posts 34·131 Posts James H's http://mersenne-aries.sili.net utility site. I could not find a good simple thread for this. I think that maybe we should have a sub-forum someplace for the handy sites like this and mersenne.info and Dario's ECM applet. I found and error in the calculations on this page: http://mersenne-aries.sili.net/exponent.php Code: echo '
has '.number_format(ceil($_REQUEST['exponentdetails'] * log(2))).' decimal digits '; should be: Code: echo ' has '.number_format(ceil($_REQUEST['exponentdetails'] * log(2) / ln(10) )).' decimal digits
'; (If my poor Java reading skills are right. This page: http://mersenne-aries.sili.net/digits.php does the calculation correctly. HTH
2011-11-02, 10:32   #2
axn

Jun 2003

124018 Posts

Quote:
 Originally Posted by Uncwilly Code: echo '
has '.number_format(ceil($_REQUEST['exponentdetails'] * log(2) / ln(10) )).' decimal digits '; if a language has both log and ln, then first one will be base-10 log and second one will be natural log. In which case, log(2) is sufficient. OTOH, may be you typoed and meant log(2) / log(10)? 2011-11-02, 12:36 #3 Uncwilly 6809 > 6502 """"""""""""""""""" Aug 2003 101×103 Posts 1061110 Posts Quote:  Originally Posted by axn if a language has both log and ln, then first one will be base-10 log and second one will be natural log. In which case, log(2) is sufficient. OTOH, may be you typoed and meant log(2) / log(10)? Here is the code that works on the other page that I referred to: Code: <script type="text/javascript"> function DigitsExp() { document.getElementById('digits_text_input').value = Math.ceil(document.getElementById('exponent_text_input').value * (Math.log(2) / Math.LN10)); // log(2, 10) = 0.301029995664 } function ExpDigits() { document.getElementById('exponent_text_input').value = Math.floor(document.getElementById('digits_text_input').value / (Math.log(2) / Math.LN10)); // log(2, 10) = 0.301029995664 } </script> Since I don't know Java or JS, I was just trying to guess. 2011-11-02, 13:36 #4 axn Jun 2003 19×283 Posts Quote:  Originally Posted by Uncwilly Here is the code that works on the other page that I referred to: Code:  Since I don't know Java or JS, I was just trying to guess. Okay. Gotcha. In which case, it would be log(10) (w/o looking at the language, which, btw, appears to be PERL PHP). LN10 is a predefined constant jn JS, and not a function call. EDIT:- I am, of course, talking about "echo '<div>has '.number_format(ceil($_REQUEST['exponentdetails'] * log(2) / ln(10) )).' decimal digits</div>';" thing.

EDIT2:- PHP log function takes an optional base argument, so log(2, 10) would be the way to go.

EDIT3:- Or better yet, use log10(2)

Last fiddled with by axn on 2011-11-02 at 13:45

2011-11-02, 13:40   #5
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts

Quote:
 Originally Posted by Uncwilly Here is the code that works on the other page that I referred to: Code:  Since I don't know Java or JS, I was just trying to guess.
JS was my first code outside of html, however i never got really into it without making pointless fancy functions that changes the background color on timers etc. I'll look in my dynamic html book I know what most if not all of it means.

 2012-08-11, 01:20 #6 Uncwilly 6809 > 6502     """"""""""""""""""" Aug 2003 101×103 Posts 297316 Posts I saw Chalsall's post over here: http://mersenneforum.org/showthread.php?t=17049 So, I decide to go over and submit all of the results I had lying around. It does not give credit for factors it already knows about. And I broke the website. I submitted this Factor5 result: Code: Trial-factoring M11111111111111111111111 in [2^1, 2^100-1] M11111111111111111111111 has a factor: 5246666666666666666666614201 - Program: L5.0x M11111111111111111111111 has 1 factors in [2^1, 2^100-1]. And this is what it now thinks the exponent is: 4,294,967,295

 Similar Threads Thread Thread Starter Forum Replies Last Post James Heinrich Marin's Mersenne-aries 51 2015-08-25 02:31 LaurV mersenne.ca 8 2013-11-25 21:01 joblack Information & Answers 28 2010-03-24 22:13 Xyzzy Marin's Mersenne-aries 12 2006-01-08 04:28 optim PrimeNet 13 2004-07-09 13:51

All times are UTC. The time now is 11:23.

Fri Jul 1 11:23:14 UTC 2022 up 78 days, 9:24, 0 users, load averages: 1.61, 1.62, 1.56