0是一位数吗0为什么不是一位数最小的一位数
1、首先,介绍了十旅邯佤践进制数的概念。sign ::= ’+’ | ’-’ digit ::= ’0’ | ’1’ | ’2’ | ’3’ | ’4’ | ’5’ | ’6’ | ’7’ | ’8’ | ’9’这里digit指的是10个阿拉伯数字indicator ::= ’e’ | ’E’ digits ::= digit [digit]...这里定义了digits的概念,就是几位数 decimal-part ::= digits ’.’ [digits] | [’.’] digits exponent-part ::= indicator [sign] digits infinity ::= ’Infinity’ | ’Inf’ nan ::= ’NaN’ [digits] | ’sNaN’ [digits]numeric-value ::= decimal-part [exponent-part] | infinitynumeric-string ::= [sign] numeric-value | [sign] nanwhere the characters in the strings accepted for infinity and nan may be in any case.
2、decNumber module这个函数计算数的结构,这里给出了一个计算某个数值是几位数的例子,分别是-1234.50,0和数字负无穷大。Examples:If DECDPUN were 4,如果这个数是-1234.50the value -1234.50 would be encoded with:digits = 6exponent = -2bits = 0x80lsu = {3450, 12}数0的各个参数的值为,这里很明确的指出数0的digits(几位数)是1,the value 0 would be:digits = 1exponent = 0bits = 0x00lsu = {0}–¥ (minus infinity) would be:digits = 1exponent = 0bits = 0xC0lsu = {0}
3、到这里,希望认为0不是一位数的人能意识到,可以认为0是一位数,而且认为0是一位数不是没有道理。