<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://bsd.neuroinf.jp/w/index.php?action=history&amp;feed=atom&amp;title=%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88%3ADigit</id>
	<title>テンプレート:Digit - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://bsd.neuroinf.jp/w/index.php?action=history&amp;feed=atom&amp;title=%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88%3ADigit"/>
	<link rel="alternate" type="text/html" href="https://bsd.neuroinf.jp/w/index.php?title=%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88:Digit&amp;action=history"/>
	<updated>2026-04-16T23:23:51Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://bsd.neuroinf.jp/w/index.php?title=%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88:Digit&amp;diff=29292&amp;oldid=prev</id>
		<title>Nijcadmin: 1版</title>
		<link rel="alternate" type="text/html" href="https://bsd.neuroinf.jp/w/index.php?title=%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88:Digit&amp;diff=29292&amp;oldid=prev"/>
		<updated>2015-03-14T03:15:30Z</updated>

		<summary type="html">&lt;p&gt;1版&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;includeonly&amp;gt;{{digit/1|({{{1}}})|({{{2}}})|{{#if:{{{3|}}}|({{{3}}})|10}}}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template gives the digit at a given position of a given positive integer, expressed in a specified [[w:numeral system|numeral system]].&lt;br /&gt;
&lt;br /&gt;
*The first parameter gives the number.&lt;br /&gt;
*The second parameter is the position of the required digit (1 being the rightmost, 2 the one to the left, etc.).&lt;br /&gt;
*The third parameter is the [[w:radix|radix]] of the numeral system (default:10), 2 for binary, 8 for octal, 16 for hexadecimal. &lt;br /&gt;
For a radix &amp;gt; 10, the value is given in decimals, for instance, 15 in the hexadecimal system will give for the rightmost digit 15 (which should be &amp;quot;F&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
; Usage&amp;amp;#58;&lt;br /&gt;
: {{Tlx|{{PAGENAME}}|&amp;#039;&amp;#039;decimal integer&amp;#039;&amp;#039;|&amp;#039;&amp;#039;digit no&amp;#039;&amp;#039;|&amp;#039;&amp;#039;numeral system number&amp;#039;&amp;#039;}}&lt;br /&gt;
: All parameters must be positive integers.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
*{{xpsoc|digit|13|1|2}}&lt;br /&gt;
*{{xpsoc|digit|13|2|2}}&lt;br /&gt;
*{{xpsoc|digit|13|3|2}}&lt;br /&gt;
*{{xpsoc|digit|13|4|2}}&lt;br /&gt;
&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|1}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|2}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|3}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|4}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|5}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|6}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|7}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|8}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|9}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|10}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|11}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|12}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|13}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|14}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|15}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|16}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|17}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|18}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|19}}&lt;br /&gt;
&lt;br /&gt;
*{{xpsoc|hex|9002543211234567}}&lt;br /&gt;
&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|1|16}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|2|16}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|3|16}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|4|16}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|5|16}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|6|16}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|7|16}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|8|16}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|9|16}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|10|16}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|11|16}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|12|16}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|13|16}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|14|16}}&lt;br /&gt;
*{{xpsoc|digit|9002543211234567|15|16}}&lt;br /&gt;
&lt;br /&gt;
==Large numbers of type integer==&lt;br /&gt;
Special care has been taken to make the result exact even for large numbers of type integer.&lt;br /&gt;
&lt;br /&gt;
*{{xpsoc|digit|trunc(9134567890e9)+trunc123456789|1}}&lt;br /&gt;
&lt;br /&gt;
*{{xpsoc|#expr:trunc16*{{trunc|9002543211234567}}+trunc7}}&lt;br /&gt;
&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|1}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|2}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|3}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|4}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|5}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|6}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|7}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|8}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|9}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|10}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|11}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|12}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|13}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|14}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|15}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|16}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|17}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|18}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|19}}&lt;br /&gt;
&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|1|1e3}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|2|1e3}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|3|1e3}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|4|1e3}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|5|1e3}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|6|1e3}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|7|1e3}}&lt;br /&gt;
&lt;br /&gt;
*{{xpsoc|digit|{{int|90140406913|79753079}}|7|1e3}}&lt;br /&gt;
*{{xpsoc|digit|{{int|90140406913|79753079}}|8|1e3}}&lt;br /&gt;
&lt;br /&gt;
*{{xpsoc|hex|{{int|1440406913|79753079}}}}&lt;br /&gt;
&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|1|16}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|2|16}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|3|16}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|4|16}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|5|16}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|6|16}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|7|16}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|8|16}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|9|16}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|10|16}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|11|16}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|12|16}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|13|16}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|14|16}}&lt;br /&gt;
*{{xpsoc|digit|{{trunc|1440406913|79753079}}|15|16}}&lt;br /&gt;
&lt;br /&gt;
==Limitation==&lt;br /&gt;
This template applies function mod with as second argument the third parameter and a power of it. Therefore it does not work properly if one of these is equal to one of the values for which mod does not work properly. Known values are 2^n-1 and 2^n+1 for n &amp;gt;= 32:&lt;br /&gt;
*{{xpsoc|digit|7|1|2^32-1}}&lt;br /&gt;
*{{xpsoc|digit|2^40|1|2^32-1}}&lt;br /&gt;
*{{xpsoc|digit|2^40|2|2^32-1}}&lt;br /&gt;
At least for powers with base &amp;lt;= 30 there are no errors with the test value 17 as first argument, see [[Help:Mod/powers]]. &lt;br /&gt;
&lt;br /&gt;
[[Category:Mathematical templates|{{PAGENAME}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nijcadmin</name></author>
	</entry>
</feed>