javascript中的十进制浮点文字语法

时间:2015-08-05 11:35:26

标签: javascript java

在java中,

十进制浮点文字(FPL)可以是十进制FPL 十六进制FPL

十进制FPL >>> import nltk >>> text = "Hello, this is my sentence. It is a very basic sentence with not much information in it" >>> tokenized_text = nltk.word_tokenize(text) >>> stopwords = nltk.corpus.stopwords.words('english') >>> filtered_tokenized_text = [word for word in tokenized_text if word not in stopwords] >>> filtered_word_freq = nltk.FreqDist(filtered_tokenized_text) >>> filtered_word_freq FreqDist({'sentence': 2, 'information': 1, ',': 1, 'It': 1, '.': 1, 'much': 1, 'basic': 1, 'Hello': 1}) 组成,  其中<digits>.<digits><ExponentPart><f|F|d|D><ExponentPart>组成(符号是可选的)。

十六进制FPL <e|E><+|-><digits>组成,<0x|0X><HexDigits><.><HexDigits><BinaryExponent><f|F|d|D><BinaryExponent><P|p><+|-><digits>(符号为可选)。

javascript中的FPL表示法是什么?

注意:JS中的初学者

1 个答案:

答案 0 :(得分:0)

在Javascript中,没有正式类型floating-point number只有Number类型。 Number可以有分数。

来自ecmascript 2015 standard

  

DecimalLiteral ::

     

DecimalIntegerLiteral。 DecimalDigits(opt)ExponentPart(opt)   。 DecimalDigits ExponentPart(opt)   DecimalIntegerLiteral ExponentPart(opt)

相关问题