<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[3]</anchor-end> <dfn>絶対値</dfn>とは、 <n xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">0</n> との<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">距離</anchor>の大きさです。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="4" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[4]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">実数</anchor> <var>x</var> の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">絶対値</anchor> <dfn><fenced xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><openfence>|</openfence><fencedtext> <var xmlns="http://www.w3.org/1999/xhtml">x</var> </fencedtext><closefence>|</closefence></fenced><title xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">|<var xmlns="http://www.w3.org/1999/xhtml">・</var>|</title></dfn> は、
次のように定義されます。</p><figure class="math"><p><fenced xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><openfence>|</openfence><fencedtext> <var xmlns="http://www.w3.org/1999/xhtml">x</var> </fencedtext><closefence>|</closefence></fenced> = <fenced xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><openfence>{</openfence><fencedtext> <lines><line> <var xmlns="http://www.w3.org/1999/xhtml">x</var> if <var xmlns="http://www.w3.org/1999/xhtml">x</var> ≧ 0 </line><line> -<var xmlns="http://www.w3.org/1999/xhtml">x</var> if <var xmlns="http://www.w3.org/1999/xhtml">x</var> &lt; 0 </line></lines> </fencedtext></fenced></p></figure><section><h1><code class="JS" xml:lang="en">Math.abs()</code> (JavaScript)</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[1]</anchor-end>
<cite>Exploring: Math.abs Returns a Negative Number</cite> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://bmaurer.blogspot.com/2006/10/mathabs-returns-negative-number.html">http://bmaurer.blogspot.com/2006/10/mathabs-returns-negative-number.html</anchor-external>
(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">名無しさん</anchor> <weak xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">2006-10-20 00:50:19 +00:00</weak>)</p></section><section><h1><code xml:lang="en">abs(<var>x</var>)</code> (ECMAScript 仕様書算法定義)</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[2]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ES3</anchor> 仕様書中の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">算法</anchor>の定義で用いられている<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">数学関数</anchor>
<dfn><code xml:lang="en">abs(<var>x</var>)</code></dfn>
は、<var xml:lang="en">x</var> の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">絶対値</anchor>、すなわち <var xml:lang="en">x</var> が<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">負</anchor>の時は -<var xml:lang="en">x</var>、
それ以外の時は <var xml:lang="en">x</var> を表します。</p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><cite xmlns="http://www.w3.org/1999/xhtml">ECMAScript Language Specification (HTML version)</cite> (<time xmlns="http://www.w3.org/1999/xhtml">2009-04-03 04:43:48 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://bclary.com/2004/11/07/#a-5.2">http://bclary.com/2004/11/07/#a-5.2</anchor-external></comment-p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="5" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[5]</anchor-end> <cite xml:lang="en"><strong>[</strong>selectors<strong>]</strong> Remove the Selectors-specific tokens, rephrase in terms o…</cite>
(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">tabatkins</anchor>著, <time>2016-12-16 07:16:49 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://github.com/w3c/csswg-drafts/commit/52554f80bac1d05be0067fff4a05d2ec126cb41f">https://github.com/w3c/csswg-drafts/commit/52554f80bac1d05be0067fff4a05d2ec126cb41f</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="6" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[6]</anchor-end> <cite xml:lang="en">Remove the Selectors-specific tokens, per WG resolution.</cite>
(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">tabatkins</anchor>著, <time>2016-12-16 07:14:21 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://github.com/w3c/csswg-drafts/commit/177fc30c38029740a4dfdc4721fc3aa4a8273595">https://github.com/w3c/csswg-drafts/commit/177fc30c38029740a4dfdc4721fc3aa4a8273595</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="7" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[7]</anchor-end> <cite xml:lang="en"><strong>[</strong>selectors-4<strong>]</strong> Why is this two tokens if '&gt;&gt;' isn't two tokens?</cite>
(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">fantasai</anchor>著, <time>2018-01-01 20:19:47 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://github.com/w3c/csswg-drafts/commit/b9350e895ec41faa4a0e29745f416921794f5cd1">https://github.com/w3c/csswg-drafts/commit/b9350e895ec41faa4a0e29745f416921794f5cd1</anchor-external></p></section></body></html>