Javascript에는 정수가 없고 64비트 부동 소수점만 있으며 부동 소수점 정밀도가 부족합니다.
Java에서 유사한 문제를 참조하십시오 . Double.parseDouble이 9999999999999999를 10000000000000000으로 만드는 이유는 무엇입니까?
why is the Double.parseDouble making 9999999999999999 to 10000000000000000?
why is the Double.parseDouble making 9999999999999999 to 10000000000000000 ? For Example : Double d =Double.parseDouble("9999999999999999"); String b= new DecimalFormat("#.##").format(d); System.out.
stackoverflow.com
Why is 9999999999999999 converted to 10000000000000000 in JavaScript?
Can any one explain to me why 9999999999999999 is converted to 10000000000000000? alert(9999999999999999); //10000000000000000 http://jsfiddle.net/Y2Vb2/
stackoverflow.com
'coding > js' 카테고리의 다른 글
amChart dispose 중요성과 dispose 순서의 중요성. (0) | 2023.03.20 |
---|---|
자바스크립트 for loop 속도 비교 (0) | 2023.02.07 |
js 정밀도 계산 (0) | 2023.02.06 |
video.js 설명을 잘 한 블로그 링크 (0) | 2023.02.03 |
[jQuery] $(document).ready() 와 $(window).on("load") (0) | 2023.02.03 |