Julia 中文文档"00111111101000000000000000000000" julia> bitstring(nextfloat(x)) "00111111101000000000000000000001" 这个例子体现了一般原则,即相邻可表示的浮点数也有着相邻的二进制整数表示。 舍入模式 一个数如果没有精确的浮点表示,就必须被舍入到一个合适的可表示的值。然而,如果想的话,可 以根据舍入模式改变舍入的方式,如 IEEE 754 typeof(ans) Rational{Int32} 对于大多数用户定义的类型,最好要求程序员明确地向构造函数提供期待的类型,但有时,尤其是 对于数值问题,自动进行类型提升会很方便。 定义类型提升规则 虽然原则上可以直接为 promote 函数定义方法,但这需要为参数类型的所有可能排列下许多冗余的 定义。相反地,promote 的行为是根据名为 promote_rule 的辅助函数定义的,该辅助函数可以为其 同,运行时系统无法正确处理对 eval 的调用,所以不允许这样做。 理解 @generated 函数与方法的重定义间如何相互作用也很重要。遵循正确的 @generated 函数不能观 察任何可变状态或导致全局状态的任何更改的原则,我们看到以下行为。观察到,生成函数不能调 用在生成函数本身的定义之前未定义的任何方法。 一开始 f(x) 有一个定义 19.6. 生成函数 207 julia> f(x) = "original0 码力 | 1238 页 | 4.59 MB | 1 年前3
Julia v1.2.0 Documentationthe enclosing scope can be "captured" in the inner func�on. For example, sum(p[i] - q[i] for i=1:n) cap- tures the three variables p, q and n from the enclosing scope. Captured variables can present performance substan�ally reorganizes the above code by extrac�ng the inner func�on to a separate code block. "Cap- tured" variables such as r that are shared by inner func�ons and their enclosing scope are also extracted U+02226 \nparallel Not Parallel To U+02227 \wedge Logical And U+02228 \vee Logical Or U+02229 ∩ \cap Intersec�on U+0222A \cup Union U+0222B ∫ \int Integral U+0222C \iint Double Integral U+0222D \iiint0 码力 | 1250 页 | 4.29 MB | 1 年前3
Julia v1.1.1 Documentationthe enclosing scope can be "captured" in the inner func�on. For example, sum(p[i] - q[i] for i=1:n) cap- tures the three variables p, q and n from the enclosing scope. Captured variables can present performance substan�ally reorganizes the above code by extrac�ng the inner func�on to a separate code block. "Cap- tured" variables such as r that are shared by inner func�ons and their enclosing scope are also extracted U+02226 \nparallel Not Parallel To U+02227 \wedge Logical And U+02228 \vee Logical Or U+02229 ∩ \cap Intersec�on U+0222A \cup Union U+0222B ∫ \int Integral U+0222C \iint Double Integral U+0222D \iiint0 码力 | 1216 页 | 4.21 MB | 1 年前3
Julia 1.1.0 Documentationthe enclosing scope can be "captured" in the inner func�on. For example, sum(p[i] - q[i] for i=1:n) cap- tures the three variables p, q and n from the enclosing scope. Captured variables can present performance substan�ally reorganizes the above code by extrac�ng the inner func�on to a separate code block. "Cap- tured" variables such as r that are shared by inner func�ons and their enclosing scope are also extracted U+02226 \nparallel Not Parallel To U+02227 \wedge Logical And U+02228 \vee Logical Or U+02229 ∩ \cap Intersec�on U+0222A \cup Union U+0222B ∫ \int Integral U+0222C \iint Double Integral U+0222D \iiint0 码力 | 1214 页 | 4.21 MB | 1 年前3
Julia 1.2.0 DEV Documentationthe enclosing scope can be "captured" in the inner func�on. For example, sum(p[i] - q[i] for i=1:n) cap- tures the three variables p, q and n from the enclosing scope. Captured variables can present performance substan�ally reorganizes the above code by extrac�ng the inner func�on to a separate code block. "Cap- tured" variables such as r that are shared by inner func�ons and their enclosing scope are also extracted U+02226 \nparallel Not Parallel To U+02227 \wedge Logical And U+02228 \vee Logical Or U+02229 ∩ \cap Intersec�on U+0222A \cup Union U+0222B ∫ \int Integral U+0222C \iint Double Integral U+0222D \iiint0 码力 | 1252 页 | 4.28 MB | 1 年前3
Julia 1.8.0 DEV Documentation∦ \nparallel Not Parallel To U+02227 ∧ \wedge Logical And U+02228 ∨ \vee Logical Or U+02229 ∩ \cap Intersection U+0222A ∪ \cup Union U+0222B ∫ \int Integral U+0222C ∬ \iint Double Integral U+0222D Image Of Or Equal To U+02292 ⊒ \sqsupseteq Square Original Of Or Equal To U+02293 ⊓ \sqcap Square Cap U+02294 ⊔ \sqcup Square Cup U+02295 ⊕ \oplus Circled Plus U+02296 ⊖ \ominus Circled Minus U+02297 Curly Logical And U+022D0 ⋐ \Subset Double Subset U+022D1 ⋑ \Supset Double Superset U+022D2 ⋒ \Cap Double Intersection U+022D3 ⋓ \Cup Double Union U+022D4 ⋔ \pitchfork Pitchfork U+022D5 ⋕ \equalparallel0 码力 | 1463 页 | 5.01 MB | 1 年前3
Julia v1.3.1 Documentationthe enclosing scope can be "captured" in the inner func�on. For example, sum(p[i] - q[i] for i=1:n) cap- tures the three variables p, q and n from the enclosing scope. Captured variables can present performance substan�ally reorganizes the above code by extrac�ng the inner func�on to a separate code block. "Cap- tured" variables such as r that are shared by inner func�ons and their enclosing scope are also extracted U+02226 \nparallel Not Parallel To U+02227 \wedge Logical And U+02228 \vee Logical Or U+02229 ∩ \cap Intersec�on U+0222A \cup Union U+0222B ∫ \int Integral U+0222C \iint Double Integral U+0222D \iiint0 码力 | 1276 页 | 4.36 MB | 1 年前3
Julia 1.3.0 DEV Documentationthe enclosing scope can be "captured" in the inner func�on. For example, sum(p[i] - q[i] for i=1:n) cap- tures the three variables p, q and n from the enclosing scope. Captured variables can present performance substan�ally reorganizes the above code by extrac�ng the inner func�on to a separate code block. "Cap- tured" variables such as r that are shared by inner func�ons and their enclosing scope are also extracted U+02226 \nparallel Not Parallel To U+02227 \wedge Logical And U+02228 \vee Logical Or U+02229 ∩ \cap Intersec�on U+0222A \cup Union U+0222B ∫ \int Integral U+0222C \iint Double Integral U+0222D \iiint0 码力 | 1274 页 | 4.36 MB | 1 年前3
Julia v1.8.5 Documentation∦ \nparallel Not Parallel To U+02227 ∧ \wedge Logical And U+02228 ∨ \vee Logical Or U+02229 ∩ \cap Intersection U+0222A ∪ \cup Union U+0222B ∫ \int Integral U+0222C ∬ \iint Double Integral U+0222D Image Of Or Equal To U+02292 ⊒ \sqsupseteq Square Original Of Or Equal To U+02293 ⊓ \sqcap Square Cap U+02294 ⊔ \sqcup Square Cup U+02295 ⊕ \oplus Circled Plus U+02296 ⊖ \ominus Circled Minus U+02297 Curly Logical And U+022D0 ⋐ \Subset Double Subset U+022D1 ⋑ \Supset Double Superset U+022D2 ⋒ \Cap Double Intersection U+022D3 ⋓ \Cup Double Union U+022D4 ⋔ \pitchfork Pitchfork U+022D5 ⋕ \equalparallel0 码力 | 1565 页 | 5.04 MB | 1 年前3
Julia v1.9.4 Documentation∦ \nparallel Not Parallel To U+02227 ∧ \wedge Logical And U+02228 ∨ \vee Logical Or U+02229 ∩ \cap Intersection U+0222A ∪ \cup Union U+0222B ∫ \int Integral U+0222C ∬ \iint Double Integral U+0222D Image Of Or Equal To U+02292 ⊒ \sqsupseteq Square Original Of Or Equal To U+02293 ⊓ \sqcap Square Cap U+02294 ⊔ \sqcup Square Cup U+02295 ⊕ \oplus Circled Plus U+02296 ⊖ \ominus Circled Minus U+02297 Curly Logical And U+022D0 ⋐ \Subset Double Subset U+022D1 ⋑ \Supset Double Superset U+022D2 ⋒ \Cap Double Intersection U+022D3 ⋓ \Cup Double Union U+022D4 ⋔ \pitchfork Pitchfork U+022D5 ⋕ \equalparallel0 码力 | 1644 页 | 5.27 MB | 1 年前3
共 87 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9













