Questions tagged as 'bigdecimal'

1
answer

Doubt with decimals Android (BigDecimal)

When I make an account to get the % of a number, I have a problem, I explain: I take 5% out of 7.74 and it's 0.3870 but I want you to only show me two numbers in the decimal part, that is < strong> 0.38 How can I do this? And anoth...
asked by 19.05.2017 / 15:59
1
answer

Correct way to show money

I am starting to work on a system that manages money, for the amounts I use the BigDecimal data type, however I have encountered some problems when generating invoices for the final client, since the invoices only have 2 decimals, therefore:...
asked by 05.08.2017 / 00:06
3
answers

Even using BigDecimal I have problems with rounding

Why should I use BigDecimal in this case, I do not get the expected result? double value1 = 5.68; double value2 = 2.45; System.out.println(BigDecimal.valueOf(value1 + value2)); DEPARTURE: 8.129999999999999 EXPECTED: 8.13     
asked by 16.12.2015 / 16:20
3
answers

How can I get decimal points in java?

I need to show the user an amount to pay, but the result returned is the following 1700.292 , the user will find it an error. You need to show the exact amount separated by points - > 1,700,292    Correct result: 1,700,292       Erron...
asked by 23.03.2018 / 04:13
1
answer

Integer numbers in pandas python "dataframe"

I import a document to jupiter and enter normal with whole numbers, I apply a formula to group, add and then subtract and the product leaves all the numbers with decimals and exponentials. How do I get only whole numbers ??? ::::::: attach...
asked by 12.04.2018 / 00:25
1
answer

BigDecimal Round UP OR DOWN

I have these two scenarios working with bigdecimal: BigDecimal result; escenario 1: result = 19315859.60145000000000 ---[should be]--> 19315859.6014 escenario 2: result = 66841687.43665000000000 ---[should be]--> 66841687.4367 The p...
asked by 18.12.2016 / 18:38
1
answer

How to remove deciales in React Native

How can I remove decimal in react native ?? this is the calculation calculateSum = () => { const { peso, altura } = this.state; this.setState({ imc: (Number(peso) / (Number(altura)*Number(altura))) * 10000 }); } shows me for example...
asked by 01.11.2017 / 22:32