Google

Go to the first, previous, next, last section, table of contents.


ntype

ntype(num)
:: num (数) の 型 (整数) を返す.
return
自然数
obj
  • 数の型の値は次の通り.
    0
    有理数
    1
    倍精度浮動小数
    2
    代数的数
    3
    任意精度浮動小数 (bigfloat)
    4
    複素数
    5
    有限体の元
    6
    大標数素体の元
    7
    標数 2 の有限体の元
  • newalg(x^2+1) で生成した数と, 虚数単位 @i は, 異なるものとして扱われる.
  • 代数的数に関しては, See section 代数的数に関する演算.
[0] [10/37,ntype(10/37)];
[10/37,0]
[1] [10.0/37.0,ntype(10.0/37.0)];
[0.27027,1]
[2] [newalg(x^2+1)+1,ntype(newalg(x^2+1)+1)];
[(#0+1),2]
[3] [eval(sin(@pi/6)),ntype(eval(sin(@pi/6)))];
[0.49999999999999999991,3]
[4] [@i+1,ntype(@i+1)];
[(1+1*@i),4]
参照
section type.


Go to the first, previous, next, last section, table of contents.