"Integer.MAX VALUE"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
 
6번째 줄: 6번째 줄:
* Integer.MAX_VALUE
* Integer.MAX_VALUE
* 2147483647
* 2147483647
<source lang='java'>
<syntaxhighlight lang='java'>
public class MyClass {
public class MyClass {
     public static void main(String args[]) {
     public static void main(String args[]) {
12번째 줄: 12번째 줄:
     }
     }
}
}
</source>
</syntaxhighlight>


==PHP==
==PHP==
20번째 줄: 20번째 줄:
* 9223372036854775807
* 9223372036854775807
* 0x7fffffffffffffff  
* 0x7fffffffffffffff  
<source lang='php'>
<syntaxhighlight lang='php'>
<?php
<?php
var_dump( PHP_INT_MAX );
var_dump( PHP_INT_MAX );
36번째 줄: 36번째 줄:
var_dump( 0x7fffffffffffffff + 1 );
var_dump( 0x7fffffffffffffff + 1 );
# float(9.2233720368548E+18)
# float(9.2233720368548E+18)
</source>
</syntaxhighlight>


==Python==
==Python==
[[분류: Python]]
[[분류: Python]]
* unbounded
* unbounded
<source lang='python'>
<syntaxhighlight lang='python'>
i = 10 ** 100
i = 10 ** 100
print(type(i))
print(type(i))
47번째 줄: 47번째 줄:
# <class 'int'>
# <class 'int'>
# 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
# 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
</source>
</syntaxhighlight>
<source lang='python'>
<syntaxhighlight lang='python'>
j = 10 ** 200
j = 10 ** 200
print(type(j))
print(type(j))
54번째 줄: 54번째 줄:
<class 'int'>
<class 'int'>
# 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
# 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==
* [[Integer.MIN_VALUE]]
* [[Integer.MIN_VALUE]]
* [[Integer]]
* [[Integer]]

2020년 11월 2일 (월) 02:31 기준 최신판


1 Java[ | ]

  • Integer.MAX_VALUE
  • 2147483647
public class MyClass {
    public static void main(String args[]) {
        System.out.println( Integer.MAX_VALUE ); // 2147483647
    }
}

2 PHP[ | ]

  • PHP_INT_MAX
  • 9223372036854775807
  • 0x7fffffffffffffff
<?php
var_dump( PHP_INT_MAX );
# int(9223372036854775807)
var_dump( PHP_INT_MAX + 1 );
# float(9.2233720368548E+18)

var_dump( 9223372036854775807 );
# int(9223372036854775807)
var_dump( 9223372036854775807 + 1 );
# float(9.2233720368548E+18)

var_dump( 0x7fffffffffffffff );
# int(9223372036854775807)
var_dump( 0x7fffffffffffffff + 1 );
# float(9.2233720368548E+18)

3 Python[ | ]

  • unbounded
i = 10 ** 100
print(type(i))
print(i)
# <class 'int'>
# 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
j = 10 ** 200
print(type(j))
print(j)
<class 'int'>
# 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

4 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}