数值缺陷
与数值编码错误相关的缺陷,如除以零、类型转换、负移位运算、数学标准库等
这些缺陷是与代码中的变量及其值、数据类型以及用法相关的错误。这些缺陷包括:
数学运算
转换溢出
运算溢出
Polyspace 结果
对负值执行按位运算 | 对负值执行按位运算的未定义行为 |
整数常量溢出 | Constant value falls outside range of integer data type |
整数转换溢出 | 在整数类型之间转换时发生溢出 |
整数除以零 | Dividing integer number by zero |
整数溢出 | Overflow from operation between integers |
超出整数精度 | Operation using integer size instead of precision can cause undefined behavior |
无效的标准库整数例程使用 | Wrong arguments to standard library function |
可能无效的布尔操作数运算 | Operation can exceed precision of Boolean operand or result in arbitrary value |
从整数转换为浮点数的精度损失 | 在将整数转换为浮点数类型时丢失的最低有效位 |
移位操作的右操作数超出允许范围 | Overflow from shifting operation |
负值移位 | Shift operator on negative value |
符号变化整数转换溢出 | Overflow when converting between signed and unsigned integers |
无符号整数转换溢出 | 在不同无符号整数类型之间转换时发生溢出 |
无符号整数溢出 | Overflow from operation between unsigned integers |
无符号整数常量溢出 | Constant value falls outside range of unsigned integer data type |
对数值使用纯字符类型 | Plain char variable in arithmetic operation without explicit
signedness |
浮点操作数被吸收 | One addition or subtraction operand is absorbed by the other operand |
浮点数转换溢出 | Overflow when converting between floating point data types |
浮点数除以零 | Dividing floating point number by zero |
浮点溢出 | Overflow from operation between floating points |
无效的标准库浮点例程使用 | Wrong arguments to standard library function |
主题
- Bug Finder 缺陷组
Bug Finder 的缺陷检查项分为数据流、并发、数值等分组。
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)