Is it possible to get more than 100 decimal digits in C#? If yes what is the necessary portion of code? In Java there something call BigDecimal but it still can't reach more than 55 digits.
float num = 0.12438f;
int thirdDecimal = (int)(Math.abs(num) * Math.pow(10,3)) % 10; // 4 sayısı gelir
int fifthDecimal = (int)(Math.abs(num) * Math.pow(10,4)) % 10; // 3 sayısı gelir
int ellinci = (int)(Math.abs(num) * Math.pow(10,50)) % 10; // 50. sayı gelir
C#:
float num = 0.12438;
int thirdDecimal = (((int)((Math.abs(num) * Math.pow(10, 3)))) % 10); // 4 sayısı
int fifthDecimal = (((int)((Math.abs(num) * Math.pow(10, 4)))) % 10); // 3 sayısı
How can I get the Nth digit after the decimal point, using Java? For example: If the decimal number is 64890.1527, then: 1st digit is 1 2nd digit is 5 3rd digit is 2 and so on ..
float num = 0.12438f;
int thirdDecimal = (int)(Math.abs(num) * Math.pow(10,3)) % 10; // 4 sayısı gelir
int fifthDecimal = (int)(Math.abs(num) * Math.pow(10,4)) % 10; // 3 sayısı gelir
How can I get the Nth digit after the decimal point, using Java? For example: If the decimal number is 64890.1527, then: 1st digit is 1 2nd digit is 5 3rd digit is 2 and so on ..