mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Lounge

Reply
 
Thread Tools
Old 2011-11-02, 01:24   #1
Uncwilly
6809 > 6502
 
Uncwilly's Avatar
 
"""""""""""""""""""
Aug 2003
101×103 Posts

29·349 Posts
Default 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 '<div>has '.number_format(ceil($_REQUEST['exponentdetails'] * log(2))).' decimal digits</div>';
should be:
Code:
echo '<div>has '.number_format(ceil($_REQUEST['exponentdetails'] * log(2) / ln(10) )).' decimal digits</div>';
(If my poor Java reading skills are right.

This page: http://mersenne-aries.sili.net/digits.php does the calculation correctly.

HTH
Uncwilly is offline   Reply With Quote
Old 2011-11-02, 10:32   #2
axn
 
axn's Avatar
 
Jun 2003

144F16 Posts
Default

Quote:
Originally Posted by Uncwilly View Post
Code:
echo '<div>has '.number_format(ceil($_REQUEST['exponentdetails'] * log(2) / ln(10) )).' decimal digits</div>';
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)?
axn is online now   Reply With Quote
Old 2011-11-02, 12:36   #3
Uncwilly
6809 > 6502
 
Uncwilly's Avatar
 
"""""""""""""""""""
Aug 2003
101×103 Posts

29·349 Posts
Default

Quote:
Originally Posted by axn View Post
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.
Uncwilly is offline   Reply With Quote
Old 2011-11-02, 13:36   #4
axn
 
axn's Avatar
 
Jun 2003

3·1,733 Posts
Default

Quote:
Originally Posted by Uncwilly View Post
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.
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
axn is online now   Reply With Quote
Old 2011-11-02, 13:40   #5
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

Quote:
Originally Posted by Uncwilly View Post
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.
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.
science_man_88 is offline   Reply With Quote
Old 2012-08-11, 01:20   #6
Uncwilly
6809 > 6502
 
Uncwilly's Avatar
 
"""""""""""""""""""
Aug 2003
101×103 Posts

100111100010012 Posts
Default

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
Uncwilly is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
http://mersenne-aries.sili.net (stats site) James Heinrich Marin's Mersenne-aries 51 2015-08-25 02:31
mersenne.ca (ex mersenne-aries.sili.net) LaurV mersenne.ca 8 2013-11-25 21:01
I don't get the 'http://mersenne.org/primenet/' joblack Information & Answers 28 2010-03-24 22:13
Who are Marin's Mersenne-aries? Xyzzy Marin's Mersenne-aries 12 2006-01-08 04:28
Mersenne Wiki: Improving the mersenne primes web site by FOSS methods optim PrimeNet 13 2004-07-09 13:51

All times are UTC. The time now is 12:20.


Mon Dec 6 12:20:58 UTC 2021 up 136 days, 6:49, 0 users, load averages: 1.43, 1.42, 1.37

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.