<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://rustedwarfare.org/index.php?action=history&amp;feed=atom&amp;title=%E7%89%B9%E6%AE%8A%E5%80%BC</id>
	<title>特殊值 - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://rustedwarfare.org/index.php?action=history&amp;feed=atom&amp;title=%E7%89%B9%E6%AE%8A%E5%80%BC"/>
	<link rel="alternate" type="text/html" href="https://rustedwarfare.org/index.php?title=%E7%89%B9%E6%AE%8A%E5%80%BC&amp;action=history"/>
	<updated>2026-08-10T18:30:54Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rustedwarfare.org/index.php?title=%E7%89%B9%E6%AE%8A%E5%80%BC&amp;diff=3460&amp;oldid=prev</id>
		<title>2024年5月6日 (一) 12:21 N9tank</title>
		<link rel="alternate" type="text/html" href="https://rustedwarfare.org/index.php?title=%E7%89%B9%E6%AE%8A%E5%80%BC&amp;diff=3460&amp;oldid=prev"/>
		<updated>2024-05-06T12:21:25Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2024年5月6日 (一) 20:21的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;第1行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第1行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;特殊值是指-Infinity,Infinity,NaN。&amp;lt;br&amp;gt;我们可以它们以下方式快速创建它。&amp;lt;br&amp;gt;-1/0,1/0,0/0&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;特殊值是指-Infinity,Infinity,NaN。&amp;lt;br&amp;gt;我们可以它们以下方式快速创建它。&amp;lt;br&amp;gt;-1/0,1/0,0/0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt;如果你不想如此复杂度比较它，你可以使用str()函数。如:str(${a})==&quot;Infinity&quot;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==比较==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==比较==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;假定a是传递的任意一个参数，b是Infinity。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;假定a是传递的任意一个参数，b是Infinity。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>N9tank</name></author>
	</entry>
	<entry>
		<id>https://rustedwarfare.org/index.php?title=%E7%89%B9%E6%AE%8A%E5%80%BC&amp;diff=3150&amp;oldid=prev</id>
		<title>N9tank：​创建页面，内容为“特殊值是指-Infinity,Infinity,NaN。&lt;br&gt;我们可以它们以下方式快速创建它。&lt;br&gt;-1/0,1/0,0/0 ==比较== 假定a是传递的任意一个参数，b是Infinity。 *请注意luke对NaN判断并不规范 #a==NaN true，这是不正确的，在代码中应该返回false #NaN!=NaN false 这是不正确的，在代码中应该返回true *比较式 这里结果0表常数。&lt;br&gt;a!=b -inf,0&lt;br&gt;a==b nan,inf&lt;br&gt;a!=-b inf,0&lt;br&gt;a==-b nan,-inf  a&lt;=b 0,inf,-inf&lt;…”</title>
		<link rel="alternate" type="text/html" href="https://rustedwarfare.org/index.php?title=%E7%89%B9%E6%AE%8A%E5%80%BC&amp;diff=3150&amp;oldid=prev"/>
		<updated>2023-11-12T02:39:59Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“特殊值是指-Infinity,Infinity,NaN。&amp;lt;br&amp;gt;我们可以它们以下方式快速创建它。&amp;lt;br&amp;gt;-1/0,1/0,0/0 ==比较== 假定a是传递的任意一个参数，b是Infinity。 *请注意luke对NaN判断并不规范 #a==NaN true，这是不正确的，在代码中应该返回false #NaN!=NaN false 这是不正确的，在代码中应该返回true *比较式 这里结果0表常数。&amp;lt;br&amp;gt;a!=b -inf,0&amp;lt;br&amp;gt;a==b nan,inf&amp;lt;br&amp;gt;a!=-b inf,0&amp;lt;br&amp;gt;a==-b nan,-inf  a&amp;lt;=b 0,inf,-inf&amp;lt;…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;特殊值是指-Infinity,Infinity,NaN。&amp;lt;br&amp;gt;我们可以它们以下方式快速创建它。&amp;lt;br&amp;gt;-1/0,1/0,0/0&lt;br /&gt;
==比较==&lt;br /&gt;
假定a是传递的任意一个参数，b是Infinity。&lt;br /&gt;
*请注意luke对NaN判断并不规范&lt;br /&gt;
#a==NaN true，这是不正确的，在代码中应该返回false&lt;br /&gt;
#NaN!=NaN false 这是不正确的，在代码中应该返回true&lt;br /&gt;
*比较式&lt;br /&gt;
这里结果0表常数。&amp;lt;br&amp;gt;a!=b -inf,0&amp;lt;br&amp;gt;a==b nan,inf&amp;lt;br&amp;gt;a!=-b inf,0&amp;lt;br&amp;gt;a==-b nan,-inf&lt;br /&gt;
&lt;br /&gt;
a&amp;lt;=b 0,inf,-inf&amp;lt;br&amp;gt;!a&amp;lt;=b nan&amp;lt;br&amp;gt;a&amp;lt;=-b -inf&amp;lt;br&amp;gt;!a&amp;lt;=-b inf,0,nan&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
b==a*0 nan,inf,-inf&amp;lt;br&amp;gt;b!=a*0 0&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a&amp;gt;=b inf&amp;lt;br&amp;gt;!a&amp;gt;=b 0,-inf,nan&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
b&amp;gt;a*0 0&amp;lt;br&amp;gt;a&amp;gt;=b inf&amp;lt;br&amp;gt;!a&amp;gt;=-b nan&amp;lt;br&amp;gt;a&amp;gt;-b 0,inf&amp;lt;br&amp;gt;b&amp;gt;a 0,-inf&amp;lt;br&amp;gt;!b&amp;gt;a inf,nan&amp;lt;br&amp;gt;!a&amp;gt;-b -inf,nan&amp;lt;br&amp;gt;a&amp;gt;=-b 0,inf,-inf&amp;lt;br&amp;gt;!a&amp;gt;=b 0,-inf,nan&amp;lt;br&amp;gt;!b&amp;gt;a*0 inf,-inf,nan&amp;lt;br&amp;gt;该表格兼容1.14不过，使用isResourceLargerThan是过于繁琐的。&amp;lt;br&amp;gt;函数max(a,b) min(a,b)不受此规则影响，且用a&amp;gt;b和a&amp;lt;b进行比较。&lt;br /&gt;
==举例==&lt;br /&gt;
如果只想要Infinity和-Infinity通过，就可以用a&amp;lt;=1/0 and a*0==1/0。&lt;br /&gt;
==其他==&lt;br /&gt;
关于特殊值的表现，请见[[rwsave]]&lt;/div&gt;</summary>
		<author><name>N9tank</name></author>
	</entry>
</feed>