Currently there may be errors shown on top of a page, because of a missing Wiki update (PHP version and extension DPL3). |
Topics | Help • Register • News • History • How to • Sequences statistics • Template prototypes |
Difference between revisions of "Template:GP"
(new) |
(contributor for MultiRes returned) |
||
(13 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
− | Get a parameter value of a template by name | + | ==Description== |
+ | Get a parameter value of a template by name if exists, "" (null) otherwise. | ||
− | Call: | + | ==Call== |
+ | :<nowiki>{{GP|<prime name>|<Parameter>}}</nowiki> | ||
− | <nowiki>{{GP|< | + | Note: |
− | [[Category:Templates]] | + | :For Riesel and Proth primes parameters for reservations the returned value is as follows: |
− | </noinclude><includeonly>{{#ifexist:{{{1}}}|{{ | + | :- Parameter (P/R)Reserved questioned: |
+ | ::- (P/R)Reserved is filled → contributor is given | ||
+ | ::- (P/R)MultiRes is filled → contributor is given | ||
+ | |||
+ | :- Parameter (P/R)MultiRes questioned: | ||
+ | ::- (P/R)MultiRes is filled → the number of the [[:Category:Multi_Reservation|MultiReservation]] is given | ||
+ | |||
+ | ==Examples== | ||
+ | Get the parameter "CKBase" from "Carol-Kynea base 2" primes | ||
+ | *<nowiki>{{GP|Carol-Kynea prime 2|CKBase}}</nowiki> results in | ||
+ | :{{GP|Carol-Kynea prime 2|CKBase}} | ||
+ | |||
+ | *<nowiki>{{GP|Riesel prime 2 15|RMaxn}}</nowiki> results in | ||
+ | :{{GP|Riesel prime 2 15|RMaxn}} | ||
+ | |||
+ | *<nowiki>{{GP|Riesel prime 2 65|RMaxn}}</nowiki> (using MultiReservation) results in | ||
+ | :{{GP|Riesel prime 2 65|RMaxn}} | ||
+ | |||
+ | *<nowiki>{{GP|Riesel prime 2 65|RDate}}</nowiki> (using MultiReservation) results in | ||
+ | :{{GP|Riesel prime 2 65|RDate}} | ||
+ | |||
+ | *<nowiki>{{GP|Riesel prime 2 65|RNlist}}</nowiki> | ||
+ | {{GP|Riesel prime 2 65|RNlist}} | ||
+ | |||
+ | *<nowiki>{{GP|GF Divisor 3 209|GFList}}</nowiki> | ||
+ | {{GP|GF Divisor 3 209|GFList}} | ||
+ | [[Category:Templates]]</noinclude><includeonly><!-- | ||
+ | -->{{#vardefine:_type|none}}<!-- | ||
+ | -->{{#vardefine:_short|none}}<!-- | ||
+ | -->{{#if:{{#pos:{{{1}}}|Carol}}|{{#vardefine:_type|Carol-Kynea prime}}{{#vardefine:_short|CK}}}}<!-- | ||
+ | -->{{#if:{{#pos:{{{1}}}|Cullen}}|{{#vardefine:_type|Cullen prime}}{{#vardefine:_short|Cu}}}}<!-- | ||
+ | -->{{#if:{{#pos:{{{1}}}|Leyland}}|{{#vardefine:_type|Leyland prime}}{{#vardefine:_short|Le}}}}<!-- | ||
+ | -->{{#if:{{#pos:{{{1}}}|Proth}}|{{#vardefine:_type|Proth prime}}{{#vardefine:_short|P}}}}<!-- | ||
+ | -->{{#if:{{#pos:{{{1}}}|Riesel}}|{{#vardefine:_type|Riesel prime}}{{#vardefine:_short|R}}}}<!-- | ||
+ | -->{{#if:{{#pos:{{{1}}}|Williams}}|{{#vardefine:_type|Williams prime}}{{#vardefine:_short|Wi}}}}<!-- | ||
+ | -->{{#if:{{#pos:{{{1}}}|Woodall}}|{{#vardefine:_type|Woodall prime}}{{#vardefine:_short|Wo}}}}<!-- | ||
+ | -->{{#if:{{#pos:{{{1}}}|GF}}|{{#vardefine:_type|GF Divisor}}{{#vardefine:_short|GF}}}}<!-- | ||
+ | -->{{#if:{{#pos:{{{1}}}|Generalized Fermat number}}|{{#vardefine:_type|Generalized Fermat number}}{{#vardefine:_short|GF}}}}<!-- | ||
+ | -->{{#vardefine:_mres|{{#ifexist:{{{1}}}|{{#dpl:title={{{1}}}|skipthispage=no|include={ {{#var:_type}}}:{{#var:_short}}MultiRes}}}}}}<!-- | ||
+ | -->{{#vardefine:_mmax|{{#ifexist:{{{1}}}|{{#dpl:title={{{1}}}|skipthispage=no|include={ {{#var:_type}}}:{{#var:_short}}Maxn}}}}}}<!-- | ||
+ | -->{{#ifexist:{{{1}}}|{{#if:{{#var:_mres}}| | ||
+ | {{#switch:{{{2}}} | ||
+ | |RMaxn |PMaxn={{#ifeq:{{#var:_mmax}}||{{Multi Reservation:{{#var:_mres}}-NMax}}|{{#var:_mmax}}}} | ||
+ | |RReserved |PReserved={{Multi Reservation:{{#var:_mres}}-Contributor}} | ||
+ | |RDate |PDate={{Multi Reservation:{{#var:_mres}}-Date}} | ||
+ | |#default={{#dpl:title={{{1}}}|skipthispage=no|include={ {{#var:_type}}}:{{{2}}}}} | ||
+ | }} | ||
+ | |{{#ifeq:{{{2}}}|Date|{{#dpl:title={{{1}}}|skipthispage=no|include={ {{#var:_type}}}:{{#var:_short}}{{{2}}}}}|{{#dpl:title={{{1}}}|skipthispage=no|include={ {{#var:_type}}}:{{{2}}}}}}}}} | ||
+ | }}</includeonly> |
Latest revision as of 12:41, 5 September 2024
Description
Get a parameter value of a template by name if exists, "" (null) otherwise.
Call
- {{GP|<prime name>|<Parameter>}}
Note:
- For Riesel and Proth primes parameters for reservations the returned value is as follows:
- - Parameter (P/R)Reserved questioned:
- - (P/R)Reserved is filled → contributor is given
- - (P/R)MultiRes is filled → contributor is given
- - Parameter (P/R)MultiRes questioned:
- - (P/R)MultiRes is filled → the number of the MultiReservation is given
Examples
Get the parameter "CKBase" from "Carol-Kynea base 2" primes
- {{GP|Carol-Kynea prime 2|CKBase}} results in
- 2
- {{GP|Riesel prime 2 15|RMaxn}} results in
- 7000000
- {{GP|Riesel prime 2 65|RMaxn}} (using MultiReservation) results in
- 3100000
- {{GP|Riesel prime 2 65|RDate}} (using MultiReservation) results in
- 2020-11-12
- {{GP|Riesel prime 2 65|RNlist}}
4 6;C:Williams 65•641-1 12;C:Williams 65•642-1 22 28 52 78;C:Williams 65•6413-1 94 124 162;C:Williams 65•6427-1 174;C:Williams 65•6429-1 192;C:Williams 65•6432-1 204;C:Williams 65•6434-1 304 376 808 930;C:Williams 65•64155-1 972;C:Williams 65•64162-1 1714 1776;C:Williams 65•64296-1 2176 2568;C:Williams 65•64428-1 4392;C:Williams 65•64732-1 4728;C:Williams 65•64788-1 5548 8046;C:Williams 65•641341-1 12474;C:Williams 65•642079-1 26856;C:Williams 65•644476-1 27156;C:Williams 65•644526-1 45240;C:Williams 65•647540-1 52026;C:Williams 65•648671-1 134598;1957;C:Williams 65•6422433-1 179658;656;C:Williams 65•6429943-1 185946;626;C:Williams 65•6430991-1 578512;75621 647130;78230;C:Williams 65•64107855-1 1374574;97849 1421088;98403;C:Williams 65•64236848-1 1505640;99143;C:Williams 65•64250940-1 2450614;117055 2583720;120527;C:Williams 65•64430620-1 2876718;122668;C:Williams 65•64479453-1 3080952;131397;C:Williams 65•64513492-1
- {{GP|GF Divisor 3 209|GFList}}
2,1,207#1956#Raphael M. Robinson 3,1,207#1992#Harvey Dubner 3,2,206#1996#Anders Björn,Hans Riesel 4,3,207#1996#Anders Björn,Hans Riesel 5,1,208#1992#Harvey Dubner 5,2,208#1996#Anders Björn,Hans Riesel 5,3,208#1996#Anders Björn,Hans Riesel 5,4,208#1996#Anders Björn,Hans Riesel 6,1,203#1969#Hans Riesel 6,5,208#1996#Anders Björn,Hans Riesel 8,3,205#1996#Anders Björn,Hans Riesel 8,5,208#1996#Anders Björn,Hans Riesel 9,2,207#1996#Anders Björn,Hans Riesel 9,5,208#1996#Anders Björn,Hans Riesel 9,8,207#1996#Anders Björn,Hans Riesel 10,1,208#1992#Harvey Dubner 10,3,208#1996#Anders Björn,Hans Riesel 10,9,208#1996#Anders Björn,Hans Riesel 12,1,207#1969#Hans Riesel 12,5,208#1996#Anders Björn,Hans Riesel