2 ms·
Try creating that number is several languages. #/usr/bin/python n = 1.0000000000000000000000000000001 print n # 1.0 //Javascript n = 1.00000000000000000000000
by neoeldex 11y ago
Try creating that number is several languages.
#/usr/bin/python
n = 1.0000000000000000000000000000001
print n # 1.0
//Javascript
n = 1.0000000000000000000000000000001;
console.log(n); // 1
- icebraining 11y agofrom decimal import Decimal n = Decimal("1.0000000000000000000000000000001") just because float is the default, doesn't mean you have to use it. JSON doesn't have anything else, though.
- orless 11y agoJSON does not have float (nor double) either. JSON has JSONNumber.