floats 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. ========================
  2. Expression: 1
  3. Object is a number : 1
  4. ========================
  5. Expression: 123
  6. Object is a number : 123
  7. ========================
  8. Expression: 1.23
  9. Object is a number : 1.23
  10. ========================
  11. Expression: 0.123
  12. Object is a number : 0.123
  13. ========================
  14. Expression: 4.
  15. Object is a number : 4
  16. ========================
  17. Expression: .4
  18. Object is a number : 0.4
  19. ========================
  20. Expression: 1.23e3
  21. Object is a number : 1230
  22. ========================
  23. Expression: 1.23e-3
  24. Object is a number : 0.00123
  25. ========================
  26. Expression: 1 div 0
  27. Object is a number : Infinity
  28. ========================
  29. Expression: -1 div 0
  30. Object is a number : -Infinity
  31. ========================
  32. Expression: 0 div 0
  33. Object is a number : NaN
  34. ========================
  35. Expression: 1 div -0
  36. Object is a number : -Infinity
  37. ========================
  38. Expression: (1 div 0) > 0
  39. Object is a Boolean : true
  40. ========================
  41. Expression: (1 div 0) < 0
  42. Object is a Boolean : false
  43. ========================
  44. Expression: (-1 div 0) > 0
  45. Object is a Boolean : false
  46. ========================
  47. Expression: (-1 div 0) < 0
  48. Object is a Boolean : true
  49. ========================
  50. Expression: (0 div 0) > 0
  51. Object is a Boolean : false
  52. ========================
  53. Expression: (0 div 0) < 0
  54. Object is a Boolean : false
  55. ========================
  56. Expression: (1 div -0) > 0
  57. Object is a Boolean : false
  58. ========================
  59. Expression: (1 div -0) < 0
  60. Object is a Boolean : true
  61. ========================
  62. Expression: 0 div 0 = 0 div 0
  63. Object is a Boolean : false
  64. ========================
  65. Expression: 0 div 0 != 0 div 0
  66. Object is a Boolean : true
  67. ========================
  68. Expression: 0 div 0 > 0 div 0
  69. Object is a Boolean : false
  70. ========================
  71. Expression: 0 div 0 < 0 div 0
  72. Object is a Boolean : false
  73. ========================
  74. Expression: 0 div 0 >= 0 div 0
  75. Object is a Boolean : false
  76. ========================
  77. Expression: 0 div 0 <= 0 div 0
  78. Object is a Boolean : false
  79. ========================
  80. Expression: 1 div 0 = -1 div 0
  81. Object is a Boolean : false
  82. ========================
  83. Expression: 1 div 0 != -1 div 0
  84. Object is a Boolean : true
  85. ========================
  86. Expression: 1 div 0 > -1 div 0
  87. Object is a Boolean : true
  88. ========================
  89. Expression: 1 div 0 < -1 div 0
  90. Object is a Boolean : false
  91. ========================
  92. Expression: 1 div 0 >= -1 div 0
  93. Object is a Boolean : true
  94. ========================
  95. Expression: 1 div 0 <= -1 div 0
  96. Object is a Boolean : false
  97. ========================
  98. Expression: 1 div 0 = 1 div 0
  99. Object is a Boolean : true
  100. ========================
  101. Expression: 1 div 0 != 1 div 0
  102. Object is a Boolean : false
  103. ========================
  104. Expression: 1 div 0 > 1 div 0
  105. Object is a Boolean : false
  106. ========================
  107. Expression: 1 div 0 < 1 div 0
  108. Object is a Boolean : false
  109. ========================
  110. Expression: 1 div 0 >= -1 div 0
  111. Object is a Boolean : true
  112. ========================
  113. Expression: 1 div 0 <= -1 div 0
  114. Object is a Boolean : false
  115. ========================
  116. Expression: -2 div 0 = -1 div 0
  117. Object is a Boolean : true
  118. ========================
  119. Expression: 1 div floor(0.1)
  120. Object is a number : Infinity
  121. ========================
  122. Expression: 1 div floor(-0.1)
  123. Object is a number : -1
  124. ========================
  125. Expression: 1 div floor(-0)
  126. Object is a number : -Infinity
  127. ========================
  128. Expression: 1 div floor(0)
  129. Object is a number : Infinity
  130. ========================
  131. Expression: 1 div ceiling(0.1)
  132. Object is a number : 1
  133. ========================
  134. Expression: 1 div ceiling(-0.1)
  135. Object is a number : -Infinity
  136. ========================
  137. Expression: 1 div ceiling(-0)
  138. Object is a number : -Infinity
  139. ========================
  140. Expression: 1 div ceiling(0)
  141. Object is a number : Infinity
  142. ========================
  143. Expression: 1 div round(0.1)
  144. Object is a number : Infinity
  145. ========================
  146. Expression: 1 div round(-0.1)
  147. Object is a number : -Infinity
  148. ========================
  149. Expression: 1 div round(-0)
  150. Object is a number : -Infinity
  151. ========================
  152. Expression: 1 div round(0)
  153. Object is a number : Infinity
  154. ========================
  155. Expression: 1 div number('f')
  156. Object is a number : NaN
  157. ========================
  158. Expression: number('f') div 1
  159. Object is a number : NaN
  160. ========================
  161. Expression: 1 div (1 div 0)
  162. Object is a number : 0
  163. ========================
  164. Expression: (1 div 0) div 1
  165. Object is a number : Infinity
  166. ========================
  167. Expression: -(1 div 0) div 1
  168. Object is a number : -Infinity
  169. ========================
  170. Expression: 5 mod 2
  171. Object is a number : 1
  172. ========================
  173. Expression: 5 mod -2
  174. Object is a number : 1
  175. ========================
  176. Expression: -5 mod 2
  177. Object is a number : -1
  178. ========================
  179. Expression: -5 mod -2
  180. Object is a number : -1
  181. ========================
  182. Expression: 8 mod 3 = 2
  183. Object is a Boolean : true