mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Programming

Reply
 
Thread Tools
Old 2010-05-11, 13:05   #1
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

838410 Posts
Default f2xm1

according to the art of assembly language second edition copyright 2010 this instruction calculates 2^ST0-1 but this only works for 3 integer values should we try and eliminate that limitation and help gimps with a loop using it ?
science_man_88 is offline   Reply With Quote
Old 2010-05-11, 13:26   #2
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

2×3×19×31 Posts
Default

Um, how would GIMPS benefit from generating strings of all-1 quickly?
jasonp is offline   Reply With Quote
Old 2010-05-11, 13:35   #3
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

838410 Posts
Default

not just generating using them lucas lehmer used mod Mp if I remember right.
science_man_88 is offline   Reply With Quote
Old 2010-05-11, 13:39   #4
Dougal
 
Dougal's Avatar
 
Jan 2009
Ireland

2×3×31 Posts
Default

read this first.


http://en.wikipedia.org/wiki/Lucas%E...primality_test

Last fiddled with by Dougal on 2010-05-11 at 13:40
Dougal is offline   Reply With Quote
Old 2010-05-11, 13:43   #5
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

100000110000002 Posts
Default

I get I'm an idiot I was just asking.
science_man_88 is offline   Reply With Quote
Old 2010-05-11, 13:45   #6
Dougal
 
Dougal's Avatar
 
Jan 2009
Ireland

2×3×31 Posts
Default

reading the link wont do any harm then.
Dougal is offline   Reply With Quote
Old 2010-05-11, 13:50   #7
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

916 mod 25-1 = 11100101002 mod 25-1
= 111002 + 101002 mod 25-1
= 1100002 mod 25-1
= 12 + 100002 mod 25-1
= 100012 mod 25-1
= 100012
= 17.

is basically what my limit helps me understand.

Last fiddled with by ewmayer on 2010-05-11 at 21:13 Reason: You're welcome...
science_man_88 is offline   Reply With Quote
Old 2010-05-11, 17:09   #8
cheesehead
 
cheesehead's Avatar
 
"Richard B. Woods"
Aug 2002
Wisconsin USA

22×3×641 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
916 mod 25−1 = 11100101002 mod 25−1

< snip >
You can display exponents by using the [ sup ] and [ /sup ] commands.

25-1
cheesehead is offline   Reply With Quote
Old 2010-05-11, 17:44   #9
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

100000110000002 Posts
Default

Quote:
Originally Posted by cheesehead View Post
You can display exponents by using the [ sup ] and [ /sup ] commands.

25-1
I got that from the article as is.
science_man_88 is offline   Reply With Quote
Old 2010-05-11, 18:06   #10
Mini-Geek
Account Deleted
 
Mini-Geek's Avatar
 
"Tim Sorbera"
Aug 2006
San Antonio, TX USA

17×251 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
I got that from the article as is.
They included the <sub> and <sup> (on this forum that'd be [sub] and [sup]) tags necessary, they just weren't copied, since the browser didn't know just how to mark that in the field you were copying to. You could be a bit more careful, and at least include something like _ and ^ if not sub and sup. If you have the forum text editor in one of the right modes for it, there're even sub and sup buttons, that look like 23 and 23, at the right end of the buttons.

Last fiddled with by Mini-Geek on 2010-05-11 at 18:08
Mini-Geek is offline   Reply With Quote
Old 2010-05-11, 22:23   #11
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

838410 Posts
Default

yeah I didn't see that and forgot BTW if anyone has "the art of assembly" the second edition has this command on p.402 if you'd like to check it out.

"If ST0 is out of range,f2xml generates an undefined result but raises no exceptions. The computed value replaces the value in ST0."

so if we could get this to be understood and turned into the proper math we might be able to cut out a few lines(with my luck probably not).
science_man_88 is offline   Reply With Quote
Reply

Thread Tools


All times are UTC. The time now is 16:35.

Fri Feb 26 16:35:02 UTC 2021 up 85 days, 12:46, 0 users, load averages: 1.54, 1.57, 1.64

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.